#include <WindowPositionUtils.h>
Definition at line 107 of file WindowPositionUtils.h.
struct cfgDialogPositionData::DeOverlapState |
cfgDialogPositionData::cfgDialogPositionData |
( |
| ) |
|
|
inline |
void cfgDialogPositionData::AddWindow |
( |
CWindow |
wnd | ) |
|
|
inline |
BOOL cfgDialogPositionData::ApplyConfig |
( |
CWindow |
wnd | ) |
|
|
inlineprivate |
Definition at line 131 of file WindowPositionUtils.h.
133 CWindow wndParent = wnd.GetParent();
134 UINT flags = SWP_NOACTIVATE | SWP_NOZORDER;
143 if (wndParent != NULL) {
147 rc.MoveToXY( rcParent.TopLeft() + CPoint(
m_posX,
m_posY) );
149 CPoint center = rcParent.CenterPoint();
150 rc.MoveToXY( center.x - rc.Width() / 2, center.y - rc.Height() / 2);
159 CRect rcAdjust(0,0,1,1);
160 if (wndParent != NULL) {
162 if (wndParent.GetWindowRect(temp)) rcAdjust = temp;
168 return wnd.SetWindowPos(NULL, rc, flags);
static void AdjustRectToScreenArea(CRect &rc, CRect rcParent)
static BOOL GetParentWndRect(CWindow wndParent, CRect &rc)
static BOOL GetClientRectAsSC(CWindow wnd, CRect &rc)
static BOOL AdjustWindowRectHelper(CWindow wnd, CRect &rc)
static void DeOverlap(CWindow wnd, CRect &rc)
void cfgDialogPositionData::ApplyDPI |
( |
| ) |
|
|
inlineprivate |
Definition at line 226 of file WindowPositionUtils.h.
228 if (screenDPI.cx == 0 || screenDPI.cy == 0) {
229 PFC_ASSERT(!
"Should not get here - something seriously wrong with the OS");
static void cfgDialogPositionData::DeOverlap |
( |
CWindow |
wnd, |
|
|
CRect & |
rc |
|
) |
| |
|
inlinestaticprivate |
Definition at line 196 of file WindowPositionUtils.h.
200 rc.OffsetRect(delta,delta);
static int DeOverlapDelta()
static bool DeOverlapTest(CWindow wnd, CPoint topLeft)
static int cfgDialogPositionData::DeOverlapDelta |
( |
| ) |
|
|
inlinestaticprivate |
static bool cfgDialogPositionData::DeOverlapTest |
( |
CWindow |
wnd, |
|
|
CPoint |
topLeft |
|
) |
| |
|
inlinestaticprivate |
Definition at line 187 of file WindowPositionUtils.h.
188 DeOverlapState state = {};
189 state.m_thisWnd = wnd; state.m_topLeft = topLeft; state.m_match =
false;
190 EnumThreadWindows(GetCurrentThreadId(),
MyEnumChildProc, reinterpret_cast<LPARAM>(&state));
191 return state.m_match;
static BOOL CALLBACK MyEnumChildProc(HWND wnd, LPARAM param)
void cfgDialogPositionData::FetchConfig |
( |
| ) |
|
|
inline |
static BOOL cfgDialogPositionData::GetParentWndRect |
( |
CWindow |
wndParent, |
|
|
CRect & |
rc |
|
) |
| |
|
inlinestaticprivate |
Definition at line 250 of file WindowPositionUtils.h.
251 if (!wndParent.IsIconic()) {
252 return wndParent.GetWindowRect(rc);
254 WINDOWPLACEMENT pl = {
sizeof(pl)};
255 if (!wndParent.GetWindowPlacement(&pl))
return FALSE;
256 rc = pl.rcNormalPosition;
CSize cfgDialogPositionData::GrabDPI |
( |
| ) |
const |
|
inlineprivate |
static BOOL CALLBACK cfgDialogPositionData::MyEnumChildProc |
( |
HWND |
wnd, |
|
|
LPARAM |
param |
|
) |
| |
|
inlinestaticprivate |
Definition at line 175 of file WindowPositionUtils.h.
176 DeOverlapState * state =
reinterpret_cast<DeOverlapState*
>(param);
177 if (wnd != state->m_thisWnd && IsWindowVisible(wnd) ) {
179 if (GetWindowRect(wnd, rc)) {
180 if (rc.TopLeft() == state->m_topLeft) {
181 state->m_match =
true;
return FALSE;
void cfgDialogPositionData::OverrideDefaultSize |
( |
t_uint32 |
width, |
|
|
t_uint32 |
height |
|
) |
| |
|
inline |
void cfgDialogPositionData::RemoveWindow |
( |
CWindow |
wnd | ) |
|
|
inline |
Definition at line 123 of file WindowPositionUtils.h.
pfc::avltree_t< CWindow > m_windows
BOOL StoreConfig(CWindow wnd)
bool contains(const t_param &p_item) const
BOOL cfgDialogPositionData::StoreConfig |
( |
CWindow |
wnd | ) |
|
|
inlineprivate |
Definition at line 203 of file WindowPositionUtils.h.
210 CWindow parent = wnd.GetParent();
211 if (parent != NULL) {
214 m_posX = rc.left - rcParent.left;
215 m_posY = rc.top - rcParent.top;
static BOOL GetParentWndRect(CWindow wndParent, CRect &rc)
static BOOL GetClientRectAsSC(CWindow wnd, CRect &rc)
void cfgDialogPositionData::TryFetchConfig |
( |
| ) |
|
|
inlineprivate |
Definition at line 220 of file WindowPositionUtils.h.
pfc::avltree_t< CWindow > m_windows
BOOL StoreConfig(CWindow wnd)
const_iterator first() const
t_uint32 cfgDialogPositionData::m_height |
t_int32 cfgDialogPositionData::m_posX |
t_int32 cfgDialogPositionData::m_posY |
The documentation for this class was generated from the following file: