OpenCOVER
VRWindow.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef VR_WINDOW_H
9#define VR_WINDOW_H
10
29#include "EventReceiver.h"
30
31#include <util/coExport.h>
32
33#include <vector>
34
35namespace opencover
36{
37
38namespace ui {
39class Button;
40}
41
42class COVEREXPORT VRWindow
43{
44
45private:
46 static VRWindow *s_instance;
47
48 int *origVSize, *origHSize;
49 std::vector<int> oldWidth, oldHeight; // detect resized windows
50 std::vector<int> origWidth, origHeight; // detect resized windows
51 std::vector<float> aspectRatio;
52
53 bool createWin(int i);
54 bool destroyWin(int i);
55
56 bool _firstTimeEmbedded;
57 EventReceiver *_eventReceiver;
58 bool m_fullscreen = false;
59 ui::Button *m_fullScreenButton = nullptr;
60
61public:
63
65
66 bool config();
67 void destroy();
68 bool unconfig();
69
70 void makeFullScreen(bool state);
71 bool isFullScreen() const;
72
73 void update();
75
76 void setOrigVSize(int win, int size)
77 {
78 origVSize[win] = size;
79 };
80 void setOrigHSize(int win, int size)
81 {
82 origHSize[win] = size;
83 };
84
85 static VRWindow *instance();
86};
87}
88#endif
Definition: ARToolKit.h:33
Definition: EventReceiver.h:20
Definition: VRWindow.h:43
bool isFullScreen() const
static VRWindow * instance()
void setOrigHSize(int win, int size)
Definition: VRWindow.h:80
void makeFullScreen(bool state)
void setOrigVSize(int win, int size)
Definition: VRWindow.h:76