class Iup::Toggle

A control that can have two or three states, and displays either some text or an image.

Example

(1) with text label

Iup::Toggle.new('click to change')

(2) with a standard image, reporting changes to value

Iup::Toggle.new do |t|
  t.image = "IUP_MessageHelp"
  t.valuechanged_cb = ->{ puts "button 1 state #{toggle1.value}" }
end