Ipelib
|
#include <ipestyle.h>
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.
Cascade::Cascade | ( | ) |
Create an empty cascade.
This does not add the standard style sheet.
Cascade::~Cascade | ( | ) |
Destructor.
|
inline |
Return number of style sheets.
Referenced by allNames(), Cascade(), fillRule(), find(), findDefinition(), findEffect(), findGradient(), findLayout(), findPageNumberStyle(), findPreamble(), findSymbol(), findTextPadding(), findTiling(), findTitleStyle(), has(), lineCap(), lineJoin(), operator=(), and saveAsXml().
|
inline |
Return StyleSheet at index.
Referenced by insert().
|
inline |
Return StyleSheet at index.
void Cascade::insert | ( | int | index, |
StyleSheet * | sheet | ||
) |
Insert a style sheet into the cascade.
Takes ownership of sheet.
References sheet().
Referenced by ipe::Document::Document(), and ipe::ImlParser::parseDocument().
void Cascade::remove | ( | int | index | ) |
Remove a style sheet from the cascade.
The old sheet is deleted.
void Cascade::saveAsXml | ( | Stream & | stream | ) | const |
References count().
Referenced by ipe::Document::saveAsXml().
References count().
Referenced by allNames(), and findDefinition().
References count().
Referenced by ipe::Reference::checkStyle(), ipe::PdfWriter::createPageView(), ipe::Painter::doDrawSymbol(), ipe::PdfPainter::doDrawSymbol(), ipe::Reference::draw(), ipe::Path::drawArrow(), ipe::CanvasBase::drawObjects(), ipe::Reference::drawSimple(), ipe::Document::findBitmaps(), ipe::PdfWriter::PdfWriter(), ipe::Document::runLatexAsync(), and ipe::Thumbnail::saveRender().
References count().
Referenced by ipe::PdfPainter::doDrawPath(), ipe::CairoPainter::doDrawPath(), and ipe::PdfWriter::PdfWriter().
References count().
Referenced by ipe::CairoPainter::doDrawPath(), and ipe::PdfWriter::PdfWriter().
References count().
Referenced by ipe::PdfWriter::createPageView().
const Layout * Cascade::findLayout | ( | ) | const |
Find page layout (such as text margins).
References count().
Referenced by ipe::PdfWriter::createPageView(), ipe::PanTool::draw(), ipe::CanvasBase::drawFrame(), ipe::CanvasBase::drawGrid(), ipe::CanvasBase::drawObjects(), ipe::CanvasBase::drawPaper(), ipe::CanvasBase::snapToPaperAndFrame(), and ipe::Thumbnail::Thumbnail().
const TextPadding * Cascade::findTextPadding | ( | ) | const |
Find text padding (for text bbox computation).
References count().
Referenced by ipe::BBoxPainter::doDrawText().
const StyleSheet::TitleStyle * Cascade::findTitleStyle | ( | ) | const |
Get style of page titles (or 0 if none defined).
References count().
Referenced by ipe::Page::applyTitleStyle().
const StyleSheet::PageNumberStyle * Cascade::findPageNumberStyle | ( | ) | const |
Return style of page numbering (or 0 if none defined).
References count().
Referenced by ipe::Latex::addPageNumber().
String Cascade::findPreamble | ( | ) | const |
Return total LaTeX preamble (of the whole cascade).
References count().
Referenced by ipe::Latex::createLatexSource().
TLineCap Cascade::lineCap | ( | ) | const |
References count(), ipe::EButtCap, and ipe::EDefaultCap.
Referenced by ipe::Painter::Painter(), and ipe::PdfPainter::PdfPainter().
TLineJoin Cascade::lineJoin | ( | ) | const |
References count(), ipe::EDefaultJoin, and ipe::ERoundJoin.
Referenced by ipe::Painter::Painter(), and ipe::PdfPainter::PdfPainter().
TFillRule Cascade::fillRule | ( | ) | const |
References count(), ipe::EDefaultRule, and ipe::EEvenOddRule.
Referenced by ipe::Painter::Painter().
void Cascade::allNames | ( | Kind | kind, |
AttributeSeq & | seq | ||
) | const |
References count(), has(), and ipe::Attribute::NORMAL().
Referenced by ipe::Latex::createLatexSource(), ipe::Document::findBitmaps(), ipe::PdfWriter::PdfWriter(), and ipe::Document::runLatexAsync().
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.
References count(), has(), and ipe::Attribute::isSymbolic().
Referenced by ipe::Object::checkSymbol().