Trait gtk::prelude::CellRendererComboExt
source · [−]pub trait CellRendererComboExt: 'static {
fn has_entry(&self) -> bool;
fn set_has_entry(&self, has_entry: bool);
fn model(&self) -> Option<TreeModel>;
fn set_model<P: IsA<TreeModel>>(&self, model: Option<&P>);
fn text_column(&self) -> i32;
fn set_text_column(&self, text_column: i32);
fn connect_changed<F: Fn(&Self, TreePath, &TreeIter) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_has_entry_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_model_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_text_column_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Expand description
Required Methods
If true
, the cell renderer will include an entry and allow to enter
values other than the ones in the popup list.
fn set_has_entry(&self, has_entry: bool)
fn set_has_entry(&self, has_entry: bool)
If true
, the cell renderer will include an entry and allow to enter
values other than the ones in the popup list.
Holds a tree model containing the possible values for the combo box. Use the text_column property to specify the column holding the values.
Holds a tree model containing the possible values for the combo box. Use the text_column property to specify the column holding the values.
fn text_column(&self) -> i32
fn text_column(&self) -> i32
Specifies the model column which holds the possible values for the combo box.
Note that this refers to the model specified in the model property, not the model backing the tree view to which this cell renderer is attached.
CellRendererCombo
automatically adds a text cell renderer for
this column to its combo box.
fn set_text_column(&self, text_column: i32)
fn set_text_column(&self, text_column: i32)
Specifies the model column which holds the possible values for the combo box.
Note that this refers to the model specified in the model property, not the model backing the tree view to which this cell renderer is attached.
CellRendererCombo
automatically adds a text cell renderer for
this column to its combo box.
fn connect_changed<F: Fn(&Self, TreePath, &TreeIter) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_changed<F: Fn(&Self, TreePath, &TreeIter) + 'static>(
&self,
f: F
) -> SignalHandlerId
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)