gtkmm
3.3.20
|
Renders a combobox in a cell. More...
Public Member Functions | |
virtual | ~CellRendererCombo () |
GtkCellRendererCombo* | gobj () |
Provides access to the underlying C GtkObject. | |
const GtkCellRendererCombo* | gobj () const |
Provides access to the underlying C GtkObject. | |
CellRendererCombo () | |
Glib::SignalProxy2< void, const Glib::ustring &, const TreeModel::iterator& > | signal_changed () |
Glib::PropertyProxy < Glib::RefPtr< Gtk::TreeModel > > | property_model () |
The model containing the possible values for the combo box. | |
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< Gtk::TreeModel > > | property_model () const |
The model containing the possible values for the combo box. | |
Glib::PropertyProxy< int > | property_text_column () |
A column in the data source model to get the strings from. | |
Glib::PropertyProxy_ReadOnly< int > | property_text_column () const |
A column in the data source model to get the strings from. | |
Glib::PropertyProxy< bool > | property_has_entry () |
If FALSE, don't allow to enter strings other than the chosen ones. | |
Glib::PropertyProxy_ReadOnly < bool > | property_has_entry () const |
If FALSE, don't allow to enter strings other than the chosen ones. | |
Related Functions | |
(Note that these are not member functions.) | |
Gtk::CellRendererCombo* | wrap (GtkCellRendererCombo* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
Renders a combobox in a cell.
CellRendererCombo renders text in a cell like CellRendererText, from which it is derived. But while CellRendererText offers a simple entry to edit the text, CellRendererCombo offers a ComboBox or ComboBoxEntry widget to edit the text. The values to display in the combo box are taken from the tree model specified in the model property.
The combo cell renderer takes care of adding a text cell renderer to the combo box and sets it to display the column specified by its text_column property. Further cell renderers can be added in a handler for the editing_started signal.
virtual Gtk::CellRendererCombo::~CellRendererCombo | ( | ) | [virtual] |
GtkCellRendererCombo* Gtk::CellRendererCombo::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::CellRendererText.
const GtkCellRendererCombo* Gtk::CellRendererCombo::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::CellRendererText.
If FALSE, don't allow to enter strings other than the chosen ones.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< bool > Gtk::CellRendererCombo::property_has_entry | ( | ) | const |
If FALSE, don't allow to enter strings other than the chosen ones.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
The model containing the possible values for the combo box.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gtk::TreeModel> > Gtk::CellRendererCombo::property_model | ( | ) | const |
The model containing the possible values for the combo box.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
A column in the data source model to get the strings from.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< int > Gtk::CellRendererCombo::property_text_column | ( | ) | const |
A column in the data source model to get the strings from.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::SignalProxy2< void,const Glib::ustring&,const TreeModel::iterator& > Gtk::CellRendererCombo::signal_changed | ( | ) |
void on_my_changed(const Glib::ustring& path, const TreeModel::iterator& iter)
This signal is emitted each time after the user selected an item in the combo box, either by using the mouse or the arrow keys. Contrary to GtkComboBox, GtkCellRendererCombo::changed is not emitted for changes made to a selected item in the entry. The argument new_iter corresponds to the newly selected item in the combo box and it is relative to the GtkTreeModel set via the model property on GtkCellRendererCombo.
Note that as soon as you change the model displayed in the tree view, the tree view will immediately cease the editing operating. This means that you most probably want to refrain from changing the model until the combo cell renderer emits the edited or editing_canceled signal.
path_string | A string of the path identifying the edited cell (relative to the tree view model). |
new_iter | The new iter selected in the combo box (relative to the combo box model). |
Gtk::CellRendererCombo* wrap | ( | GtkCellRendererCombo * | object, |
bool | take_copy = false |
||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |