X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/939dafa6d484d348d674f6cbd77c4a647599102c..38534f596974042130716a26276e9564b0b72295:/interface/wx/brush.h?ds=inline diff --git a/interface/wx/brush.h b/interface/wx/brush.h index 7af8e2f533..67467e5bfc 100644 --- a/interface/wx/brush.h +++ b/interface/wx/brush.h @@ -3,7 +3,7 @@ // Purpose: interface of wxBrush // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -30,26 +30,29 @@ enum wxBrushStyle wxBRUSHSTYLE_STIPPLE = wxSTIPPLE, /**< Uses a bitmap as a stipple. */ - wxBRUSHSTYLE_BDIAGONAL_HATCH = wxBDIAGONAL_HATCH, + wxBRUSHSTYLE_BDIAGONAL_HATCH, /**< Backward diagonal hatch. */ - wxBRUSHSTYLE_CROSSDIAG_HATCH = wxCROSSDIAG_HATCH, + wxBRUSHSTYLE_CROSSDIAG_HATCH, /**< Cross-diagonal hatch. */ - wxBRUSHSTYLE_FDIAGONAL_HATCH = wxFDIAGONAL_HATCH, + wxBRUSHSTYLE_FDIAGONAL_HATCH, /**< Forward diagonal hatch. */ - wxBRUSHSTYLE_CROSS_HATCH = wxCROSS_HATCH, + wxBRUSHSTYLE_CROSS_HATCH, /**< Cross hatch. */ - wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHORIZONTAL_HATCH, + wxBRUSHSTYLE_HORIZONTAL_HATCH, /**< Horizontal hatch. */ - wxBRUSHSTYLE_VERTICAL_HATCH = wxVERTICAL_HATCH, + wxBRUSHSTYLE_VERTICAL_HATCH, /**< Vertical hatch. */ - wxBRUSHSTYLE_FIRST_HATCH = wxFIRST_HATCH, - wxBRUSHSTYLE_LAST_HATCH = wxLAST_HATCH, + wxBRUSHSTYLE_FIRST_HATCH, + /**< First of the hatch styles (inclusive). */ + + wxBRUSHSTYLE_LAST_HATCH + /**< Last of the hatch styles (inclusive). */ }; @@ -89,6 +92,7 @@ enum wxBrushStyle @li ::wxBLUE_BRUSH @li ::wxCYAN_BRUSH @li ::wxGREEN_BRUSH + @li ::wxYELLOW_BRUSH @li ::wxGREY_BRUSH @li ::wxLIGHT_GREY_BRUSH @li ::wxMEDIUM_GREY_BRUSH @@ -171,12 +175,47 @@ public: virtual bool IsHatch() const; /** - Returns @true if the brush is initialised. It will return @false if the default - constructor has been used (for example, the brush is a member of a class, or - @NULL has been assigned to it). + Returns @true if the brush is initialised. + + Notice that an uninitialized brush object can't be queried for any + brush properties and all calls to the accessor methods on it will + result in an assert failure. */ virtual bool IsOk() const; + /** + Returns @true if the brush is a valid non-transparent brush. + + This method returns @true if the brush 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 + wxBRUSHSTYLE_TRANSPARENT if the brush may be invalid as GetStyle() + would assert in this case. + + @see IsTransparent() + + @since 2.9.2. + */ + bool IsNonTransparent() const; + + /** + Returns @true if the brush is transparent. + + A transparent brush is simply a brush with wxBRUSHSTYLE_TRANSPARENT + style. + + Notice that this function works even for non-initialized brushes (for + which it returns @false) unlike tests of the form GetStyle() == + wxBRUSHSTYLE_TRANSPARENT which would assert if the brush is + invalid. + + @see IsNonTransparent() + + @since 2.9.2. + */ + bool IsTransparent() const; + + //@{ /** Sets the brush colour using red, green and blue values. @@ -244,6 +283,13 @@ wxBrush* wxBLUE_BRUSH; */ wxBrush* wxGREEN_BRUSH; +/** + Yellow brush. + Except for the color it has all standard attributes + (@c wxBRUSHSTYLE_SOLID, no stipple bitmap, etc...). +*/ +wxBrush* wxYELLOW_BRUSH; + /** White brush. Except for the color it has all standard attributes @@ -315,7 +361,7 @@ wxBrush* wxRED_BRUSH; @see wxBrush */ -class wxBrushList : public wxList +class wxBrushList { public: /**