PanelView

Trait PanelView 

Source
pub trait PanelView:
    'static
    + Send
    + Sync {
Show 17 methods // Required methods fn panel_name(&self, cx: &App) -> &'static str; fn panel_id(&self, cx: &App) -> EntityId; fn tab_name(&self, cx: &App) -> Option<SharedString>; fn title(&self, window: &Window, cx: &App) -> AnyElement; fn title_suffix( &self, window: &mut Window, cx: &mut App, ) -> Option<AnyElement>; fn title_style(&self, cx: &App) -> Option<TitleStyle>; fn closable(&self, cx: &App) -> bool; fn zoomable(&self, cx: &App) -> Option<PanelControl>; fn visible(&self, cx: &App) -> bool; fn set_active(&self, active: bool, window: &mut Window, cx: &mut App); fn set_zoomed(&self, zoomed: bool, window: &mut Window, cx: &mut App); fn popup_menu( &self, menu: PopupMenu, window: &Window, cx: &App, ) -> PopupMenu; fn toolbar_buttons( &self, window: &mut Window, cx: &mut App, ) -> Option<Vec<Button>>; fn view(&self) -> AnyView; fn focus_handle(&self, cx: &App) -> FocusHandle; fn dump(&self, cx: &App) -> PanelState; fn inner_padding(&self, cx: &App) -> bool;
}
Expand description

The PanelView trait used to define the panel view.

Required Methods§

Source

fn panel_name(&self, cx: &App) -> &'static str

Source

fn panel_id(&self, cx: &App) -> EntityId

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn set_active(&self, active: bool, window: &mut Window, cx: &mut App)

Source

fn set_zoomed(&self, zoomed: bool, window: &mut Window, cx: &mut App)

Source

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

Source

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

Source

fn view(&self) -> AnyView

Source

fn focus_handle(&self, cx: &App) -> FocusHandle

Source

fn dump(&self, cx: &App) -> PanelState

Source

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

Trait Implementations§

Source§

impl From<&(dyn PanelView + 'static)> for AnyView

Source§

fn from(handle: &dyn PanelView) -> Self

Converts to this type from the input type.
Source§

impl<T: Panel> From<&(dyn PanelView + 'static)> for Entity<T>

Source§

fn from(value: &dyn PanelView) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for dyn PanelView

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Implementations on Foreign Types§

Source§

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

Source§

fn panel_name(&self, cx: &App) -> &'static str

Source§

fn panel_id(&self, _: &App) -> EntityId

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn set_active(&self, active: bool, window: &mut Window, cx: &mut App)

Source§

fn set_zoomed(&self, zoomed: bool, window: &mut Window, cx: &mut App)

Source§

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

Source§

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

Source§

fn view(&self) -> AnyView

Source§

fn focus_handle(&self, cx: &App) -> FocusHandle

Source§

fn dump(&self, cx: &App) -> PanelState

Source§

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

Implementors§