GimpColorBar

GimpColorBar

Synopsis

                    GimpColorBar;
GtkWidget *         gimp_color_bar_new                  (GtkOrientation orientation);
void                gimp_color_bar_set_color            (GimpColorBar *bar,
                                                         const GimpRGB *color);
void                gimp_color_bar_set_channel          (GimpColorBar *bar,
                                                         GimpHistogramChannel channel);
void                gimp_color_bar_set_buffers          (GimpColorBar *bar,
                                                         const guchar *red,
                                                         const guchar *green,
                                                         const guchar *blue);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkEventBox
                                       +----GimpColorBar

Implemented Interfaces

GimpColorBar implements AtkImplementorIface and GtkBuildable.

Properties

  "color"                    GimpRGB*              : Write / Construct
  "histogram-channel"        GimpHistogramChannel  : Write
  "orientation"              GtkOrientation        : Read / Write / Construct Only

Description

Details

GimpColorBar

typedef struct _GimpColorBar GimpColorBar;


gimp_color_bar_new ()

GtkWidget *         gimp_color_bar_new                  (GtkOrientation orientation);

Creates a new GimpColorBar widget.

orientation :

whether the bar should be oriented horizontally or vertically

Returns :

The new GimpColorBar widget.

gimp_color_bar_set_color ()

void                gimp_color_bar_set_color            (GimpColorBar *bar,
                                                         const GimpRGB *color);

Makes the bar display a gradient from black (on the left or the bottom), to the given color (on the right or at the top).

bar :

a GimpColorBar widget

color :

a GimpRGB color

gimp_color_bar_set_channel ()

void                gimp_color_bar_set_channel          (GimpColorBar *bar,
                                                         GimpHistogramChannel channel);

Convenience function that calls gimp_color_bar_set_color() with the color that matches the channel.

bar :

a GimpColorBar widget

channel :

a GimpHistogramChannel

gimp_color_bar_set_buffers ()

void                gimp_color_bar_set_buffers          (GimpColorBar *bar,
                                                         const guchar *red,
                                                         const guchar *green,
                                                         const guchar *blue);

This function gives full control over the colors displayed by the bar widget. The 3 arrays can for example be taken from a Levels or a Curves struct.

bar :

a GimpColorBar widget

red :

an array of 256 values

green :

an array of 256 values

blue :

an array of 256 values

Property Details

The "color" property

  "color"                    GimpRGB*              : Write / Construct


The "histogram-channel" property

  "histogram-channel"        GimpHistogramChannel  : Write

Default value: GIMP_HISTOGRAM_VALUE


The "orientation" property

  "orientation"              GtkOrientation        : Read / Write / Construct Only

Default value: GTK_ORIENTATION_HORIZONTAL