gtkmm: Gtk::CenterLayout Class Reference

A centering layout. More...

#include <gtkmm/centerlayout.h>

Inheritance diagram for Gtk::CenterLayout:

Public Member Functions

 CenterLayout (CenterLayout&& src) noexcept
 
CenterLayoutoperator= (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...

 
Widgetget_start_widget ()
 Returns the start widget fo the layout. More...

 
const Widgetget_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...

 
Widgetget_center_widget ()
 Returns the center widget of the layout. More...

 
const Widgetget_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...

 
Widgetget_end_widget ()
 Returns the end widget of the layout. More...

 
const Widgetget_end_widget () const
 Returns the end widget of the layout. More...

 
- Public Member Functions inherited from Gtk::LayoutManager
 LayoutManager (LayoutManager&& src) noexcept
 
LayoutManageroperator= (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...

 
Widgetget_widget ()
 Retrieves the Gtk::Widget using the given Gtk::LayoutManager. More...

 
const Widgetget_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< LayoutChildget_layout_child (Widget& child)
 Retrieves a Gtk::LayoutChild instance for the Gtk::LayoutManager, creating one if necessary. More...

 
Glib::RefPtr< const LayoutChildget_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
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&src) noexcept
 
Objectoperator= (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::Objectwrap (GObject *object, bool take_copy=false)
 
- Public Member Functions inherited from Glib::ObjectBase
 ObjectBase (const ObjectBase &)=delete
 
ObjectBaseoperator= (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 ()
 
trackableoperator= (const trackable &src)
 
trackableoperator= (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< CenterLayoutcreate ()
 
- 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< LayoutChildcreate_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
 
ObjectBaseoperator= (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::CenterLayoutwrap (GtkCenterLayout* 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.

Since gtkmm 3.96:

Constructor & Destructor Documentation

Gtk::CenterLayout::CenterLayout ( CenterLayout&&  src)
noexcept
Gtk::CenterLayout::~CenterLayout ( )
overridenoexcept
Gtk::CenterLayout::CenterLayout ( )
protected

Member Function Documentation

static Glib::RefPtr<CenterLayout> Gtk::CenterLayout::create ( )
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 GType Gtk::CenterLayout::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

GtkCenterLayout* Gtk::CenterLayout::gobj ( )
inline

Provides access to the underlying C GObject.

const GtkCenterLayout* Gtk::CenterLayout::gobj ( ) const
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.

CenterLayout& Gtk::CenterLayout::operator= ( CenterLayout&&  src)
noexcept
void Gtk::CenterLayout::set_baseline_position ( BaselinePosition  baseline_position)

Sets the new baseline position of self.

Parameters
baseline_positionThe 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
widgetThe 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
widgetThe new end widget.
void Gtk::CenterLayout::set_orientation ( Orientation  orientation)

Sets the orientation of self.

Parameters
orientationThe 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
widgetThe new start widget.

Friends And Related Function Documentation

Glib::RefPtr< Gtk::CenterLayout > wrap ( GtkCenterLayout *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse 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.