[−][src]Struct orbtk::layouts::StackLayout
StackLayout arranges it's child widgets into a single line. The children could be stacked horizontal or vertical.
Fields
rect: Cell<Rect>
Methods
impl StackLayout
[src]
pub fn new(orientation: Orientation) -> Arc<Self>
[src]
Creates and returns a new StackLayout with the given orientation.
pub fn orientation(&self) -> &Cell<Orientation>
[src]
Borrow the arrangement orientation of stack layout.
pub fn spacing(&self, spacing: u32) -> &Self
[src]
Set the spacing between the children of stack layout.
Trait Implementations
impl Place for StackLayout
[src]
fn position(&self, x: i32, y: i32) -> &Self
[src]
fn size(&self, width: u32, height: u32) -> &Self
[src]
fn placement(
&self,
vertical_placement: VerticalPlacement,
horizontal_placement: HorizontalPlacement
) -> &Self
[src]
&self,
vertical_placement: VerticalPlacement,
horizontal_placement: HorizontalPlacement
) -> &Self
impl Widget for StackLayout
[src]
fn name(&self) -> &str
[src]
fn rect(&self) -> &Cell<Rect>
[src]
fn local_position(&self) -> &Cell<Point>
[src]
fn vertical_placement(&self) -> &Cell<VerticalPlacement>
[src]
fn horizontal_placement(&self) -> &Cell<HorizontalPlacement>
[src]
fn margin(&self) -> &Cell<Thickness>
[src]
fn children(&self) -> &RefCell<Vec<Arc<dyn Widget>>>
[src]
fn arrange(&self)
[src]
fn draw(&self, _renderer: &mut dyn Renderer, _focused: bool, _theme: &Theme)
[src]
Used to draw the widget by render code.
fn preview_event(
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_handled: bool
) -> bool
[src]
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_handled: bool
) -> bool
Handle the incoming events by tunneling from parent to child. Must have overwritten to create a custom tunneling event handling. Read more
fn event(
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_caught: &mut bool
) -> bool
[src]
&self,
_event: Event,
_focused: bool,
_redraw: &mut bool,
_caught: &mut bool
) -> bool
Handle the incoming events by bubbling from child to parent. Must have overwritten to create a custom bubbling event handling. Read more
fn add(&self, widget: Arc<dyn Widget>)
[src]
Add a child to the widget.
fn update(&self)
[src]
Used to update the state of the widget. Could be used to update the selector.
Auto Trait Implementations
impl !Send for StackLayout
impl !Sync for StackLayout
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.