[][src]Struct vgtk::types::GridPosition

pub struct GridPosition {
    pub left: i32,
    pub top: i32,
    pub width: i32,
    pub height: i32,
}

Specifies the position of a widget in a Grid.

The primary use of this struct is to fetch the current position of a widget in the grid via GridExtHelpers::get_child_position.

Fields

left: i32

The column in the grid for the widget.

top: i32

The row in the grid for the widget.

width: i32

The number of columns the widget will span in the grid.

height: i32

The number of rows the widget will span in the grid.

Implementations

impl GridPosition[src]

These builder methods allow for an alternate syntax to be used when building grid layouts. A brief example:

<Grid row_spacing=10 column_spacing=10>
  <Label label="Label1:" halign=Align::End />
  <Entry Grid::position=GridPosition::default().with_left(1) hexpand=true />
</Grid>

pub fn with_left(self, left: i32) -> Self[src]

Specify the left/column position of the widget.

pub fn with_top(self, top: i32) -> Self[src]

Specify the top/row position of the widget.

pub fn with_width(self, width: i32) -> Self[src]

Specify the column span for the widget.

pub fn with_height(self, height: i32) -> Self[src]

Specify the row span for the widget.

Trait Implementations

impl Clone for GridPosition[src]

impl Debug for GridPosition[src]

impl Default for GridPosition[src]

impl PartialEq<GridPosition> for GridPosition[src]

impl StructuralPartialEq for GridPosition[src]

Auto Trait Implementations

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<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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.