Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QWindowsGeometryHint Class Reference

Stores geometry constraints and provides utility functions. More...

#include <qwindowswindow.h>

+ Collaboration diagram for QWindowsGeometryHint:

Static Public Member Functions

static QMargins frameOnPrimaryScreen (const QWindow *w, DWORD style, DWORD exStyle)
 
static QMargins frameOnPrimaryScreen (const QWindow *w, HWND hwnd)
 
static QMargins frame (const QWindow *w, DWORD style, DWORD exStyle, qreal dpi)
 
static QMargins frame (const QWindow *w, HWND hwnd, DWORD style, DWORD exStyle)
 
static QMargins frame (const QWindow *w, HWND hwnd)
 
static QMargins frame (const QWindow *w, const QRect &geometry, DWORD style, DWORD exStyle)
 
static bool handleCalculateSize (const QMargins &customMargins, const MSG &msg, LRESULT *result)
 
static void applyToMinMaxInfo (const QWindow *w, const QScreen *screen, const QMargins &margins, MINMAXINFO *mmi)
 
static void applyToMinMaxInfo (const QWindow *w, const QMargins &margins, MINMAXINFO *mmi)
 
static void frameSizeConstraints (const QWindow *w, const QScreen *screen, const QMargins &margins, QSize *minimumSize, QSize *maximumSize)
 
static QPoint mapToGlobal (HWND hwnd, const QPoint &)
 
static QPoint mapToGlobal (const QWindow *w, const QPoint &)
 
static QPoint mapFromGlobal (const HWND hwnd, const QPoint &)
 
static QPoint mapFromGlobal (const QWindow *w, const QPoint &)
 
static bool positionIncludesFrame (const QWindow *w)
 

Detailed Description

Stores geometry constraints and provides utility functions.

Geometry constraints ready to apply to a MINMAXINFO taking frame into account.

Definition at line 27 of file qwindowswindow.h.

Member Function Documentation

◆ applyToMinMaxInfo() [1/2]

void QWindowsGeometryHint::applyToMinMaxInfo ( const QWindow w,
const QMargins margins,
MINMAXINFO *  mmi 
)
static

Definition at line 1176 of file qwindowswindow.cpp.

References applyToMinMaxInfo().

+ Here is the call graph for this function:

◆ applyToMinMaxInfo() [2/2]

void QWindowsGeometryHint::applyToMinMaxInfo ( const QWindow w,
const QScreen screen,
const QMargins margins,
MINMAXINFO *  mmi 
)
static

Definition at line 1150 of file qwindowswindow.cpp.

References frameSizeConstraints(), QSize::height(), qCDebug, QWINDOWSIZE_MAX, screen, and QSize::width().

Referenced by applyToMinMaxInfo(), QWindowCreationContext::applyToMinMaxInfo(), and QWindowsWindow::getSizeHints().

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

◆ frame() [1/4]

QMargins QWindowsGeometryHint::frame ( const QWindow w,
const QRect geometry,
DWORD  style,
DWORD  exStyle 
)
static

Definition at line 1090 of file qwindowswindow.cpp.

References QRect::center(), frame(), Qt::FramelessWindowHint, frameOnPrimaryScreen(), QWindowsContext::instance(), QWindowsScreenManager::isSingleScreen(), screen, QWindowsContext::screenManager(), and QWindowsContext::shouldHaveNonClientDpiScaling().

+ Here is the call graph for this function:

◆ frame() [2/4]

QMargins QWindowsGeometryHint::frame ( const QWindow w,
DWORD  style,
DWORD  exStyle,
qreal  dpi 
)
static

Definition at line 1049 of file qwindowswindow.cpp.

References Qt::dec(), Qt::FramelessWindowHint, Qt::hex(), Qt::noshowbase(), qAbs(), qCDebug, qErrnoWarning(), qRound(), rect, and Qt::showbase().

Referenced by frame(), QWindowsBaseWindow::frameMargins_sys(), QWindowsWindow::handleDpiScaledSize(), and QWindowsWindow::normalGeometry().

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

◆ frame() [3/4]

QMargins QWindowsGeometryHint::frame ( const QWindow w,
HWND  hwnd 
)
static

Definition at line 1081 of file qwindowswindow.cpp.

References frame, and Qt::FramelessWindowHint.

◆ frame() [4/4]

QMargins QWindowsGeometryHint::frame ( const QWindow w,
HWND  hwnd,
DWORD  style,
DWORD  exStyle 
)
static

Definition at line 1067 of file qwindowswindow.cpp.

