gtkmm 4.13.3
Public Member Functions | Protected Attributes | Related Functions | List of all members
Gdk::Graphene::Size Class Reference

Size representation. More...

#include <gdkmm/graphene_size.h>

Public Member Functions

 Size ()
 Constructs an invalid object. More...
 
 Size (graphene_size_t * castitem, bool make_a_copy=false)
 
 Size (const Size & src)
 
Sizeoperator= (const Size & src)
 
 Size (Size && other) noexcept
 
Sizeoperator= (Size && other) noexcept
 
 ~Size () noexcept
 
void swap (Size & other) noexcept
 
graphene_size_t * gobj ()
 
const graphene_size_t * gobj () const
 
graphene_size_t * gobj_copy () const
 Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. More...
 
 Size (float width, float height)
 
 operator bool () const
 Checks if this instance is valid. More...
 
float get_width () const
 
void set_width (const float & value)
 
float get_height () const
 
void set_height (const float & value)
 
bool equal (const Size & b) const
 Checks whether the two give #graphene_size_t are equal. More...
 

Protected Attributes

graphene_size_t * gobject_
 

Related Functions

(Note that these are not member functions.)

void swap (Size & lhs, Size & rhs) noexcept
 
Gdk::Graphene::Size wrap (graphene_size_t * object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Detailed Description

Size representation.

Gdk::Graphene::Size represents a size composed of a width by a height.

Since gtkmm 4.12:

Constructor & Destructor Documentation

◆ Size() [1/5]

Gdk::Graphene::Size::Size ( )

Constructs an invalid object.

E.g. for output arguments to methods. There is not much you can do with the object before it has been assigned a valid value.

◆ Size() [2/5]

Gdk::Graphene::Size::Size ( graphene_size_t *  castitem,
bool  make_a_copy = false 
)
explicit

◆ Size() [3/5]

Gdk::Graphene::Size::Size ( const Size src)

◆ Size() [4/5]

Gdk::Graphene::Size::Size ( Size &&  other)
noexcept

◆ ~Size()

Gdk::Graphene::Size::~Size ( )
noexcept

◆ Size() [5/5]

Gdk::Graphene::Size::Size ( float  width,
float  height 
)

Member Function Documentation

◆ equal()

bool Gdk::Graphene::Size::equal ( const Size b) const

Checks whether the two give #graphene_size_t are equal.

Since gtkmm 4.12:
Parameters
bA #graphene_size_t.
Returns
true if the sizes are equal.

◆ get_height()

float Gdk::Graphene::Size::get_height ( ) const

◆ get_width()

float Gdk::Graphene::Size::get_width ( ) const

◆ gobj() [1/2]

graphene_size_t * Gdk::Graphene::Size::gobj ( )
inline

◆ gobj() [2/2]

const graphene_size_t * Gdk::Graphene::Size::gobj ( ) const
inline

◆ gobj_copy()

graphene_size_t * Gdk::Graphene::Size::gobj_copy ( ) const

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

◆ operator bool()

Gdk::Graphene::Size::operator bool ( ) const
explicit

Checks if this instance is valid.

It is valid if and only if it contains a value. For instance,

if (size)
do_something()
valarray< size_t > size() const

◆ operator=() [1/2]

Size & Gdk::Graphene::Size::operator= ( const Size src)

◆ operator=() [2/2]

Size & Gdk::Graphene::Size::operator= ( Size &&  other)
noexcept

◆ set_height()

void Gdk::Graphene::Size::set_height ( const float &  value)

◆ set_width()

void Gdk::Graphene::Size::set_width ( const float &  value)

◆ swap()

void Gdk::Graphene::Size::swap ( Size other)
noexcept

Friends And Related Function Documentation

◆ swap()

void swap ( Size lhs,
Size rhs 
)
related
Parameters
lhsThe left-hand side
rhsThe right-hand side

◆ wrap()

Gdk::Graphene::Size wrap ( graphene_size_t *  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.

Member Data Documentation

◆ gobject_

graphene_size_t* Gdk::Graphene::Size::gobject_
protected