4#include <cgv/base/named.h>
122view_ptr gui_group::add_view_void(
const std::string& label,
const void* value_ptr,
const std::string& value_type,
const std::string& gui_type,
const std::string& options,
const std::string& align)
127 label, value_ptr, value_type, gui_type, options,
align);
132 const std::string& value_type,
const std::string& gui_type,
133 const std::string& options,
const std::string& align,
void* user_data)
138 label, value_ptr ? value_ptr : user_data, acp, value_type, gui_type, options,
align);
144 for (
unsigned i=0; i<n; ++i) {
148 if (np->get_name() ==
name)
217 label, group_type, options,
align);
225 label, decorator_type, options,
align);
233 label, options,
align);
unsigned int get_nr_children() const
return the number of children
base_ptr get_child(unsigned int i) const
return the i-th child
std::string name
store the name as a string
void clear()
set to null pointer
gui independent group class which is a container for gui elements
void add_managed_objects(cgv::base::base_ptr object)
add the passed object as an managed object.
virtual bool can_open_and_close() const
returns whether open and close of sub groups is allowed
virtual cgv::base::base_ptr add_decorator(const std::string &label, const std::string &decorator_type, const std::string &options, const std::string &align)
add a newly created decorator to the group
std::string get_type_name() const
overload to return the type name of this object
cgv::signal::signal< cgv::base::base_ptr, bool > on_selection_change
This signal is emitted for every change of the selection of a child.
virtual bool unselect_child(unsigned ci)
unselect the ci-th child.
void release_managed_objects(cgv::base::base_ptr object)
release a specific managed object
control_ptr find_control_void(void *value_ptr, int *idx_ptr)
find a control in the group based on a const void pointer
virtual bool is_open_child_group(gui_group_ptr g) const
return whether the given child is open
static void set_provider_parent(provider *p, gui_group_ptr g)
access to protected provider method
void unregister_object(cgv::base::base_ptr object, const std::string &options)
overload to handle unregistration events
virtual bool multiple_selection() const
return whether several children of the group can be selected at the same time
virtual gui_group_ptr add_group(const std::string &label, const std::string &group_type, const std::string &options, const std::string &align)
add a new group to the given parent group
virtual bool close_child_group(gui_group_ptr g)
try to close given child group and return whether this was successful
void release_all_managed_objects()
release all managed objects
static gui_group_ptr get_provider_parent(const provider *p)
driver specific handle for the group gui element managing the gui built in the provider
std::vector< cgv::base::base_ptr > managed_objects
managed objects can be add to the group such that
virtual control_ptr add_control_void(const std::string &label, void *value_ptr, abst_control_provider *acp, const std::string &value_type, const std::string &gui_type, const std::string &options, const std::string &align, void *user_data)
add a newly created control to the group
virtual button_ptr add_button(const std::string &label, const std::string &options, const std::string &align)
add a newly created button to the group
bool is_managed_object(cgv::base::base_ptr object)
check whether an object is managed by this gui group
cgv::base::base_ptr find_element(const std::string &name)
find a gui element by name, return empty pointer if not found
virtual void select_child(unsigned ci, bool exclusive=false)
select the ci-th child of the group.
gui_group(const std::string &name="")
construct from name
void register_object(cgv::base::base_ptr object, const std::string &options)
interface of adding an object
virtual int get_selected_child_index() const
return the index of the currently selected child.
view_ptr find_view_void(const void *value_ptr, int *idx_ptr)
find a view in the group based on a const void pointer
virtual cgv::base::base_ptr get_selected_child() const
return the currently selected child.
virtual bool open_child_group(gui_group_ptr g)
try to open given child group and return whether this was successful
virtual bool is_selected(cgv::base::base_ptr c) const
return whether the given child is selected
virtual void align(const std::string &_align)
send pure alignment information
virtual view_ptr add_view_void(const std::string &label, const void *value_ptr, const std::string &value_type, const std::string &gui_type, const std::string &options, const std::string &align)
add a newly created view to the group
derive from this class to provide a gui to the current viewer
void set_parent(gui_group_ptr)
the gui window sets the parent group through this method
gui_group_ptr parent_group
driver specific handle for the group gui element managing the gui built in the provider
data::ref_ptr< base, true > base_ptr
ref counted pointer to base
data::ref_ptr< gui_group, true > gui_group_ptr
ref counted pointer to a gui group
gui_driver_ptr get_gui_driver()
return the currently registered gui driver or an empty pointer if non has been registered
data::ref_ptr< button > button_ptr
ref counted pointer to button
data::ref_ptr< abst_view > view_ptr
ref counted pointer to abst view
data::ref_ptr< abst_control > control_ptr
ref counted pointer to abst control
type independent base class of control provider interface