Trait gtk4::subclass::cell_renderer::CellRendererImpl

source ·
pub trait CellRendererImpl: CellRendererImplExt + ObjectImpl {
    // Provided methods
    fn activate<P: IsA<Widget>>(
        &self,
        event: Option<&Event>,
        widget: &P,
        path: &str,
        background_area: &Rectangle,
        cell_area: &Rectangle,
        flags: CellRendererState
    ) -> bool { ... }
    fn editing_canceled(&self) { ... }
    fn editing_started(&self, editable: &CellEditable, path: &str) { ... }
    fn aligned_area<P: IsA<Widget>>(
        &self,
        widget: &P,
        flags: CellRendererState,
        cell_area: &Rectangle
    ) -> Rectangle { ... }
    fn preferred_height_for_width<P: IsA<Widget>>(
        &self,
        widget: &P,
        width: i32
    ) -> (i32, i32) { ... }
    fn preferred_height<P: IsA<Widget>>(&self, widget: &P) -> (i32, i32) { ... }
    fn preferred_width_for_height<P: IsA<Widget>>(
        &self,
        widget: &P,
        height: i32
    ) -> (i32, i32) { ... }
    fn preferred_width<P: IsA<Widget>>(&self, widget: &P) -> (i32, i32) { ... }
    fn request_mode(&self) -> SizeRequestMode { ... }
    fn snapshot<P: IsA<Widget>>(
        &self,
        snapshot: &Snapshot,
        widget: &P,
        background_area: &Rectangle,
        cell_area: &Rectangle,
        flags: CellRendererState
    ) { ... }
    fn start_editing<P: IsA<Widget>>(
        &self,
        event: Option<&Event>,
        widget: &P,
        path: &str,
        background_area: &Rectangle,
        cell_area: &Rectangle,
        flags: CellRendererState
    ) -> Option<CellEditable> { ... }
}
👎Deprecated: Since 4.10

Provided Methods§

source

fn activate<P: IsA<Widget>>( &self, event: Option<&Event>, widget: &P, path: &str, background_area: &Rectangle, cell_area: &Rectangle, flags: CellRendererState ) -> bool

👎Deprecated: Since 4.10

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.

§Deprecated since 4.10
§event

a gdk::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

source

fn editing_canceled(&self)

👎Deprecated: Since 4.10

Signal gets emitted when the user cancels the process of editing a cell.

source

fn editing_started(&self, editable: &CellEditable, path: &str)

👎Deprecated: Since 4.10

Signal gets emitted when a cell starts to be edited.

source

fn aligned_area<P: IsA<Widget>>( &self, widget: &P, flags: CellRendererState, cell_area: &Rectangle ) -> Rectangle

👎Deprecated: Since 4.10

Gets the aligned area used by @self inside @cell_area. Used for finding the appropriate edit and focus rectangle.

§Deprecated since 4.10
§widget

the Widget this cell will be rendering to

§flags

render flags

§cell_area

cell area which would be passed to gtk_cell_renderer_render()

§Returns
§aligned_area

the return location for the space inside @cell_area that would actually be used to render.

source

fn preferred_height_for_width<P: IsA<Widget>>( &self, widget: &P, width: i32 ) -> (i32, i32)

👎Deprecated: Since 4.10

Retrieves a cell renderers’s minimum and natural height if it were rendered to @widget with the specified @width.

§Deprecated since 4.10
§widget

the Widget this cell will be rendering to

§width

the size which is available for allocation

§Returns
§minimum_height

location for storing the minimum size

§natural_height

location for storing the preferred size

source

fn preferred_height<P: IsA<Widget>>(&self, widget: &P) -> (i32, i32)

👎Deprecated: Since 4.10

Retrieves a renderer’s natural size when rendered to @widget.

§Deprecated since 4.10
§widget

the Widget this cell will be rendering to

§Returns
§minimum_size

location to store the minimum size

§natural_size

location to store the natural size

source

fn preferred_width_for_height<P: IsA<Widget>>( &self, widget: &P, height: i32 ) -> (i32, i32)

👎Deprecated: Since 4.10

Retrieves a cell renderers’s minimum and natural width if it were rendered to @widget with the specified @height.

§Deprecated since 4.10
§widget

the Widget this cell will be rendering to

§height

the size which is available for allocation

§Returns
§minimum_width

location for storing the minimum size

§natural_width

location for storing the preferred size

source

fn preferred_width<P: IsA<Widget>>(&self, widget: &P) -> (i32, i32)

👎Deprecated: Since 4.10

Retrieves a renderer’s natural size when rendered to @widget.

§Deprecated since 4.10
§widget

the Widget this cell will be rendering to

§Returns
§minimum_size

location to store the minimum size

§natural_size

location to store the natural size

source

fn request_mode(&self) -> SizeRequestMode

👎Deprecated: Since 4.10

Gets whether the cell renderer prefers a height-for-width layout or a width-for-height layout.

§Deprecated since 4.10
§Returns

The SizeRequestMode preferred by this renderer.

source

fn snapshot<P: IsA<Widget>>( &self, snapshot: &Snapshot, widget: &P, background_area: &Rectangle, cell_area: &Rectangle, flags: CellRendererState )

👎Deprecated: Since 4.10

Invokes the virtual render function of the CellRenderer. The three passed-in rectangles are areas in @cr. Most renderers will draw within @cell_area; the xalign, yalign, xpad, and ypad fields of the CellRenderer should be honored with respect to @cell_area. @background_area includes the blank space around the cell, and also the area containing the tree expander; so the @background_area rectangles for all cells tile to cover the entire @window.

§Deprecated since 4.10
§snapshot

a Snapshot to draw to

§widget

the widget owning @window

§background_area

entire cell area (including tree expanders and maybe padding on the sides)

§cell_area

area normally rendered by a cell renderer

§flags

flags that affect rendering

source

fn start_editing<P: IsA<Widget>>( &self, event: Option<&Event>, widget: &P, path: &str, background_area: &Rectangle, cell_area: &Rectangle, flags: CellRendererState ) -> Option<CellEditable>

👎Deprecated: Since 4.10

Starts editing the contents of this @self, through a new CellEditable widget created by the CellRendererClass.start_editing virtual function.

§Deprecated since 4.10
§event

a gdk::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

Object Safety§

This trait is not object safe.

Implementors§