ColorButton
Object Hierarchy:
Description:
[
CCode ( type_id =
"gtk_color_button_get_type ()" ) ]
public class ColorButton :
Button,
Implementor,
Actionable,
Activatable,
Buildable,
ColorChooser
The ColorButton is a button which displays the currently selected color and allows to open a color selection
dialog to change the color.
It is suitable widget for selecting a color in a preference dialog.
CSS nodes
GtkColorButton has a single CSS node with name button. To differentiate it from a plain Button
, it gets the .color style class.
Content:
Properties:
- public uint alpha { get; set; }
The selected opacity value (0 fully transparent, 65535 fully opaque).
- public Color color { owned get; set; }
The selected color.
- public bool show_editor { get; set; }
Set this property to true to skip
the palette in the dialog and go directly to the color editor.
- public string title { get; set; }
The title of the color selection dialog
- public bool use_alpha { get; set; }
Creation methods:
Methods:
- public uint16 get_alpha ()
Returns the current alpha value.
- public void get_color (out Color color)
Sets color
to be the current color in the
ColorButton widget.
- public unowned string get_title ()
Gets the title of the color selection dialog.
- public bool get_use_alpha ()
Does the color selection dialog use the alpha channel ?
- public void set_alpha (uint16 alpha)
Sets the current opacity to be alpha
.
- public void set_color (Color color)
Sets the current color to be color
.
- public void set_title (string title)
Sets the title for the color selection dialog.
- public void set_use_alpha (bool use_alpha)
Sets whether or not the color button should use the alpha channel.
Signals:
Inherited Members:
All known members inherited from class Gtk.Button
All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Container
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Actionable
All known members inherited from interface Gtk.Activatable
All known members inherited from interface Gtk.Buildable
All known members inherited from interface Gtk.ColorChooser