ColorPaint
#include <bb/cascades/ColorPaint>
A representation of a color.
The actual value of the color is not exposed through this API.
This class currently has a limited purpose. In the future we may want to represent "theme colors" rather than colors with specific RGB values, and then this class provides the appropriate level of abstraction. We already make use of it in SystemDefaults.
BlackBerry 10.0.0
Inheritance
| bb::cascades::Paint | ||
| bb::cascades::ColorPaint | ||
| bb::cascades::Color | ||
Public Functions Index
| ColorPaint () | |
| ColorPaint (const ColorPaint &orig) | |
| virtual ColorPaint & | operator= (const ColorPaint &other) |
| virtual | ~ColorPaint () |
| virtual bool | operator== (const Paint &other) const |
| virtual bool | operator!= (const Paint &other) const |
| bool | isNull () const |
| Paint & | operator= (const Paint &other) |
| Paint (const Paint &orig) |
Public Functions
Creates a null ColorPaint object.
The resulting paint is a null paint until initialized with another (non-null) ColorPaint object. There is no public API for creating a non-null ColorPaint directly without using the copy constructor.
// creates a null paint
ColorPaint c;
...
// Initializes c with the value of label.textColor().
c = SystemDefaults::Paints::defaultText();
BlackBerry 10.0.0
A copy constructor which creates a copy of the passed ColorPaint object.
ColorPaint c = SystemDefaults::Paints::defaultText();
or
ColorPaint c(SystemDefaults::Paints::defaultText());
| Parameters | |
|---|---|
| orig |
The ColorPaint object to create a copy of. |
BlackBerry 10.0.0
virtualColorPaint &
Assignment operator that makes this color a copy of the passed color.
| Parameters | |
|---|---|
| other |
The ColorPaint object to make a copy of. |
BlackBerry 10.0.0
virtual
Destructor.
BlackBerry 10.0.0
virtual bool
An == operator for ColorPaint objects.
The objects are equal if they stem from the same original object (for example, if they represent the same SystemDefault color) or if they are both null paints.
Subclasses can override this criteria in their own implementation.
true if the objects stem from the same original object, or if both paints are null, false otherwise.
BlackBerry 10.0.0
virtual bool
A != operator for paint objects.
This is equivalent to !operator==();
true if the objects are not equal, false otherwise.
BlackBerry 10.0.0
bool 
Checks whether this Paint object is a null paint.
true if this Paint object is a null paint, false otherwise.
BlackBerry 10.0.0
Copy constructor for Paint objects.
BlackBerry 10.0.0