| GTK-EXTRA - Reference Manual

| Home

# GtkToggleCombo

## Name

GtkToggleCombo - toggle combo widget for gtk+

## Synopsis

    GtkType

    gtk_toggle_combo_get_type

    (void);

    GtkWidget*

    gtk_toggle_combo_new

    (gint nrows, gint ncols);

    void

    gtk_toggle_combo_construct

    GtkToggleCombo *combo, gint nrows, gint ncols);

    gint

    gtk_toggle_combo_get_nrows

    GtkToggleCombo *combo)

    gint

    gtk_toggle_combo_get_ncols

    GtkToggleCombo *combo)

    void

    gtk_toggle_combo_select

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

    void

    gtk_toggle_combo_get_selection

    (GtkToggleCombo *combo, gint *row, gint *col)

## Object Hierarchy

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

##
Args

      "default_flag"               gboolean             : Read / Write

## Signal Prototypes

    "changed"   void        user_function      (GtkToggleCombo  *toggle_combo, gint row, gint col,
                                                 gpointer user_data);

## Description

#### A GtkToggleCombo is a GtkCombo which will remain 'pressed-in' when clicked. Clicking again will cause the toggle combo to return to it's normal state.
A toggle combo is created by calling either gtk_toggle_combo_new()
The number of rows/columns may be find out by calling gtk_toggle_combo_get_nrows() or gtk_toggle_combo_get_ncols()
A combo row may be selected with gtk_toggle_combo_select() .The current selection is returned by gtk_toggle_combo_get_selection()

## Details
struct GtkToggleCombo

    struct _GtkToggleCombo {
               GtkComboBox toggle_combo;
               gint default_flag:1;
               gint nrows;
               gint ncols;
               gint row;
               gint column;
               GtkWidget ***button;
               GtkWidget *table;
               GtkWidget *custom_button;
               };

The GtkToggleCombo struct contains private data and should be manipulated using the functions below.
You should access only the entry and list fields directly

### gtk_toggle_combo_get_type ()

    GtkType gtk_toggle_combo_get_type (void);

Returns : |

### gtk_toggle_combo_new ()

    GtkWidget* gtk_toggle_combo_new (void);

Creates a new toggle combo.

Returns : | a new toggle combo.

### gtk_toggle_combo_construct ()

    void gtk_toggle_combo_construct (GtkToggleCombo *combo,gint nrows, gint ncols);

`combo` | a GtkToggleCombo from gtk_toggle_combo_new()
nrows | number of rows
ncols | number of columns

### gtk_toggle_combo_get_nrows ()

    gint gtk_toggle_combo_get_nrows(GtkToggleCombo *combo);

Determines the number of columns from combo.

combo | a GtkToggleCombo
`Returns` | numberr of rows in combo

### gtk_toggle_combo_get_ncols ()

    gint gtk_toggle_combo_get_ncols(GtkToggleCombo *combo);

Determines the number of columns from combo.

combo | a GtkToggleCombo
`Returns` | number of columnsin combo

### gtk_toggle_combo_select ()

    void gtk_toggle_combo_select(GtkToggleCombo *combo,gint row, gint col);

Selects the cell(row,col) from combo .

combo | a GtkToggleCombo
row | row number
col | olumn number

### gtk_toggle_combo_get_selection()

    void gtk_toggle_combo_get_selection (GtkToggleCombo *combo,gint *row, gint *col);

Returns the row and column of the selected cell in *row,*col.

combo | a GtkToggleCombo
row | gint pointer
col | gint pointer

## Args

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

  What does this means?

## Signals

### The "changed" signal

    "changed" void user_function (GtkToggleCombo *toggle_combo, gint row, gint col, gpointer user_data);

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

`toggle_combo` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

## See Also

GtkCombo

  a text entry field with a dropdown list.

| Home |  |