1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Position types for various widgets.

/// Storing information about where new widgets can be placed
/// inside a [`gtk::Grid`].
#[derive(Debug)]
pub struct GridPosition {
    /// The number of the column.
    pub column: i32,
    /// The number of the row.
    pub row: i32,
    /// The amount of columns the widget should take.
    pub width: i32,
    /// The amount of rows the widget should take.
    pub height: i32,
}

#[derive(Debug)]
/// Position (or rather information) for a stack page
/// inside a factory.
pub struct StackPageInfo {
    /// The name of the [`gtk::StackPage`].
    pub name: Option<String>,
    /// The title of the [`gtk::StackPage`].
    pub title: Option<String>,
}

#[derive(Debug)]
/// Position (or rather information) for a tab page.
pub struct TabPageInfo {
    /// The tooltip of the tab page.
    pub tooltip: Option<String>,
    /// The title of the tab page.
    pub title: Option<String>,
}

#[derive(Debug)]
/// Position used for [`gtk::Fixed`].
pub struct FixedPosition {
    /// Position on the x-axis.
    pub x: f64,
    /// Position on the y-axis.
    pub y: f64,
}