2 #ifndef __RE_Window_h__
3 #define __RE_Window_h__
40 void setName(
const char *
name);
41 void setIconName(
const char *name);
46 void setDialogParentHint(
RE_IDType parent_hint);
51 {
return myVisualResource; }
55 { myRender = std::move(r); }
63 void initMaxSize(
int w,
int h );
64 void initMinSize(
int w,
int h );
67 { myLimitPositions = limitpos; }
69 {
return myLimitPositions; }
71 void moveWindow(
int x,
int y);
72 void sizeWindow(
int w,
int h);
76 void setWindowOpacity(
fpreal opacity);
81 void maximizeWindow();
84 bool isMaximized()
const;
90 void fullscreenWindow(
bool full);
91 bool isFullscreenWindow()
const;
96 void setHasWindowFrame(
bool b);
97 bool hasWindowFrame()
const;
100 {
return myLeftBorder+myRightBorder; }
102 {
return myTopBorder+myBottomBorder; }
104 {
return myTopBorder; }
106 {
return myLeftBorder; }
108 {
return myBottomBorder; }
110 {
return myRightBorder; }
117 void setWindowAlwaysOnTop(
bool newstate);
120 void setWindowFloatOnTop(
bool on_top);
125 {
return myVisualType; }
130 { myWindowType =
t; }
137 {
return myWindowID; }
139 {
return wid == myWindowID; }
147 void setIMESupport(
bool enable);
150 static QWidget * mainQtWindow();
154 static void initQtWindow(
163 static bool appActive();
168 myRightBorder =
right;
177 winFlags.maximized = is_maximized;
180 static bool isTabFocusEnabled();
181 static void enableTabFocus(
bool enable);
187 bool isQuadBufferStereo()
const;
195 fpreal screenToDeviceScale()
const;
198 static const int* getDefaultWindowBorderSizes();
199 static int getDefaultWindowTitleBarHeight();
203 void initBorderSizes_();
206 void moveQtWindow_();
210 void addAlwaysOnTopSystemMenuItem_();
227 QWidget *myStashWidget;
236 using IntPair = std::pair<int, int>;
244 unsigned long myIconPixmap;
256 unsigned int myLimitPositions:1;
261 bool myAddedAlwaysOnTopMenuItem;
278 { lock(); myWindows.append(w); unlock(); }
280 { lock(); myWindows.findAndRemove(w); unlock(); }
282 {
return myWindows.entries(); }
284 {
return myWindows(index); }
void removeWindow(RE_Window *w)
const RE_Window * getParentWindow() const
void setWindowID(RE_IDType id)
RE_VisualType getVisualType() const
int getBorderLeftSize() const
int getBorderWidth() const
void setWindowType(RE_WindowType t)
void addWindow(RE_Window *w)
RE_Window * getWindow(int index) const
int getWindowAlwaysOnTop() const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
OGLDrawable getGraphicsDrawable() const
void setGraphicsDrawable(OGLDrawable d)
int getBorderBottomSize() const
void setVisualType(RE_VisualType t)
virtual RE_IDType getBufferID() const
int matchID(RE_IDType wid) const
int getNumWindows() const
int getBorderRightSize() const
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
void setLimitPositions(bool limitpos)
GLfloat GLfloat GLfloat GLfloat h
int getBorderHeight() const
GLdouble GLdouble GLdouble top
int getBorderTopSize() const
GLubyte GLubyte GLubyte GLubyte w
void setRender(UT_UniquePtr< RE_Render > r)
void updateMaximizedFlag(bool is_maximized)
void setWindowBorders(int left, int right, int top, int bottom)
static const char * windowTag()
bool getLimitPositions() const
RE_IDType getWindowID() const