Struct gelatin::line_layout_container::LineLayoutContainer
source · [−]pub struct LineLayoutContainer<Dim: PickDimension + 'static> { /* private fields */ }
Implementations
sourceimpl<Dim: PickDimension + 'static> LineLayoutContainer<Dim>
impl<Dim: PickDimension + 'static> LineLayoutContainer<Dim>
pub fn new() -> LineLayoutContainer<Dim>
pub fn set_margin_all(&self, pixels: f32)
pub fn set_margin_left(&self, pixels: f32)
pub fn set_margin_right(&self, pixels: f32)
pub fn set_margin_top(&self, pixels: f32)
pub fn set_margin_bottom(&self, pixels: f32)
pub fn set_horizontal_align(&self, align: Alignment)
pub fn set_vertical_align(&self, align: Alignment)
pub fn set_fixed_size(&self, size: LogicalVector)
pub fn set_width(&self, width: Length)
pub fn set_height(&self, height: Length)
pub fn set_ignore_layout(&self, ignore: bool)
pub fn set_visible(&self, visible: bool)
pub fn set_bg_color(&self, color: [f32; 4])
pub fn add_child(&self, new_child: Rc<dyn Widget>)
pub fn remove_child(&self, target: Rc<dyn Widget>)
Trait Implementations
sourceimpl<Dim: PickDimension + 'static> Default for LineLayoutContainer<Dim>
impl<Dim: PickDimension + 'static> Default for LineLayoutContainer<Dim>
sourceimpl<Dim: PickDimension + 'static> Widget for LineLayoutContainer<Dim>
impl<Dim: PickDimension + 'static> Widget for LineLayoutContainer<Dim>
sourcefn before_draw(&self, window: &Window) -> NextUpdate
fn before_draw(&self, window: &Window) -> NextUpdate
This function is called before calling the draw function.
Widgets may use this function to mutate the window. This is however not allowed in the
draw
method. Read moresourcefn draw(
&self,
target: &mut Frame,
context: &DrawContext<'_>
) -> Result<NextUpdate, WidgetError>
fn draw(
&self,
target: &mut Frame,
context: &DrawContext<'_>
) -> Result<NextUpdate, WidgetError>
This function is called when the window is being re-rendered. Read more
fn layout(&self, total_available_space: LogicalRect)
fn handle_event(&self, event: &Event)
sourcefn children(&self, children: &mut Vec<Rc<dyn Widget>>)
fn children(&self, children: &mut Vec<Rc<dyn Widget>>)
The implementer is expected to
push
its children into the provided vector.fn placement(&self) -> WidgetPlacement
fn visible(&self) -> bool
sourcefn set_valid_ref(&self, render_validity: RenderValidity)
fn set_valid_ref(&self, render_validity: RenderValidity)
Implementer of this trait must store the provided object
and call
invalidate
on it whenever a change happens on them
that requires a re-draw. Read moreAuto Trait Implementations
impl<Dim> !RefUnwindSafe for LineLayoutContainer<Dim>
impl<Dim> !Send for LineLayoutContainer<Dim>
impl<Dim> !Sync for LineLayoutContainer<Dim>
impl<Dim> Unpin for LineLayoutContainer<Dim>where
Dim: Unpin,
impl<Dim> !UnwindSafe for LineLayoutContainer<Dim>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_big_endian()
.sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_native_endian()
.