cgv
Loading...
Searching...
No Matches
cgv::gui::control_provider< T > Struct Template Referenceabstract

#include <control.h>

Inheritance diagram for cgv::gui::control_provider< T >:
cgv::gui::abst_control_provider

Public Member Functions

virtual void set_value (const T &value, void *user_data)=0
 overload to set the value
virtual T get_value (void *user_data) const =0
 overload to get the value
virtual bool controls (const void *ptr, void *user_data) const
 the default implementation compares ptr to &get_value().

Detailed Description

template<typename T>
struct cgv::gui::control_provider< T >

reimplement the control provider for a customized control. A control provider can be used as argument to the constructor of the control class. The provider class also implements an overloaded version of the add_control method that takes a control provider as second argument instead of the reference to a value.

Definition at line 56 of file control.h.

Member Function Documentation

◆ controls()

template<typename T>
virtual bool cgv::gui::control_provider< T >::controls ( const void * ptr,
void * user_data ) const
inlinevirtual

the default implementation compares ptr to &get_value().

Implements cgv::gui::abst_control_provider.

Definition at line 63 of file control.h.


The documentation for this struct was generated from the following file: