X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63e819f2981585279fe8a06629f69b7002eee9dc..140316c27863b729b4d468bab01298e49eb4ef80:/include/wx/window.h diff --git a/include/wx/window.h b/include/wx/window.h index 338073b554..7a20dcb81a 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; } @@ -464,6 +479,10 @@ public: virtual bool IsShown() const { return m_isShown; } virtual bool IsEnabled() const { return m_isEnabled; } + // returns true if the window is visible, i.e. IsShown() returns true + // if called on it and all its parents up to the first TLW + virtual bool IsVisible() const; + // get/set window style (setting style won't update the window and so // is only useful for internal usage) virtual void SetWindowStyleFlag( long style ) { m_windowStyle = style; } @@ -1027,6 +1046,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 // -------------- @@ -1329,9 +1354,8 @@ protected: virtual void DoSetWindowVariant( wxWindowVariant variant ) ; // Must be called when mouse capture is lost to send - // wxMouseCaptureLostEvent to windows on capture stack. The argument is - // the window gaining capture or NULL if outside of wx code or none. - static void NotifyCaptureLost(wxWindow *gainedCapture); + // wxMouseCaptureLostEvent to windows on capture stack. + static void NotifyCaptureLost(); private: // contains the last id generated by NewControlId @@ -1392,12 +1416,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