Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

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

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...
 

Detailed Description

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.

See also
IlvStylist::addStyleSheet().

Constructor & Destructor Documentation

§ IlvStyleSheet()

IlvStyleSheet::IlvStyleSheet ( const char *  name)

Initializes a new instance of the IlvStyleSheet class.

Parameters
nameThe 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.
See also
getName().

§ ~IlvStyleSheet()

virtual IlvStyleSheet::~IlvStyleSheet ( )
virtual

Destructor.

Releases all the memory referenced by this instance.

Member Function Documentation

§ getName()

virtual const char* IlvStyleSheet::getName ( ) const
virtual

Returns the name of this style sheet.

Returns
The name of this style sheet as it was provided in the constructor, or 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.
The default implementation return 0.

§ getStylingTechnology()

virtual const char* IlvStyleSheet::getStylingTechnology ( ) const
pure virtual

Returns a string that identifies the styling technology of the current style sheet.

Returns
The name of the styling technology implemented by this style sheet. The returned value must not be modified or deleted.

§ read()

virtual IlBoolean IlvStyleSheet::read ( std::istream &  stream)
pure virtual

Reads a style sheet content from the specified input stream.

Parameters
streamThe input stream to read the style from.
Returns
IlTrue on success, and IlFalse if the operation fails.

§ setContent()

virtual IlBoolean IlvStyleSheet::setContent ( const char *  content)
pure virtual

Sets the content of this style sheet.

Parameters
contentThe content to set to this style sheet.
Returns
IlTrue on success, and IlFalse if the operation fails.

§ unLock()

void IlvStyleSheet::unLock ( )

Decrements the reference count by 1.

If the counter reaches 0, this style sheet is deleted.


© Copyright 2018, 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.