References frame, Qt::FramelessWindowHint, frameOnPrimaryScreen(), QWindowsContext::instance(), QWindowsScreenManager::isSingleScreen(), screen, and QWindowsContext::screenManager().

+ Here is the call graph for this function:

◆ frameOnPrimaryScreen() [1/2]

QMargins QWindowsGeometryHint::frameOnPrimaryScreen ( const QWindow w,
DWORD  style,
DWORD  exStyle 
)
static

Definition at line 1025 of file qwindowswindow.cpp.

References Qt::dec(), Qt::FramelessWindowHint, Qt::hex(), Qt::noshowbase(), qAbs(), qCDebug, qErrnoWarning(), rect, and Qt::showbase().

Referenced by frame(), frame(), and frameOnPrimaryScreen().

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

◆ frameOnPrimaryScreen() [2/2]

QMargins QWindowsGeometryHint::frameOnPrimaryScreen ( const QWindow w,
HWND  hwnd 
)
static

Definition at line 1041 of file qwindowswindow.cpp.

References Qt::FramelessWindowHint, and frameOnPrimaryScreen().

+ Here is the call graph for this function:

◆ frameSizeConstraints()

void QWindowsGeometryHint::frameSizeConstraints ( const QWindow w,
const QScreen screen,
const QMargins margins,
QSize minimumSize,
QSize maximumSize 
)
static

Definition at line 1128 of file qwindowswindow.cpp.

References QMargins::bottom(), QSize::height(), QMargins::left(), qMax(), QWINDOWSIZE_MAX, QSize::rheight(), QMargins::right(), QSize::rwidth(), screen, QSize::setHeight(), QSize::setWidth(), toNativeSizeConstrained(), QMargins::top(), and QSize::width().

Referenced by applyToMinMaxInfo().

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

◆ handleCalculateSize()

bool QWindowsGeometryHint::handleCalculateSize ( const QMargins customMargins,
const MSG msg,
LRESULT *  result 
)
static

Definition at line 1109 of file qwindowswindow.cpp.

References QMargins::bottom(), QMargins::isNull(), QMargins::left(), qCDebug, QMargins::right(), and QMargins::top().

Referenced by QWindowsContext::windowsProc().

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

◆ mapFromGlobal() [1/2]

QPoint QWindowsGeometryHint::mapFromGlobal ( const HWND  hwnd,
const QPoint qp 
)
inlinestatic

Definition at line 439 of file qwindowswindow.h.

References screenToClient(), QPoint::x(), and QPoint::y().

Referenced by QWindowsOleDropTarget::DragOver(), QWindowsBaseWindow::mapFromGlobal(), QWindowsWindow::mapFromGlobal(), mapFromGlobal(), redirectWheelEvent(), QWindowsMouseHandler::translateMouseEvent(), and QWindowsPointerHandler::translateMouseEvent().

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

◆ mapFromGlobal() [2/2]

QPoint QWindowsGeometryHint::mapFromGlobal ( const QWindow w,
const QPoint p 
)
inlinestatic

Definition at line 449 of file qwindowswindow.h.

References QWindowsBaseWindow::handleOf(), and mapFromGlobal().

+ Here is the call graph for this function:

◆ mapToGlobal() [1/2]

QPoint QWindowsGeometryHint::mapToGlobal ( const QWindow w,
const QPoint p 
)
inlinestatic

Definition at line 446 of file qwindowswindow.h.

References QWindowsBaseWindow::handleOf(), and mapToGlobal().

+ Here is the call graph for this function:

◆ mapToGlobal() [2/2]

QPoint QWindowsGeometryHint::mapToGlobal ( HWND  hwnd,
const QPoint qp 
)
inlinestatic

Definition at line 432 of file qwindowswindow.h.

References clientToScreen(), QPoint::x(), and QPoint::y().

Referenced by QWindowsBaseWindow::mapToGlobal(), QWindowsWindow::mapToGlobal(), mapToGlobal(), QWindowsMouseHandler::translateMouseEvent(), and QWindowsPointerHandler::translateMouseEvent().

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

◆ positionIncludesFrame()

bool QWindowsGeometryHint::positionIncludesFrame ( const QWindow w)
static

Definition at line 1183 of file qwindowswindow.cpp.

References QWindowPrivate::positionPolicy, qt_window_private(), and QWindowPrivate::WindowFrameInclusive.

Referenced by QWindowCreationContext::QWindowCreationContext(), WindowCreationData::create(), QWindowsIntegration::createPlatformWindow(), and QWindowsWindow::setGeometry().

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

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