Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvStylist Class Referenceabstract

Applies styles to IlvStylable objects. More...

#include <ilviews/base/stylist.h>

Inheritance diagram for IlvStylist:
IlvDisplay

Public Member Functions

IlBoolean addStyleSheet (IlvStyleSheet *styleSheet)
 Associates a style sheet to this stylist. More...
 
virtual IlvStylistgetParentStylist () const =0
 Returns the parent stylist. More...
 
IlBoolean removeStyleSheet (IlvStyleSheet *styleSheet)
 Dissociates a style sheet from this stylist. More...
 

Detailed Description

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.

See also
IlvStyleSheet, IlvStylable.

Member Function Documentation

§ addStyleSheet()

IlBoolean IlvStylist::addStyleSheet ( IlvStyleSheet styleSheet)

Associates a style sheet to this stylist.

After a style sheet is attached to a stylist, it

Note that, when several style sheets are attached to a stylist, the new style sheet is the last to be queried for styles. Therefore, for this stylist, the styles it defines have a higher priority than the styles defined in the other attached style sheets.

Parameters
styleSheetThe style sheet to attach to this stylist. If the style sheet is already attached to this stylist, this method does nothing.
Returns
IlTrue if the style sheet was attached succesfully, and IlFalse if a problem occured.
See also
removeStyleSheet().

§ getParentStylist()

virtual IlvStylist* IlvStylist::getParentStylist ( ) const
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.

Returns
The parent stylist or 0 if there is none.

Implemented in IlvDisplay.

§ removeStyleSheet()

IlBoolean IlvStylist::removeStyleSheet ( IlvStyleSheet styleSheet)

Dissociates a style sheet from this stylist.

When a style sheet is removed from a stylist, its reference count is decremented and therefore may be deleted.

Parameters
styleSheetThe style sheet to detach from this container. If the style sheet is not attached to this stylist, this method does nothing. If this parameter is 0, the last style sheet that was attached is detached, if there is one.
Returns
IlTrue if the style sheet was detached succesfully, and IlFalse if a problem occured or if this stylist has no style sheet attached.
See also
addStyleSheet().

© Copyright 2017, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.