[−][src]Trait gtk::CellLayoutExt
Trait containing all CellLayout
methods.
Implementors
AppChooserButton
, CellAreaBox
, CellArea
, CellLayout
, CellView
, ComboBoxText
, ComboBox
, EntryCompletion
, IconView
, TreeViewColumn
Required methods
fn add_attribute<P: IsA<CellRenderer>>(
&self,
cell: &P,
attribute: &str,
column: i32
)
&self,
cell: &P,
attribute: &str,
column: i32
)
Adds an attribute mapping to the list in self
.
The column
is the column of the model to get a value from, and the
attribute
is the parameter on cell
to be set from the value. So for
example if column 2 of the model contains strings, you could have the
“text” attribute of a CellRendererText
get its values from column 2.
cell
a CellRenderer
attribute
an attribute on the renderer
column
the column position on the model to get the attribute from
fn clear(&self)
Unsets all the mappings on all renderers on self
and
removes all renderers from self
.
fn clear_attributes<P: IsA<CellRenderer>>(&self, cell: &P)
Clears all existing attributes previously set with
CellLayout::set_attributes
.
cell
a CellRenderer
to clear the attribute mapping on
fn get_area(&self) -> Option<CellArea>
Returns the underlying CellArea
which might be self
if called on a CellArea
or might be None
if no CellArea
is used by self
.
Returns
the cell area used by self
,
or None
in case no cell area is used.
fn get_cells(&self) -> Vec<CellRenderer>
Returns the cell renderers which have been added to self
.
Returns
a list of cell renderers. The list, but not the renderers has
been newly allocated and should be freed with glib::List::free
when no longer needed.
fn pack_end<P: IsA<CellRenderer>>(&self, cell: &P, expand: bool)
Adds the cell
to the end of self
. If expand
is false
, then the
cell
is allocated no more space than it needs. Any unused space is
divided evenly between cells for which expand
is true
.
Note that reusing the same cell renderer is not supported.
cell
a CellRenderer
expand
true
if cell
is to be given extra space allocated to self
fn pack_start<P: IsA<CellRenderer>>(&self, cell: &P, expand: bool)
Packs the cell
into the beginning of self
. If expand
is false
,
then the cell
is allocated no more space than it needs. Any unused space
is divided evenly between cells for which expand
is true
.
Note that reusing the same cell renderer is not supported.
cell
a CellRenderer
expand
true
if cell
is to be given extra space allocated to self
fn reorder<P: IsA<CellRenderer>>(&self, cell: &P, position: i32)
Re-inserts cell
at position
.
Note that cell
has already to be packed into self
for this to function properly.
cell
a CellRenderer
to reorder
position
new position to insert cell
at
fn set_cell_data_func<P: IsA<CellRenderer>>(
&self,
cell: &P,
func: Option<Box_<dyn Fn(&CellLayout, &CellRenderer, &TreeModel, &TreeIter) + 'static>>
)
&self,
cell: &P,
func: Option<Box_<dyn Fn(&CellLayout, &CellRenderer, &TreeModel, &TreeIter) + 'static>>
)
Sets the GtkCellLayoutDataFunc
to use for self
.
This function is used instead of the standard attributes mapping
for setting the column value, and should set the value of self
’s
cell renderer(s) as appropriate.
func
may be None
to remove a previously set function.
cell
a CellRenderer
func
the GtkCellLayoutDataFunc
to use, or None
func_data
user data for func
destroy
destroy notify for func_data
Implementors
impl<O: IsA<CellLayout>> CellLayoutExt for O
[src]
fn add_attribute<P: IsA<CellRenderer>>(
&self,
cell: &P,
attribute: &str,
column: i32
)
[src]
&self,
cell: &P,
attribute: &str,
column: i32
)
fn clear(&self)
[src]
fn clear_attributes<P: IsA<CellRenderer>>(&self, cell: &P)
[src]
fn get_area(&self) -> Option<CellArea>
[src]
fn get_cells(&self) -> Vec<CellRenderer>
[src]
fn pack_end<P: IsA<CellRenderer>>(&self, cell: &P, expand: bool)
[src]
fn pack_start<P: IsA<CellRenderer>>(&self, cell: &P, expand: bool)
[src]
fn reorder<P: IsA<CellRenderer>>(&self, cell: &P, position: i32)
[src]
fn set_cell_data_func<P: IsA<CellRenderer>>(
&self,
cell: &P,
func: Option<Box_<dyn Fn(&CellLayout, &CellRenderer, &TreeModel, &TreeIter) + 'static>>
)
[src]
&self,
cell: &P,
func: Option<Box_<dyn Fn(&CellLayout, &CellRenderer, &TreeModel, &TreeIter) + 'static>>
)