gtk4/auto/overlay_layout.rs
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 44 45
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::{ffi, LayoutManager};
use glib::{prelude::*, translate::*};
glib::wrapper! {
/// [`OverlayLayout`][crate::OverlayLayout] is the layout manager used by [`Overlay`][crate::Overlay].
///
/// It places widgets as overlays on top of the main child.
///
/// This is not a reusable layout manager, since it expects its widget
/// to be a [`Overlay`][crate::Overlay]. It is only listed here so that its layout
/// properties get documented.
///
/// # Implements
///
/// [`LayoutManagerExt`][trait@crate::prelude::LayoutManagerExt], [`trait@glib::ObjectExt`]
#[doc(alias = "GtkOverlayLayout")]
pub struct OverlayLayout(Object<ffi::GtkOverlayLayout, ffi::GtkOverlayLayoutClass>) @extends LayoutManager;
match fn {
type_ => || ffi::gtk_overlay_layout_get_type(),
}
}
impl OverlayLayout {
/// Creates a new [`OverlayLayout`][crate::OverlayLayout] instance.
///
/// # Returns
///
/// the newly created instance
#[doc(alias = "gtk_overlay_layout_new")]
pub fn new() -> OverlayLayout {
assert_initialized_main_thread!();
unsafe { LayoutManager::from_glib_full(ffi::gtk_overlay_layout_new()).unsafe_cast() }
}
}
impl Default for OverlayLayout {
fn default() -> Self {
Self::new()
}
}