X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/526954c5968baa29218c994ec48e476ae2bd4b9f..1cef35cad32a422dd3cb414cbf67dfdf9abbca60:/interface/wx/gdicmn.h diff --git a/interface/wx/gdicmn.h b/interface/wx/gdicmn.h index 900d7b5f91..867a0c4ed1 100644 --- a/interface/wx/gdicmn.h +++ b/interface/wx/gdicmn.h @@ -583,6 +583,49 @@ public: wxSize& operator *=(int factor); //@} + + /** + @name Defaults handling. + + Test for and set non-specified wxPoint components. + + Although a wxPoint is always initialized to (0, 0), wxWidgets commonly + uses wxDefaultCoord (defined as @c -1) to indicate that a point hasn't + been initialized or specified. In particular, ::wxDefaultPosition is + used in many places with this meaning. + */ + //@{ + + /** + Returns @true if neither of the point components is equal to + wxDefaultCoord. + + This method is typically used before calling SetDefaults(). + + @since 2.9.2 + */ + bool IsFullySpecified() const; + + /** + Combine this object with another one replacing the uninitialized + values. + + It is typically used like this: + + @code + if ( !pos.IsFullySpecified() ) + { + pos.SetDefaults(GetDefaultPosition()); + } + @endcode + + @see IsFullySpecified() + + @since 2.9.2 + */ + void SetDefaults(const wxSize& sizeDefault); + //@} + /** x member. */ @@ -595,7 +638,7 @@ public: }; /** - Global istance of a wxPoint initialized with values (-1,-1). + Global instance of a wxPoint initialized with values (-1,-1). */ wxPoint wxDefaultPosition; @@ -724,6 +767,12 @@ public: }; +/** + Global istance of a wxColourDatabase. +*/ +wxColourDatabase* wxTheColourDatabase; + + /** @class wxSize