[]Struct gtk::Viewport

pub struct Viewport(_, _);

The Viewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities. Use Viewport to scroll child widgets such as Grid, Box, and so on.

If a widget has native scrolling abilities, such as TextView, TreeView or IconView, it can be added to a ScrolledWindow with ContainerExt::add. If a widget does not, you must first add the widget to a Viewport, then add the viewport to the scrolled window. ContainerExt::add does this automatically if a child that does not implement Scrollable is added to a ScrolledWindow, so you can ignore the presence of the viewport.

The Viewport will start scrolling content only if allocated less than the child widget’s minimum size in a given orientation.

CSS nodes

Viewport has a single CSS node with name viewport.

Implements

ViewportExt, BinExt, ContainerExt, WidgetExt, glib::object::ObjectExt, BuildableExt, ScrollableExt, WidgetExtManual, BuildableExtManual

Implementations

impl Viewport[src]

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

Creates a new Viewport with the given adjustments, or with default adjustments if none are given.

hadjustment

horizontal adjustment

vadjustment

vertical adjustment

Returns

a new Viewport

Trait Implementations

impl Clone for Viewport

impl Debug for Viewport

impl Display for Viewport[src]

impl Eq for Viewport

impl Hash for Viewport

impl IsA<Bin> for Viewport

impl IsA<Buildable> for Viewport

impl IsA<Container> for Viewport

impl IsA<Scrollable> for Viewport

impl IsA<Widget> for Viewport

impl Ord for Viewport

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

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

impl StaticType for Viewport

Auto Trait Implementations

impl RefUnwindSafe for Viewport

impl !Send for Viewport

impl !Sync for Viewport

impl Unpin for Viewport

impl UnwindSafe for Viewport

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.