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
Returns a new instance of App.
10 11 12 13 14 15 |
# File 'lib/Context/Gtk/App.rb', line 10 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.
8 9 10 |
# File 'lib/Context/Gtk/App.rb', line 8 def mainContext @mainContext end |
Instance Method Details
#enter ⇒ Object
17 18 19 20 21 |
# File 'lib/Context/Gtk/App.rb', line 17 def enter super(nil) @mainContext.enter(self) Gtk.main end |
#exit ⇒ Object
23 24 25 26 |
# File 'lib/Context/Gtk/App.rb', line 23 def exit super() Gtk.main_quit end |