Method: Gtk::ToolButton#initialize

Defined in:
lib/gtk3/tool-button.rb

#initialize(options = {}) ⇒ ToolButton

Returns a new instance of ToolButton.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/gtk3/tool-button.rb', line 20

def initialize(options={})
  icon_widget = options[:icon_widget]
  label       = options[:label]
  stock_id    = options[:stock_id]

  if icon_widget
    initialize_new(icon_widget)
  elsif stock_id
    initialize_new_from_stock(stock_id)
  else
    initialize_new
  end

  set_label(label) if label
end