OOFILE  1.9
Public Types | Public Member Functions | Protected Attributes | List of all members
oofRepBlock Class Referenceabstract

Abstract base for a fixed-size block drawn by an oofRepLayoutBand. More...

#include <oofrep.h>

Inheritance diagram for oofRepBlock:
Inheritance graph
[legend]
Collaboration diagram for oofRepBlock:
Collaboration graph
[legend]

Public Types

enum  blockAlignT { alignLeft, alignCentre, alignRight }
 

Public Member Functions

oofAdornerListadorners ()
 
blockAlignT align () const
 
oofRepBlockalign (blockAlignT)
 
void clearID ()
 
virtual oofRepBlockclone () const =0
 
virtual unsigned int countCells () const
 
virtual void describeLayout ()
 central default call like draw() but still able to be overriden in extreme cases. More...
 
virtual void draw ()
 central default call for drawing, but still able to be overriden in extreme cases. More...
 
virtual void finishConstruction ()
 null base method occasionally overriden More...
 
virtual unsigned long fixedHeight ()
 
unsigned long fixedWidth ()
 
oofRepBlockfixedWidth (unsigned long)
 
virtual oofString getCellText (bool *outIsEditable=0, oofString *outLocationName=0, long row=0, short col=0) const
 
bool hasAdorners () const
 
oofString ID () const
 
void ID (const oofString &)
 
oofRepTextStylelocalTextStyle () const
 Get style owned by this object. More...
 
virtual oofRepEditLinkmakeEditLink (const oofRepEditingEnv &)
 Make an editor for this drawable - by default return a null link. More...
 
bool moveDownAfter () const
 Indicate if a layout band should start a new row of blocks. More...
 
oofRepBlockmoveDownAfter (bool)
 Set the flag to be returned by moveDownAfter(). More...
 
 oofRepBlock (oofRepTextStyle *adoptedStyle=0)
 
virtual void setCellText (const oofString &, long row=0, short col=0)
 
void textStyle (oofRepTextStyle *adoptedStyle)
 Set style owned by this object. More...
 
void textStyle (const char *fontName, unsigned short fontSize, unsigned char styleNum=0, short leading=0, oofColor color=oofColor::Black)
 Set style owned by this object, creating from the font parameters. More...
 
virtual oofRepTextStyletextStyle () const
 
oofRepTextStyleuniqueTextStyle ()
 Get a style unique to this object, cloning the one we'd normally use if necessary. More...
 
virtual dbViewview (unsigned short whichView=0) const
 Request a dbView which may be the source of data for the item. More...
 
virtual unsigned long width ()
 
virtual ~oofRepBlock ()
 
multi-method dispatch to factories for rendering report objects.

one for each environment

Note
don't use pure virtuals as some subclasses may not implement
virtual void makeRender (const oofRepMacEnv &)
 
virtual void makeRender (const oofRepMacCGEnv &)
 
virtual void makeRender (const oofRepWinEnv &)
 
virtual void makeRender (const oofRepTextEnv &)
 
virtual void makeRender (const oofRepGDIPlusEnv &)
 
virtual void makeRender (const oofRepRTFEnv &)
 
virtual void makeRender (const oofRepHTMLEnv &)
 
virtual void makeRender (const oofRepCSVEnv &)
 
virtual void makeRender (const oofRepTSVEnv &)
 
virtual void makeRender (const oofRepXMLEnv &)
 
virtual void makeRender (const oofRepEditingEnv &)
 Just make a renderer for the GUI environment as if not editing because by default most drawables are not editable! More...
 

Protected Attributes

blockAlignT mAlignment
 
unsigned long mFixedWidth
 
oofString mID
 
bool mMoveDownAfter
 
oofRepRendermRender
 
oofRepTextStylemStyle
 

Detailed Description

Abstract base for a fixed-size block drawn by an oofRepLayoutBand.

Definition at line 1408 of file oofrep.h.

Constructor & Destructor Documentation

oofRepBlock::oofRepBlock ( oofRepTextStyle adoptedStyle = 0)

Definition at line 1579 of file oofrep1.cpp.

virtual oofRepBlock::~oofRepBlock ( )
inlinevirtual

Definition at line 1414 of file oofrep.h.

Member Function Documentation

oofAdornerList & OOF_mixAdornable::adorners ( )
inlineinherited
oofRepBlock::blockAlignT oofRepBlock::align ( ) const
inline
oofRepBlock & oofRepBlock::align ( oofRepBlock::blockAlignT  A)

