CanvasStyleManager Class Reference

the main class to read the style part of Canvas file More...

#include <CanvasStyleManager.hxx>

Public Member Functions

 CanvasStyleManager (CanvasParser &parser)
 constructor
 
virtual ~CanvasStyleManager ()
 destructor
 
int version () const
 returns the file version
 

Protected Member Functions

void setInput (MWAWInputStreamPtr &input)
 store the actual input
 
MWAWInputStreamPtrgetInput ()
 returns the current input
 
bool get (int index, MWAWColor &color) const
 try to retrieve a color from the color index
 
std::vector< MWAWColor > const & getColorsList () const
 returns the list of colors
 
bool get (int index, MWAWGraphicStyle::Pattern &pattern) const
 try to retrieve a pattern from the pattern index
 
bool readArrows ()
 read the arrow shapes
 
bool readArrow (MWAWGraphicStyle::Arrow &arrow, std::string &extra)
 read an arrow shape
 
bool readColors (int numColors)
 try to read the colors list
 
bool readDashes (int numDashes, bool user=false)
 try to read the dash list
 
bool readGradient (MWAWEntry const &entry, MWAWGraphicStyle::Gradient &gradient)
 try to read a gradient (ObFL)
 
bool readPatterns (int numPatterns)
 try to read the pattern list
 
bool readPenSize ()
 read the pen size
 
bool readSprays ()
 try to read the spray
 
bool readFonts (int numFonts)
 try to read the fonts names
 
bool readColorValues (MWAWEntry const &entry)
 read the Windows CVal RSRC: v3 (a list of color)
 

Protected Attributes

MWAWParserStatePtr m_parserState
 the parser state
 
std::shared_ptr< CanvasStyleManagerInternal::Statem_state
 the state
 
CanvasParserm_mainParser
 the main parser;
 

Private Member Functions

 CanvasStyleManager (CanvasStyleManager const &orig)=delete
 
CanvasStyleManageroperator= (CanvasStyleManager const &orig)=delete
 

Friends

class CanvasGraph
 
class CanvasParser
 

Detailed Description

the main class to read the style part of Canvas file

Constructor & Destructor Documentation

◆ CanvasStyleManager() [1/2]

CanvasStyleManager::CanvasStyleManager ( CanvasParser parser)
explicit

constructor

◆ ~CanvasStyleManager()

CanvasStyleManager::~CanvasStyleManager ( )
virtual

destructor

◆ CanvasStyleManager() [2/2]

CanvasStyleManager::CanvasStyleManager ( CanvasStyleManager const &  orig)
privatedelete

Member Function Documentation

◆ get() [1/2]

bool CanvasStyleManager::get ( int  index,
MWAWColor color 
) const
protected

try to retrieve a color from the color index

◆ get() [2/2]

bool CanvasStyleManager::get ( int  index,
MWAWGraphicStyle::Pattern pattern 
) const
protected

try to retrieve a pattern from the pattern index

◆ getColorsList()

std::vector< MWAWColor > const & CanvasStyleManager::getColorsList ( ) const
protected

returns the list of colors

◆ getInput()

MWAWInputStreamPtr & CanvasStyleManager::getInput ( )
protected

◆ operator=()

CanvasStyleManager & CanvasStyleManager::operator= ( CanvasStyleManager const &  orig)
privatedelete

◆ readArrow()

bool CanvasStyleManager::readArrow ( MWAWGraphicStyle::Arrow arrow,
std::string &  extra 
)
protected

read an arrow shape

Referenced by readArrows().

◆ readArrows()

bool CanvasStyleManager::readArrows ( )
protected

read the arrow shapes

◆ readColors()

bool CanvasStyleManager::readColors ( int  numColors)
protected

try to read the colors list

◆ readColorValues()

bool CanvasStyleManager::readColorValues ( MWAWEntry const &  entry)
protected

read the Windows CVal RSRC: v3 (a list of color)

◆ readDashes()

bool CanvasStyleManager::readDashes ( int  numDashes,
bool  user = false 
)
protected

try to read the dash list

◆ readFonts()

bool CanvasStyleManager::readFonts ( int  numFonts)
protected

try to read the fonts names

◆ readGradient()

bool CanvasStyleManager::readGradient ( MWAWEntry const &  entry,
MWAWGraphicStyle::Gradient gradient 
)
protected

try to read a gradient (ObFL)

◆ readPatterns()

bool CanvasStyleManager::readPatterns ( int  numPatterns)
protected

try to read the pattern list

◆ readPenSize()

bool CanvasStyleManager::readPenSize ( )
protected

read the pen size

◆ readSprays()

bool CanvasStyleManager::readSprays ( )
protected

try to read the spray

◆ setInput()

void CanvasStyleManager::setInput ( MWAWInputStreamPtr input)
protected

store the actual input

◆ version()

int CanvasStyleManager::version ( ) const

returns the file version

Friends And Related Function Documentation

◆ CanvasGraph

friend class CanvasGraph
friend

◆ CanvasParser

friend class CanvasParser
friend

Member Data Documentation

◆ m_mainParser

CanvasParser* CanvasStyleManager::m_mainParser
protected

the main parser;

Referenced by readColors(), readDashes(), readFonts(), and readPatterns().

◆ m_parserState

MWAWParserStatePtr CanvasStyleManager::m_parserState
protected

◆ m_state

std::shared_ptr<CanvasStyleManagerInternal::State> CanvasStyleManager::m_state
protected

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

Generated on Thu Jan 19 2023 00:00:00 for libmwaw by doxygen 1.9.6