class Iup::ColorDialog
A predefined modal dialog used for selecting a color.
Example
dlg = Iup::ColorDialog.new do |d| d.title = "select a new color" end dlg.popup p dlg.value # retrieve the selected color
Also see: Iup.get_color
Attributes
If defined, enables alpha selection in dialog. Returns value if user pressed βOKβ.
βm;n;β¦β gives a list of values for the palette.
If set, shows the color table. Values βyesβ / βnoβ.
If set, shows the color table. Values βyesβ / βnoβ.
Shows a help button if help_cb defined. Values βyesβ / βnoβ.
If set, shows a hexadecimal representation of color. Values βyesβ / βnoβ.
Returns β1β if βOKβ pressed, or null.
Initial value for dialog, and return value if βOKβ pressed, as βr g bβ or βr g b aβ.
Initial value for dialog, and return value if βOKβ pressed, as βrrggbbβ.
Initial value for dialog, and return value if βOKβ pressed, as βH S Iβ.
Public Class Methods
Source
# File lib/wrapped/colordialog.rb, line 40 def initialize &block @handle = IupLib.IupColorDlg yield self if block_given? end
Creates a dialog, using the optional block to set its attributes.
Callbacks
Attributes
Action generated when the color is updated in the dialog. Callback must respond to call and take no arguments.