Trait gtk4::prelude::CellAreaExt

source ·
pub trait CellAreaExt: 'static {
Show 44 methods fn activate(
        &self,
        context: &impl IsA<CellAreaContext>,
        widget: &impl IsA<Widget>,
        cell_area: &Rectangle,
        flags: CellRendererState,
        edit_only: bool
    ) -> bool; fn activate_cell(
        &self,
        widget: &impl IsA<Widget>,
        renderer: &impl IsA<CellRenderer>,
        event: impl AsRef<Event>,
        cell_area: &Rectangle,
        flags: CellRendererState
    ) -> bool; fn add(&self, renderer: &impl IsA<CellRenderer>); fn add_focus_sibling(
        &self,
        renderer: &impl IsA<CellRenderer>,
        sibling: &impl IsA<CellRenderer>
    ); fn apply_attributes(
        &self,
        tree_model: &impl IsA<TreeModel>,
        iter: &TreeIter,
        is_expander: bool,
        is_expanded: bool
    ); fn attribute_connect(
        &self,
        renderer: &impl IsA<CellRenderer>,
        attribute: &str,
        column: i32
    ); fn attribute_disconnect(
        &self,
        renderer: &impl IsA<CellRenderer>,
        attribute: &str
    ); fn attribute_get_column(
        &self,
        renderer: &impl IsA<CellRenderer>,
        attribute: &str
    ) -> i32; fn copy_context(
        &self,
        context: &impl IsA<CellAreaContext>
    ) -> CellAreaContext; fn create_context(&self) -> CellAreaContext; fn event(
        &self,
        context: &impl IsA<CellAreaContext>,
        widget: &impl IsA<Widget>,
        event: impl AsRef<Event>,
        cell_area: &Rectangle,
        flags: CellRendererState
    ) -> i32; fn focus(&self, direction: DirectionType) -> bool; fn foreach<P: FnMut(&CellRenderer) -> bool>(&self, callback: P); fn foreach_alloc<P: FnMut(&CellRenderer, &Rectangle, &Rectangle) -> bool>(
        &self,
        context: &impl IsA<CellAreaContext>,
        widget: &impl IsA<Widget>,
        cell_area: &Rectangle,
        background_area: &Rectangle,
        callback: P
    ); fn cell_allocation(
        &self,
        context: &impl IsA<CellAreaContext>,
        widget: &impl IsA<Widget>,
        renderer: &impl IsA<CellRenderer>,
        cell_area: &Rectangle
    ) -> Rectangle; fn cell_at_position(
        &self,
        context: &impl IsA<CellAreaContext>,
        widget: &impl IsA<Widget>,
        cell_area: &Rectangle,
        x: i32,
        y: i32
    ) -> (CellRenderer, Rectangle); fn current_path_string(&self) -> GString; fn edit_widget(&self) -> Option<CellEditable>; fn edited_cell(&self) -> Option<CellRenderer>; fn focus_cell(&self) -> Option<CellRenderer>; fn focus_from_sibling(
        &self,
        renderer: &impl IsA<CellRenderer>
    ) -> Option<CellRenderer>; fn focus_siblings(
        &self,
        renderer: &impl IsA<CellRenderer>
    ) -> Vec<CellRenderer>; fn preferred_height(
        &self,
        context: &impl IsA<CellAreaContext>,
        widget: &impl IsA<Widget>
    ) -> (i32, i32); fn preferred_height_for_width(
        &self,
        context: &impl IsA<CellAreaContext>,
        widget: &impl IsA<Widget>,
        width: i32
    ) -> (i32, i32); fn preferred_width(
        &self,
        context: &impl IsA<CellAreaContext>,
        widget: &impl IsA<Widget>
    ) -> (i32, i32); fn preferred_width_for_height(
        &self,
        context: &impl IsA<CellAreaContext>,
        widget: &impl IsA<Widget>,
        height: i32
    ) -> (i32, i32); fn request_mode(&self) -> SizeRequestMode; fn has_renderer(&self, renderer: &impl IsA<CellRenderer>) -> bool; fn inner_cell_area(
        &self,
        widget: &impl IsA<Widget>,
        cell_area: &Rectangle
    ) -> Rectangle; fn is_activatable(&self) -> bool; fn is_focus_sibling(
        &self,
        renderer: &impl IsA<CellRenderer>,
        sibling: &impl IsA<CellRenderer>
    ) -> bool; fn remove(&self, renderer: &impl IsA<CellRenderer>); fn remove_focus_sibling(
        &self,
        renderer: &impl IsA<CellRenderer>,
        sibling: &impl IsA<CellRenderer>
    ); fn request_renderer(
        &self,
        renderer: &impl IsA<CellRenderer>,
        orientation: Orientation,
        widget: &impl IsA<Widget>,
        for_size: i32
    ) -> (i32, i32); fn set_focus_cell(&self, renderer: Option<&impl IsA<CellRenderer>>); fn snapshot(
        &self,
        context: &impl IsA<CellAreaContext>,
        widget: &impl IsA<Widget>,
        snapshot: &impl IsA<Snapshot>,
        background_area: &Rectangle,
        cell_area: &Rectangle,
        flags: CellRendererState,
        paint_focus: bool
    ); fn stop_editing(&self, canceled: bool); fn connect_add_editable<F: Fn(&Self, &CellRenderer, &CellEditable, &Rectangle, TreePath) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_apply_attributes<F: Fn(&Self, &TreeModel, &TreeIter, bool, bool) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_focus_changed<F: Fn(&Self, &CellRenderer, TreePath) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_remove_editable<F: Fn(&Self, &CellRenderer, &CellEditable) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_edit_widget_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_edited_cell_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_focus_cell_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Trait containing all CellArea methods.

Implementors

CellAreaBox, CellArea

Required Methods§

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 CellAreaContext 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 CellRendererState 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.

This is used by CellArea subclasses when handling events to activate cells, the base CellArea class activates cells for keyboard events for free in its own GtkCellArea->activate() implementation.

Deprecated since 4.10
widget

the Widget that @self is rendering onto

renderer

the CellRenderer in @self to activate

event

the gdk::Event for which cell activation should occur

cell_area

the gdk::Rectangle in @widget relative coordinates of @renderer for the current row.

flags

the CellRendererState for @renderer

Returns

whether cell activation was successful

Implementors§