Applies styles to IlvStylable
objects.
More...
#include <ilviews/base/stylist.h>
Public Member Functions | |
IlString | getAppliedStyleSheet () const |
CSS stylesheet applied to this stylist as IlString Returns empty string if hasStylingApplied() is false. More... | |
virtual views::vector< IlvStylist * > | getChildStylists () const =0 |
Get child stylists. More... | |
virtual IlvStylist * | getParentStylist () const =0 |
Returns the parent stylist. More... | |
const IlPathName & | getStyleSheetPath () const |
Returns the CSS file that was applied to the stylist If there's no known path to a file. The IlvPathName::isEmpty will return true. This can happen if the CSS file has been applied with the string or streamer API. More... | |
virtual void | notifyStyleChanges () |
Recalculates the stylables and redraws them. | |
void | notifyStyleChangesInStylistChain () |
Recursively walks down the stylist hierarchy and calls notifyStyleChanges on all stylists without styling. | |
void | removeStyling (IlBoolean refreshStylables=IlTrue) |
Removes all styling information from the stylist. More... | |
IlBoolean | setStyleSheet (const char *text, size_t length, IlBoolean refreshStylables=IlTrue) |
Applies styling information to this stylist. More... | |
IlBoolean | setStyleSheet (std::istream &file, IlBoolean refreshStylables=IlTrue) |
Applies styling information to this stylist. More... | |
void | setStyleSheetPath (const IlPathName &file) |
Records the CSS file path that was applied to this stylist. More... | |
Applies styles to IlvStylable
objects.
Library: xviews or winviews or mviews (mutually exclusive)
A stylist is responsible for applying the styles that are stored in the style sheets attached to it to the stylable object it is in charge of.
IlvStylable
. IlString IlvStylist::getAppliedStyleSheet | ( | ) | const |
|
pure virtual |
Get child stylists.
Returns a list of child stylists that are attached to this stylist. The child stylists may or may not have any styling applied. This can be checked with hasStylingApplied().
0
if there is none. hasStylingApplied()
. Implemented in IlvDisplay, and IlvAbstractView.
|
pure virtual |
Returns the parent stylist.
Stylist hierarchy is how cascading styling is done: if no style apply for a given stylable in this stylist, the parent stylist will be queried, recursively until there is no parent stylist anymore.
0
if there is none. Implemented in IlvDisplay, and IlvAbstractView.
const IlPathName& IlvStylist::getStyleSheetPath | ( | ) | const |
Returns the CSS file that was applied to the stylist If there's no known path to a file. The IlvPathName::isEmpty will return true. This can happen if the CSS file has been applied with the string or streamer API.
IlvPathName
pointing to the CSS file applied to this stylist. Removes all styling information from the stylist.
refreshStylables. | If IlTrue, the stylables will be recalculated and redrawn after the styling is applied. Otherwise notifyStyleChanges must be manually called to see changes. |
IlBoolean IlvStylist::setStyleSheet | ( | const char * | text, |
size_t | length, | ||
IlBoolean | refreshStylables = IlTrue |
||
) |
Applies styling information to this stylist.
The style sheet is queried for styling information if the look & feel handler is set to CSS. Calling this method again overwrites the previous styling information.
text. | A pointer to the css styling text. |
length. | Length of the styling text. |
refreshStylables. | If IlTrue, the stylables will be recalculated and redrawn after the styling is applied. Otherwise notifyStyleChanges must be manually called to see changes. |
IlTrue
if the style sheet was applied succesfully, and IlFalse
if a problem occured. removeStyling(), notifyStyleChanges()
. Applies styling information to this stylist.
The style sheet is queried for styling information if the look & feel handler is set to CSS. Calling this method again overwrites the previous styling information.
file. | An input stream to the style sheet file containing the style information. |
refreshStylables. | If IlTrue, the stylables will be recalculated and redrawn after the styling is applied. Otherwise notifyStyleChanges must be manually called to see changes. If there was already a style sheet applied to this stylist, this method overwrites the previous one. |
IlTrue
if the style sheet was applied succesfully, and IlFalse
if a problem occured. removeStyling(), notifyStyleChanges()
. void IlvStylist::setStyleSheetPath | ( | const IlPathName & | file | ) |
Records the CSS file path that was applied to this stylist.
file | IlvPathName pointing to the CSS file applied on disk |