class Iup::Text

A text control is one of the more complex controls, because it can be displayed in a variety of ways:

(1) a single line, for inputting a single line of text.

Iup::Text.new do |t|
  t.expand = 'horizontal'
end

(2) a multi-line control, to act more like an editor.

Iup::Text.new do |t|
  t.multiline = 'yes'
  t.expand = 'yes'
  t.size = '200x100'
end

(3) a spin box, for selecting one of several values: this example supports the range 10 to 20 and reports the current value as it changes.

Iup::Text.new do |t|
  t.spin = 'yes'
  t.spinmax = 20
  t.spinmin = 10
  t.expand = 'horizontal'
  t.spin_cb = ->(v){
    puts "spin control is now #{v}"
    Iup::DEFAULT
  }
end