Class: Context::Gtk::App
Instance Attribute Summary collapse
-
#mainContext ⇒ Object
readonly
Returns the value of attribute mainContext.
Attributes inherited from Context
#mainView, #parent, #viewBridge
Instance Method Summary collapse
- #enter ⇒ Object
- #exit ⇒ Object
-
#initialize(namespace, context) ⇒ App
constructor
A new instance of App.
Methods inherited from Context
#addView, #createViews, #destroyViews, #isEntered?, #onExit, #peekAtView, #setupViews
Constructor Details
#initialize(namespace, context) ⇒ App
11 12 13 14 15 16 |
# File 'lib/Context/Gtk/App.rb', line 11 def initialize(namespace, context) viewBridge = Context::Bridge.new(namespace) super(viewBridge) Gtk.init @mainContext = context.new(viewBridge) end |
Instance Attribute Details
#mainContext ⇒ Object (readonly)
Returns the value of attribute mainContext.
9 10 11 |
# File 'lib/Context/Gtk/App.rb', line 9 def mainContext @mainContext end |
Instance Method Details
#enter ⇒ Object
18 19 20 21 22 |
# File 'lib/Context/Gtk/App.rb', line 18 def enter super(nil) @mainContext.enter(self) Gtk.main end |
#exit ⇒ Object
24 25 26 27 |
# File 'lib/Context/Gtk/App.rb', line 24 def exit super() Gtk.main_quit end |