gtkmm 4.10.0
|
A centering layout. More...
#include <gtkmm/centerlayout.h>
Public Member Functions | |
CenterLayout (CenterLayout && src) noexcept | |
CenterLayout & | operator= (CenterLayout && src) noexcept |
~CenterLayout () noexcept override | |
GtkCenterLayout * | gobj () |
Provides access to the underlying C GObject. | |
const GtkCenterLayout * | gobj () const |
Provides access to the underlying C GObject. | |
GtkCenterLayout * | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
void | set_orientation (Orientation orientation) |
Sets the orientation of self. | |
Orientation | get_orientation () const |
Gets the current orienration of the layout manager. | |
void | set_baseline_position (BaselinePosition baseline_position) |
Sets the new baseline position of self. | |
BaselinePosition | get_baseline_position () const |
Returns the baseline position of the layout. | |
void | set_start_widget (Widget * widget) |
Sets the new start widget of self. | |
Widget * | get_start_widget () |
Returns the start widget of the layout. | |
const Widget * | get_start_widget () const |
Returns the start widget of the layout. | |
void | set_center_widget (Widget * widget) |
Sets the new center widget of self. | |
Widget * | get_center_widget () |
Returns the center widget of the layout. | |
const Widget * | get_center_widget () const |
Returns the center widget of the layout. | |
void | set_end_widget (Widget * widget) |
Sets the new end widget of self. | |
Widget * | get_end_widget () |
Returns the end widget of the layout. | |
const Widget * | get_end_widget () const |
Returns the end widget of the layout. | |
![]() | |
LayoutManager (LayoutManager && src) noexcept | |
LayoutManager & | operator= (LayoutManager && src) noexcept |
~LayoutManager () noexcept override | |
GtkLayoutManager * | gobj () |
Provides access to the underlying C GObject. | |
const GtkLayoutManager * | gobj () const |
Provides access to the underlying C GObject. | |
GtkLayoutManager * | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
void | measure (Widget & widget, Orientation orientation, int for_size, int & minimum, int & natural, int & minimum_baseline, int & natural_baseline) const |
Measures the size of the widget using manager, for the given orientation and size. | |
void | allocate (Widget & widget, int width, int height, int baseline) |
Assigns the given width, height, and baseline to a widget, and computes the position and sizes of the children of the widget using the layout management policy of manager. | |
SizeRequestMode | get_request_mode () const |
Retrieves the request mode of manager. | |
Widget * | get_widget () |
Retrieves the Gtk::Widget using the given Gtk::LayoutManager . | |
const Widget * | get_widget () const |
Retrieves the Gtk::Widget using the given Gtk::LayoutManager . | |
void | layout_changed () |
Queues a resize on the Gtk::Widget using manager, if any. | |
Glib::RefPtr< LayoutChild > | get_layout_child (Widget & child) |
Retrieves a Gtk::LayoutChild instance for the Gtk::LayoutManager , creating one if necessary. | |
Glib::RefPtr< const LayoutChild > | get_layout_child (Widget & child) const |
Retrieves a Gtk::LayoutChild instance for the Gtk::LayoutManager , creating one if necessary. | |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. | |
static Glib::RefPtr< CenterLayout > | create () |
![]() | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. | |
Protected Member Functions | |
CenterLayout () | |
![]() | |
LayoutManager () | |
There is no create() method that corresponds to this constructor, because only derived classes shall be created. | |
virtual SizeRequestMode | get_request_mode_vfunc (const Widget & widget) const |
virtual void | measure_vfunc (const Widget & widget, Orientation orientation, int for_size, int & minimum, int & natural, int & minimum_baseline, int & natural_baseline) const |
virtual void | allocate_vfunc (const Widget & widget, int width, int height, int baseline) |
virtual Glib::RefPtr< LayoutChild > | create_layout_child_vfunc (const Widget & widget, const Widget & for_child) |
virtual void | root_vfunc () |
virtual void | unroot_vfunc () |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gtk::CenterLayout > | wrap (GtkCenterLayout * object, bool take_copy=false) |
A Glib::wrap() method for this object. | |
![]() | |
Glib::RefPtr< Gtk::LayoutManager > | wrap (GtkLayoutManager * object, bool take_copy=false) |
A Glib::wrap() method for this object. | |
A centering layout.
A Gtk::CenterLayout is a layout manager that manages up to three children. The start widget is allocated at the start of the layout (left in LRT layouts and right in RTL ones), and the end widget at the end.
The center widget is centered regarding the full width of the layout.
|
noexcept |
|
overridenoexcept |
|
protected |
|
static |
BaselinePosition Gtk::CenterLayout::get_baseline_position | ( | ) | const |
Returns the baseline position of the layout.
Widget * Gtk::CenterLayout::get_center_widget | ( | ) |
Returns the center widget of the layout.
const Widget * Gtk::CenterLayout::get_center_widget | ( | ) | const |
Returns the center widget of the layout.
Widget * Gtk::CenterLayout::get_end_widget | ( | ) |
Returns the end widget of the layout.
const Widget * Gtk::CenterLayout::get_end_widget | ( | ) | const |
Returns the end widget of the layout.
Orientation Gtk::CenterLayout::get_orientation | ( | ) | const |
Gets the current orienration of the layout manager.
Widget * Gtk::CenterLayout::get_start_widget | ( | ) |
Returns the start widget of the layout.
const Widget * Gtk::CenterLayout::get_start_widget | ( | ) | const |
Returns the start widget of the layout.
|
static |
Get the GType for this class, for use with the underlying GObject type system.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
GtkCenterLayout * Gtk::CenterLayout::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
noexcept |
void Gtk::CenterLayout::set_baseline_position | ( | BaselinePosition | baseline_position | ) |
Sets the new baseline position of self.
baseline_position | The new baseline position. |
void Gtk::CenterLayout::set_center_widget | ( | Widget * | widget | ) |
Sets the new center widget of self.
To remove the existing center widget, pass nullptr
.
widget | The new center widget. |
void Gtk::CenterLayout::set_end_widget | ( | Widget * | widget | ) |
Sets the new end widget of self.
To remove the existing center widget, pass nullptr
.
widget | The new end widget. |
void Gtk::CenterLayout::set_orientation | ( | Orientation | orientation | ) |
Sets the orientation of self.
orientation | The new orientation. |
void Gtk::CenterLayout::set_start_widget | ( | Widget * | widget | ) |
Sets the new start widget of self.
To remove the existing start widget, pass nullptr
.
widget | The new start widget. |
|
related |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |