| GTK-EXTRA - Reference Manual

| Home

# GtkColorCombo

## Name

GtkColorCombo - color combo widget for gtk+

## Synopsis

    GtkType

    gtk_color_combo_get_type

    (void);

    GtkWidget*

    gtk_color_combo_new

    (void);

    GtkWidget*

    gtk_color_combo_new_with_values

    (gint nrows, gint ncols,
    gchar **color_names);

    void

    gtk_color_combo_construct

    (GtkColorCombo *color_combo);

    void

    gtk_color_combo_construct_with_values

    (GtkColorCombo *color_combo,
    gint nrows, gint ncols,
    gchar **color_names);

    gchar *

    gtk_color_combo_get_color_at

    (GtkColorCombo *combo,
    gint row, gint col);

    void

    gtk_color_combo_find_color

    (GtkColorCombo *color_combo,
    GdkColor *color,
    gint *row, gint *col);

## Object Hierarchy

     GtkObject
       +----GtkWidget
             +----GtkContainer
                   +----GtkBox
                         +----GtkHBox
                               +----GtkCombo
                                     +-----GtkColorCombo

##
Args

## Signal Prototypes

    void (*changed) (GtkColorCombo *color_combo,  gint selection, gchar *color_name);

## Description

A GtkColorCombo is a GtkCOmbo which contains all kinds of colors.

##
Details

    struct _GtkColorCombo {
             GtkComboBox color_combo;
             gint default_flag:1;
             gint nrows;
             gint ncols;
             gint row;
             gint column;
             GtkWidget ***button;
             GtkWidget *table;
             GtkWidget *custom_button;
             gchar **color_name;
             };

Screenshot

### gtk_color_combo_get_type ()

    GtkType gtk_color_combo_get_type (void);

Returns : |

### gtk_color_combo_new ()

GtkWidget *gtk_color_combo_new (void);

Creates a new color combo.

Returns : | a new color combo widget

### gtk_color_combo_new_with_values ()

    GtkWidget *gtk_color_combo_new_with_values  (gint nrows, gint ncols,
                                                 gchar **color_names);

Creates an user-defined color combo.

`nrows` | number of rows in color combo
ncols | number of columns n color combo
color_names | list with color names

### gtk_color_combo_construct ()

    void gtk_color_combo_construct (GtkColorCombo *color_combo);

Initialize a color combo structure

color_combo |

### gtk_color_combo_construct_with_values ()

    void 	  gtk_color_combo_construct_with_values (GtkColorCombo *color_combo,
                                                   gint nrows, gint ncols,
                                                   gchar **color_names);

Initialize an user-defined color combo.

color_combo | a color combo widget
`nrows` | number of rows in color combo
ncols | number of columns n color combo
color_names | list with color names

### gtk_color_combo_get_color_at ()

    gchar *gtk_color_combo_get_color_at (GtkColorCombo *combo, gint row, gint col);

Return the name of the color at row,col in color combo .

combo | a color combo widget
row | row number
col | olumn number

### gtk_toggle_combo_get_selection()

    void gtk_color_combo_find_color (GtkColorCombo *color_combo,
                                     GdkColor *color,
                                     gint *row, gint *col); );

Find a color in color combo and store its combo coordinates in row,col

combo | a color combo widget
color | GdkColor to be found
row | gint pointer
col | gint pointer

## Args

"`default_flag`" (gboolean : Read / Write)

  What does this means?

## Signals

### The "changed" signal

    void (*changed) (GtkColorCombo *color_combo,  gint selection, gchar *color_name);

Should be connected if you wish to perform an action whenever the GtkColorCombo's state is changed.

`color_combo` : | the object which received the signal.
selection |
color_name | the name of the color

## See Also

GtkCombo

  a text entry field with a dropdown list.

| Home |  |