Class: Context::Gtk::PageView

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

Defined Under Namespace

Classes: MainWindow

Instance Attribute Summary collapse

Attributes inherited from View

#context

Instance Method Summary collapse

Methods inherited from PageView

#close

Methods inherited from View

#addView, #close, #notifyKey, #removeView

Constructor Details

#initialize(context, title = "No Title") ⇒ PageView

Returns a new instance of PageView.



30
31
32
33
34
35
# File 'lib/Context/Views/Gtk/PageView.rb', line 30

def initialize(context, title="No Title")
	super(context)
	@mainWindow = MainWindow.new(title, self)
	@mainWindow.set_default_size(600, 400)
	@widget = Context::Gtk::Widget.new(@mainWindow)
end

Instance Attribute Details

#mainWindowObject (readonly)

Returns the value of attribute mainWindow.



28
29
30
# File 'lib/Context/Views/Gtk/PageView.rb', line 28

def mainWindow
  @mainWindow
end

Instance Method Details

#emitDestroyEventObject



46
47
48
# File 'lib/Context/Views/Gtk/PageView.rb', line 46

def emitDestroyEvent
	@mainWindow.signal_emit("destroy")
end

#getWidgetObject



42
43
44
# File 'lib/Context/Views/Gtk/PageView.rb', line 42

def getWidget
	@widget
end

#openObject



37
38
39
40
# File 'lib/Context/Views/Gtk/PageView.rb', line 37

def open
	@mainWindow.show_all
	@mainWindow.grab_focus
end