Synopsis#include <gtk/gtk.h> GtkColorButton; GtkWidget* gtk_color_button_new (void); GtkWidget* gtk_color_button_new_with_color (const GdkColor *color); void gtk_color_button_set_color (GtkColorButton *color_button, const GdkColor *color); void gtk_color_button_get_color (GtkColorButton *color_button, GdkColor *color); void gtk_color_button_set_alpha (GtkColorButton *color_button, guint16 alpha); guint16 gtk_color_button_get_alpha (GtkColorButton *color_button); void gtk_color_button_set_use_alpha (GtkColorButton *color_button, gboolean use_alpha); gboolean gtk_color_button_get_use_alpha (GtkColorButton *color_button); void gtk_color_button_set_title (GtkColorButton *color_button, const gchar *title); const gchar* gtk_color_button_get_title (GtkColorButton *color_button); Object HierarchyGObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkButton +----GtkColorButton Properties"alpha" guint : Read / Write "color" GdkColor* : Read / Write "title" gchar* : Read / Write "use-alpha" gboolean : Read / Write DescriptionThe GtkColorButton is a button which displays the currently selected color an allows to open a color selection dialog to change the color. It is suitable widget for selecting a color in a preference dialog. DetailsGtkColorButtontypedef struct _GtkColorButton GtkColorButton; The GtkColorButton struct has only private fields and should not be used directly. gtk_color_button_new ()GtkWidget* gtk_color_button_new (void); Creates a new color button. This returns a widget in the form of a small button containing a swatch representing the current selected color. When the button is clicked, a color-selection dialog will open, allowing the user to select a color. The swatch will be updated to reflect the new color when the user finishes.
Since 2.4 gtk_color_button_new_with_color ()GtkWidget* gtk_color_button_new_with_color (const GdkColor *color); Creates a new color button.
Since 2.4 gtk_color_button_set_color ()void gtk_color_button_set_color (GtkColorButton *color_button, const GdkColor *color);
Sets the current color to be
Since 2.4 gtk_color_button_get_color ()void gtk_color_button_get_color (GtkColorButton *color_button, GdkColor *color);
Sets
Since 2.4 gtk_color_button_set_alpha ()void gtk_color_button_set_alpha (GtkColorButton *color_button, guint16 alpha);
Sets the current opacity to be
Since 2.4 gtk_color_button_get_alpha ()guint16 gtk_color_button_get_alpha (GtkColorButton *color_button); Returns the current alpha value.
Since 2.4 gtk_color_button_set_use_alpha ()void gtk_color_button_set_use_alpha (GtkColorButton *color_button, gboolean use_alpha); Sets whether or not the color button should use the alpha channel.
Since 2.4 gtk_color_button_get_use_alpha ()gboolean gtk_color_button_get_use_alpha (GtkColorButton *color_button); Does the color selection dialog use the alpha channel?
Since 2.4 gtk_color_button_set_title ()void gtk_color_button_set_title (GtkColorButton *color_button, const gchar *title); Sets the title for the color selection dialog.
Since 2.4 gtk_color_button_get_title ()const gchar* gtk_color_button_get_title (GtkColorButton *color_button); Gets the title of the color selection dialog.
Since 2.4 Property DetailsThe
|
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
Since 2.4