pub trait ToolbarItemView: Render + EventEmitter<ToolbarItemEvent> {
    // Required method
    fn set_active_pane_item(
        &mut self,
        active_pane_item: Option<&dyn ItemHandle>,
        cx: &mut ViewContext<'_, Self>
    ) -> ToolbarItemLocation;

    // Provided methods
    fn pane_focus_update(
        &mut self,
        _pane_focused: bool,
        _cx: &mut ViewContext<'_, Self>
    ) { ... }
    fn row_count(&self, _cx: &WindowContext<'_>) -> usize { ... }
}

Required Methods§

source

fn set_active_pane_item( &mut self, active_pane_item: Option<&dyn ItemHandle>, cx: &mut ViewContext<'_, Self> ) -> ToolbarItemLocation

Provided Methods§

source

fn pane_focus_update( &mut self, _pane_focused: bool, _cx: &mut ViewContext<'_, Self> )

source

fn row_count(&self, _cx: &WindowContext<'_>) -> usize

Number of times toolbar’s height will be repeated to get the effective height. Useful when multiple rows one under each other are needed. The rows have the same width and act as a whole when reacting to resizes and similar events.

Implementors§