Ipelib

ipe::Cascade Class Reference

A cascade of style sheets. More...

#include <ipestyle.h>

List of all members.

Public Member Functions


Detailed Description

A cascade of style sheets.

The StyleSheets of a document cascade in the sense that a document can refer to several StyleSheets, which are arranged in a stack. A lookup is done from top to bottom, and returns as soon as a match is found. Ipe always appends the built-in "standard" style sheet at the bottom of the cascade.


Constructor & Destructor Documentation

Cascade::Cascade ( )

Create an empty cascade.

This does not add the standard style sheet.

Cascade::Cascade ( const Cascade rhs)

Copy constructor.

Cascade::~Cascade ( )

Destructor.


Member Function Documentation

Cascade & Cascade::operator= ( const Cascade rhs)

Assignment operator.

int ipe::Cascade::count ( ) const [inline]

Return number of style sheets.

StyleSheet* ipe::Cascade::sheet ( int  index) [inline]

Return StyleSheet at index.

void Cascade::insert ( int  index,
StyleSheet sheet 
)

Insert a style sheet into the cascade.

Takes ownership of sheet.

void Cascade::remove ( int  index)

Remove a style sheet from the cascade.

The old sheet is deleted.

void Cascade::saveAsXml ( Stream stream) const
bool Cascade::has ( Kind  kind,
Attribute  sym 
) const
Attribute Cascade::find ( Kind  kind,
Attribute  sym 
) const
const Symbol * Cascade::findSymbol ( Attribute  sym) const
const Gradient * Cascade::findGradient ( Attribute  sym) const
const Tiling * Cascade::findTiling ( Attribute  sym) const
const Effect * Cascade::findEffect ( Attribute  sym) const
const Layout * Cascade::findLayout ( ) const

Find page layout (such as text margins).

const StyleSheet::TitleStyle * Cascade::findTitleStyle ( ) const

Get style of page titles (or 0 if none defined).

const StyleSheet::PageNumberStyle * Cascade::findPageNumberStyle ( ) const

Return style of page numbering (or 0 if none defined).

String Cascade::findPreamble ( ) const

Return total LaTeX preamble (of the whole cascade).

String Cascade::findEncoding ( ) const

Return LaTeX encoding (of the whole cascade).

TLineCap Cascade::lineCap ( ) const
TLineJoin Cascade::lineJoin ( ) const
TFillRule Cascade::fillRule ( ) const
void Cascade::allNames ( Kind  kind,
AttributeSeq seq 
) const
int Cascade::findDefinition ( Kind  kind,
Attribute  sym 
) const

Find stylesheet defining the attribute.

This method goes through the cascade looking for a definition of the symbolic attribute sym. It returns the index of the stylesheet defining the attribute, or -1 if the attribute is not defined.

The method panics if sym is not symbolic. It also works for ESymbol, EGradient, ETiling, and EEffect.

void Cascade::allCMaps ( std::vector< String > &  seq) const
String Cascade::update ( String  dir)

Update all style sheets in document from stylesheet file.

Looks for files in directory dir whose name matches the name of the style sheet and has the extension 'isy'.

Returns:
a string describing what has been done.

The documentation for this class was generated from the following files: