X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/789367e10d91dff77ed0069c4f5079eb7a00db09..345319d60c69cac3f5e9e74ee570d20370fc532f:/include/wx/window.h diff --git a/include/wx/window.h b/include/wx/window.h index 9ac9397953..e0b685a110 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -25,6 +25,7 @@ #include "wx/colour.h" #include "wx/region.h" #include "wx/utils.h" +#include "wx/intl.h" #include "wx/validate.h" // for wxDefaultValidator (always include it) @@ -180,9 +181,10 @@ public: virtual void SetName( const wxString &name ) { m_windowName = name; } virtual wxString GetName() const { return m_windowName; } - // sets the window variant, calls internally DoSetVariant if variant has changed - void SetWindowVariant( wxWindowVariant variant ) ; - wxWindowVariant GetWindowVariant() const { return m_windowVariant ; } + // sets the window variant, calls internally DoSetVariant if variant + // has changed + void SetWindowVariant(wxWindowVariant variant); + wxWindowVariant GetWindowVariant() const { return m_windowVariant; } // window id uniquely identifies the window among its siblings unless @@ -190,6 +192,19 @@ public: void SetId( wxWindowID winid ) { m_windowId = winid; } wxWindowID GetId() const { return m_windowId; } + // get or change the layout direction (LTR or RTL) for this window, + // wxLayout_Default is returned if layout direction is not supported + virtual wxLayoutDirection GetLayoutDirection() const + { return wxLayout_Default; } + virtual void SetLayoutDirection(wxLayoutDirection WXUNUSED(dir)) + { } + + // mirror coordinates for RTL layout if this window uses it and if the + // mirroring is not done automatically like Win32 + virtual wxCoord AdjustForLayoutDirection(wxCoord x, + wxCoord width, + wxCoord widthTotal) const; + // generate a control id for the controls which were not given one by // user static int NewControlId() { return --ms_lastControlId; } @@ -514,23 +529,6 @@ public: // click it virtual bool AcceptsFocusFromKeyboard() const { return AcceptsFocus(); } - // NB: these methods really don't belong here but with the current - // class hierarchy there is no other place for them :-( - - // get the default child of this parent, i.e. the one which is - // activated by pressing - virtual wxWindow *GetDefaultItem() const { return NULL; } - - // set this child as default, return the old default - virtual wxWindow *SetDefaultItem(wxWindow * WXUNUSED(child)) - { return NULL; } - - // set this child as temporary default - virtual void SetTmpDefaultItem(wxWindow * WXUNUSED(win)) { } - - // return the temporary default item, can be NULL - virtual wxWindow *GetTmpDefaultItem() const { return NULL; } - // navigates in the specified direction by sending a wxNavigationKeyEvent virtual bool Navigate(int flags = wxNavigationKeyEvent::IsForward); @@ -882,6 +880,10 @@ public: { return DoPopupMenu(menu, x, y); } #endif // wxUSE_MENUS + // override this method to return true for controls having multiple pages + virtual bool HasMultiplePages() const { return false; } + + // scrollbars // ---------- @@ -1040,6 +1042,12 @@ public: wxAccessible* GetOrCreateAccessible() ; #endif + + // Set window transparency if the platform supports it + virtual bool SetTransparent(wxByte WXUNUSED(alpha)) { return false; } + virtual bool CanSetTransparent() { return false; } + + // implementation // -------------- @@ -1341,12 +1349,20 @@ protected: // implements the window variants virtual void DoSetWindowVariant( wxWindowVariant variant ) ; + // Must be called when mouse capture is lost to send + // wxMouseCaptureLostEvent to windows on capture stack. + static void NotifyCaptureLost(); + private: // contains the last id generated by NewControlId static int ms_lastControlId; // the stack of windows which have captured the mouse static struct WXDLLEXPORT wxWindowNext *ms_winCaptureNext; + // the window that currently has mouse capture + static wxWindow *ms_winCaptureCurrent; + // indicates if execution is inside CaptureMouse/ReleaseMouse + static bool ms_winCaptureChanging; DECLARE_ABSTRACT_CLASS(wxWindowBase) DECLARE_NO_COPY_CLASS(wxWindowBase) @@ -1396,12 +1412,11 @@ private: #endif // wxUniv #include "wx/x11/window.h" #elif defined(__WXMGL__) - #ifdef __WXUNIVERSAL__ - #define wxWindowNative wxWindowMGL - #else // !wxUniv - #define wxWindowMGL wxWindow - #endif // wxUniv + #define wxWindowNative wxWindowMGL #include "wx/mgl/window.h" +#elif defined(__WXDFB__) + #define wxWindowNative wxWindowDFB + #include "wx/dfb/window.h" #elif defined(__WXMAC__) #ifdef __WXUNIVERSAL__ #define wxWindowNative wxWindowMac