cgv
Loading...
Searching...
No Matches
window.h
1#pragma once
2
3#include <cgv/base/base.h>
4#include "event.h"
5#include "gui_group.h"
6
7#include "lib_begin.h"
8
9namespace cgv {
10 namespace gui {
11
13class CGV_API window : public gui_group
14{
15public:
17 window(const std::string& name);
19 std::string get_type_name() const;
23 virtual void show(bool modal = false) = 0;
25 virtual void hide() = 0;
27 virtual bool dispatch_event(event& e);
28};
29
32
35
36#if _MSC_VER >= 1400
37CGV_TEMPLATE template class CGV_API data::ref_ptr<window>;
38CGV_TEMPLATE template class CGV_API data::ref_ptr<const window>;
39#endif
40
41
42 }
43}
44
45#include <cgv/config/lib_end.h>
std::string name
store the name as a string
Definition named.h:25
reference counted pointer, which can work together with types that are derived from ref_counted,...
Definition ref_ptr.h:160
gui_group(const std::string &name="")
construct from name
Definition gui_group.cxx:11
window(const std::string &name)
construct from name
Definition window.cxx:6
virtual bool dispatch_event(event &e)
dispatch a cgv event
Definition window.cxx:20
virtual void show(bool modal=false)=0
show the window. This needs to be called after creation to make the window visible
virtual gui_group_ptr get_inner_group()
return the group that is managing the content of the window
Definition window.cxx:14
std::string get_type_name() const
overload to return the type name of this object
Definition window.cxx:8
virtual void hide()=0
hide the window
namespace that holds the abstract gui interface
Definition vr_calib.cxx:10
data::ref_ptr< window > window_ptr
ref counted pointer to &window
Definition window.h:31
data::ref_ptr< gui_group, true > gui_group_ptr
ref counted pointer to a gui group
Definition gui_group.h:31
data::ref_ptr< const window > const_window_ptr
ref counted pointer to const window
Definition window.h:34
this header is dependency free
Definition print.h:11