Views
Foundation Package API Reference Guide
Product Documentation:
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:
IlvAbstractView IlvDisplay IlvScrollView IlvView IlvDrawingView IlvElasticView IlvViewCOMAdapter IlvContainer

Public Member Functions

virtual IlvStylistgetParentStylist () const =0
 Returns the parent stylist. More...
 
void removeStyling ()
 Removes all styling information from the stylist.
 
IlBoolean setStyleSheet (const char *text, size_t length)
 Applies styling information to this stylist. More...
 
IlBoolean setStyleSheet (std::istream &file)
 Applies styling information to 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
IlvStylable.

Member Function Documentation

◆ 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 IlvAbstractView, and IlvDisplay.

◆ setStyleSheet() [1/2]

IlBoolean IlvStylist::setStyleSheet ( const char *  text,
size_t  length 
)

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. After setting the stylesheet notifyStyleChanges() must be called to recalculate the style and redraw.

Parameters
text.A pointer to the css styling text.
length.Length of the styling text.
Returns
IlTrue if the style sheet was applied succesfully, and IlFalse if a problem occured.
See also
removeStyling().

◆ setStyleSheet() [2/2]

IlBoolean IlvStylist::setStyleSheet ( std::istream &  file)

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. After setting the stylesheet notifyStyleChanges() must be called to recalculate the style and redraw.

Parameters
file.An input stream to the style sheet file containing the style information. If there was already a style sheet applied to this stylist, this method overwrites the previous one.
Returns
IlTrue if the style sheet was applied succesfully, and IlFalse if a problem occured.
See also
removeStyling(), IlvDisplay::notifyStyleChanges().