X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d2aa927a57b3f49f53ec5cf0e19edaa57c126219..4aa59c3df6c324a6e6f9d540eac25e88b9c28acd:/interface/brush.h diff --git a/interface/brush.h b/interface/brush.h index 61514f25a4..f98b98525f 100644 --- a/interface/brush.h +++ b/interface/brush.h @@ -11,6 +11,8 @@ */ enum wxBrushStyle { + wxBRUSHSTYLE_INVALID = -1, + wxBRUSHSTYLE_SOLID = wxSOLID, /**< Solid. */ @@ -46,7 +48,6 @@ enum wxBrushStyle wxBRUSHSTYLE_FIRST_HATCH = wxFIRST_HATCH, wxBRUSHSTYLE_LAST_HATCH = wxLAST_HATCH, - wxBRUSHSTYLE_MAX }; @@ -105,19 +106,7 @@ public: @param style One of the ::wxBrushStyle enumeration values. */ - wxBrush(const wxColour& colour, wxBrushStyle style = wxSOLID); - - /** - Constructs a brush from a colour name and @a style. - - @param colourName - Colour name. The name will be looked up in the colour database. - @param style - One of the ::wxBrushStyle enumeration values. - - @see wxColourDatabase - */ - wxBrush(const wxString& colourName, wxBrushStyle style); + wxBrush(const wxColour& colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID); /** Constructs a stippled brush using a bitmap. @@ -148,7 +137,7 @@ public: @see SetColour() */ - wxColour& GetColour() const; + virtual wxColour GetColour() const; /** Gets a pointer to the stipple bitmap. If the brush does not have a wxBRUSHSTYLE_STIPPLE @@ -156,14 +145,14 @@ public: @see SetStipple() */ - wxBitmap* GetStipple() const; + virtual wxBitmap* GetStipple() const; /** Returns the brush style, one of the ::wxBrushStyle values. @see SetStyle(), SetColour(), SetStipple() */ - wxBrushStyle GetStyle() const; + virtual wxBrushStyle GetStyle() const; /** Returns @true if the style of the brush is any of hatched fills. @@ -185,10 +174,8 @@ public: @see GetColour() */ - void SetColour(wxColour& colour); - void SetColour(const wxString& colourName); - void SetColour(unsigned char red, unsigned char green, - unsigned char blue); + virtual void SetColour(wxColour& colour); + virtual void SetColour(unsigned char red, unsigned char green, unsigned char blue); //@} /** @@ -203,7 +190,7 @@ public: @see wxBitmap */ - void SetStipple(const wxBitmap& bitmap); + virtual void SetStipple(const wxBitmap& bitmap); /** Sets the brush style. @@ -213,24 +200,19 @@ public: @see GetStyle() */ - void SetStyle(wxBrushStyle style); + virtual void SetStyle(wxBrushStyle style); /** Inequality operator. See @ref overview_refcount_equality for more info. */ - bool operator !=(const wxBrush& brush); - - /** - Assignment operator, using @ref overview_refcount "reference counting". - */ - wxBrush operator =(const wxBrush& brush); + bool operator !=(const wxBrush& brush) const; /** Equality operator. See @ref overview_refcount_equality for more info. */ - bool operator ==(const wxBrush& brush); + bool operator ==(const wxBrush& brush) const; }; /** @@ -296,6 +278,9 @@ wxBrush* wxRED_BRUSH; A brush list is a list containing all brushes which have been created. + The application should not construct its own brush list: it should use the + object pointer ::wxTheBrushList. + @library{wxcore} @category{gdi} @@ -304,12 +289,6 @@ wxBrush* wxRED_BRUSH; class wxBrushList : public wxList { public: - /** - Constructor. The application should not construct its own brush list: - use the object pointer ::wxTheBrushList. - */ - wxBrushList(); - /** Finds a brush with the specified attributes and returns it, else creates a new brush, adds it to the brush list, and returns it.