Trait workspace2::dock::Panel

source ·
pub trait Panel: FocusableView + EventEmitter<PanelEvent> {
Show 13 methods // Required methods fn persistent_name() -> &'static str; fn position(&self, cx: &WindowContext<'_>) -> DockPosition; fn position_is_valid(&self, position: DockPosition) -> bool; fn set_position( &mut self, position: DockPosition, cx: &mut ViewContext<'_, Self> ); fn size(&self, cx: &WindowContext<'_>) -> f32; fn set_size(&mut self, size: Option<f32>, cx: &mut ViewContext<'_, Self>); fn icon(&self, cx: &WindowContext<'_>) -> Option<Icon>; fn toggle_action(&self) -> Box<dyn Action>; fn has_focus(&self, cx: &WindowContext<'_>) -> bool; // Provided methods fn icon_label(&self, _: &WindowContext<'_>) -> Option<String> { ... } fn is_zoomed(&self, _cx: &WindowContext<'_>) -> bool { ... } fn set_zoomed(&mut self, _zoomed: bool, _cx: &mut ViewContext<'_, Self>) { ... } fn set_active(&mut self, _active: bool, _cx: &mut ViewContext<'_, Self>) { ... }
}

Required Methods§

source

fn persistent_name() -> &'static str

source

fn position(&self, cx: &WindowContext<'_>) -> DockPosition

source

fn position_is_valid(&self, position: DockPosition) -> bool

source

fn set_position( &mut self, position: DockPosition, cx: &mut ViewContext<'_, Self> )

source

fn size(&self, cx: &WindowContext<'_>) -> f32

source

fn set_size(&mut self, size: Option<f32>, cx: &mut ViewContext<'_, Self>)

source

fn icon(&self, cx: &WindowContext<'_>) -> Option<Icon>

source

fn toggle_action(&self) -> Box<dyn Action>

source

fn has_focus(&self, cx: &WindowContext<'_>) -> bool

Provided Methods§

source

fn icon_label(&self, _: &WindowContext<'_>) -> Option<String>

source

fn is_zoomed(&self, _cx: &WindowContext<'_>) -> bool

source

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

source

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

Implementors§