Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Types | Public Member Functions | Static Protected Attributes
Xfc::Gtk::ComboBox Class Reference

A GtkComboBox C++ wrapper class. More...

#include <xfc/gtk/combobox.hh>

Inheritance diagram for Xfc::Gtk::ComboBox:
Xfc::Gtk::Bin Xfc::Gtk::CellLayout Xfc::Gtk::Container Xfc::G::TypeInterface Xfc::Gtk::Widget Xfc::G::TypeInstance Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::Trackable Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable Xfc::Gtk::ComboBoxEntry Xfc::Gtk::ComboBoxText Xfc::Gtk::ComboBoxEntryText

List of all members.

Public Types

Public Member Functions

Static Protected Attributes

Constructors


Detailed Description

A GtkComboBox C++ wrapper class.

The ComboBox widget is used to choose an item from a list of items.

See also: the ComboBox HOWTOs and examples.


Member Typedef Documentation

typedef sigc::slot<bool, const TreeModel&, const TreeIter&> Xfc::Gtk::ComboBox::RowSeparatorSlot

Signature of the callback slot called to determine whether the row pointed to by iter should be rendered as a separator.

Example: Method signature for RowSeparatorSlot.

< void method(const TreeModel& model, const TreeIter& iter);
< // model: The TreeModel.
< // iter: A TreeIter pointing to a row in the model. 
< // return: <EM>true</EM> if the row is a separator.   
<

A common way to implement this is to have a boolean column in the model, whose values the RowSeparatorSlot returns.


Constructor & Destructor Documentation

Xfc::Gtk::ComboBox::ComboBox ( GtkComboBox *  combo_box,
bool  owns_reference = false 
) [explicit, protected]

Construct a new ComboBox from an existing GtkComboBox.

Parameters:
combo_boxA pointer to a GtkComboBox.
owns_referenceSet false if the initial reference count is floating, set true if it's not.

The combo_box can be a newly created GtkComboBox or an existing GtkComboBox (see G::Object::Object).

Xfc::Gtk::ComboBox::ComboBox ( TreeModel model)

Constructs a new combo box with the model initialized to model.

Parameters:
modelA Gtk::TreeModel.

Member Function Documentation

Gets the index of the currently active item, or -1 if there's no active item.

Returns:
An integer which is the index of the currently active item, or -1 if there's no active item.

Sets iter to point to the current active item, if it exists.

Parameters:
iterA Gtk::TreeIter.
Returns:
true if iter was set to point to the active item.

Determines whether dropdowns should have a tearoff menu item.

Returns:
true if the dropdowns have a tearoff menu item.

Gets the column with column span information for the combo box.

Returns:
The column span column.

Determines whether the combo box grabs focus when it is clicked with the mouse (see set_focus_on_click()).

Returns:
true if the combo box grabs focus when it is clicked with the mouse.

Gets the Gtk::TreeModel which is acting as data source for the combo box.

Returns:
A Gtk::TreeModel.

Gets the accessible object corresponding to the combo box's popup.

Returns:
The accessible object corresponding to the combo box's popup.

This method is mostly intended for use by accessibility technologies; applications should have little use for it.

Gets the column with row span information for the combo box.

Returns:
The row span column.

Gets the wrap width which is used to determine the number of columns for the popup menu.

Returns:
The wrap width.

If the wrap width is larger than 1, the combo box is in grid mode.

Hides the menu or dropdown list of the combo box.

This method is mostly intended for use by accessibility technologies; applications should have little use for it.

Pops up the menu or dropdown list of the combo box.

This method is mostly intended for use by accessibility technologies; applications should have little use for it.

void Xfc::Gtk::ComboBox::set_active ( int  index)

Sets the active item of the combo box to be the item at index.

Parameters:
indexAn index in the model passed during construction, or -1 to have no active item.

Sets the current active item to be the one referenced by iter.

Parameters:
iterThe Gtk::TreeIter.

iter must correspond to a path of depth one.

void Xfc::Gtk::ComboBox::set_add_tearoffs ( bool  add_tearoffs)

Sets whether the popup menu should have a tearoff menu item.

Parameters:
add_tearoffsSet to true to add tearoff menu items.
void Xfc::Gtk::ComboBox::set_column_span_column ( int  column_span)

Sets the column with column span information for the combo box to be column_span.

Parameters:
column_spanA column in the model passed during construction.

The column span column contains integers which indicate how many columns an item should span.

void Xfc::Gtk::ComboBox::set_focus_on_click ( bool  focus_on_click)

Sets whether the combo box will grab focus when it is clicked with the mouse.

Parameters:
focus_on_clickSet to true if the combo box grabs focus when clicked with the mouse.

Making mouse clicks not grab focus is useful in places like toolbarswhere you don't want the keyboard focus removed from the main area of the application.

Sets the model used by the combo box to be model.

Parameters:
modelA Gtk::TreeModel.

Will unset a previously set model (if applicable).

Sets the row separator function, which is used to determine whether a row should be drawn as a separator.

Parameters:
slotThe RowSeparatorSlot to call.

By default no separators are drawn

Sets the column with row span information for the combo box to be row_span.

Parameters:
row_spanA column in the model passed during construction.

The row span column contains integers which indicate how many rows an item should span.

Sets the wrap width of the combo box to be width.

Parameters:
widthThe preferred number of columns.

The wrap width is basically the preferred number of columns when you want the popup to be layed out in a table.

Unsets the row separator function set by set_row_separator_func().

After calling this method no separators will be drawn. This is the default value so you only need to call this method if you previously called set_row_separator_func().


Member Data Documentation

Changed signal (see signal_changed()).

Calls a slot with the signature:

< void function();
<

The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC