pub trait CellAreaImpl: CellAreaImplExt + ObjectImpl {
Show 20 methods
// Provided methods
fn cell_properties() -> &'static [ParamSpec] { ... }
fn set_cell_property<R: IsA<CellRenderer>>(
&self,
_renderer: &R,
_id: usize,
_value: &Value,
_pspec: &ParamSpec,
) { ... }
fn cell_property<R: IsA<CellRenderer>>(
&self,
_renderer: &R,
_id: usize,
_pspec: &ParamSpec,
) -> Value { ... }
fn activate<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
area: &Rectangle,
flags: CellRendererState,
edit_only: bool,
) -> bool { ... }
fn add<R: IsA<CellRenderer>>(&self, renderer: &R) { ... }
fn apply_attributes<M: IsA<TreeModel>>(
&self,
tree_model: &M,
iter: &TreeIter,
is_expander: bool,
is_expanded: bool,
) { ... }
fn create_context(&self) -> Option<CellAreaContext> { ... }
fn copy_context<P: IsA<CellAreaContext>>(
&self,
context: &P,
) -> Option<CellAreaContext> { ... }
fn event<W: IsA<Widget>, P: IsA<CellAreaContext>>(
&self,
context: &P,
widget: &W,
event: &Event,
area: &Rectangle,
flags: CellRendererState,
) -> bool { ... }
fn foreach(&self, callback: &CellCallback) { ... }
fn foreach_alloc<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
area: &Rectangle,
bg_area: &Rectangle,
callback: &CellCallbackAllocate,
) { ... }
fn remove<R: IsA<CellRenderer>>(&self, renderer: &R) { ... }
fn is_activatable(&self) -> bool { ... }
fn focus(&self, direction_type: DirectionType) -> bool { ... }
fn request_mode(&self) -> SizeRequestMode { ... }
fn preferred_width<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
) -> (i32, i32) { ... }
fn preferred_width_for_height<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
height: i32,
) -> (i32, i32) { ... }
fn preferred_height<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
) -> (i32, i32) { ... }
fn preferred_height_for_width<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
width: i32,
) -> (i32, i32) { ... }
fn snapshot<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
snapshot: &Snapshot,
widget: &W,
background_area: &Rectangle,
cellarea: &Rectangle,
flags: CellRendererState,
paint_focus: bool,
) { ... }
}
Provided Methods§
fn cell_properties() -> &'static [ParamSpec]
Sourcefn set_cell_property<R: IsA<CellRenderer>>(
&self,
_renderer: &R,
_id: usize,
_value: &Value,
_pspec: &ParamSpec,
)
👎Deprecated: Since 4.10
fn set_cell_property<R: IsA<CellRenderer>>( &self, _renderer: &R, _id: usize, _value: &Value, _pspec: &ParamSpec, )
This should be implemented to handle changes in child
cell properties for a given CellRenderer
that were previously
installed on the [CellAreaClass
][crate::CellAreaClass] with gtk_cell_area_class_install_cell_property().
Sourcefn cell_property<R: IsA<CellRenderer>>(
&self,
_renderer: &R,
_id: usize,
_pspec: &ParamSpec,
) -> Value
👎Deprecated: Since 4.10
fn cell_property<R: IsA<CellRenderer>>( &self, _renderer: &R, _id: usize, _pspec: &ParamSpec, ) -> Value
This should be implemented to report the values of
child cell properties for a given child CellRenderer
.
Sourcefn activate<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
area: &Rectangle,
flags: CellRendererState,
edit_only: bool,
) -> bool
👎Deprecated: Since 4.10
fn activate<P: IsA<CellAreaContext>, W: IsA<Widget>>( &self, context: &P, widget: &W, area: &Rectangle, flags: CellRendererState, edit_only: bool, ) -> bool
Activates @self, usually by activating the currently focused cell, however some subclasses which embed widgets in the area can also activate a widget if it currently has the focus.
§Deprecated since 4.10
§context
the CellArea
Context in context with the current row data
§widget
the Widget
that @self is rendering on
§cell_area
the size and location of @self relative to @widget’s allocation
§flags
the CellRenderer
State flags for @self for this row of data.
§edit_only
if true
then only cell renderers that are CellRendererMode::Editable
will be activated.
§Returns
Whether @self was successfully activated.
Sourcefn add<R: IsA<CellRenderer>>(&self, renderer: &R)
👎Deprecated: Since 4.10
fn add<R: IsA<CellRenderer>>(&self, renderer: &R)
Adds @renderer to @self with the default child cell properties.
§Deprecated since 4.10
§renderer
the CellRenderer
to add to @self
Sourcefn apply_attributes<M: IsA<TreeModel>>(
&self,
tree_model: &M,
iter: &TreeIter,
is_expander: bool,
is_expanded: bool,
)
👎Deprecated: Since 4.10
fn apply_attributes<M: IsA<TreeModel>>( &self, tree_model: &M, iter: &TreeIter, is_expander: bool, is_expanded: bool, )
Applies any connected attributes to the renderers in @self by pulling the values from @tree_model.
§Deprecated since 4.10
§tree_model
the TreeModel
to pull values from
§iter
the TreeIter
in @tree_model to apply values for
§is_expander
whether @iter has children
§is_expanded
whether @iter is expanded in the view and children are visible
Sourcefn create_context(&self) -> Option<CellAreaContext>
👎Deprecated: Since 4.10
fn create_context(&self) -> Option<CellAreaContext>
Creates a CellArea
Context to be used with @self for
all purposes. CellArea
Context stores geometry information
for rows for which it was operated on, it is important to use
the same context for the same row of data at all times (i.e.
one should render and handle events with the same CellArea
Context
which was used to request the size of those rows of data).
§Deprecated since 4.10
§Returns
a newly created CellArea
Context which can be used with @self.
Sourcefn copy_context<P: IsA<CellAreaContext>>(
&self,
context: &P,
) -> Option<CellAreaContext>
👎Deprecated: Since 4.10
fn copy_context<P: IsA<CellAreaContext>>( &self, context: &P, ) -> Option<CellAreaContext>
This is sometimes needed for cases where rows need to share alignments in one orientation but may be separately grouped in the opposing orientation.
For instance, IconView
creates all icons (rows) to have
the same width and the cells theirin to have the same
horizontal alignments. However each row of icons may have
a separate collective height. IconView
uses this to
request the heights of each row based on a context which
was already used to request all the row widths that are
to be displayed.
§Deprecated since 4.10
§context
the CellArea
Context to copy
§Returns
a newly created CellArea
Context copy of @context.
Sourcefn event<W: IsA<Widget>, P: IsA<CellAreaContext>>(
&self,
context: &P,
widget: &W,
event: &Event,
area: &Rectangle,
flags: CellRendererState,
) -> bool
👎Deprecated: Since 4.10
fn event<W: IsA<Widget>, P: IsA<CellAreaContext>>( &self, context: &P, widget: &W, event: &Event, area: &Rectangle, flags: CellRendererState, ) -> bool
Delegates event handling to a CellArea
.
§Deprecated since 4.10
§context
the CellArea
Context for this row of data.
§widget
the Widget
that @self is rendering to
§event
the gdk::Event
to handle
§cell_area
the @widget relative coordinates for @self
§flags
the CellRenderer
State for @self in this row.
§Returns
true
if the event was handled by @self.
Sourcefn foreach(&self, callback: &CellCallback)
👎Deprecated: Since 4.10
fn foreach(&self, callback: &CellCallback)
Calls @callback for every CellRenderer
in @self.
§Deprecated since 4.10
§callback
the GtkCellCallback
to call
§callback_data
user provided data pointer
Sourcefn foreach_alloc<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
area: &Rectangle,
bg_area: &Rectangle,
callback: &CellCallbackAllocate,
)
👎Deprecated: Since 4.10
fn foreach_alloc<P: IsA<CellAreaContext>, W: IsA<Widget>>( &self, context: &P, widget: &W, area: &Rectangle, bg_area: &Rectangle, callback: &CellCallbackAllocate, )
Calls @callback for every CellRenderer
in @self with the
allocated rectangle inside @cell_area.
§context
the CellArea
Context for this row of data.
§widget
the Widget
that @self is rendering to
§cell_area
the @widget relative coordinates and size for @self
§background_area
the @widget relative coordinates of the background area
§callback
the GtkCellAllocCallback
to call
§callback_data
user provided data pointer
Sourcefn remove<R: IsA<CellRenderer>>(&self, renderer: &R)
👎Deprecated: Since 4.10
fn remove<R: IsA<CellRenderer>>(&self, renderer: &R)
Sourcefn is_activatable(&self) -> bool
👎Deprecated: Since 4.10
fn is_activatable(&self) -> bool
Sourcefn focus(&self, direction_type: DirectionType) -> bool
👎Deprecated: Since 4.10
fn focus(&self, direction_type: DirectionType) -> bool
This should be called by the @self’s owning layout widget when focus is to be passed to @self, or moved within @self for a given @direction and row data.
Implementing CellArea
classes should implement this
method to receive and navigate focus in its own way particular
to how it lays out cells.
§Deprecated since 4.10
§direction
the DirectionType
§Returns
true
if focus remains inside @self as a result of this call.
Sourcefn request_mode(&self) -> SizeRequestMode
👎Deprecated: Since 4.10
fn request_mode(&self) -> SizeRequestMode
Gets whether the area prefers a height-for-width layout or a width-for-height layout.
§Returns
The SizeRequestMode
preferred by @self.
Sourcefn preferred_width<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
) -> (i32, i32)
👎Deprecated: Since 4.10
fn preferred_width<P: IsA<CellAreaContext>, W: IsA<Widget>>( &self, context: &P, widget: &W, ) -> (i32, i32)
Retrieves a cell area’s initial minimum and natural width.
@self will store some geometrical information in @context along the way; when requesting sizes over an arbitrary number of rows, it’s not important to check the @minimum_width and @natural_width of this call but rather to consult gtk_cell_area_context_get_preferred_width() after a series of requests.
§Deprecated since 4.10
§context
the CellArea
Context to perform this request with
§widget
the Widget
where @self will be rendering
§Returns
§minimum_width
location to store the minimum width
§natural_width
location to store the natural width
Sourcefn preferred_width_for_height<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
height: i32,
) -> (i32, i32)
👎Deprecated: Since 4.10
fn preferred_width_for_height<P: IsA<CellAreaContext>, W: IsA<Widget>>( &self, context: &P, widget: &W, height: i32, ) -> (i32, i32)
Retrieves a cell area’s minimum and natural width if it would be given the specified @height.
@self stores some geometrical information in @context along the way while calling gtk_cell_area_get_preferred_height(). It’s important to perform a series of gtk_cell_area_get_preferred_height() requests with @context first and then call gtk_cell_area_get_preferred_width_for_height() on each cell area individually to get the height for width of each fully requested row.
If at some point, the height of a single row changes, it should be requested with gtk_cell_area_get_preferred_height() again and then the full height of the requested rows checked again with gtk_cell_area_context_get_preferred_height().
§Deprecated since 4.10
§context
the CellArea
Context which has already been requested for widths.
§widget
the Widget
where @self will be rendering
§height
the height for which to check the width of this area
§Returns
§minimum_width
location to store the minimum width
§natural_width
location to store the natural width
Sourcefn preferred_height<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
) -> (i32, i32)
👎Deprecated: Since 4.10
fn preferred_height<P: IsA<CellAreaContext>, W: IsA<Widget>>( &self, context: &P, widget: &W, ) -> (i32, i32)
Retrieves a cell area’s initial minimum and natural height.
@self will store some geometrical information in @context along the way; when requesting sizes over an arbitrary number of rows, it’s not important to check the @minimum_height and @natural_height of this call but rather to consult gtk_cell_area_context_get_preferred_height() after a series of requests.
§Deprecated since 4.10
§context
the CellArea
Context to perform this request with
§widget
the Widget
where @self will be rendering
§Returns
§minimum_height
location to store the minimum height
§natural_height
location to store the natural height
Sourcefn preferred_height_for_width<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
widget: &W,
width: i32,
) -> (i32, i32)
👎Deprecated: Since 4.10
fn preferred_height_for_width<P: IsA<CellAreaContext>, W: IsA<Widget>>( &self, context: &P, widget: &W, width: i32, ) -> (i32, i32)
Retrieves a cell area’s minimum and natural height if it would be given the specified @width.
@self stores some geometrical information in @context along the way while calling gtk_cell_area_get_preferred_width(). It’s important to perform a series of gtk_cell_area_get_preferred_width() requests with @context first and then call gtk_cell_area_get_preferred_height_for_width() on each cell area individually to get the height for width of each fully requested row.
If at some point, the width of a single row changes, it should be requested with gtk_cell_area_get_preferred_width() again and then the full width of the requested rows checked again with gtk_cell_area_context_get_preferred_width().
§Deprecated since 4.10
§context
the CellArea
Context which has already been requested for widths.
§widget
the Widget
where @self will be rendering
§width
the width for which to check the height of this area
§Returns
§minimum_height
location to store the minimum height
§natural_height
location to store the natural height
Sourcefn snapshot<P: IsA<CellAreaContext>, W: IsA<Widget>>(
&self,
context: &P,
snapshot: &Snapshot,
widget: &W,
background_area: &Rectangle,
cellarea: &Rectangle,
flags: CellRendererState,
paint_focus: bool,
)
👎Deprecated: Since 4.10
fn snapshot<P: IsA<CellAreaContext>, W: IsA<Widget>>( &self, context: &P, snapshot: &Snapshot, widget: &W, background_area: &Rectangle, cellarea: &Rectangle, flags: CellRendererState, paint_focus: bool, )
Snapshots @self’s cells according to @self’s layout onto at the given coordinates.
§Deprecated since 4.10
§context
the CellArea
Context for this row of data.
§widget
the Widget
that @self is rendering to
§snapshot
the Snapshot
to draw to
§background_area
the @widget relative coordinates for @self’s background
§cell_area
the @widget relative coordinates for @self
§flags
the CellRenderer
State for @self in this row.
§paint_focus
whether @self should paint focus on focused cells for focused rows or not.
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.