HeColorButton

HeColorButton — A widget to open HeColorDialog

Synopsis

                    HeColorButtonPrivate;
                    HeColorButton;
GtkWidget*          he_color_button_new                 (void);
GtkWidget*          he_color_button_new_with_color      (const GdkColor *color);
void                he_color_button_get_color           (HeColorButton *cb,
                                                         GdkColor *color);
void                he_color_button_set_color           (HeColorButton *cb,
                                                         const GdkColor *color);
gboolean            he_color_button_get_popup_shown     (HeColorButton *cb);
void                he_color_button_popdown             (HeColorButton *cb);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkButton
                                       +----HeColorButton

Implemented Interfaces

HeColorButton implements AtkImplementorIface and GtkBuildable.

Properties

  "color"                    GdkColor*             : Read / Write
  "popup-shown"              gboolean              : Read

Description

HeColorButton is a widget to open a HeColorDialog. The selected color is shown in the button. The selected color is a property of the button. The property name is "color" and its type is GdkColor.

Details

HeColorButtonPrivate

typedef struct _HeColorButtonPrivate HeColorButtonPrivate;


HeColorButton

typedef struct _HeColorButton HeColorButton;


he_color_button_new ()

GtkWidget*          he_color_button_new                 (void);

Creates a new HeColorButton

Returns : a new HeColorButton

Since 2.2


he_color_button_new_with_color ()

GtkWidget*          he_color_button_new_with_color      (const GdkColor *color);

Creates a new HeColorButton with a specific color.

color : the color to initialize to
Returns : a new HeColorButton

Since 2.2


he_color_button_get_color ()

void                he_color_button_get_color           (HeColorButton *cb,
                                                         GdkColor *color);

cb : the HeColorButton
color : a GdkColor to be filled with the current color

Since 2.2


he_color_button_set_color ()

void                he_color_button_set_color           (HeColorButton *cb,
                                                         const GdkColor *color);

Sets the current color on the HeColorButton widget

cb : the HeColorButton
color : the color to set

Since 2.2


he_color_button_get_popup_shown ()

gboolean            he_color_button_get_popup_shown     (HeColorButton *cb);

This function checks if the color button has the color dialog currently popped-up

cb : the HeColorButton
Returns : TRUE if the dialog is popped-up (visible to user)

Since 2.2


he_color_button_popdown ()

void                he_color_button_popdown             (HeColorButton *cb);

If the color dialog is currently popped-up (visible) it will be popped-down (hidden).

cb : the HeColorButton

Since 2.2

Property Details

The "color" property

  "color"                    GdkColor*             : Read / Write

The selected color.


The "popup-shown" property

  "popup-shown"              gboolean              : Read

If the color dialog is popped up.

Default value: FALSE

See Also

HeColorSelector, HeColorDialog