Rogue Wave Views
Gadgets Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvCssStyleSheet Class Reference

Class that represents a CSS style sheet. More...

#include <ilviews/css/stylesheet.h>

Inheritance diagram for IlvCssStyleSheet:
IlvStyleSheet

Public Member Functions

 IlvCssStyleSheet (const char *name=0)
 Constructor. More...
 
virtual ~IlvCssStyleSheet ()
 Destructor. More...
 
virtual IlBoolean read (std::istream &stream)
 Reads a CSS style sheet content. More...
 
virtual IlBoolean setContent (const char *content)
 Sets the content of this style sheet. More...
 

Detailed Description

Class that represents a CSS style sheet.

Library: ilvcss

The IlvCssStyleSheet class holds a style sheet that is created using the standard CSS stylesheet language (level 2). See Cascading Style Sheets W3C Recommendation for details.

At the time of this writing, an application can apply a style to all the predefined Views gadgets, impacting their foreground and background colors using the color and background-color CSS properties.

The selection part of the CSS code is implemented as follows:

See also
IlvStylist::addStyleSheet().

Constructor & Destructor Documentation

§ IlvCssStyleSheet()

IlvCssStyleSheet::IlvCssStyleSheet ( const char *  name = 0)

Constructor.

Initializes a new instance of the IlvCssStyleSheet class.

Parameters
nameThe name of this style sheet. The string is copied.

§ ~IlvCssStyleSheet()

virtual IlvCssStyleSheet::~IlvCssStyleSheet ( )
virtual

Destructor.

Releases all the memory referenced by this instance.

Member Function Documentation

§ read()

virtual IlBoolean IlvCssStyleSheet::read ( std::istream &  stream)
virtual

Reads a CSS style sheet content.

The stream should contain CSS code.

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

Implements IlvStyleSheet.

§ setContent()

virtual IlBoolean IlvCssStyleSheet::setContent ( const char *  content)
virtual

Sets the content of this style sheet.

Example:

sheet->setContent("IlvButton { background-color: green; }");
display->->addStyleSheet(sheet);
Parameters
contentThe CSS content to set to this style sheet.
Returns
IlTrue on success, and IlFalse if the operation fails.

Implements IlvStyleSheet.


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