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 46 47
// 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::Buildable; use crate::Widget; use std::fmt; glib::wrapper! { /// The [`Misc`][crate::Misc] widget is an abstract widget which is not useful itself, but /// is used to derive subclasses which have alignment and padding attributes. /// /// The horizontal and vertical padding attributes allows extra space to be /// added around the widget. /// /// The horizontal and vertical alignment attributes enable the widget to be /// positioned within its allocated area. Note that if the widget is added to /// a container in such a way that it expands automatically to fill its /// allocated area, the alignment settings will not alter the widget's position. /// /// Note that the desired effect can in most cases be achieved by using the /// `property::Widget::halign`, `property::Widget::valign` and `property::Widget::margin` properties /// on the child widget, so GtkMisc should not be used in new code. To reflect /// this fact, all [`Misc`][crate::Misc] API has been deprecated. /// /// This is an Abstract Base Class, you cannot instantiate it. /// /// # Implements /// /// [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`BuildableExtManual`][trait@crate::prelude::BuildableExtManual] #[doc(alias = "GtkMisc")] pub struct Misc(Object<ffi::GtkMisc, ffi::GtkMiscClass>) @extends Widget, @implements Buildable; match fn { type_ => || ffi::gtk_misc_get_type(), } } impl Misc {} pub const NONE_MISC: Option<&Misc> = None; impl fmt::Display for Misc { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("Misc") } }