class Iup::ColourDialog

A ColourDialog allows the user to select a colour.

Also see: Iup#get_colour

Attributes

alpha

If defined, enables alpha selection in dialog. Returns value if user pressed 'OK'.

colortable

“m;n;…” gives a list of values for the palette.

parentdialog

This dialog will be always in front of the parent dialog. If the parent is minimized, this dialog is automatically minimized. Important Closing the parent will also close the child, but the child dialog's CLOSE_CB method will not be called.

showalpha

If set, shows the colour table. Values 'yes' / 'no'.

showcolortable

If set, shows the colour table. Values 'yes' / 'no'.

showhelp

Shows a help button if help_cb defined. Values 'yes' / 'no'.

showhex

If set, shows a hexadecimal representation of colour. Values 'yes' / 'no'.

status

read-only Returns '1' if 'OK' pressed, or null.

title

Title text for the dialog.

value

Initial value for dialog, and return value if 'OK' pressed, as 'r g b' or 'r g b a'.

valuehex

Initial value for dialog, and return value if 'OK' pressed, as 'rrggbb'.

valuehsi

Initial value for dialog, and return value if 'OK' pressed, as 'H S I'.

Public Class Methods

new(&block) click to toggle source

Creates a dialog, using the optional block to set its attributes.

# File lib/wrapped/colourdialog.rb, line 32
def initialize &block
  @handle = IupLib.IupColorDlg

  self.instance_eval &block if block_given?
end

Public Instance Methods

popup(x=0, y=0) click to toggle source

Shows the dialog at position x, y.