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>) { ... }
}