Definition at line 1589 of file oofrep1.cpp.

References mAlignment.

void oofRepDrawable::clearID ( )
inlineinherited

Definition at line 1863 of file oofrep.h.

References oofString::clear(), and oofRepDrawable::mID.

Referenced by OOF_repXMLclearIDVisitor::VisitDrawable().

virtual oofRepBlock* oofRepBlock::clone ( ) const
pure virtual
unsigned int oofRepBlock::countCells ( ) const
virtual

Reimplemented in oofRepPictBlock, oofRepBracketedTextBlock, and oofRepTextBlock.

Definition at line 1638 of file oofrep1.cpp.

Referenced by OOF_RepBlockCellRow::addBlockCells().

void oofRepDrawable::describeLayout ( )
virtualinherited

central default call like draw() but still able to be overriden in extreme cases.

Provides a second virtual function for renderers used by backends such as XML which have distinct drawing time and declarative time operations

Definition at line 1265 of file oofrep1.cpp.

References oofRepRender::describeLayout(), and oofRepDrawable::mRender.

Referenced by OOF_repXMLlayoutVisitor::VisitDrawable().

void oofRepDrawable::draw ( )
virtualinherited
void oofRepDrawable::finishConstruction ( )
virtualinherited

null base method occasionally overriden

Reimplemented in oofRepGraphBand.

Definition at line 1242 of file oofrep1.cpp.

Referenced by oofRepBreak::finishConstruction(), and OOF_repFinishConstructionVisitor::VisitDrawable().

unsigned long oofRepBlock::fixedHeight ( )
inlinevirtual
unsigned long oofRepBlock::fixedWidth ( )
inline
oofRepBlock & oofRepBlock::fixedWidth ( unsigned long  inWidth)

Definition at line 1597 of file oofrep1.cpp.

References mFixedWidth.

oofString oofRepBlock::getCellText ( bool *  outIsEditable = 0,
oofString outLocationName = 0,
long  row = 0,
short  col = 0 
) const
virtual

Reimplemented in oofRepPageNoBlock, oofRepFieldBlock, oofRepPictBlock, and oofRepTextBlock.

Definition at line 1645 of file oofrep1.cpp.

Referenced by oofRepLayoutEditLink::getCellText().

bool OOF_mixAdornable::hasAdorners ( ) const
inlineinherited

Definition at line 361 of file oofadorn.h.

References oofAdornerList::count().

Referenced by OOF_repXMLstyleVisitor::VisitDrawable().

oofString oofRepDrawable::ID ( ) const
inlineinherited
void oofRepDrawable::ID ( const oofString inID)
inlineinherited

Definition at line 1855 of file oofrep.h.

References oofString::isEmpty(), and oofRepDrawable::mID.

oofRepTextStyle * oofRepTextStylable::localTextStyle ( ) const
inlineinherited

Get style owned by this object.

Returns
may be null indicating use container's style.

Definition at line 2654 of file oofrep.h.

References oofRepTextStylable::mStyle.

Referenced by oofRepEditLink::localTextStyle(), and OOF_repXMLstyleVisitor::VisitDrawable().

oofRepEditLink * oofRepDrawable::makeEditLink ( const oofRepEditingEnv inEnv)
virtualinherited

Make an editor for this drawable - by default return a null link.

Note that this is separated from the making of render wrappers as editing may have its own complexities - a given drawable may therefore provide a subclassed edit link but use standard wrapping.

Reimplemented in oofRepViewBand.

Definition at line 1421 of file oofrep1.cpp.

void oofRepDrawable::makeRender ( const oofRepMacEnv )
virtualinherited
void oofRepDrawable::makeRender ( const oofRepMacCGEnv &  )
virtualinherited
void oofRepDrawable::makeRender ( const oofRepWinEnv )
virtualinherited
void oofRepDrawable::makeRender ( const oofRepTextEnv )
virtualinherited
void oofRepDrawable::makeRender ( const oofRepGDIPlusEnv )
virtualinherited
void oofRepDrawable::makeRender ( const oofRepRTFEnv )
virtualinherited
void oofRepDrawable::makeRender ( const oofRepHTMLEnv )
virtualinherited
void oofRepDrawable::makeRender ( const oofRepCSVEnv )
virtualinherited
void oofRepDrawable::makeRender ( const oofRepTSVEnv )
virtualinherited
void oofRepDrawable::makeRender ( const oofRepXMLEnv )
virtualinherited
void oofRepDrawable::makeRender ( const oofRepEditingEnv inEnv)
virtualinherited

