pub trait Panel: View {
Show 18 methods
// Required methods
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_path(&self, cx: &WindowContext<'_>) -> Option<&'static str>;
fn icon_tooltip(&self) -> (String, Option<Box<dyn Action>>);
fn should_change_position_on_event(_: &Self::Event) -> bool;
fn has_focus(&self, cx: &WindowContext<'_>) -> bool;
fn is_focus_event(_: &Self::Event) -> bool;
// Provided methods
fn icon_label(&self, _: &WindowContext<'_>) -> Option<String> { ... }
fn should_zoom_in_on_event(_: &Self::Event) -> bool { ... }
fn should_zoom_out_on_event(_: &Self::Event) -> bool { ... }
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>) { ... }
fn should_activate_on_event(_: &Self::Event) -> bool { ... }
fn should_close_on_event(_: &Self::Event) -> bool { ... }
}