pub struct TheVLayout { /* private fields */ }Trait Implementations§
Source§impl TheLayout for TheVLayout
impl TheLayout for TheVLayout
fn new(id: TheId) -> TheVLayoutwhere
TheVLayout: Sized,
Source§fn set_margin(&mut self, margin: Vec4<i32>)
fn set_margin(&mut self, margin: Vec4<i32>)
Sets the margin for content in the layout
Source§fn set_padding(&mut self, padding: i32)
fn set_padding(&mut self, padding: i32)
Set the padding for content in the layout
Source§fn set_background_color(&mut self, color: Option<TheThemeColors>)
fn set_background_color(&mut self, color: Option<TheThemeColors>)
Set the background color for the layout
fn widgets(&mut self) -> &mut Vec<Box<dyn TheWidget>>
fn get_widget_at_coord( &mut self, coord: Vec2<i32>, ) -> Option<&mut Box<dyn TheWidget>>
fn get_widget( &mut self, name: Option<&String>, uuid: Option<&Uuid>, ) -> Option<&mut Box<dyn TheWidget>>
Source§fn dim_mut(&mut self) -> &mut TheDim
fn dim_mut(&mut self) -> &mut TheDim
Returns a mutable reference to the dimensions of the widget.
Source§fn set_dim(&mut self, dim: TheDim, ctx: &mut TheContext)
fn set_dim(&mut self, dim: TheDim, ctx: &mut TheContext)
Set the dimensions of the widget
Source§fn relayout(&mut self, ctx: &mut TheContext)
fn relayout(&mut self, ctx: &mut TheContext)
Relayouts the layout.
Source§fn limiter(&self) -> &TheSizeLimiter
fn limiter(&self) -> &TheSizeLimiter
Returns a reference to the size limiter of the widget.
Source§fn limiter_mut(&mut self) -> &mut TheSizeLimiter
fn limiter_mut(&mut self) -> &mut TheSizeLimiter
Returns a mutable reference to the limiter of the widget.
Source§fn draw(
&mut self,
buffer: &mut TheRGBABuffer,
style: &mut Box<dyn TheStyle>,
ctx: &mut TheContext,
)
fn draw( &mut self, buffer: &mut TheRGBABuffer, style: &mut Box<dyn TheStyle>, ctx: &mut TheContext, )
Draw the widget in the given style
Source§fn as_vlayout(&mut self) -> Option<&mut dyn TheVLayoutTrait>
fn as_vlayout(&mut self) -> Option<&mut dyn TheVLayoutTrait>
Attempts to cast to TheVLayoutTrait. Only valid for TheVLayout.
Source§fn needs_redraw(&mut self) -> bool
fn needs_redraw(&mut self) -> bool
If this function returns true it indicates that the layout needs a redraw.
Source§fn supports_mouse_wheel(&self) -> bool
fn supports_mouse_wheel(&self) -> bool
This layouts supports mouse wheel events (TheListLayout etc)
Source§fn mouse_wheel_scroll(&mut self, coord: Vec2<i32>)
fn mouse_wheel_scroll(&mut self, coord: Vec2<i32>)
And if yes, process them here.
fn get_layout( &mut self, name: Option<&String>, uuid: Option<&Uuid>, ) -> Option<&mut Box<dyn TheLayout>>
fn get_layout_at_coord(&mut self, coord: Vec2<i32>) -> Option<TheId>
fn redirected_widget_value( &mut self, widget_id: &TheId, value: &TheValue, ctx: &mut TheContext, )
Source§fn as_stack_layout(&mut self) -> Option<&mut dyn TheStackLayoutTrait>
fn as_stack_layout(&mut self) -> Option<&mut dyn TheStackLayoutTrait>
Attempts to cast to TheStackLayoutTrait. Only valid for TheStackLayout.
Source§fn as_list_layout(&mut self) -> Option<&mut dyn TheListLayoutTrait>
fn as_list_layout(&mut self) -> Option<&mut dyn TheListLayoutTrait>
Attempts to cast to TheListLayoutTrait. Only valid for TheListLayout.
Source§fn as_rowlist_layout(&mut self) -> Option<&mut dyn TheRowListLayoutTrait>
fn as_rowlist_layout(&mut self) -> Option<&mut dyn TheRowListLayoutTrait>
Attempts to cast to TheRowListLayoutTrait. Only valid for TheRowListLayout.
Source§fn as_rgba_layout(&mut self) -> Option<&mut dyn TheRGBALayoutTrait>
fn as_rgba_layout(&mut self) -> Option<&mut dyn TheRGBALayoutTrait>
Attempts to cast to TheRGBALayoutTrait. Only valid for TheRGBALayout.
Source§fn as_tab_layout(&mut self) -> Option<&mut dyn TheTabLayoutTrait>
fn as_tab_layout(&mut self) -> Option<&mut dyn TheTabLayoutTrait>
Attempts to cast to TheTabLayoutTrait. Only valid for TheTabLayout.
Attempts to cast to TheSharedHLayoutTrait. Only valid for TheSharedHLayout.
Attempts to cast to TheSharedVLayoutTrait. Only valid for TheSharedVLayout.
Source§fn as_hlayout(&mut self) -> Option<&mut dyn TheHLayoutTrait>
fn as_hlayout(&mut self) -> Option<&mut dyn TheHLayoutTrait>
Attempts to cast to TheHLayoutTrait. Only valid for TheHLayout.
Source§fn as_text_layout(&mut self) -> Option<&mut dyn TheTextLayoutTrait>
fn as_text_layout(&mut self) -> Option<&mut dyn TheTextLayoutTrait>
Attempts to cast to TheTextLayout. Only valid for TheTextLayout.
Source§fn as_tree_layout(&mut self) -> Option<&mut dyn TheTreeLayoutTrait>
fn as_tree_layout(&mut self) -> Option<&mut dyn TheTreeLayoutTrait>
Attempts to cast to TheTreeLayout. Only valid for TheTreeLayout.
Source§impl TheVLayoutTrait for TheVLayout
impl TheVLayoutTrait for TheVLayout
Source§fn add_widget(&mut self, widget: Box<dyn TheWidget>)
fn add_widget(&mut self, widget: Box<dyn TheWidget>)
Add a widget to the layout.
Source§fn set_mode(&mut self, mode: TheVLayoutMode)
fn set_mode(&mut self, mode: TheVLayoutMode)
Set the layout mode.
Source§fn set_reverse_index(&mut self, reverse_index: Option<i32>)
fn set_reverse_index(&mut self, reverse_index: Option<i32>)
Set the top / bottom alingnment split index
Source§fn set_alignment(&mut self, align: TheHorizontalAlign)
fn set_alignment(&mut self, align: TheHorizontalAlign)
Set the horizontal alignment.
Auto Trait Implementations§
impl Freeze for TheVLayout
impl !RefUnwindSafe for TheVLayout
impl Send for TheVLayout
impl !Sync for TheVLayout
impl Unpin for TheVLayout
impl UnsafeUnpin for TheVLayout
impl !UnwindSafe for TheVLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.