Class: Minder::HelpFrame
Instance Attribute Summary
Attributes inherited from Frame
#height, #left, #lines, #min_height, #pomodoro_runner, #task_manager, #top, #width, #window
Instance Method Summary collapse
Methods inherited from Frame
#build_window, #erase, #focus, #focused?, #handle_char_keypress, #handle_non_char_keypress, #has_cursor?, #hidden?, #hide, #initialize, #listen, #move, #parse_template, #print_line, #refresh, #resize, #set_cursor_position, #set_text, #unfocus, #unhide, #window_refresh
Constructor Details
This class inherits a constructor from Minder::Frame
Instance Method Details
#desired_height ⇒ Object
24 25 26 |
# File 'lib/minder/cli/help_frame.rb', line 24 def desired_height template.split("\n").length + 2 end |
#handle_keypress(key) ⇒ Object
28 29 30 31 32 |
# File 'lib/minder/cli/help_frame.rb', line 28 def handle_keypress(key) return unless key changed notify_observers(:hide_help) end |
#template ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/minder/cli/help_frame.rb', line 5 def template "Commands: any key to dismiss\n\n(s) start task\n(u) un-start task\n(d) mark task as done\n(x) delete task\n(e) edit task\n(G) go to bottom of list\n(gg) go to top of list\n(/) Search among tasks\n(m) minimize messages frame\n(n) Next search result\n(N) Previous search result\n(?) to view this text\n TEXT\nend\n" |