pub trait CellAreaImpl: ObjectImpl + ObjectSubclass<Type: IsA<CellArea> + IsA<Buildable> + IsA<CellLayout>> {
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,
) { ... }
}Since 4.10
Provided Methods§
fn cell_properties() -> &'static [ParamSpec]
Since 4.10
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, )
Since 4.10
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
Since 4.10
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
Since 4.10
Activates @area, 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 CellAreaContext in context with the current row data
§widget
the Widget that @area is rendering on
§cell_area
s allocation
§flags
the CellRendererState flags for @area for this row of data.
§edit_only
if true then only cell renderers that are CellRendererMode::Editable
will be activated.
§Returns
Whether @area was successfully activated.
Sourcefn add<R: IsA<CellRenderer>>(&self, renderer: &R)
👎Deprecated: Since 4.10
fn add<R: IsA<CellRenderer>>(&self, renderer: &R)
Since 4.10
Adds @renderer to @area with the default child cell properties.
§Deprecated since 4.10
§renderer
the CellRenderer to add to @area
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, )
Since 4.10
Applies any connected attributes to the renderers in @area 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>
Since 4.10
Creates a CellAreaContext to be used with @area for
all purposes. CellAreaContext 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 CellAreaContext
which was used to request the size of those rows of data).
§Deprecated since 4.10
§Returns
a newly created CellAreaContext which can be used with @area.
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>
Since 4.10
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 CellAreaContext to copy
§Returns
a newly created CellAreaContext 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
Since 4.10
Delegates event handling to a CellArea.
§Deprecated since 4.10
§context
the CellAreaContext for this row of data.
§widget
the Widget that @area is rendering to
§event
the gdk::Event to handle
§cell_area
the @widget relative coordinates for @area
§flags
the CellRendererState for @area in this row.
§Returns
true if the event was handled by @area.
Sourcefn foreach(&self, callback: &CellCallback)
👎Deprecated: Since 4.10
fn foreach(&self, callback: &CellCallback)
Since 4.10
Calls @callback for every CellRenderer in @area.
§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, )
Since 4.10
Calls @callback for every CellRenderer in @area with the
allocated rectangle inside @cell_area.
§Deprecated since 4.10
§context
the CellAreaContext for this row of data.
§widget
the Widget that @area is rendering to
§cell_area
the @widget relative coordinates and size for @area
§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)
Since 4.10
Sourcefn is_activatable(&self) -> bool
👎Deprecated: Since 4.10
fn is_activatable(&self) -> bool
Since 4.10
Sourcefn focus(&self, direction_type: DirectionType) -> bool
👎Deprecated: Since 4.10
fn focus(&self, direction_type: DirectionType) -> bool
Since 4.10
s owning layout widget when focus is to be passed to @area, or moved within @area 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 @area as a result of this call.
Sourcefn request_mode(&self) -> SizeRequestMode
👎Deprecated: Since 4.10
fn request_mode(&self) -> SizeRequestMode
Since 4.10
Gets whether the area prefers a height-for-width layout or a width-for-height layout.
§Deprecated since 4.10
§Returns
The SizeRequestMode preferred by @area.
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)
Since 4.10
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 CellAreaContext to perform this request with
§widget
the Widget where @area 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)
Since 4.10
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 CellAreaContext which has already been requested for widths.
§widget
the Widget where @area 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)
Since 4.10
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 CellAreaContext to perform this request with
§widget
the Widget where @area 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)
Since 4.10
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 CellAreaContext which has already been requested for widths.
§widget
the Widget where @area 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, )
Since 4.10
s layout onto at the given coordinates.
§Deprecated since 4.10
§context
the CellAreaContext for this row of data.
§widget
the Widget that @area is rendering to
§snapshot
the Snapshot to draw to
§background_area
s background
§cell_area
the @widget relative coordinates for @area
§flags
the CellRendererState for @area in this row.
§paint_focus
whether @area 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".