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 <<-TEXT Commands: any key to dismiss (s) start task (u) un-start task (d) mark task as done (x) delete task (e) edit task (G) go to bottom of list (gg) go to top of list (/) Search among tasks (m) minimize messages frame (n) Next search result (N) Previous search result (?) to view this text TEXT end |