Class: Lustr4Wx::App

Inherits:
Wx::App
  • Object
show all
Includes:
Lustr::WidgetBase
Defined in:
lib/lustr-wx/app.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#frameObject (readonly)

Returns the value of attribute frame.



27
28
29
# File 'lib/lustr-wx/app.rb', line 27

def frame
  @frame
end

#init_blockObject

Returns the value of attribute init_block.



28
29
30
# File 'lib/lustr-wx/app.rb', line 28

def init_block
  @init_block
end

Instance Method Details

#on_initObject



30
31
32
33
34
35
36
# File 'lib/lustr-wx/app.rb', line 30

def on_init
  self.controller=option(:controller) if option(:controller)
  @frame=Lustr4Wx::Frame.new(nil, -1, option(:title))
  frame.set_client_size(Wx::Size.new(option(:width), option(:height)))
  init_block.call if init_block
  frame.show
end

#resolveObject



38
39
40
# File 'lib/lustr-wx/app.rb', line 38

def resolve
  return frame
end

#showObject



42
43
44
# File 'lib/lustr-wx/app.rb', line 42

def show
  main_loop
end