gtkmm  4.8.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gtk::CenterLayout Class Reference

A centering layout. More...

#include <gtkmm/centerlayout.h>

Inheritance diagram for Gtk::CenterLayout:
Inheritance graph
[legend]

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)
 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...
 

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 ()
 

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

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

◆ CenterLayout() [1/2]

Gtk::CenterLayout::CenterLayout ( CenterLayout &&  src)
noexcept

◆ ~CenterLayout()

Gtk::CenterLayout::~CenterLayout ( )
overridenoexcept

◆ CenterLayout() [2/2]

Gtk::CenterLayout::CenterLayout ( )
protected

Member Function Documentation

◆ create()

static Glib::RefPtr<CenterLayout> Gtk::CenterLayout::create ( )
static

◆ get_baseline_position()

BaselinePosition Gtk::CenterLayout::get_baseline_position ( ) const

Returns the baseline position of the layout.

Returns
The current baseline position of self.

◆ get_center_widget() [1/2]

Widget* Gtk::CenterLayout::get_center_widget ( )

Returns the center widget of the layout.

Returns
The current center widget of self.

◆ get_center_widget() [2/2]

const Widget* Gtk::CenterLayout::get_center_widget ( ) const

Returns the center widget of the layout.

Returns
The current center widget of self.

◆ get_end_widget() [1/2]

Widget* Gtk::CenterLayout::get_end_widget ( )

Returns the end widget of the layout.

Returns
The current end widget of self.

◆ get_end_widget() [2/2]

const Widget* Gtk::CenterLayout::get_end_widget ( ) const

Returns the end widget of the layout.

Returns
The current end widget of self.

◆ get_orientation()

Orientation Gtk::CenterLayout::get_orientation ( ) const

Gets the current orienration of the layout manager.

Returns
The current orientation of self.

◆ get_start_widget() [1/2]

Widget* Gtk::CenterLayout::get_start_widget ( )

Returns the start widget fo the layout.

Returns
The current start widget of self.

◆ get_start_widget() [2/2]

const Widget* Gtk::CenterLayout::get_start_widget ( ) const

Returns the start widget fo the layout.

Returns
The current start widget of self.

◆ get_type()

static GType Gtk::CenterLayout::get_type ( )
static

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

◆ gobj() [1/2]

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

Provides access to the underlying C GObject.

◆ gobj() [2/2]

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

Provides access to the underlying C GObject.

◆ gobj_copy()

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.

◆ operator=()

CenterLayout& Gtk::CenterLayout::operator= ( CenterLayout &&  src)
noexcept

◆ set_baseline_position()

void Gtk::CenterLayout::set_baseline_position ( BaselinePosition  baseline_position)

Sets the new baseline position of self.

Parameters
baseline_positionThe new baseline position.

◆ set_center_widget()

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.

◆ set_end_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.

◆ set_orientation()

void Gtk::CenterLayout::set_orientation ( Orientation  orientation)

Sets the orientation of self.

Parameters
orientationThe new orientation.

◆ set_start_widget()

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

◆ wrap()

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.