Class: Reflexion::MainWindow
- Inherits:
-
Window
- Object
- Window
- Reflexion::MainWindow
- Defined in:
- lib/reflexion.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Instance Method Summary collapse
- #call_event(event, *args, &block) ⇒ Object
-
#initialize(*args, &block) ⇒ MainWindow
constructor
A new instance of MainWindow.
- #on_draw(e) ⇒ Object
- #on_key(e) ⇒ Object
- #on_pointer(e) ⇒ Object
- #on_update(e) ⇒ Object
Constructor Details
#initialize(*args, &block) ⇒ MainWindow
Returns a new instance of MainWindow.
25 26 27 28 29 |
# File 'lib/reflexion.rb', line 25 def initialize (*args, &block) super $window = self call_event nil, self, &$setup end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
23 24 25 |
# File 'lib/reflexion.rb', line 23 def event @event end |
Instance Method Details
#call_event(event, *args, &block) ⇒ Object
52 53 54 55 |
# File 'lib/reflexion.rb', line 52 def call_event (event, *args, &block) @event = event Xot::BlockUtil.instance_eval_or_block_call *args, &block if block end |
#on_draw(e) ⇒ Object
37 38 39 40 |
# File 'lib/reflexion.rb', line 37 def on_draw (e) super call_event e, e.painter, &$draw end |
#on_key(e) ⇒ Object
42 43 44 45 |
# File 'lib/reflexion.rb', line 42 def on_key (e) super call_event e, e, &$key end |
#on_pointer(e) ⇒ Object
47 48 49 50 |
# File 'lib/reflexion.rb', line 47 def on_pointer (e) super call_event e, e, &$pointer end |
#on_update(e) ⇒ Object
31 32 33 34 35 |
# File 'lib/reflexion.rb', line 31 def on_update (e) super redraw call_event e, e, &$update end |