2 #ifndef __RE_Window_h__
3 #define __RE_Window_h__
48 virtual
bool shouldApplyDevicePixelRatio() const = 0;
49 virtual
bool useHoloStyle() const = 0;
50 virtual
bool hasPendingLayoutsForPaint() const = 0;
51 virtual
void deferPaintForPendingLayouts() = 0;
52 virtual
void processPendingLayoutsForPaint() = 0;
53 virtual
void handleScreenChanged() = 0;
67 void setName(
const char *
name);
68 void setIconName(
const char *name);
70 void setParentWindow(RE_Window *parent);
73 void setDialogParentHint(
RE_IDType parent_hint);
78 {
return myVisualResource; }
82 { myRender = std::move(r); }
89 void initMaxSize(
int w,
int h );
90 void initMinSize(
int w,
int h );
93 { myLimitPositions = limitpos; }
95 {
return myLimitPositions; }
97 void moveWindow(
int x,
int y);
98 void sizeWindow(
int w,
int h);
102 void setWindowOpacity(
fpreal opacity);
107 void maximizeWindow();
108 void restoreWindow();
110 bool isMaximized()
const;
116 void fullscreenWindow(
bool full);
117 bool isFullscreenWindow()
const;
122 void setHasWindowFrame(
bool b);
123 bool hasWindowFrame()
const;
126 {
return myLeftBorder+myRightBorder; }
128 {
return myTopBorder+myBottomBorder; }
130 {
return myTopBorder; }
132 {
return myLeftBorder; }
134 {
return myBottomBorder; }
136 {
return myRightBorder; }
143 void setWindowAlwaysOnTop(
bool newstate);
146 void setWindowFloatOnTop(
bool on_top);
151 {
return myVisualType; }
156 { myWindowType =
t; }
163 {
return myWindowID; }
165 {
return wid == myWindowID; }
171 bool needsOpenGL()
const;
179 {
return myOpenGLDrawable; }
184 {
return myQPainterDrawable; }
195 void setIMESupport(
bool enable);
198 static QWidget * mainQtWindow();
202 static void initQtWindow(
211 static bool appActive();
214 bool isActiveWindow()
const;
219 myRightBorder =
right;
228 winFlags.maximized = is_maximized;
231 static bool isTabFocusEnabled();
232 static void enableTabFocus(
bool enable);
238 bool isQuadBufferStereo()
const;
246 fpreal screenToDeviceScale()
const;
252 void requestRender(
bool immediate =
false);
256 static RE_Window *immediateRenderWindow();
257 static void setImmediateRenderWindow(RE_Window *window);
276 virtual bool shouldApplyDevicePixelRatio()
const;
279 bool useHoloStyle()
const;
281 bool hasPendingLayoutsForPaint()
const;
282 void deferPaintForPendingLayouts();
284 void processPendingLayoutsForPaint();
287 void handleScreenChanged();
291 static const int* getDefaultWindowBorderSizes();
292 static int getDefaultWindowTitleBarHeight();
296 void initBorderSizes_();
299 void moveQtWindow_();
303 void addAlwaysOnTopSystemMenuItem_();
318 #if defined(WIN32) || defined(USE_QT6)
327 QWidget *myStashWidget;
336 using IntPair = std::pair<int, int>;
362 unsigned long myIconPixmap;
364 RE_Window *parentWindow;
374 unsigned int myLimitPositions:1;
379 bool myAddedAlwaysOnTopMenuItem;
398 { lock(); myWindows.append(w); unlock(); }
400 { lock(); myWindows.findAndRemove(w); unlock(); }
402 {
return myWindows.entries(); }
404 {
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)
RE_OpenGLDrawable * getOpenGLDrawable() const
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