GimpColorFrame

GimpColorFrame

Synopsis

#define             GIMP_COLOR_FRAME_ROWS
                    GimpColorFrame;
GtkWidget *         gimp_color_frame_new                (void);
void                gimp_color_frame_set_mode           (GimpColorFrame *frame,
                                                         GimpColorFrameMode mode);
void                gimp_color_frame_set_has_number     (GimpColorFrame *frame,
                                                         gboolean has_number);
void                gimp_color_frame_set_number         (GimpColorFrame *frame,
                                                         gint number);
void                gimp_color_frame_set_has_color_area (GimpColorFrame *frame,
                                                         gboolean has_color_area);
void                gimp_color_frame_set_color          (GimpColorFrame *frame,
                                                         GimpImageType sample_type,
                                                         const GimpRGB *color,
                                                         gint color_index);
void                gimp_color_frame_set_invalid        (GimpColorFrame *frame);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkFrame
                                       +----GimpFrame
                                             +----GimpColorFrame

Implemented Interfaces

GimpColorFrame implements AtkImplementorIface and GtkBuildable.

Properties

  "has-color-area"           gboolean              : Read / Write
  "has-number"               gboolean              : Read / Write
  "mode"                     GimpColorFrameMode    : Read / Write
  "number"                   gint                  : Read / Write

Description

Details

GIMP_COLOR_FRAME_ROWS

#define GIMP_COLOR_FRAME_ROWS 5


GimpColorFrame

typedef struct _GimpColorFrame GimpColorFrame;


gimp_color_frame_new ()

GtkWidget *         gimp_color_frame_new                (void);

Creates a new GimpColorFrame widget.

Returns :

The new GimpColorFrame widget.

gimp_color_frame_set_mode ()

void                gimp_color_frame_set_mode           (GimpColorFrame *frame,
                                                         GimpColorFrameMode mode);

Sets the GimpColorFrame's color mode. Calling this function does the same as selecting the mode from the frame's GtkOptionMenu.

frame :

The GimpColorFrame.

mode :

The new mode.

gimp_color_frame_set_has_number ()

void                gimp_color_frame_set_has_number     (GimpColorFrame *frame,
                                                         gboolean has_number);


gimp_color_frame_set_number ()

void                gimp_color_frame_set_number         (GimpColorFrame *frame,
                                                         gint number);


gimp_color_frame_set_has_color_area ()

void                gimp_color_frame_set_has_color_area (GimpColorFrame *frame,
                                                         gboolean has_color_area);


gimp_color_frame_set_color ()

void                gimp_color_frame_set_color          (GimpColorFrame *frame,
                                                         GimpImageType sample_type,
                                                         const GimpRGB *color,
                                                         gint color_index);

Sets the color sample to display in the GimpColorFrame.

frame :

The GimpColorFrame.

sample_type :

The type of the GimpDrawable or GimpImage the color was picked from.

color :

The color to set.

color_index :

The color's index. This value is ignored unless sample_type equals to GIMP_INDEXED_IMAGE or GIMP_INDEXEDA_IMAGE.

gimp_color_frame_set_invalid ()

void                gimp_color_frame_set_invalid        (GimpColorFrame *frame);

Tells the GimpColorFrame that the current sample is invalid. All labels visible for the current color space will show "n/a" (not available).

There is no special API for setting the frame to "valid" again because this happens automatically when calling gimp_color_frame_set_color().

frame :

The GimpColorFrame.

Property Details

The "has-color-area" property

  "has-color-area"           gboolean              : Read / Write

Default value: FALSE


The "has-number" property

  "has-number"               gboolean              : Read / Write

Default value: FALSE


The "mode" property

  "mode"                     GimpColorFrameMode    : Read / Write

Default value: GIMP_COLOR_FRAME_MODE_PIXEL


The "number" property

  "number"                   gint                  : Read / Write

Allowed values: [0,256]

Default value: 0