From: Robin Dunn Date: Tue, 14 Aug 2012 05:11:59 +0000 (+0000) Subject: Interface fixes for Phoenix X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0c3140ca4494195cfe3fee8a21dd0834437993a6 Interface fixes for Phoenix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/interface/wx/dc.h b/interface/wx/dc.h index 54b0053602..d496f73703 100644 --- a/interface/wx/dc.h +++ b/interface/wx/dc.h @@ -1534,6 +1534,23 @@ public: //@} + + /** + @name query capabilities + */ + //@{ + + /** + Does the DC support drawing bitmaps? + */ + bool CanDrawBitmap() const; + + /** + Does the DC supoprt calculating the size required to draw text? + */ + bool CanGetTextExtent() const; + + //@} /** Returns a value that can be used as a handle to the native drawing @@ -1549,7 +1566,13 @@ public: @since 2.9.5 */ void* GetHandle() const; + + /** + If supported by the platform and the type of DC, fetch the contents of the DC, or a subset of it, as a bitmap. + */ + wxBitmap GetAsBitmap(const wxRect *subrect = NULL) const; + void SetLogicalScale(double x, double y); void GetLogicalScale(double *x, double *y) const; diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index 351215add7..9501317cfa 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -439,6 +439,11 @@ public: */ wxWindow* GetContainingWindow() const; + /** + Set the window this sizer is used in. + */ + void SetContainingWindow(wxWindow *window); + /** Returns the number of items in the sizer. @@ -921,6 +926,13 @@ public: @see Hide(), IsShown() */ bool Show(size_t index, bool show = true); + + + /** + Show or hide all items managed by the sizer. + */ + virtual void ShowItems(bool show); + }; diff --git a/interface/wx/validate.h b/interface/wx/validate.h index 13aa8c1288..e8e18f6ddd 100644 --- a/interface/wx/validate.h +++ b/interface/wx/validate.h @@ -78,6 +78,11 @@ public: */ static void SuppressBellOnError(bool suppress = true); + /** + Returns if the error sound is currently disabled. + */ + static bool IsSilent(); + /** Associates a window with the validator. diff --git a/interface/wx/window.h b/interface/wx/window.h index 15bc3bd13a..7b32e9c5c5 100644 --- a/interface/wx/window.h +++ b/interface/wx/window.h @@ -360,6 +360,26 @@ public: container windows. */ virtual bool AcceptsFocusRecursively() const; + + /** + Can this window itself have focus? + */ + bool IsFocusable() const; + + /** + Can this window have focus right now? + + If this method returns true, it means that calling SetFocus() will + put focus either to this window or one of its children, if you need + to know whether this window accepts focus itself, use IsFocusable() + */ + bool CanAcceptFocus() const; + + /** + Can this window be assigned focus from keyboard right now? + */ + bool CanAcceptFocusFromKeyboard() const; + /** Returns @true if the window (or in case of composite controls, its main @@ -1897,6 +1917,9 @@ public: */ void SetOwnBackgroundColour(const wxColour& colour); + bool InheritsBackgroundColour() const; + bool UseBgCol() const; + /** Sets the font of the window but prevents it from being inherited by the children of this window. @@ -2686,6 +2709,14 @@ public: */ virtual wxLayoutDirection GetLayoutDirection() const; + /** + 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; + /** Returns the window's name. @@ -3223,6 +3254,12 @@ public: */ virtual void OnInternalIdle(); + /** + Send idle event to window and all subwindows. Returns true if more idle + time is requested. + */ + virtual bool SendIdleEvents(wxIdleEvent& event); + /** Registers a system wide hotkey. Every time the user presses the hotkey registered here, this window will receive a hotkey event.