Trait fltk::prelude::GroupExt [−][src]
pub unsafe trait GroupExt: WidgetExt {
Show 22 methods
fn begin(&self);
fn end(&self);
fn clear(&mut self);
fn children(&self) -> i32;
fn child(&self, idx: i32) -> Option<Widget>;
fn find<W: WidgetExt>(&self, widget: &W) -> i32
where
Self: Sized;
fn add<W: WidgetExt>(&mut self, widget: &W)
where
Self: Sized;
fn insert<W: WidgetExt>(&mut self, widget: &W, index: i32)
where
Self: Sized;
fn remove<W: WidgetExt>(&mut self, widget: &W)
where
Self: Sized;
fn remove_by_index(&mut self, idx: i32);
fn resizable<W: WidgetExt>(&self, widget: &W)
where
Self: Sized;
fn make_resizable(&mut self, val: bool);
fn add_resizable<W: WidgetExt>(&mut self, widget: &W)
where
Self: Sized;
fn set_clip_children(&mut self, flag: bool);
fn clip_children(&mut self) -> bool;
fn draw_child<W: WidgetExt>(&self, w: &mut W)
where
Self: Sized;
fn update_child<W: WidgetExt>(&self, w: &mut W)
where
Self: Sized;
fn draw_outside_label<W: WidgetExt>(&self, w: &mut W)
where
Self: Sized;
fn draw_children(&mut self);
fn init_sizes(&mut self);
fn bounds(&self) -> Vec<(i32, i32, i32, i32)>;
unsafe fn into_group(&self) -> Group;
}
Expand description
Defines the methods implemented by all group widgets
Required methods
Find a widget within a group and return its index
Insert a widget to a group at a certain index
Remove a widget from a group, but does not delete it
fn remove_by_index(&mut self, idx: i32)
fn remove_by_index(&mut self, idx: i32)
Remove a child widget by its index
The resizable widget defines both the resizing frame and the resizing behavior of the group and its children.
fn make_resizable(&mut self, val: bool)
fn make_resizable(&mut self, val: bool)
Make the group itself resizable, should be called before the widget is shown
fn add_resizable<W: WidgetExt>(&mut self, widget: &W) where
Self: Sized,
fn add_resizable<W: WidgetExt>(&mut self, widget: &W) where
Self: Sized,
Adds a widget to the group and makes it the resizable widget
fn set_clip_children(&mut self, flag: bool)
fn set_clip_children(&mut self, flag: bool)
Clips children outside the group boundaries
fn clip_children(&mut self) -> bool
fn clip_children(&mut self) -> bool
Get whether clip_children
is set
fn draw_child<W: WidgetExt>(&self, w: &mut W) where
Self: Sized,
fn draw_child<W: WidgetExt>(&self, w: &mut W) where
Self: Sized,
Draw a child widget, the call should be in a WidgetBase::draw
method
fn update_child<W: WidgetExt>(&self, w: &mut W) where
Self: Sized,
fn update_child<W: WidgetExt>(&self, w: &mut W) where
Self: Sized,
Update a child widget, the call should be in a WidgetBase::draw
method
fn draw_outside_label<W: WidgetExt>(&self, w: &mut W) where
Self: Sized,
fn draw_outside_label<W: WidgetExt>(&self, w: &mut W) where
Self: Sized,
Draw the outside label, the call should be in a WidgetBase::draw
method
fn draw_children(&mut self)
fn draw_children(&mut self)
Draw children, the call should be in a WidgetBase::draw
method
fn init_sizes(&mut self)
fn init_sizes(&mut self)
Resets the internal array of widget sizes and positions
Get the bounds of all children widgets (left, upper, right, bottom)
unsafe fn into_group(&self) -> Group
unsafe fn into_group(&self) -> Group
Converts a widget implementing GroupExt into a Group widget
Safety
If the widget wasn’t created by fltk-rs, vtable differences mean certain methods can’t be overriden (e.g. handle & draw)