Module: Cryptum::Event::Pane
- Defined in:
- lib/cryptum/event/pane.rb
Overview
This Module is used to Switch through Order Plan / Order History Window Panes when the TAB Key is Pressed.
Class Method Summary collapse
-
.help ⇒ Object
Display Usage for this Module.
-
.switch(opts = {}) ⇒ Object
- Supported Method Parameters
-
Cryptum::Event::Pane.switch( ).
-
.toggle_details(opts = {}) ⇒ Object
- Supported Method Parameters
-
Cryptum::Event::Pane.toggle_details( ).
Class Method Details
.help ⇒ Object
Display Usage for this Module
58 59 60 61 62 63 |
# File 'lib/cryptum/event/pane.rb', line 58 public_class_method def self.help puts "USAGE: #{self}.switch() #{self}.toggle_details() " end |
.switch(opts = {}) ⇒ Object
- Supported Method Parameters
-
Cryptum::Event::Pane.switch( )
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cryptum/event/pane.rb', line 12 public_class_method def self.switch(opts = {}) terminal_win = opts[:terminal_win] event_history = opts[:event_history] terminal_win.key_press_event.key_tab = false if event_history.order_plan_win_active event_history.order_plan_win_active = false event_history.order_execute_win_active = true else event_history.order_plan_win_active = true event_history.order_execute_win_active = false end rescue Interrupt, StandardError => e Cryptum::Log.append(level: :error, msg: e, which_self: self) end |
.toggle_details(opts = {}) ⇒ Object
- Supported Method Parameters
-
Cryptum::Event::Pane.toggle_details( )
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/cryptum/event/pane.rb', line 32 public_class_method def self.toggle_details(opts = {}) terminal_win = opts[:terminal_win] event_history = opts[:event_history] terminal_win.key_press_event.key_enter = false if event_history.order_plan_win_active unless event_history.red_pill event_history.order_plan_details_win_active = if event_history.order_plan_details_win_active false else true end end elsif event_history.order_execute_win_active event_history.order_execute_details_win_active = if event_history.order_execute_details_win_active false else true end end rescue Interrupt, StandardError => e Cryptum::Log.append(level: :error, msg: e, which_self: self, event_history: event_history) end |