pub trait CellLayoutExt:
IsA<CellLayout>
+ Sealed
+ 'static {
// Provided methods
fn add_attribute(
&self,
cell: &impl IsA<CellRenderer>,
attribute: &str,
column: i32,
) { ... }
fn clear(&self) { ... }
fn clear_attributes(&self, cell: &impl IsA<CellRenderer>) { ... }
fn area(&self) -> Option<CellArea> { ... }
fn cells(&self) -> Vec<CellRenderer> { ... }
fn pack_end(&self, cell: &impl IsA<CellRenderer>, expand: bool) { ... }
fn pack_start(&self, cell: &impl IsA<CellRenderer>, expand: bool) { ... }
fn reorder(&self, cell: &impl IsA<CellRenderer>, position: i32) { ... }
fn set_cell_data_func<P: Fn(&CellLayout, &CellRenderer, &TreeModel, &TreeIter) + 'static>(
&self,
cell: &impl IsA<CellRenderer>,
func: P,
) { ... }
}
Expand description
Trait containing all CellLayout
methods.
§Implementors
CellAreaBox
, CellArea
, CellLayout
, CellView
, ComboBoxText
, ComboBox
, EntryCompletion
, IconView
, TreeViewColumn
Provided Methods§
Sourcefn add_attribute(
&self,
cell: &impl IsA<CellRenderer>,
attribute: &str,
column: i32,
)
👎Deprecated: Since 4.10
fn add_attribute( &self, cell: &impl IsA<CellRenderer>, 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 property on @cell to be set from that 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.
In this context “attribute” and “property” are used interchangeably.
§Deprecated since 4.10
§cell
§attribute
a property on the renderer
§column
the column position on the model to get the attribute from
Sourcefn clear(&self)
👎Deprecated: Since 4.10
fn clear(&self)
Unsets all the mappings on all renderers on @self and removes all renderers from @self.
§Deprecated since 4.10
Sourcefn clear_attributes(&self, cell: &impl IsA<CellRenderer>)
👎Deprecated: Since 4.10
fn clear_attributes(&self, cell: &impl IsA<CellRenderer>)
Clears all existing attributes previously set with gtk_cell_layout_set_attributes().
§Deprecated since 4.10
§cell
a CellRenderer
to clear the attribute mapping on
Sourcefn cells(&self) -> Vec<CellRenderer>
👎Deprecated: Since 4.10
fn cells(&self) -> Vec<CellRenderer>
Sourcefn pack_end(&self, cell: &impl IsA<CellRenderer>, expand: bool)
👎Deprecated: Since 4.10
fn pack_end(&self, cell: &impl IsA<CellRenderer>, 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.
§Deprecated since 4.10
§cell
§expand
true
if @cell is to be given extra space allocated to @self
Sourcefn pack_start(&self, cell: &impl IsA<CellRenderer>, expand: bool)
👎Deprecated: Since 4.10
fn pack_start(&self, cell: &impl IsA<CellRenderer>, 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.
§Deprecated since 4.10
§cell
§expand
true
if @cell is to be given extra space allocated to @self
Sourcefn reorder(&self, cell: &impl IsA<CellRenderer>, position: i32)
👎Deprecated: Since 4.10
fn reorder(&self, cell: &impl IsA<CellRenderer>, position: i32)
Re-inserts @cell at @position.
Note that @cell has already to be packed into @self for this to function properly.
§Deprecated since 4.10
§cell
a CellRenderer
to reorder
§position
new position to insert @cell at
Sourcefn set_cell_data_func<P: Fn(&CellLayout, &CellRenderer, &TreeModel, &TreeIter) + 'static>(
&self,
cell: &impl IsA<CellRenderer>,
func: P,
)
👎Deprecated: Since 4.10
fn set_cell_data_func<P: Fn(&CellLayout, &CellRenderer, &TreeModel, &TreeIter) + 'static>( &self, cell: &impl IsA<CellRenderer>, func: P, )
Sets the CellLayout
DataFunc 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.
§Deprecated since 4.10
§cell
§func
the CellLayout
DataFunc to use
§func_data
user data for @func
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.