Skip to main content

PanelView

Trait PanelView 

Source
pub trait PanelView:
    'static
    + Send
    + Sync {
Show 19 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: &mut Window, cx: &mut 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 on_added_to( &self, tab_panel: WeakEntity<TabPanel>, window: &mut Window, cx: &mut App, ); fn on_removed(&self, window: &mut Window, cx: &mut App); fn dropdown_menu( &self, menu: PopupMenu, window: &mut Window, cx: &mut 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: &mut Window, cx: &mut 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 on_added_to( &self, tab_panel: WeakEntity<TabPanel>, window: &mut Window, cx: &mut App, )

Source

fn on_removed(&self, window: &mut Window, cx: &mut App)

Source

fn dropdown_menu( &self, menu: PopupMenu, window: &mut Window, cx: &mut 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 (const: unstable) · 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.

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 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: &mut Window, cx: &mut 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 on_added_to( &self, tab_panel: WeakEntity<TabPanel>, window: &mut Window, cx: &mut App, )

Source§

fn on_removed(&self, window: &mut Window, cx: &mut App)

Source§

fn dropdown_menu( &self, menu: PopupMenu, window: &mut Window, cx: &mut 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§