Module: WxExtensions::ToolBar

Defined in:
lib/reactive-wx/wx_ext/toolbar.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:



3
4
5
6
7
# File 'lib/reactive-wx/wx_ext/toolbar.rb', line 3

def self.included(base) #:nodoc:
  base.send :alias_method_chain, :initialize, :extension
  base.send :alias_method_chain, :add_tool, :extension
  base.send :alias_method_chain, :add_check_tool, :extension
end

Instance Method Details

#add_check_tool_with_extension(*args, &block) ⇒ Object



23
24
25
26
27
# File 'lib/reactive-wx/wx_ext/toolbar.rb', line 23

def add_check_tool_with_extension(*args, &block)
  id = add_check_tool_without_extension(*args)
  evt_tool(id, &block) if block
  id
end

#add_tool_with_extension(*args, &block) ⇒ Object



17
18
19
20
21
# File 'lib/reactive-wx/wx_ext/toolbar.rb', line 17

def add_tool_with_extension(*args, &block)
  id = add_tool_without_extension(*args)
  evt_tool(id, &block) if block
  id
end

#initialize_with_extension(*args) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/reactive-wx/wx_ext/toolbar.rb', line 9

def initialize_with_extension(*args)
  initialize_without_extension(*args)
  if block_given?
    yield self
    realize
  end
end