Trait gtk4::prelude::CellRendererExtManual
source · [−]pub trait CellRendererExtManual {
fn activate(
&self,
event: &impl AsRef<Event>,
widget: &impl IsA<Widget>,
path: &str,
background_area: &Rectangle,
cell_area: &Rectangle,
flags: CellRendererState
) -> bool;
fn start_editing(
&self,
event: Option<&impl AsRef<Event>>,
widget: &impl IsA<Widget>,
path: &str,
background_area: &Rectangle,
cell_area: &Rectangle,
flags: CellRendererState
) -> Option<CellEditable>;
}
Expand description
Trait containing manually implemented methods of CellRenderer
.
Required methods
Passes an activate event to the cell renderer for possible processing.
Some cell renderers may use events; for example, CellRendererToggle
toggles when it gets a mouse click.
event
widget
widget that received the event
path
widget-dependent string representation of the event location;
e.g. for TreeView
, a string representation of TreePath
background_area
background area as passed to gtk_cell_renderer_render()
cell_area
cell area as passed to gtk_cell_renderer_render()
flags
render flags
Returns
true
if the event was consumed/handled
fn start_editing(
&self,
event: Option<&impl AsRef<Event>>,
widget: &impl IsA<Widget>,
path: &str,
background_area: &Rectangle,
cell_area: &Rectangle,
flags: CellRendererState
) -> Option<CellEditable>
fn start_editing(
&self,
event: Option<&impl AsRef<Event>>,
widget: &impl IsA<Widget>,
path: &str,
background_area: &Rectangle,
cell_area: &Rectangle,
flags: CellRendererState
) -> Option<CellEditable>
Starts editing the contents of this @self, through a new CellEditable
widget created by the CellRenderer
Class.start_editing virtual function.
event
widget
widget that received the event
path
widget-dependent string representation of the event location;
e.g. for TreeView
, a string representation of TreePath
background_area
background area as passed to gtk_cell_renderer_render()
cell_area
cell area as passed to gtk_cell_renderer_render()
flags
render flags
Returns
A new CellEditable
for editing this
@self, or None
if editing is not possible