gtkmm: Gtk::CenterLayout Class Reference
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. More... | |
const GtkCenterLayout* | gobj () const |
Provides access to the underlying C GObject. More... | |
GtkCenterLayout* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
void | set_orientation (Orientation orientation) |
Sets the orientation of self. More... | |
Orientation | get_orientation () const |
Gets the current orienration of the layout manager. More... | |
void | set_baseline_position (BaselinePosition baseline_position) |
Sets the new baseline position of self. More... | |
BaselinePosition | get_baseline_position () const |
Returns the baseline position of the layout. More... | |
void | set_start_widget (Widget* widget) |
Sets the new start widget of self. More... | |
Widget* | get_start_widget () |
Returns the start widget fo the layout. More... | |
const Widget* | get_start_widget () const |
Returns the start widget fo the layout. More... | |
void | set_center_widget (Widget* widget) |
Sets the new center widget of self. More... | |
Widget* | get_center_widget () |
Returns the center widget of the layout. More... | |
const Widget* | get_center_widget () const |
Returns the center widget of the layout. More... | |
void | set_end_widget (Widget* widget) |
Sets the new end widget of self. More... | |
Widget* | get_end_widget () |
Returns the end widget of the layout. More... | |
const Widget* | get_end_widget () const |
Returns the end widget of the layout. More... | |
Public Member Functions inherited from Gtk::LayoutManager | |
LayoutManager (LayoutManager&& src) noexcept | |
LayoutManager& | operator= (LayoutManager&& src) noexcept |
~LayoutManager () noexcept override | |
GtkLayoutManager* | gobj () |
Provides access to the underlying C GObject. More... | |
const GtkLayoutManager* | gobj () const |
Provides access to the underlying C GObject. More... | |
GtkLayoutManager* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
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. More... | |
void | allocate (Widget& widget, int width, int height, int baseline) |
This function 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. More... | |
SizeRequestMode | get_request_mode () const |
Retrieves the request mode of manager. More... | |
Widget* | get_widget () |
Retrieves the Gtk::Widget using the given Gtk::LayoutManager. More... | |
const Widget* | get_widget () const |
Retrieves the Gtk::Widget using the given Gtk::LayoutManager. More... | |
void | layout_changed () |
Queues a resize on the Gtk::Widget using manager, if any. More... | |
Glib::RefPtr< LayoutChild > | get_layout_child (Widget& child) |
Retrieves a Gtk::LayoutChild instance for the Gtk::LayoutManager, creating one if necessary. More... | |
Glib::RefPtr< const LayoutChild > | get_layout_child (Widget& child) const |
Retrieves a Gtk::LayoutChild instance for the Gtk::LayoutManager, creating one if necessary. More... | |
Public Member Functions inherited from Glib::Object | |
Object (const Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&src) noexcept | |
Object & | operator= (Object &&src) noexcept |
void * | get_data (const QueryQuark &key) |
void | set_data (const Quark &key, void *data) |
void | set_data (const Quark &key, void *data, DestroyNotify notify) |
void | remove_data (const QueryQuark &quark) |
void * | steal_data (const QueryQuark &quark) |
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false) |
Public Member Functions inherited from Glib::ObjectBase | |
ObjectBase (const ObjectBase &)=delete | |
ObjectBase & | operator= (const ObjectBase &)=delete |
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value) |
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const |
void | set_property (const Glib::ustring &property_name, const PropertyType &value) |
void | get_property (const Glib::ustring &property_name, PropertyType &value) const |
PropertyType | get_property (const Glib::ustring &property_name) const |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot) |
sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot) |
void | freeze_notify () |
void | thaw_notify () |
virtual void | reference () const |
virtual void | unreference () const |
GObject * | gobj () |
const GObject * | gobj () const |
GObject * | gobj_copy () const |
Public Member Functions inherited from sigc::trackable | |
trackable () noexcept | |
trackable (const trackable &src) noexcept | |
trackable (trackable &&src) noexcept | |
~trackable () | |
void | add_destroy_notify_callback (notifiable *data, func_destroy_notify func) const |
void | notify_callbacks () |
trackable & | operator= (const trackable &src) |
trackable & | operator= (trackable &&src) noexcept |
void | remove_destroy_notify_callback (notifiable *data) const |
Static Public Member Functions | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
static Glib::RefPtr< CenterLayout > | create () |
Static Public Member Functions inherited from Gtk::LayoutManager | |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. More... | |
Protected Member Functions | |
CenterLayout () | |
Protected Member Functions inherited from Gtk::LayoutManager | |
LayoutManager () | |
There is no create() method that corresponds to this constructor, because only derived classes shall be created. More... | |
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 () |
Protected Member Functions inherited from Glib::Object | |
Object () | |
Object (const Glib::ConstructParams &construct_params) | |
Object (GObject *castitem) | |
~Object () noexcept override | |
Protected Member Functions inherited from Glib::ObjectBase | |
ObjectBase () | |
ObjectBase (const char *custom_type_name) | |
ObjectBase (const std::type_info &custom_type_info) | |
ObjectBase (ObjectBase &&src) noexcept | |
ObjectBase & | operator= (ObjectBase &&src) noexcept |
virtual | ~ObjectBase () noexcept=0 |
void | initialize (GObject *castitem) |
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper) |
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. More... | |
Related Functions inherited from Gtk::LayoutManager | |
Glib::RefPtr< Gtk::LayoutManager > | wrap (GtkLayoutManager* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Additional Inherited Members | |
Public Types inherited from Glib::Object | |
typedef void(*)(gpointer data | DestroyNotify) |
Public Types inherited from sigc::trackable | |
typedef internal::func_destroy_notify | func_destroy_notify |
Public Types inherited from sigc::notifiable | |
typedef internal::func_destroy_notify | func_destroy_notify |
Detailed Description
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.
Constructor & Destructor Documentation
|
noexcept |
|
overridenoexcept |
|
protected |
Member Function Documentation
|
static |
BaselinePosition Gtk::CenterLayout::get_baseline_position | ( | ) | const |
Returns the baseline position of the layout.
- Returns
- The current baseline position of self.
Widget* Gtk::CenterLayout::get_center_widget | ( | ) |
Returns the center widget of the layout.
- Returns
- The current center widget of self.
const Widget* Gtk::CenterLayout::get_center_widget | ( | ) | const |
Returns the center widget of the layout.
- Returns
- The current center widget of self.
Widget* Gtk::CenterLayout::get_end_widget | ( | ) |
Returns the end widget of the layout.
- Returns
- The current end widget of self.
const Widget* Gtk::CenterLayout::get_end_widget | ( | ) | const |
Returns the end widget of the layout.
- Returns
- The current end widget of self.
Orientation Gtk::CenterLayout::get_orientation | ( | ) | const |
Gets the current orienration of the layout manager.
- Returns
- The current orientation of self.
Widget* Gtk::CenterLayout::get_start_widget | ( | ) |
Returns the start widget fo the layout.
- Returns
- The current start widget of self.
const Widget* Gtk::CenterLayout::get_start_widget | ( | ) | const |
Returns the start widget fo the layout.
- Returns
- The current start widget of self.
|
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.
- Parameters
-
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
.
- Parameters
-
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
.
- Parameters
-
widget The new end widget.
void Gtk::CenterLayout::set_orientation | ( | Orientation | orientation | ) |
Sets the orientation of self.
- Parameters
-
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
.
- Parameters
-
widget The new start widget.
Friends And Related Function Documentation
|
related |
A Glib::wrap() method for this object.
- Parameters
-
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.
- Returns
- A C++ instance that wraps this C instance.