*/
enum wxBrushStyle
{
+ wxBRUSHSTYLE_INVALID = -1,
+
wxBRUSHSTYLE_SOLID = wxSOLID,
/**< Solid. */
wxBRUSHSTYLE_FIRST_HATCH = wxFIRST_HATCH,
wxBRUSHSTYLE_LAST_HATCH = wxLAST_HATCH,
- wxBRUSHSTYLE_MAX
};
@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.
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
@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
@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);
//@}
/**
@see wxBitmap
*/
- void SetStipple(const wxBitmap& bitmap);
+ virtual void SetStipple(const wxBitmap& bitmap);
/**
Sets the brush style.
@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;
};
/**
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}
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.