Method: Gtk::ToggleButton#initialize

Defined in:
lib/gtk4/toggle-button.rb

#initialize(options = {}) ⇒ ToggleButton

Returns a new instance of ToggleButton.



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

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

  if label
    if use_underline
      initialize_new_with_mnemonic(label)
    else
      initialize_new_with_label(label)
    end
  else
    initialize_raw
  end
end