Just make a renderer for the GUI environment as if not editing because by default most drawables are not editable!

Reimplemented in oofRepPictBlock, oofRepTextBlock, oofRepEmptyRootBand, oofRepViewBand, and oofRepLayoutBand.

Definition at line 51 of file oofrepedit.cpp.

References oofRepEditingEnv::editor(), oofRepEditor::makeDefaultRenderWrapper(), and oofRepEditingEnv::parentGUIenv().

bool oofRepBlock::moveDownAfter ( ) const
inline
oofRepBlock & oofRepBlock::moveDownAfter ( bool  b)

Set the flag to be returned by moveDownAfter().

Same effect achieved by ending an oofRepTextBlock with a linefeed.

Definition at line 1609 of file oofrep1.cpp.

References mMoveDownAfter.

void oofRepBlock::setCellText ( const oofString ,
long  row = 0,
short  col = 0 
)
virtual

Reimplemented in oofRepPageNoBlock, oofRepFieldBlock, and oofRepTextBlock.

Definition at line 1655 of file oofrep1.cpp.

Referenced by oofRepLayoutEditLink::setCellText().

void oofRepTextStylable::textStyle ( oofRepTextStyle adoptedStyle)
inherited
void oofRepTextStylable::textStyle ( const char *  fontName,
unsigned short  fontSize,
unsigned char  styleNum = 0,
short  leading = 0,
oofColor  color = oofColor::Black 
)
inherited

Set style owned by this object, creating from the font parameters.

Definition at line 1815 of file oofrep1.cpp.

References oofRepTextStylable::mStyle.

oofRepTextStyle * oofRepBlock::textStyle ( ) const
virtual
Returns
text style of this block or whatever's drawing it. Can cope with no currentLayout as may be called when not drawing.
See also
OOF_repXMLstyleCleanupVisitor::VisitDrawable

Reimplemented from oofRepTextStylable.

Definition at line 1622 of file oofrep1.cpp.

References oofRepLayoutBand::currentLayout(), oofRepTextStylable::mStyle, and oofRepTextStylable::textStyle().

Referenced by oofRepTextBlock_MacRender::draw(), fixedHeight(), and oofRepTextBlock_MacRender::width().

oofRepTextStyle * oofRepTextStylable::uniqueTextStyle ( )
inherited

Get a style unique to this object, cloning the one we'd normally use if necessary.

Return values
Alwaysreturns a style.

Definition at line 1842 of file oofrep1.cpp.

References oofRepTextStyle::clone(), oofRepTextStylable::mStyle, and oofRepTextStylable::textStyle().

dbView * oofRepDrawable::view ( unsigned short  whichView = 0) const
virtualinherited

Request a dbView which may be the source of data for the item.

Parameters
whichViewis zero-based index of views. eg: oofRepGraphBand has more than one view for some graph types.
Returns
null by default if no band matching index

Reimplemented in oofRepViewBand, and oofRepGraphBand.

Definition at line 1253 of file oofrep1.cpp.

Referenced by oofRepSection::drawSection(), OOF_repXMLschemaVisitor::VisitComplexBand(), OOF_repXMLlayoutVisitor::VisitComplexBand(), oofRepSchemaVisitor::VisitDrawable(), OOF_repEditSetupVisitor::VisitIterableBandBody(), and OOF_repXMLlayoutVisitor::WriteColumns().

unsigned long oofRepDrawable::width ( )
virtualinherited

Member Data Documentation

blockAlignT oofRepBlock::mAlignment
protected

Definition at line 1436 of file oofrep.h.

Referenced by align(), and oofRepPageNoBlock::oofRepPageNoBlock().

unsigned long oofRepBlock::mFixedWidth
protected

Definition at line 1435 of file oofrep.h.

Referenced by oofRepPictBlock::fixedHeight(), fixedWidth(), and oofRepPictBlock::width().

oofString oofRepDrawable::mID
protectedinherited

Definition at line 902 of file oofrep.h.

Referenced by oofRepDrawable::clearID(), and oofRepDrawable::ID().

bool oofRepBlock::mMoveDownAfter
protected

Definition at line 1437 of file oofrep.h.

Referenced by moveDownAfter().

oofRepRender* oofRepDrawable::mRender
protectedinherited
oofRepTextStyle* oofRepTextStylable::mStyle
protectedinherited

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