GtkToggleCombo: GtkExtra Reference Manual

## GtkToggleCombo GtkToggleCombo — A toggle combo widget for GTK. |

## Functions

GtkWidget * | gtk_toggle_combo_new ()
void | gtk_toggle_combo_construct ()
gint | gtk_toggle_combo_get_nrows ()
gint | gtk_toggle_combo_get_ncols ()
void | gtk_toggle_combo_select ()
void | gtk_toggle_combo_get_selection ()

## Signals

void | changed | Run First

## Types and Values

struct | GtkToggleCombo

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ╰── GtkWidget
                    ╰── GtkContainer
                        ╰── GtkBox
                            ╰── GtkHBox
                                ╰── GtkComboButton
                                    ╰── GtkToggleCombo

## Implemented Interfaces

GtkToggleCombo implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Includes

    #include <gtkextra.h>

## Description

A GtkToggleCombo is a GtkCombo which will remain 'pressed-in' when clicked. Clicking it again will cause the toggle combo to return to it's normal state. A toggle combo is created by calling `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()`.

## Functions

### gtk_toggle_combo_new ()

    GtkWidget *
    gtk_toggle_combo_new (gint nrows,
                          gint ncols);

Creates a new GtkToggleCombo widget with `nrows` rows and `ncols` columns.

#### Parameters

nrows | number of rows |
ncols | number of columns |

#### Returns

the newly-created GtkToggleCombo widget.

### gtk_toggle_combo_construct ()

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

Initializes the GtkToggleCombo with `nrows` rows and `ncols` columns.

#### Parameters

toggle_combo | a GtkToggleCombo |
nrows | number of rows |
ncols | number of columns |

### gtk_toggle_combo_get_nrows ()

    gint
    gtk_toggle_combo_get_nrows (GtkToggleCombo *combo);

Get the number of rows in GtkToggleCombo.

#### Parameters

combo | a GtkToggleCombo |

#### Returns

number of rows

### gtk_toggle_combo_get_ncols ()

    gint
    gtk_toggle_combo_get_ncols (GtkToggleCombo *combo);

Get the number of columns in GtkToggleCombo.

#### Parameters

combo | a GtkToggleCombo |

#### Returns

number of columns

### gtk_toggle_combo_select ()

    void
    gtk_toggle_combo_select (GtkToggleCombo *toggle_combo,
                             gint new_row,
                             gint new_col);

Select the cell(row,col) from GtkToggleCombo.

#### Parameters

toggle_combo | a GtkToggleCombo |
new_row | number of row |
new_col | number of column |

### gtk_toggle_combo_get_selection ()

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

Get the current selection(row,col) in GtkToggleCombo.

#### Parameters

combo | a GtkToggleCombo |
row | number of row |
col | number of column |

## Types and Values

### struct GtkToggleCombo

    struct GtkToggleCombo;

The GtkToggleCombo struct contains only private data. It should only be accessed through the functions described below.

## Signal Details

### The `“changed”` signal

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

Emmited when the `row` ,`col` are selected in GtkToggleCombo

#### Parameters

toggle_combo | the GtkToggleCombo object that received the signal |
row | row number |
col | column number |
user_data | user data set when the signal handler was connected. |

Flags: Run First