X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/939dafa6d484d348d674f6cbd77c4a647599102c..92c0fc34c104c8d7c12d6a3b78ea232690fc23f4:/interface/wx/pen.h diff --git a/interface/wx/pen.h b/interface/wx/pen.h index 0bcddb1248..2cfc12f5b9 100644 --- a/interface/wx/pen.h +++ b/interface/wx/pen.h @@ -2,12 +2,14 @@ // Name: pen.h // Purpose: interface of wxPen* classes // Author: wxWidgets team -// RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** The possible styles for a wxPen. + + Note that hatched pen styles are not supported by X11-based ports, + including wxGTK. */ enum wxPenStyle { @@ -61,8 +63,11 @@ enum wxPenStyle wxPENSTYLE_VERTICAL_HATCH, /**< Vertical hatch. */ - wxPENSTYLE_FIRST_HATCH = wxPENSTYLE_BDIAGONAL_HATCH, - wxPENSTYLE_LAST_HATCH = wxPENSTYLE_VERTICAL_HATCH + wxPENSTYLE_FIRST_HATCH, + /**< First of the hatch styles (inclusive). */ + + wxPENSTYLE_LAST_HATCH + /**< Last of the hatch styles (inclusive). */ }; /** @@ -134,6 +139,7 @@ enum wxPenCap @li ::wxBLUE_PEN @li ::wxCYAN_PEN @li ::wxGREEN_PEN + @li ::wxYELLOW_PEN @li ::wxGREY_PEN @li ::wxLIGHT_GREY_PEN @li ::wxMEDIUM_GREY_PEN @@ -182,7 +188,7 @@ public: @param stipple A stipple bitmap. - @onlyfor{wxmsw,wxmac} + @onlyfor{wxmsw,wxosx} @see SetWidth(), SetStipple() */ @@ -269,9 +275,43 @@ public: /** Returns @true if the pen is initialised. + + Notice that an uninitialized pen object can't be queried for any pen + properties and all calls to the accessor methods on it will result in + an assert failure. */ virtual bool IsOk() const; + /** + Returns @true if the pen is a valid non-transparent pen. + + This method returns @true if the pen object is initialized and has a + non-transparent style. Notice that this should be used instead of + simply testing whether GetStyle() returns a style different from + wxPENSTYLE_TRANSPARENT if the pen may be invalid as GetStyle() would + assert in this case. + + @see IsTransparent() + + @since 2.9.2. + */ + bool IsNonTransparent() const; + + /** + Returns @true if the pen is transparent. + + A transparent pen is simply a pen with wxPENSTYLE_TRANSPARENT style. + + Notice that this function works even for non-initialized pens (for + which it returns @false) unlike tests of the form GetStyle() == + wxPENSTYLE_TRANSPARENT which would assert if the pen is invalid. + + @see IsNonTransparent() + + @since 2.9.2. + */ + bool IsTransparent() const; + /** Sets the pen cap style, which may be one of @c wxCAP_ROUND, @c wxCAP_PROJECTING and @c wxCAP_BUTT. The default is @c wxCAP_ROUND. @@ -291,7 +331,7 @@ public: //@} /** - Associates an array of pointers to dashes (defined as @c char in X, @c DWORD under + Associates an array of dash values (defined as @c char in X, @c DWORD under Windows) with the pen. The array is not deallocated by wxPen, but neither must it be deallocated by @@ -389,6 +429,13 @@ wxPen* wxCYAN_PEN; */ wxPen* wxGREEN_PEN; +/** + Yellow pen. + Except for the color it has all standard attributes + (1-pixel width, @c wxPENSTYLE_SOLID and @c wxCAP_ROUND styles, etc...). +*/ +wxPen* wxYELLOW_PEN; + /** Black pen. Except for the color it has all standard attributes