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.



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

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

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



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

def event
  @event
end

Instance Method Details

#on_draw(e) ⇒ Object



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

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

#on_key(e) ⇒ Object



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

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

#on_pointer(e) ⇒ Object



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

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

#on_update(e) ⇒ Object



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

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