gtkmm 4.18.0
Gtk::ExpressionWatch< T > Class Template Referencefinal

#include <gtkmm/expressionwatch.h>

Inheritance diagram for Gtk::ExpressionWatch< T >:

Public Member Functions

std::optional< T > evaluate ()
 Evaluates the watched expression and on success returns the result.
Public Member Functions inherited from Gtk::ExpressionWatchBase
void reference () const
 Increment the reference count for this object.
void unreference () const
 Decrement the reference count for this object.
GtkExpressionWatch * gobj ()
 Provides access to the underlying C instance.
const GtkExpressionWatch * gobj () const
 Provides access to the underlying C instance.
GtkExpressionWatch * gobj_copy () const
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
 ExpressionWatchBase ()=delete
 ExpressionWatchBase (const ExpressionWatchBase &)=delete
ExpressionWatchBaseoperator= (const ExpressionWatchBase &)=delete
void unwatch ()
 Stops watching an expression that was established via Gtk::Expression::watch().

Additional Inherited Members

Protected Member Functions inherited from Gtk::ExpressionWatchBase
void operator delete (void *, std::size_t)

Member Function Documentation

◆ evaluate()

template <class T>
std::optional< T > Gtk::ExpressionWatch< T >::evaluate ( )

Evaluates the watched expression and on success returns the result.

This is equivalent to calling Gtk::Expression::evaluate() with the expression and this pointer originally used to create the watch.

Returns
The optional result of the evaluation.