cgv
Loading...
Searching...
No Matches
menu_provider.h
1#pragma once
2
3#include <cgv/gui/button.h>
4#include <cgv/gui/control.h>
5
6#include "lib_begin.h"
7
8namespace cgv {
9 namespace gui {
10
12class CGV_API menu_provider //: public cgv::signal::tacker
13{
14protected:
18 base::base_ptr add_menu_separator(const std::string& menu_path);
20 button_ptr add_menu_button(const std::string& menu_path, const std::string& options = "");
22 data::ref_ptr<control<bool> > add_menu_bool_control(const std::string& menu_path, bool& value, const std::string& options = "");
24
28 base::base_ptr find_menu_element(const std::string& menu_path) const;
30 void remove_menu_element(base::base_ptr);
32public:
38 virtual void create_menu() = 0;
40 virtual void destroy_menu() = 0;
41};
42
43 }
44}
45
46#include <cgv/config/lib_end.h>
derive from this class to provide a gui to the current viewer
virtual void destroy_menu()=0
you must overload this for to remove all elements from the menu again
virtual void create_menu()=0
you must overload this for menu creation
the cgv namespace
Definition print.h:11