Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::Gtk::ComboBoxEntry Class Reference

A GtkComboBoxEntry C++ wrapper class. More...

`#include <xfc/gtk/comboboxentry.hh>`

Inheritance diagram for Xfc::Gtk::ComboBoxEntry:

List of all members.

## Public Member Functions

Constructors

- ComboBoxEntry ()
    Constructs a new ComboBoxEntry which has an Entry widget as child.
- ComboBoxEntry (TreeModel &model, int text_column)
    Constructs a new ComboBoxEntry which has an Entry widget and a popup list of strings.
- virtual ~ComboBoxEntry ()
    Destructor.

Accessors

- GtkComboBoxEntry * gtk_combo_box_entry () const
    Get a pointer to the GtkComboBoxEntry structure.
- operator GtkComboBoxEntry * () const
    Conversion operator; safely converts an ComboBoxEntry to a GtkComboBoxEntry pointer.
- String get_text () const
    Retrieves the contents of the entry widget (see also Gtk::Entry::get_text()).
- int get_text_column () const
    Gets the column which the entry box is using to get the strings from.

Methods

- void set_text_column (int text_column)
    Sets the model column which the entry box should use to get strings from to be text_column.

## Protected Member Functions

Constructors

- ComboBoxEntry (GtkComboBoxEntry *entry_box, bool owns_reference=false)
    Construct a new ComboBoxEntry from an existing GtkComboBoxEntry.

## Detailed Description

A GtkComboBoxEntry C++ wrapper class.

ComboBoxEntry is a widget with a text entry field with a dropdown list.

See also: the ComboBox HOWTOs and examples.

## Constructor & Destructor Documentation

Xfc::Gtk::ComboBoxEntry::ComboBoxEntry | ( | GtkComboBoxEntry * | entry_box,
|  | bool | owns_reference = `false`
| ) | `[explicit, protected]`

  | Construct a new ComboBoxEntry from an existing GtkComboBoxEntry. Parameters:
  | entry_box | A pointer to a GtkComboBoxEntry.
  | owns_reference | Set false if the initial reference count is floating, set true if it's not.
The entry_box can be a newly created GtkComboBoxEntry or an existing GtkComboBoxEntry (see G::Object::Object).

Xfc::Gtk::ComboBoxEntry::ComboBoxEntry | ( |  | ) |

| Constructs a new ComboBoxEntry which has an Entry widget as child. After construction, you should set a model using Gtk::ComboBbox::set_model() and a text_column using set_text_column().

Xfc::Gtk::ComboBoxEntry::ComboBoxEntry | ( | TreeModel & | model,
|  | int | text_column
| ) |

  | Constructs a new ComboBoxEntry which has an Entry widget and a popup list of strings. Parameters:
  | model | A Gtk::TreeModel.
  | text_column | A column in model to get the strings from.
You can get the Entry widget from a ComboBoxEntry by casting Gtk::Bin::get_child() to an Entry. To add and remove strings from the list, just modify model using its data manipulation API.

## Member Function Documentation

String Xfc::Gtk::ComboBoxEntry::get_text | ( |  | ) | const

| Retrieves the contents of the entry widget (see also Gtk::Entry::get_text()). Returns: A String that contains the contents of the entry widget.

int Xfc::Gtk::ComboBoxEntry::get_text_column | ( |  | ) | const

| Gets the column which the entry box is using to get the strings from. Returns: A column in the data source model of the entry box.

void Xfc::Gtk::ComboBoxEntry::set_text_column | ( | int | text_column | ) |

  | Sets the model column which the entry box should use to get strings from to be text_column. Parameters:
  | text_column | A column in model to get the strings from.

The documentation for this class was generated from the following file:

- comboboxentry.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3