Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QWindowCreationContext Class Reference

Active Context for creating windows. More...

#include <qwindowswindow.h>

+ Collaboration diagram for QWindowCreationContext:

Public Member Functions

 QWindowCreationContext (const QWindow *w, const QScreen *s, const QRect &geometryIn, const QRect &geometry, const QMargins &customMargins, DWORD style, DWORD exStyle)
 
void applyToMinMaxInfo (MINMAXINFO *mmi) const
 

Public Attributes

const QWindowwindow
 
const QScreenscreen
 
QRect requestedGeometryIn
 
QRect requestedGeometry
 
QPoint obtainedPos
 
QSize obtainedSize
 
QMargins margins
 
QMargins customMargins
 
int frameX = CW_USEDEFAULT
 
int frameY = CW_USEDEFAULT
 
int frameWidth = CW_USEDEFAULT
 
int frameHeight = CW_USEDEFAULT
 
int menuHeight = 0
 

Detailed Description

Active Context for creating windows.

There is a phase in window creation (WindowCreationData::create()) in which events are sent before the system API CreateWindowEx() returns the handle. These cannot be handled by the platform window as the association of the unknown handle value to the window does not exist yet and as not to trigger recursive handle creation, etc.

In that phase, an instance of QWindowCreationContext is set on QWindowsContext.

QWindowCreationContext stores the information to answer the initial WM_GETMINMAXINFO and obtains the corrected size/position.

See also
WindowCreationData, QWindowsContext

Definition at line 52 of file qwindowswindow.h.

Constructor & Destructor Documentation

◆ QWindowCreationContext()

QWindowCreationContext::QWindowCreationContext ( const QWindow * w,
const QScreen * s,
const QRect & geometryIn,
const QRect & geometry,
const QMargins & customMargins,
DWORD style,
DWORD exStyle )
explicit

Definition at line 1416 of file qwindowswindow.cpp.

References QMargins::bottom(), customMargins, frameHeight, Qt::FramelessWindowHint, frameWidth, frameX, frameY, QRect::height(), QRect::isValid(), QMargins::left(), margins, QWindowsMenuBar::menuBarOf(), menuHeight, QWindowsGeometryHint::positionIncludesFrame(), qCDebug, qt_window_private(), QMargins::right(), QMargins::top(), QRect::width(), QRect::x(), and QRect::y().

+ Here is the call graph for this function:

Member Function Documentation

◆ applyToMinMaxInfo()

void QWindowCreationContext::applyToMinMaxInfo ( MINMAXINFO * mmi) const

Definition at line 1462 of file qwindowswindow.cpp.

References QWindowsGeometryHint::applyToMinMaxInfo(), customMargins, margins, screen, and window.

Referenced by QWindowsContext::windowsProc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ customMargins

QMargins QWindowCreationContext::customMargins

◆ frameHeight

int QWindowCreationContext::frameHeight = CW_USEDEFAULT

Definition at line 73 of file qwindowswindow.h.

Referenced by QWindowCreationContext().

◆ frameWidth

int QWindowCreationContext::frameWidth = CW_USEDEFAULT

Definition at line 72 of file qwindowswindow.h.

Referenced by QWindowCreationContext().

◆ frameX

int QWindowCreationContext::frameX = CW_USEDEFAULT

Definition at line 70 of file qwindowswindow.h.

Referenced by QWindowCreationContext().

◆ frameY

int QWindowCreationContext::frameY = CW_USEDEFAULT

Definition at line 71 of file qwindowswindow.h.

Referenced by QWindowCreationContext().

◆ margins

QMargins QWindowCreationContext::margins

◆ menuHeight

int QWindowCreationContext::menuHeight = 0

Definition at line 74 of file qwindowswindow.h.

Referenced by QWindowCreationContext().

◆ obtainedPos

QPoint QWindowCreationContext::obtainedPos

Definition at line 66 of file qwindowswindow.h.

Referenced by QWindowsWindow::initialize(), and QWindowsContext::windowsProc().

◆ obtainedSize

QSize QWindowCreationContext::obtainedSize

Definition at line 67 of file qwindowswindow.h.

Referenced by QWindowsWindow::initialize(), and QWindowsContext::windowsProc().

◆ requestedGeometry

QRect QWindowCreationContext::requestedGeometry

Definition at line 65 of file qwindowswindow.h.

◆ requestedGeometryIn

QRect QWindowCreationContext::requestedGeometryIn

Definition at line 64 of file qwindowswindow.h.

Referenced by QWindowsWindow::initialize().

◆ screen

const QScreen* QWindowCreationContext::screen

Definition at line 63 of file qwindowswindow.h.

Referenced by applyToMinMaxInfo().

◆ window

const QWindow* QWindowCreationContext::window

Definition at line 60 of file qwindowswindow.h.

Referenced by applyToMinMaxInfo(), and QWindowsContext::windowsProc().


The documentation for this class was generated from the following files: