Class: JLDrill::Gtk::CommandView

Inherits:
RunCommandContext::CommandView show all
Defined in:
lib/jldrill/views/gtk/CommandView.rb,
lib/jldrill/views/gtk/widgets/MenuWidget.rb,
lib/jldrill/views/gtk/widgets/ToolBarWidget.rb

Defined Under Namespace

Classes: Menu, ReviewModeButton, ToolBar

Instance Attribute Summary

Attributes inherited from Context::View

#context

Instance Method Summary collapse

Methods inherited from Context::View

#addView, #removeView, #removingViewFrom, #viewAddedTo

Constructor Details

#initialize(context) ⇒ CommandView

Returns a new instance of CommandView.



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/jldrill/views/gtk/CommandView.rb', line 13

def initialize(context)
          super(context)
          @vbox = Context::Gtk::VBox.new
          @menu = Menu.new(self)
          @toolbar = ToolBar.new(self)
          @vbox.pack_start(@menu, false, false)
          @vbox.pack_start(@toolbar, false, false)
	@vbox.afterWidgetIsAdded do |container|
	    container.gtkWidgetMainWindow.add_accel_group(@menu.accelGroup)
	end
	@vbox.expandWidgetWidth
end

Instance Method Details

#getWidgetObject



26
27
28
# File 'lib/jldrill/views/gtk/CommandView.rb', line 26

def getWidget
	@vbox
end

#updateObject



30
31
32
# File 'lib/jldrill/views/gtk/CommandView.rb', line 30

def update
    @toolbar.update
end