[]Struct gtk::Layout

pub struct Layout(_, _);

Layout is similar to DrawingArea in that it’s a “blank slate” and doesn’t do anything except paint a blank background by default. It’s different in that it supports scrolling natively due to implementing Scrollable, and can contain child widgets since it’s a Container.

If you just want to draw, a DrawingArea is a better choice since it has lower overhead. If you just need to position child widgets at specific points, then Fixed provides that functionality on its own.

When handling expose events on a Layout, you must draw to the gdk::Window returned by LayoutExt::get_bin_window, rather than to the one returned by WidgetExt::get_window as you would for a DrawingArea.

Implements

LayoutExt, ContainerExt, WidgetExt, glib::object::ObjectExt, BuildableExt, ScrollableExt, WidgetExtManual, BuildableExtManual

Implementations

impl Layout[src]

pub fn new<P: IsA<Adjustment>, Q: IsA<Adjustment>>(
    hadjustment: Option<&P>,
    vadjustment: Option<&Q>
) -> Layout
[src]

Creates a new Layout. Unless you have a specific adjustment you’d like the layout to use for scrolling, pass None for hadjustment and vadjustment.

hadjustment

horizontal scroll adjustment, or None

vadjustment

vertical scroll adjustment, or None

Returns

a new Layout

Trait Implementations

impl Clone for Layout

impl Debug for Layout

impl Display for Layout[src]

impl Eq for Layout

impl Hash for Layout

impl IsA<Buildable> for Layout

impl IsA<Container> for Layout

impl IsA<Scrollable> for Layout

impl IsA<Widget> for Layout

impl Ord for Layout

impl<T: ObjectType> PartialEq<T> for Layout

impl<T: ObjectType> PartialOrd<T> for Layout

impl StaticType for Layout

Auto Trait Implementations

impl RefUnwindSafe for Layout

impl !Send for Layout

impl !Sync for Layout

impl Unpin for Layout

impl UnwindSafe for Layout

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.