2 #ifndef __RE_Window_h__
3 #define __RE_Window_h__
47 virtual
bool shouldApplyDevicePixelRatio() const = 0;
48 virtual
bool useHoloStyle() const = 0;
49 virtual
bool hasPendingLayoutsForPaint() const = 0;
50 virtual
void deferPaintForPendingLayouts() = 0;
51 virtual
void processPendingLayoutsForPaint() = 0;
52 virtual
void handleScreenChanged() = 0;
66 void setName(
const char *
name);
67 void setIconName(
const char *name);
69 void setParentWindow(RE_Window *parent);
72 void setDialogParentHint(
RE_IDType parent_hint);
77 {
return myVisualResource; }
81 { myRender = std::move(r); }
88 void initMaxSize(
int w,
int h );
89 void initMinSize(
int w,
int h );
92 { myLimitPositions = limitpos; }
94 {
return myLimitPositions; }
96 void moveWindow(
int x,
int y);
97 void sizeWindow(
int w,
int h);
101 void setWindowOpacity(
fpreal opacity);
106 void maximizeWindow();
107 void restoreWindow();
109 bool isMaximized()
const;
115 void fullscreenWindow(
bool full);
116 bool isFullscreenWindow()
const;
121 void setHasWindowFrame(
bool b);
122 bool hasWindowFrame()
const;
125 {
return myLeftBorder+myRightBorder; }
127 {
return myTopBorder+myBottomBorder; }
129 {
return myTopBorder; }
131 {
return myLeftBorder; }
133 {
return myBottomBorder; }
135 {
return myRightBorder; }
142 void setWindowAlwaysOnTop(
bool newstate);
145 void setWindowFloatOnTop(
bool on_top);
150 {
return myVisualType; }
155 { myWindowType =
t; }
162 {
return myWindowID; }
164 {
return wid == myWindowID; }
170 bool needsOpenGL()
const;
188 void setIMESupport(
bool enable);
191 static QWidget * mainQtWindow();
195 static void initQtWindow(
204 static bool appActive();
207 bool isActiveWindow()
const;
212 myRightBorder =
right;
221 winFlags.maximized = is_maximized;
224 static bool isTabFocusEnabled();
225 static void enableTabFocus(
bool enable);
231 bool isQuadBufferStereo()
const;
239 fpreal screenToDeviceScale()
const;
245 void requestRender(
bool immediate =
false);
249 static RE_Window *immediateRenderWindow();
250 static void setImmediateRenderWindow(RE_Window *window);
268 virtual bool shouldApplyDevicePixelRatio()
const;
271 bool useHoloStyle()
const;
273 bool hasPendingLayoutsForPaint()
const;
274 void deferPaintForPendingLayouts();
276 void processPendingLayoutsForPaint();
279 void handleScreenChanged();
283 static const int* getDefaultWindowBorderSizes();
284 static int getDefaultWindowTitleBarHeight();
288 void initBorderSizes_();
291 void moveQtWindow_();
295 void addAlwaysOnTopSystemMenuItem_();
310 #if defined(WIN32) || defined(USE_QT6)
319 QWidget *myStashWidget;
328 using IntPair = std::pair<int, int>;
350 unsigned long myIconPixmap;
352 RE_Window *parentWindow;
362 unsigned int myLimitPositions:1;
367 bool myAddedAlwaysOnTopMenuItem;
386 { lock(); myWindows.append(w); unlock(); }
388 { lock(); myWindows.findAndRemove(w); unlock(); }
390 {
return myWindows.entries(); }
392 {
return myWindows(index); }
void removeWindow(RE_Window *w)
RE_QPainterDrawable * getQPainterDrawable() const
const RE_Window * getParentWindow() const
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
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)
GLint GLint GLsizei GLint GLenum GLenum type
int getBorderBottomSize() const
void setVisualType(RE_VisualType t)
virtual RE_IDType getBufferID() const
int matchID(RE_IDType wid) const
int getNumWindows() const
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
RE_WindowDrawable * getDrawable() const
int getBorderRightSize() const
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
void setLimitPositions(bool limitpos)
GLfloat GLfloat GLfloat GLfloat h
int getBorderHeight() const
virtual ~RE_WindowOwner()
Window drawable that uses only QPainter for the new UI path.
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)
Pass key class to help restrict method access to drawable classes.
static const char * windowTag()
bool getLimitPositions() const
RE_IDType getWindowID() const