Method: Tk::Tcllib::Widget::ToolbarItem#initialize
- Defined in:
- lib/tkextlib/tcllib/toolbar.rb
#initialize(parent, *args) ⇒ ToolbarItem
Returns a new instance of ToolbarItem.
60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/tkextlib/tcllib/toolbar.rb', line 60 def initialize(parent, *args) @parent = @t = parent @tpath = parent.path @path = @id = @t.tk_send('add', *args) # A same id is rejected by the Tcl function. .mutex.synchronize{ [@id] = self [@tpath] = {} unless [@tpath] [@tpath][@id] = self } end |