Holds a style sheet. More...
#include <ilviews/base/stylesheet.h>
Public Member Functions | |
IlvStyleSheet (const char *name) | |
Initializes a new instance of the IlvStyleSheet class. More... | |
virtual | ~IlvStyleSheet () |
Destructor. More... | |
virtual const char * | getName () const |
Returns the name of this style sheet. More... | |
virtual const char * | getStylingTechnology () const =0 |
Returns a string that identifies the styling technology of the current style sheet. More... | |
void | lock () |
Increments the reference count by 1 . | |
virtual IlBoolean | read (std::istream &stream)=0 |
Reads a style sheet content from the specified input stream. More... | |
virtual IlBoolean | setContent (const char *content)=0 |
Sets the content of this style sheet. More... | |
void | unLock () |
Decrements the reference count by 1 . More... | |
Holds a style sheet.
Library: xviews or winviews or mviews (mutually exclusive)
A style sheet can be attached to one or several IlvStylist
in order to impact the aspect of the IlvStylable
objects they control. Typically, an application will attach a style sheet to a IlvGadgetContainer
to provide a style to the controls it stores.
A style sheet holds a set of Styles. A style is a set of graphical resources that impact a set of objects called Stylable.
Note that IlvStyleSheet
are tracked with reference counting: a counter is increased when this style sheet is attached to a IlvStylist
. This counter is decreased when the style sheet is detached from the stylist. If the object's reference count reaches zero, the style sheet is destroyed.
IlvStylist::addStyleSheet()
. IlvStyleSheet::IlvStyleSheet | ( | const char * | name | ) |
Initializes a new instance of the IlvStyleSheet
class.
name | The name of this style sheet. If the implementation of this class for a given styling technology (such as CSS) uses it, this string is copied. Otherwise, this parameter is ignored. |
getName()
.
|
virtual |
Destructor.
Releases all the memory referenced by this instance.
|
virtual |
Returns the name of this style sheet.
0
if it has none, or if the styling technology does not care for style sheet names. If a valid value is returned, it must not be modified or deleted.0
.
|
pure virtual |
Returns a string that identifies the styling technology of the current style sheet.
|
pure virtual |
Reads a style sheet content from the specified input stream.
stream | The input stream to read the style from. |
IlTrue
on success, and IlFalse
if the operation fails.
|
pure virtual |
Sets the content of this style sheet.
content | The content to set to this style sheet. |
IlTrue
on success, and IlFalse
if the operation fails. void IlvStyleSheet::unLock | ( | ) |
Decrements the reference count by 1
.
If the counter reaches 0
, this style sheet is deleted.