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

An invisible constraint target. More...

#include <gtkmm/constraintguide.h>

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

Public Member Functions

 ConstraintGuide (ConstraintGuide && src) noexcept
 
ConstraintGuideoperator= (ConstraintGuide && src) noexcept
 
 ~ConstraintGuide () noexcept override
 
GtkConstraintGuide * gobj ()
 Provides access to the underlying C GObject. More...
 
const GtkConstraintGuide * gobj () const
 Provides access to the underlying C GObject. More...
 
GtkConstraintGuide * 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_min_size (int width, int height)
 Sets the minimum size of guide. More...
 
void get_min_size (int & width, int & height) const
 Gets the minimum size of guide. More...
 
void set_nat_size (int width, int height)
 Sets the natural size of guide. More...
 
void get_nat_size (int & width, int & height) const
 Gets the natural size of guide. More...
 
void set_max_size (int width, int height)
 Sets the maximum size of guide. More...
 
void get_max_size (int & width, int & height) const
 Gets the maximum size of guide. More...
 
void set_strength (Constraint::Strength strength)
 Sets the strength of the constraint on the natural size of the given Gtk::ConstraintGuide. More...
 
Constraint::Strength get_strength () const
 Retrieves the strength set using set_strength(). More...
 
void set_name (const Glib::ustring & name)
 Sets a name for the given Gtk::ConstraintGuide. More...
 
Glib::ustring get_name () const
 Retrieves the name set using set_name(). More...
 
Glib::PropertyProxy< int > property_min_width ()
 The minimum width of the guide. More...
 
Glib::PropertyProxy_ReadOnly< int > property_min_width () const
 The minimum width of the guide. More...
 
Glib::PropertyProxy< int > property_min_height ()
 The minimum height of the guide. More...
 
Glib::PropertyProxy_ReadOnly< int > property_min_height () const
 The minimum height of the guide. More...
 
Glib::PropertyProxy< int > property_nat_width ()
 The preferred, or natural, width of the guide. More...
 
Glib::PropertyProxy_ReadOnly< int > property_nat_width () const
 The preferred, or natural, width of the guide. More...
 
Glib::PropertyProxy< int > property_nat_height ()
 The preferred, or natural, height of the guide. More...
 
Glib::PropertyProxy_ReadOnly< int > property_nat_height () const
 The preferred, or natural, height of the guide. More...
 
Glib::PropertyProxy< int > property_max_width ()
 The maximum width of the guide. More...
 
Glib::PropertyProxy_ReadOnly< int > property_max_width () const
 The maximum width of the guide. More...
 
Glib::PropertyProxy< int > property_max_height ()
 The maximum height of the guide. More...
 
Glib::PropertyProxy_ReadOnly< int > property_max_height () const
 The maximum height of the guide. More...
 
Glib::PropertyProxy< Constraint::Strengthproperty_strength ()
 The Gtk::ConstraintStrength to be used for the constraint on the natural size of the guide. More...
 
Glib::PropertyProxy_ReadOnly< Constraint::Strengthproperty_strength () const
 The Gtk::ConstraintStrength to be used for the constraint on the natural size of the guide. More...
 
Glib::PropertyProxy< Glib::ustring > property_name ()
 A name that identifies the Gtk::ConstraintGuide, for debugging. More...
 
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_name () const
 A name that identifies the Gtk::ConstraintGuide, for debugging. More...
 
- Public Member Functions inherited from Gtk::ConstraintTarget
 ConstraintTarget (ConstraintTarget && src) noexcept
 
ConstraintTargetoperator= (ConstraintTarget && src) noexcept
 
 ~ConstraintTarget () noexcept override
 
GtkConstraintTarget * gobj ()
 Provides access to the underlying C GObject. More...
 
const GtkConstraintTarget * gobj () const
 Provides access to the underlying C GObject. 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< ConstraintGuidecreate ()
 
- Static Public Member Functions inherited from Gtk::ConstraintTarget
static void add_interface (GType gtype_implementer)
 
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...
 

Protected Member Functions

 ConstraintGuide ()
 
- Protected Member Functions inherited from Gtk::ConstraintTarget
 ConstraintTarget ()
 You should derive from this class to use it. More...
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gtk::ConstraintGuidewrap (GtkConstraintGuide * object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Detailed Description

An invisible constraint target.

A ConstraintGuide is an invisible layout element that can be used by widgets inside a Gtk::ConstraintLayout as a source or a target of a Gtk::Constraint. Guides can be used like guidelines or as flexible space.

Unlike a Gtk::Widget, a Gtk::ConstraintGuide will not be drawn.

Since gtkmm 3.96:

Constructor & Destructor Documentation

◆ ConstraintGuide() [1/2]

Gtk::ConstraintGuide::ConstraintGuide ( ConstraintGuide &&  src)
noexcept

◆ ~ConstraintGuide()

Gtk::ConstraintGuide::~ConstraintGuide ( )
overridenoexcept

◆ ConstraintGuide() [2/2]

Gtk::ConstraintGuide::ConstraintGuide ( )
protected

Member Function Documentation

◆ create()

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

◆ get_max_size()

void Gtk::ConstraintGuide::get_max_size ( int &  width,
int &  height 
) const

Gets the maximum size of guide.

Parameters
widthReturn location for the maximum width.
heightReturn location for the maximum height.

◆ get_min_size()

void Gtk::ConstraintGuide::get_min_size ( int &  width,
int &  height 
) const

Gets the minimum size of guide.

Parameters
widthReturn location for the minimum width.
heightReturn location for the minimum height.

◆ get_name()

Glib::ustring Gtk::ConstraintGuide::get_name ( ) const

Retrieves the name set using set_name().

Returns
The name of the guide.

◆ get_nat_size()

void Gtk::ConstraintGuide::get_nat_size ( int &  width,
int &  height 
) const

Gets the natural size of guide.

Parameters
widthReturn location for the natural width.
heightReturn location for the natural height.

◆ get_strength()

Constraint::Strength Gtk::ConstraintGuide::get_strength ( ) const

Retrieves the strength set using set_strength().

Returns
The strength of the constraint on the natural size.

◆ get_type()

static GType Gtk::ConstraintGuide::get_type ( )
static

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

◆ gobj() [1/2]

GtkConstraintGuide* Gtk::ConstraintGuide::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const GtkConstraintGuide* Gtk::ConstraintGuide::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ gobj_copy()

GtkConstraintGuide* Gtk::ConstraintGuide::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

◆ operator=()

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

◆ property_max_height() [1/2]

Glib::PropertyProxy< int > Gtk::ConstraintGuide::property_max_height ( )

The maximum height of the guide.

Default value: 2147483647

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_max_height() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::ConstraintGuide::property_max_height ( ) const

The maximum height of the guide.

Default value: 2147483647

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_max_width() [1/2]

Glib::PropertyProxy< int > Gtk::ConstraintGuide::property_max_width ( )

The maximum width of the guide.

Default value: 2147483647

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_max_width() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::ConstraintGuide::property_max_width ( ) const

The maximum width of the guide.

Default value: 2147483647

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_min_height() [1/2]

Glib::PropertyProxy< int > Gtk::ConstraintGuide::property_min_height ( )

The minimum height of the guide.

Default value: 0

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_min_height() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::ConstraintGuide::property_min_height ( ) const

The minimum height of the guide.

Default value: 0

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_min_width() [1/2]

Glib::PropertyProxy< int > Gtk::ConstraintGuide::property_min_width ( )

The minimum width of the guide.

Default value: 0

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_min_width() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::ConstraintGuide::property_min_width ( ) const

The minimum width of the guide.

Default value: 0

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_name() [1/2]

Glib::PropertyProxy< Glib::ustring > Gtk::ConstraintGuide::property_name ( )

A name that identifies the Gtk::ConstraintGuide, for debugging.

Default value: ""

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_name() [2/2]

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::ConstraintGuide::property_name ( ) const

A name that identifies the Gtk::ConstraintGuide, for debugging.

Default value: ""

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_nat_height() [1/2]

Glib::PropertyProxy< int > Gtk::ConstraintGuide::property_nat_height ( )

The preferred, or natural, height of the guide.

Default value: 0

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_nat_height() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::ConstraintGuide::property_nat_height ( ) const

The preferred, or natural, height of the guide.

Default value: 0

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_nat_width() [1/2]

Glib::PropertyProxy< int > Gtk::ConstraintGuide::property_nat_width ( )

The preferred, or natural, width of the guide.

Default value: 0

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_nat_width() [2/2]

Glib::PropertyProxy_ReadOnly< int > Gtk::ConstraintGuide::property_nat_width ( ) const

The preferred, or natural, width of the guide.

Default value: 0

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_strength() [1/2]

Glib::PropertyProxy< Constraint::Strength > Gtk::ConstraintGuide::property_strength ( )

The Gtk::ConstraintStrength to be used for the constraint on the natural size of the guide.

Default value: Gtk::Constraint::Strength::MEDIUM

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_strength() [2/2]

Glib::PropertyProxy_ReadOnly< Constraint::Strength > Gtk::ConstraintGuide::property_strength ( ) const

The Gtk::ConstraintStrength to be used for the constraint on the natural size of the guide.

Default value: Gtk::Constraint::Strength::MEDIUM

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ set_max_size()

void Gtk::ConstraintGuide::set_max_size ( int  width,
int  height 
)

Sets the maximum size of guide.

If guide is attached to a Gtk::ConstraintLayout, the constraints will be updated to reflect the new size.

Parameters
widthThe new maximum width, or -1 to not change it.
heightThe new maximum height, or -1 to not change it.

◆ set_min_size()

void Gtk::ConstraintGuide::set_min_size ( int  width,
int  height 
)

Sets the minimum size of guide.

If guide is attached to a Gtk::ConstraintLayout, the constraints will be updated to reflect the new size.

Parameters
widthThe new minimum width, or -1 to not change it.
heightThe new minimum height, or -1 to not change it.

◆ set_name()

void Gtk::ConstraintGuide::set_name ( const Glib::ustring &  name)

Sets a name for the given Gtk::ConstraintGuide.

The name is useful for debugging purposes.

Parameters
nameA name for the guide.

◆ set_nat_size()

void Gtk::ConstraintGuide::set_nat_size ( int  width,
int  height 
)

Sets the natural size of guide.

If guide is attached to a Gtk::ConstraintLayout, the constraints will be updated to reflect the new size.

Parameters
widthThe new natural width, or -1 to not change it.
heightThe new natural height, or -1 to not change it.

◆ set_strength()

void Gtk::ConstraintGuide::set_strength ( Constraint::Strength  strength)

Sets the strength of the constraint on the natural size of the given Gtk::ConstraintGuide.

Parameters
strengthThe strength of the constraint.

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Gtk::ConstraintGuide > wrap ( GtkConstraintGuide *  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.