X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1a784dfc808db85f5e2616c014ea2ecd23c6a3c1..e7272c085692e058092e3d9cc20103f9110de15b:/include/wx/msw/window.h diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 627f4378f7..520e9db2a9 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -47,6 +47,12 @@ enum class WXDLLEXPORT wxWindowMSW : public wxWindowBase { + friend class wxSpinCtrl; + friend class wxSlider; + friend class wxRadioBox; +#if defined __VISUALC__ && __VISUALC__ <= 1200 + friend class wxWindowMSW; +#endif public: wxWindowMSW() { Init(); } @@ -160,6 +166,9 @@ public: void AssociateHandle(WXWidget handle); void DissociateHandle(); + // does this window have deferred position and/or size? + bool IsSizeDeferred() const; + // implementation from now on // ========================== @@ -385,6 +394,14 @@ public: return false; } + // some controls (e.g. wxListBox) need to set the return value themselves + // + // return true to let parent handle it if we don't, false otherwise + virtual bool MSWShouldPropagatePrintChild() + { + return true; + } + // Responds to colour changes: passes event on to children. void OnSysColourChanged(wxSysColourChangedEvent& event); @@ -441,6 +458,14 @@ protected: // has the window been frozen by Freeze()? bool IsFrozen() const { return m_frozenness > 0; } + // this simply moves/resizes the given HWND which is supposed to be our + // sibling (this is useful for controls which are composite at MSW level + // and for which DoMoveWindow() is not enough) + // + // returns true if the window move was deferred, false if it was moved + // immediately (no error return) + bool DoMoveSibling(WXHWND hwnd, int x, int y, int width, int height); + // move the window to the specified location and resize it: this is called // from both DoSetSize() and DoSetClientSize() and would usually just call // ::MoveWindow() except for composite controls which will want to arrange @@ -466,6 +491,9 @@ protected: // the background, false otherwise (i.e. the system should erase it) bool DoEraseBackground(WXHDC hDC); + // generate WM_UPDATEUISTATE if it's needed for the OS we're running under + void MSWUpdateUIState(); + private: // common part of all ctors void Init(); @@ -488,6 +516,11 @@ private: // current defer window position operation handle (may be NULL) WXHANDLE m_hDWP; + // When deferred positioning is done these hold the pending changes, and + // are used for the default values if another size/pos changes is done on + // this window before the group of deferred changes is completed. + wxPoint m_pendingPosition; + wxSize m_pendingSize; DECLARE_DYNAMIC_CLASS(wxWindowMSW) DECLARE_NO_COPY_CLASS(wxWindowMSW)