Skip to main content

PanelView

Trait PanelView 

Source
pub trait PanelView: PanelView {
    // Required methods
    fn tab_name(&self, cx: &App) -> Option<SharedString>;
    fn title(&self, window: &mut Window, cx: &mut App) -> AnyElement;
    fn title_style(&self, cx: &App) -> Option<TitleStyle>;
    fn title_suffix(
        &self,
        window: &mut Window,
        cx: &mut App,
    ) -> Option<AnyElement>;
    fn toolbar_buttons(
        &self,
        window: &mut Window,
        cx: &mut App,
    ) -> Option<Vec<Button>>;
    fn dropdown_menu(
        &self,
        menu: PopupMenu,
        window: &mut Window,
        cx: &mut App,
    ) -> PopupMenu;
    fn zoom_control(&self, cx: &App) -> Option<PanelControl>;
    fn inner_padding(&self, cx: &App) -> bool;
}
Expand description

Object-safe counterpart of Panel, and the presentation half of the handle a skin holds.

Required Methods§

Source

fn tab_name(&self, cx: &App) -> Option<SharedString>

Source

fn title(&self, window: &mut Window, cx: &mut App) -> AnyElement

Source

fn title_style(&self, cx: &App) -> Option<TitleStyle>

Source

fn title_suffix(&self, window: &mut Window, cx: &mut App) -> Option<AnyElement>

Source

fn toolbar_buttons( &self, window: &mut Window, cx: &mut App, ) -> Option<Vec<Button>>

Source

fn dropdown_menu( &self, menu: PopupMenu, window: &mut Window, cx: &mut App, ) -> PopupMenu

Source

fn zoom_control(&self, cx: &App) -> Option<PanelControl>

Source

fn inner_padding(&self, cx: &App) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Panel> PanelView for Entity<T>

Source§

fn tab_name(&self, cx: &App) -> Option<SharedString>

Source§

fn title(&self, window: &mut Window, cx: &mut App) -> AnyElement

Source§

fn title_style(&self, cx: &App) -> Option<TitleStyle>

Source§

fn title_suffix(&self, window: &mut Window, cx: &mut App) -> Option<AnyElement>

Source§

fn toolbar_buttons( &self, window: &mut Window, cx: &mut App, ) -> Option<Vec<Button>>

Source§

fn dropdown_menu( &self, menu: PopupMenu, window: &mut Window, cx: &mut App, ) -> PopupMenu

Source§

fn zoom_control(&self, cx: &App) -> Option<PanelControl>

Source§

fn inner_padding(&self, cx: &App) -> bool

Implementors§