X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1afe4f9b47b9ee020cc21e12ed603409f60a59dc..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/msw/window.h diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 5b41235d9f..3475f3d6b7 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -5,7 +5,6 @@ // Modified by: Vadim Zeitlin on 13.05.99: complete refont of message handling, // elimination of Default(), ... // Created: 01/02/97 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -67,6 +66,9 @@ public: virtual void Raise(); virtual void Lower(); + virtual bool BeginRepositioningChildren(); + virtual void EndRepositioningChildren(); + virtual bool Show(bool show = true); virtual bool ShowWithEffect(wxShowEffect effect, unsigned timeout = 0) @@ -345,12 +347,13 @@ public: bool HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags); bool HandleMouseMove(int x, int y, WXUINT flags); - bool HandleMouseWheel(WXWPARAM wParam, WXLPARAM lParam); + bool HandleMouseWheel(wxMouseWheelAxis axis, + WXWPARAM wParam, WXLPARAM lParam); bool HandleChar(WXWPARAM wParam, WXLPARAM lParam); bool HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam); bool HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam); -#if wxUSE_ACCEL +#if wxUSE_HOTKEY bool HandleHotKey(WXWPARAM wParam, WXLPARAM lParam); #endif #ifdef __WIN32__ @@ -366,7 +369,21 @@ public: bool HandlePower(WXWPARAM wParam, WXLPARAM lParam, bool *vetoed); - // Window procedure + // The main body of common window proc for all wxWindow objects. It tries + // to handle the given message and returns true if it was handled (the + // appropriate return value is then put in result, which must be non-NULL) + // or false if it wasn't. + // + // This function should be overridden in any new code instead of + // MSWWindowProc() even if currently most of the code overrides + // MSWWindowProc() as it had been written before this function was added. + virtual bool MSWHandleMessage(WXLRESULT *result, + WXUINT message, + WXWPARAM wParam, + WXLPARAM lParam); + + // Common Window procedure for all wxWindow objects: forwards to + // MSWHandleMessage() and MSWDefWindowProc() if the message wasn't handled. virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); // Calls an appropriate default window procedure @@ -395,6 +412,17 @@ public: // weird wxToolBar case and MSWGetBgBrushForChild() itself is used by // MSWGetBgBrush() to actually find the right brush to use. + // Adjust the origin for the brush returned by MSWGetBgBrushForChild(). + // + // This needs to be overridden for scrolled windows to ensure that the + // scrolling of their associated DC is taken into account. + // + // Both parameters must be non-NULL. + virtual void MSWAdjustBrushOrg(int* WXUNUSED(xOrg), + int* WXUNUSED(yOrg)) const + { + } + // The brush returned from here must remain valid at least until the next // event loop iteration. Returning 0, as is done by default, indicates // there is no custom background brush. @@ -453,7 +481,13 @@ public: // This should be overridden to return true for the controls which have // themed background that should through their children. Currently only // wxNotebook uses this. - virtual bool MSWHasInheritableBackground() const { return false; } + // + // The base class version already returns true if we have a solid + // background colour that should be propagated to our children. + virtual bool MSWHasInheritableBackground() const + { + return InheritsBackgroundColour(); + } #if !defined(__WXWINCE__) && !defined(__WXUNIVERSAL__) #define wxHAS_MSW_BACKGROUND_ERASE_HOOK