[−][src]Struct vgtk::types::GridPosition
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.
Methods
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]
fn clone(&self) -> GridPosition
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for GridPosition
[src]
impl Default for GridPosition
[src]
impl PartialEq<GridPosition> for GridPosition
[src]
fn eq(&self, other: &GridPosition) -> bool
[src]
fn ne(&self, other: &GridPosition) -> bool
[src]
impl StructuralPartialEq for GridPosition
[src]
Auto Trait Implementations
impl RefUnwindSafe for GridPosition
impl Send for GridPosition
impl Sync for GridPosition
impl Unpin for GridPosition
impl UnwindSafe for GridPosition
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,