X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8024723d768fee81373b38218564f48d4a0ea871..3201a1046ba71ba8e5ef2ed694fde34d12f743f3:/interface/brush.h diff --git a/interface/brush.h b/interface/brush.h index 3b4e63d63d..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. @@ -141,14 +130,14 @@ public: object is stored in an application data structure, and there is a risk of double deletion. */ - ~wxBrush(); + virtual ~wxBrush(); /** Returns a reference to the brush colour. @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,21 +145,21 @@ 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. @see GetStyle() */ - bool IsHatch() const; + virtual bool IsHatch() const; /** Returns @true if the brush is initialised. It will return @false if the default @@ -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.