cgv
Loading...
Searching...
No Matches
subprovider.cxx
1#include <cgv/gui/subprovider.h>
2
3namespace cgv {
4 namespace gui {
5
6void subprovider::update_member(void* member_ptr) {
7
9 provider_ptr->update_member(member_ptr);
10}
11
13
14 provider_ptr = p;
15 cgv::base::base* b = dynamic_cast<cgv::base::base*>(p);
16 if(b && p)
17 create_gui_impl(b, p);
18}
19
20void subprovider::create_gui_tree_node(provider* p, const std::string& title, bool initial_visibility, const std::string& options) {
21
22 provider_ptr = p;
23 cgv::base::base* b = dynamic_cast<cgv::base::base*>(p);
24 if(b && p) {
25 if(p->begin_tree_node(title, tree_node_handle, initial_visibility, options)) {
26 p->align("\a");
27 create_gui_impl(b, p);
28 p->align("\b");
29 p->end_tree_node(tree_node_handle);
30 }
31 }
32}
33
34 }
35}
base class for all classes that can be registered with support for dynamic properties (see also secti...
Definition base.h:75
derive from this class to provide a gui to the current viewer
Definition provider.h:64
void align(const std::string &_align)
send pure alignment information
Definition provider.cxx:36
bool begin_tree_node(const std::string &label, const T &value, bool initial_visibility=false, const std::string &options="", gui_group_ptr ggp=gui_group_ptr())
Begin a sub tree of a tree structured gui.
Definition provider.h:212
virtual void update_member(void *member_ptr)
call this to update all views and controls of a member
Definition provider.cxx:72
void end_tree_node(const T &value)
template specialization that allows to specify value reference plus node_instance by using the result...
Definition provider.h:222
virtual void create_gui_impl(cgv::base::base *b, provider *p)=0
implement this to add gui controls using the supplied base and provider
provider * provider_ptr
pointer to the main provider
Definition subprovider.h:19
void update_member(void *member_ptr)
call this to update all views and controls of a member
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 additionall...
the cgv namespace
Definition print.h:11