2 #ifndef __RE_Window_h__
3 #define __RE_Window_h__
16 #if defined(EXPERIMENTAL_QOPENGLWIDGET)
38 #if defined(EXPERIMENTAL_QOPENGLWIDGET)
42 class RE_API RE_WindowOwner
46 virtual ~RE_WindowOwner() {}
48 virtual void initializeForRender() = 0;
56 #if defined(EXPERIMENTAL_QOPENGLWIDGET)
60 RE_WindowOwner *owner =
nullptr);
69 void setName(
const char *
name);
70 void setIconName(
const char *name);
75 void setDialogParentHint(
RE_IDType parent_hint);
80 {
return myVisualResource; }
84 { myRender = std::move(r); }
92 void initMaxSize(
int w,
int h );
93 void initMinSize(
int w,
int h );
96 { myLimitPositions = limitpos; }
98 {
return myLimitPositions; }
100 void moveWindow(
int x,
int y);
101 void sizeWindow(
int w,
int h);
105 void setWindowOpacity(
fpreal opacity);
110 void maximizeWindow();
111 void restoreWindow();
113 bool isMaximized()
const;
119 void fullscreenWindow(
bool full);
120 bool isFullscreenWindow()
const;
125 void setHasWindowFrame(
bool b);
126 bool hasWindowFrame()
const;
129 {
return myLeftBorder+myRightBorder; }
131 {
return myTopBorder+myBottomBorder; }
133 {
return myTopBorder; }
135 {
return myLeftBorder; }
137 {
return myBottomBorder; }
139 {
return myRightBorder; }
146 void setWindowAlwaysOnTop(
bool newstate);
149 void setWindowFloatOnTop(
bool on_top);
154 {
return myVisualType; }
159 { myWindowType =
t; }
166 {
return myWindowID; }
168 {
return wid == myWindowID; }
172 #if defined(EXPERIMENTAL_QOPENGLWIDGET)
173 RE_GLDrawable *getGraphicsDrawable()
const {
return myDrawable; }
181 void setIMESupport(
bool enable);
184 static QWidget * mainQtWindow();
188 static void initQtWindow(
197 static bool appActive();
202 myRightBorder =
right;
211 winFlags.maximized = is_maximized;
214 static bool isTabFocusEnabled();
215 static void enableTabFocus(
bool enable);
221 bool isQuadBufferStereo()
const;
229 fpreal screenToDeviceScale()
const;
231 #if defined(EXPERIMENTAL_QOPENGLWIDGET)
233 void requestRender();
237 class DrawablePassKey
241 DrawablePassKey() =
default;
242 ~DrawablePassKey() =
default;
247 void initializeForRender(
const DrawablePassKey &k);
251 void render(
const DrawablePassKey &k);
255 static const int* getDefaultWindowBorderSizes();
256 static int getDefaultWindowTitleBarHeight();
260 void initBorderSizes_();
263 void moveQtWindow_();
267 void addAlwaysOnTopSystemMenuItem_();
271 #if defined(EXPERIMENTAL_QOPENGLWIDGET)
272 RE_WindowOwner *myOwner;
281 #if defined(WIN32) || defined(USE_QT6)
290 QWidget *myStashWidget;
299 using IntPair = std::pair<int, int>;
305 #if defined(EXPERIMENTAL_QOPENGLWIDGET)
311 unsigned long myIconPixmap;
323 unsigned int myLimitPositions:1;
328 bool myAddedAlwaysOnTopMenuItem;
345 { lock(); myWindows.append(w); unlock(); }
347 { lock(); myWindows.findAndRemove(w); unlock(); }
349 {
return myWindows.entries(); }
351 {
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
IFDmantra you can see code vm_image_mplay_direction endcode When SOHO starts a render
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