Class: Context::Gtk::App

Inherits:
Context show all
Defined in:
lib/Context/Gtk/App.rb

Instance Attribute Summary collapse

Attributes inherited from Context

#mainView, #parent, #viewBridge

Instance Method Summary collapse

Methods inherited from Context

#addView, #createViews, #destroyViews, #isEntered?, #onExit, #peekAtView, #setupViews

Constructor Details

#initialize(namespace, context) ⇒ App

Returns a new instance of 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

#mainContextObject (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

#enterObject



18
19
20
21
22
# File 'lib/Context/Gtk/App.rb', line 18

def enter
	super(nil)
	@mainContext.enter(self)
	Gtk.main
end

#exitObject



24
25
26
27
# File 'lib/Context/Gtk/App.rb', line 24

def exit
	super()
	Gtk.main_quit
end