[−][src]Trait kas::Window
Functionality required by a window
Required methods
fn title(&self) -> &str
Get the window title
fn restrict_dimensions(&self) -> (bool, bool)
Whether to limit the maximum size of a window
All widgets' size rules allow calculation of two sizes: the minimum size and the ideal size. Windows are initially sized to the ideal size. This option controls whether the window size is restricted by the calculated minimum size and by the ideal size.
Return value is (restrict_min, restrict_max)
. Suggested is to use
(true, true)
for simple dialog boxes and (true, false)
for complex
windows.
fn add_popup(
&mut self,
size_handle: &mut dyn SizeHandle,
mgr: &mut Manager,
id: WindowId,
popup: Popup
)
&mut self,
size_handle: &mut dyn SizeHandle,
mgr: &mut Manager,
id: WindowId,
popup: Popup
)
fn resize_popups(&mut self, size_handle: &mut dyn SizeHandle)
Resize popups
This is called immediately after Layout::set_rect
to resize
existing pop-ups.
fn remove_popup(&mut self, mgr: &mut Manager, id: WindowId)
Trigger closure of a pop-up
If the given id
refers to a pop-up, it should be closed.
Provided methods
fn handle_closure(&mut self, _mgr: &mut Manager)
Handle closure of self
This allows for actions on destruction, but doesn't need to do anything.
Implementors
impl Window for MessageBox
[src]
fn title(&self) -> &str
[src]
fn restrict_dimensions(&self) -> (bool, bool)
[src]
fn add_popup(
&mut self,
_: &mut dyn SizeHandle,
_: &mut Manager,
_: WindowId,
_: Popup
)
[src]
&mut self,
_: &mut dyn SizeHandle,
_: &mut Manager,
_: WindowId,
_: Popup
)
fn remove_popup(&mut self, _: &mut Manager, _: WindowId)
[src]
fn resize_popups(&mut self, _: &mut dyn SizeHandle)
[src]
impl<W: Widget<Msg = VoidMsg> + 'static> Window for Window<W>
[src]
fn title(&self) -> &str
[src]
fn restrict_dimensions(&self) -> (bool, bool)
[src]
fn add_popup(
&mut self,
size_handle: &mut dyn SizeHandle,
mgr: &mut Manager,
id: WindowId,
popup: Popup
)
[src]
&mut self,
size_handle: &mut dyn SizeHandle,
mgr: &mut Manager,
id: WindowId,
popup: Popup
)