cgv
Loading...
Searching...
No Matches
cgv::gui::subprovider Class Referenceabstract

derive from this class to use a provider from another viewer More...

#include <subprovider.h>

Public Member Functions

void create_gui (provider *p)
 Create the gui of the subprovider using the implementation given in create_gui_impl().
 
void create_gui_tree_node (provider *p, const std::string &title, bool initial_visibility, const std::string &options="")
 Create the gui of the subprovider using the implementation given in create_gui_impl() and additionally create a tree node around the actual gui.
 

Protected Member Functions

void update_member (void *member_ptr)
 call this to update all views and controls of a member
 
template<typename T >
void set_and_update_member (T &member, const T &value)
 call this to update the value and all views and controls of a member
 
virtual void create_gui_impl (cgv::base::base *b, provider *p)=0
 implement this to add gui controls using the supplied base and provider
 

Protected Attributes

providerprovider_ptr = nullptr
 pointer to the main provider
 

Detailed Description

derive from this class to use a provider from another viewer

Definition at line 11 of file subprovider.h.

Member Function Documentation

◆ create_gui()

void cgv::gui::subprovider::create_gui ( provider p)

Create the gui of the subprovider using the implementation given in create_gui_impl().

Call this in your provider::create_gui() method.

Definition at line 12 of file subprovider.cxx.

References create_gui_impl(), and provider_ptr.

◆ create_gui_tree_node()

void cgv::gui::subprovider::create_gui_tree_node ( provider p,
const std::string &  title,
bool  initial_visibility,
const std::string &  options = "" 
)

Create the gui of the subprovider using the implementation given in create_gui_impl() and additionally create a tree node around the actual gui.

Call this in your provider::create_gui() method.

Definition at line 20 of file subprovider.cxx.

References cgv::gui::provider::align(), cgv::gui::provider::begin_tree_node(), create_gui_impl(), cgv::gui::provider::end_tree_node(), and provider_ptr.

◆ set_and_update_member()

template<typename T >
void cgv::gui::subprovider::set_and_update_member ( T &  member,
const T &  value 
)
inlineprotected

call this to update the value and all views and controls of a member

Definition at line 26 of file subprovider.h.

◆ update_member()

void cgv::gui::subprovider::update_member ( void *  member_ptr)
protected

call this to update all views and controls of a member

Definition at line 6 of file subprovider.cxx.

References provider_ptr, and cgv::gui::provider::update_member().

Member Data Documentation

◆ provider_ptr

provider* cgv::gui::subprovider::provider_ptr = nullptr
protected

pointer to the main provider

Definition at line 19 of file subprovider.h.

Referenced by create_gui(), create_gui_tree_node(), and update_member().


The documentation for this class was generated from the following files: