gtkmm 4.10.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:
[legend]

## Public Member Functions
| ConstraintGuide (ConstraintGuide && src) noexcept
ConstraintGuide & | operator= (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::Strength > | property_strength ()
| The `Gtk::ConstraintStrength` to be used for the constraint on the natural size of the guide. More...
Glib::PropertyProxy_ReadOnly< Constraint::Strength > | property_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 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
Public Member Functions inherited from Gtk::ConstraintTarget
| ConstraintTarget (ConstraintTarget && src) noexcept
ConstraintTarget & | operator= (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...
Public Member Functions inherited from Glib::Interface
| Interface ()
| Interface (Interface &&src) noexcept
Interface & | operator= (Interface &&src) noexcept
| Interface (const Glib::Interface_Class &interface_class)
| Interface (GObject *castitem)
| ~Interface () noexcept override
| Interface (const Interface &)=delete
Interface & | operator= (const Interface &)=delete
GObject * | gobj ()
const GObject * | gobj () 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< ConstraintGuide > | create ()
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 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)
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::ConstraintGuide > | wrap (GtkConstraintGuide * object, bool take_copy=false)
| A Glib::wrap() method for this object. More...
Related Functions inherited from Gtk::ConstraintTarget
Glib::RefPtr< Gtk::ConstraintTarget > | wrap (GtkConstraintTarget * 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

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

## ◆ 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

  width | Return location for the maximum width.
  height | Return 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

  width | Return location for the minimum width.
  height | Return 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

  width | Return location for the natural width.
  height | Return 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

  width | The new maximum width, or -1 to not change it.
  height | The 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

  width | The new minimum width, or -1 to not change it.
  height | The 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

  name | A 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

  width | The new natural width, or -1 to not change it.
  height | The 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

  strength | The 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

  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.