gtkmm 4.14.0
Static Public Member Functions | List of all members
Gtk::ObjectExpression< T > Class Template Referencefinal

#include <gtkmm/expression.h>

Inheritance diagram for Gtk::ObjectExpression< T >:
Inheritance graph
[legend]

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< ObjectExpression< T > > create (const T & object)
 Creates an expression evaluating to the given object with a weak reference. More...
 

Additional Inherited Members

- Public Types inherited from Gtk::Expression< T >
using ValueType = T
 
- Public Types inherited from Gtk::ExpressionBase
using SlotNotify = sigc::slot< void()>
 For instance: void on_notify();. More...
 
- Public Member Functions inherited from Gtk::Expression< T >
std::optional< T > evaluate (const Glib::RefPtr< Glib::ObjectBase > & this_)
 Evaluates the given expression and on success returns the result. More...
 
Glib::RefPtr< ExpressionWatch< T > > watch (const Glib::RefPtr< Glib::ObjectBase > & this_, const SlotNotify & notify)
 Installs a watch for the expression that calls the notify function whenever the evaluation of the expression may have changed. More...
 
template<class T2 >
Glib::RefPtr< ExpressionWatch< T > > bind (const Glib::PropertyProxy< T2 > & property, const Glib::RefPtr< Glib::ObjectBase > & this_=nullptr)
 Bind a target's property to the expression. More...
 
template<class T2 >
Glib::RefPtr< ExpressionWatch< T > > bind (const Glib::PropertyProxy_WriteOnly< T2 > & property, const Glib::RefPtr< Glib::ObjectBase > & this_=nullptr)
 Bind a target's property to the expression. More...
 
- Public Member Functions inherited from Gtk::ExpressionBase
void reference () const
 Increment the reference count for this object. More...
 
void unreference () const
 Decrement the reference count for this object. More...
 
GtkExpression * gobj ()
 Provides access to the underlying C instance. More...
 
const GtkExpression * gobj () const
 Provides access to the underlying C instance. More...
 
GtkExpression * gobj_copy () const
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
 ExpressionBase ()=delete
 
 ExpressionBase (const ExpressionBase &)=delete
 
ExpressionBaseoperator= (const ExpressionBase &)=delete
 
GType get_value_type () const
 Gets the GType that this expression evaluates to. More...
 
bool is_static () const
 Checks if the expression is static. More...
 
- Protected Member Functions inherited from Gtk::ExpressionBase
void operator delete (void *, std::size_t)
 

Member Function Documentation

◆ create()

template <class T >
static Glib::RefPtr< ObjectExpression< T > > Gtk::ObjectExpression< T >::create ( const T &  object)
static

Creates an expression evaluating to the given object with a weak reference.

Once the object is disposed, it will fail to evaluate. This expression is meant to break reference cycles.

If you want to keep a reference to object, use Gtk::ConstantExpression::create().

Parameters
objectObject to watch.
Returns
A new Gtk::Expression.

◆ get_type()

template <class T >
static GType Gtk::ObjectExpression< T >::get_type ( )
static

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