Class: Reflexion::MainWindow

Inherits:
Window
  • Object
show all
Defined in:
lib/reflexion.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ MainWindow

Returns a new instance of MainWindow.



39
40
41
42
43
# File 'lib/reflexion.rb', line 39

def initialize(*args, &block)
  super
  $window = self
  call_event nil, self, &$setup
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



37
38
39
# File 'lib/reflexion.rb', line 37

def event
  @event
end

Instance Method Details

#on_draw(e) ⇒ Object



51
52
53
54
# File 'lib/reflexion.rb', line 51

def on_draw(e)
  super
  call_event e, e.painter, &$draw
end

#on_key(e) ⇒ Object



56
57
58
59
# File 'lib/reflexion.rb', line 56

def on_key(e)
  super
  call_event e, e, &$key
end

#on_pointer(e) ⇒ Object



61
62
63
64
# File 'lib/reflexion.rb', line 61

def on_pointer(e)
  super
  call_event e, e, &$pointer
end

#on_update(e) ⇒ Object



45
46
47
48
49
# File 'lib/reflexion.rb', line 45

def on_update(e)
  super
  redraw
  call_event e, e, &$update
end