OOFILE  1.9
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members

Top level class for a report. More...

#include <oofrep.h>

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

Public Types

enum  { kBodyViewLevel =1 }
 

Public Member Functions

oofAdornerListadorners ()
 
void becomeCurrent ()
 
oofRepIterableTreeBandbody (oofRepIterableTreeBand *adoptedBody)
 Set the main band from which report hangs. More...
 
oofRepIterableTreeBandbody ()
 
unsigned long bodyEnd ()
 
unsigned long bodyHeight ()
 
unsigned long bodyStart ()
 
unsigned long bodyWidth ()
 
void changeTextStyle (oofRepTextStyle *)
 Provide forwarding so report objects that are drawing can affect environment text style. More...
 
unsigned long & currentVerticalPos ()
 
void decrementIteratingBandLevel ()
 Call when visiting tree enters band implementing OOF_mixIterableBand. More...
 
void describe (std::ostream &)
 
virtual void draw (oofRepEnvironment &)
 
void drawFirstPageFooters ()
 
void drawFirstPageHeaders ()
 
void drawPageBreak ()
 
void drawPageFooters ()
 
void drawPageHeaders ()
 
oofRepEnvironmentenvironment () const
 
oofRepBandListfirstPageFooters ()
 
oofRepBandListfirstPageHeaders ()
 
oofRepSettingsgetLocalSettings ()
 
bool hasAdorners () const
 
void incrementIteratingBandLevel ()
 Call when visiting tree enters band implementing OOF_mixIterableBand. More...
 
virtual bool isMultiReport () const
 
unsigned short nestedViewLevel () const
 
 oofRep (dbTable *inTableForDefaultBody, unsigned long startingPageNumber=1)
 
 oofRep (dbView *adoptedViewForDefaultBody, unsigned long startingPageNumber=1)
 
 oofRep (const dbView &inViewForDefaultBody, unsigned long startingPageNumber=1)
 
 oofRep (oofRepIterableTreeBand *adoptedBody=0, unsigned long startingPageNumber=1)
 
 oofRep (const oofRep &)
 
oofRepBandListpageFooters ()
 
oofRepBandListpageHeaders ()
 
unsigned long pageHeight ()
 
void pageNumber (unsigned long)
 
unsigned long pageNumber () const
 
unsigned long pageWidth ()
 
bool reportAllowsEditing () const
 
void resetIteratingBandLevel ()
 Quick reset for visitors. More...
 
void restoreEnvironment (oofRepEnvironment *)
 Use to restore a saved environment when in a print preview. More...
 
const oofRepSettingssettings () const
 
virtual bool shouldDrawViewColumnHeaders () const
 
unsigned long startingPageNumber () const
 
void startingPageNumber (unsigned long)
 
oofRepIterableTreeBanduseEmptyBody ()
 Set the main oofRepViewBand to be an empty band. More...
 
virtual ~oofRep ()
 

Static Public Member Functions

static oofRepcurrentReport ()
 
static oofRepSettingsdefaultSettings ()
 

Protected Member Functions

void DrawBandList (oofRepBandList &, bool inBody=true)
 
void DrawBreakList (oofRepBreakList &inList)
 
void DrawComplexBand (oofRepBand *)
 Draw a single row of the oofRepViewBand. More...
 
void ProcessBreakList (oofRepBreakList &inList, bool beforeRecord)
 

Protected Attributes

unsigned long mBodyStart
 
unsigned long mBodyWidth
 
oofRepBandmCurrentBand
 
oofRepBreakmCurrentBreak
 
oofRepEnvironmentmDrawingEnv
 
bool mFinishedConstruction
 
bool mFirstPage
 
unsigned long mFirstPageBodyStart
 
unsigned long mFirstPageFooterHeight
 
oofRepBandList mFirstPageFooters
 
unsigned long mFirstPageFootersStartAt
 
unsigned long mFirstPageHeaderHeight
 
oofRepBandList mFirstPageHeaders
 
unsigned long mFootersStartAt
 
unsigned long mHeadersStartAt
 
oofRepRenderT mLastRenderType
 
unsigned short mNestedIteratingBandLevel
 1=in body view as zero allowed for outside the main body view More...
 
unsigned long mPageFooterHeight
 
oofRepBandList mPageFooters
 
unsigned long mPageHeaderHeight
 
oofRepBandList mPageHeaders
 
unsigned long mPageHeight
 
unsigned long mPageNumber
 
unsigned long mPageWidth
 
unsigned short * mReferences
 owned More...
 
oofRepDatamRepData
 owned More...
 
oofRepSettingsmSettings
 owned More...
 
unsigned long mStartingPageNumber
 
oofRepIterableTreeBandmTopBand
 owned More...
 
unsigned long mVerticalPos
 

Static Protected Attributes

static oofRepsCurrentReport
 

Detailed Description

Top level class for a report.

Reports consist of a tree of bands rooted in a top level oofRepIterableTreeBand.

Warning
not thread safe whilst drawing - draw method sets sCurrentReport.

Definition at line 571 of file oofrep.h.

Constructor & Destructor Documentation

oofRep::oofRep ( dbTable inTableForDefaultBody,
unsigned long  startingPageNumber = 1 
)

Definition at line 279 of file oofrep1.cpp.

References mReferences.

oofRep::oofRep ( dbView adoptedViewForDefaultBody,
unsigned long  startingPageNumber = 1 
)

Definition at line 305 of file oofrep1.cpp.

References mReferences.

oofRep::oofRep ( const dbView inViewForDefaultBody,
unsigned long  startingPageNumber = 1 
)

Definition at line 331 of file oofrep1.cpp.

References mReferences.

oofRep::oofRep ( oofRepIterableTreeBand adoptedBody = 0,
unsigned long  startingPageNumber = 1 
)

Definition at line 357 of file oofrep1.cpp.

References mReferences.

oofRep::oofRep ( const oofRep rhs)

Definition at line 383 of file oofrep1.cpp.

References mReferences.

oofRep::~oofRep ( )
virtual

Member Function Documentation

oofAdornerList & OOF_mixAdornable::adorners ( )
inlineinherited
void oofRep::becomeCurrent ( )
oofRepIterableTreeBand * oofRep::body ( oofRepIterableTreeBand adoptedBody)

Set the main band from which report hangs.

Returns
same as adoptedBody so you can call with new oofRepIterableTreeBand and immediately get pointer back.

Definition at line 695 of file oofrep1.cpp.

References mLastRenderType, and mTopBand.

Referenced by oofRepVisitor::visit().

oofRepIterableTreeBand * oofRep::body ( )
inline

Definition at line 1933 of file oofrep.h.

References mTopBand.

Referenced by useEmptyBody().

unsigned long oofRep::bodyEnd ( )
inline
unsigned long oofRep::bodyHeight ( )
inline

Definition at line 1961 of file oofrep.h.

References mBodyStart, and mFootersStartAt.

Referenced by DrawBandList(), and oofRepGraphBand::finishConstruction().

unsigned long oofRep::bodyStart ( )
inline

Definition at line 1948 of file oofrep.h.

References mBodyStart.

unsigned long oofRep::bodyWidth ( )
inline
void oofRep::changeTextStyle ( oofRepTextStyle S)
inline
oofRep * oofRep::currentReport ( )
inlinestatic

Definition at line 2003 of file oofrep.h.

References sCurrentReport.

Referenced by oofRepViewRedirectingRender::AddRowInteractionAreas(), oofRepViewBand_WinRender::CalcColHeaderWrapping(), oofRepViewBand_HTMLRender::CalcColWidths(), oofRepViewBand_Render::CalcColWidths(), oofRepSpaceBand_XMLRender::describeLayout(), oofRepGraphBand_XMLRender::describeLayout(), oofRepLineBand_XMLRender::describeLayout(), oofRepTextBlock_XMLRender::describeLayout(), oofRepPageNoBlock_XMLRender::describeLayout(), oofBorderAdorner_MacRender::draw(), oofShadingAdorner_MacRender::draw(), oofShadingAdorner_WinRender::draw(), oofRepSpaceBand_TextRender::draw(), oofBandShadingAdorner_MacRender::draw(), oofBandShadingAdorner_WinRender::draw(), oofRepSpaceBand_WinRender::draw(), oofRepGraphBand_WinRender::draw(), oofRepSpaceBand_MacRender::draw(), oofRepLayoutBand_WinRender::draw(), oofRepFreeImageBand_RTFRender::draw(), oofRepGraphBand_MacRender::draw(), oofRepLineBand_WinRender::draw(), oofRepFreeImageBand_WinRender::draw(), oofRepGraphBand_MacPrintRender::draw(), oofRepPictBand_WinRender::draw(), oofRepViewBand_HTMLRender::draw(), oofRepGraphBand_XMLRender::draw(), oofRepLayoutBand_MacRender::draw(), oofRepViewBand_WinRender::draw(), oofRepLineBand_MacRender::draw(), oofRepTextBlock_WinRender::draw(), oofRepPictBand_MacRender::draw(), oofRepGraphBand_RTFRender::draw(), oofRepViewBand_MacRender::draw(), oofRepTextBlock_MacRender::draw(), oofRepLineBand_RTFRender::draw(), oofRepPictBand_RTFRender::draw(), oofRepViewBand_RTFRender::draw(), oofWinPictDE::draw(), oofRepDrawable::draw(), oofBandShadingAdorner_MacRender::drawcell(), oofBandShadingAdorner_WinRender::drawcell(), oofRepViewRedirectingRender::drawColumnHeaders(), oofRepViewBand_CSVRender::drawColumnHeaders(), oofRepViewBand_TSVRender::drawColumnHeaders(), oofRepViewBand_WinRender::drawColumnHeaders(), oofRepViewBand_MacRender::drawColumnHeaders(), oofRepViewBand_RTFRender::drawColumnHeaders(), oofRepViewBand_WinRender::DrawContinuingOverPage(), oofRepViewBand_MacRender::DrawContinuingOverPage(), oofRepRedirectingRender::editingEnv(), oofRepRedirectingRender::editRedirectionActive(), oofRepXMLEnv::endEnvironment(), oofRepViewBand_HTMLRender::endTableBody(), oofRepViewBand_XMLRender::endTableBody(), oofRepViewBand_Render::finishConstruction(), oofRepGraphBand::finishConstruction(), oofRepTextStyle::fixedHeight(), oofRepLayoutBand_RTFRender::GenerateTabList(), oofRepRender::leftDrawMargin(), oofRepPageNoBlock::MiddleText(), oofRepViewBand_XMLRender::oofRepViewBand_XMLRender(), oofRepRTFEnv::startEnvironment(), oofRepXMLEnv::startEnvironment(), oofRepEditingEnv::startNonEditableArea(), oofRepXMLEnv::StartReport(), oofRepRTFEnv::startSection(), oofRepViewRedirectingRender::startTableBody(), oofRepViewBand_HTMLRender::startTableBody(), oofRepViewBand_WinRender::startTableBody(), oofRepViewBand_MacRender::startTableBody(), oofRepTextStylable::textStyle(), oofRepTextBlock_WinRender::width(), and oofRepTextBlock_MacRender::width().

unsigned long & oofRep::currentVerticalPos ( )
inline
void oofRep::decrementIteratingBandLevel ( )
inline

Call when visiting tree enters band implementing OOF_mixIterableBand.

Definition at line 2035 of file oofrep.h.

References mNestedIteratingBandLevel.

Referenced by DrawComplexBand(), and oofRepVisitor::VisitComplexBand().

oofRepSettings * oofRep::defaultSettings ( )
static
void oofRep::describe ( std::ostream &  )

Definition at line 927 of file oofrep1.cpp.

References oofRepSettings::describe(), and mSettings.

void oofRep::draw ( oofRepEnvironment inEnv)
virtual

Reimplemented in oofRepMulti.

Definition at line 479 of file oofrep1.cpp.

References becomeCurrent(), oofRepSettings::bottomMargin(), oofRepEnvironment::calcPageHeight(), oofRepEnvironment::calcPageWidth(), oofRepEnvironment::canDraw(), oofRepBandList::count(), oofRepSettings::defaultPageFooters(), oofRepSettings::defaultPageHeaders(), DrawComplexBand(), drawFirstPageFooters(), drawFirstPageHeaders(), drawPageFooters(), drawPageHeaders(), oofRepEnvironment::endEnvironment(), firstPageFooters(), firstPageHeaders(), oofRepBandList::fixedHeight(), oofRepSettings::leftMargin(), oofRepEnvironment::makeRender(), oofRepEditor::makeRepEditingSetupVisitor(), mBodyStart, mBodyWidth, mDrawingEnv, mFinishedConstruction, mFirstPage, mFirstPageBodyStart, mFirstPageFooterHeight, mFirstPageFooters, mFirstPageFootersStartAt, mFirstPageHeaderHeight, mFirstPageHeaders, mFootersStartAt, mHeadersStartAt, mLastRenderType, mPageFooterHeight, mPageFooters, mPageHeaderHeight, mPageHeaders, mPageHeight, mPageNumber, mPageWidth, mRepData, mStartingPageNumber, mTopBand, mVerticalPos, oofRepEnvironment::preprocessesPageHeadersAndFooters(), oofRepEnvironment::renderType(), reportAllowsEditing(), oofRepSettings::reportEditor(), resetIteratingBandLevel(), oofRepData::restoreDataSelection(), oofRepSettings::rightMargin(), settings(), oofRepEnvironment::startEnvironment(), oofRepSettings::topMargin(), and oofRepVisitor::visit().

Referenced by oofRepWindow::CreatePreviewContent(), oofRepWindow::DoPrint(), oofRepWindow::DoSaveAs(), and oofRepWindow::ReflowReport().

void oofRep::DrawBandList ( oofRepBandList inList,
bool  inBody = true 
)
protected
void oofRep::DrawBreakList ( oofRepBreakList inList)
protected
void oofRep::DrawComplexBand ( oofRepBand inBand)
protected

Draw a single row of the oofRepViewBand.

Note
it may seem a little weird that we draw a view band rather than simply calling it to draw itself but as you will see below, a view band does know how to draw itself - it just draws a single row of fields.

The control logic that knows how to process breaks resides up at the report level, as the report contains other bands (eg: page headers) and works out how they interact. The view band knows nothing of these complex interactions.

Definition at line 878 of file oofrep1.cpp.

References oofRepBand::asBandWithSubBands(), oofRepBand::asBandWithTableWrappers(), oofRepBand::asIterableBand(), decrementIteratingBandLevel(), oofRepDrawable::draw(), DrawBandList(), OOF_mixBandWithTableWrappers::endTableBody(), OOF_mixBandWithTableWrappers::endTableWrapper(), OOF_mixIterableBand::footerBreaks(), OOF_mixBandWithSubBands::footers(), OOF_mixIterableBand::headerBreaks(), OOF_mixBandWithSubBands::headers(), incrementIteratingBandLevel(), mCurrentBand, OOF_mixIterableBand::more(), OOF_mixIterableBand::next(), ProcessBreakList(), OOF_mixIterableBand::start(), OOF_mixBandWithTableWrappers::startTableBody(), and OOF_mixBandWithTableWrappers::startTableWrapper().

Referenced by draw(), DrawBandList(), DrawBreakList(), and oofRepSection::drawSection().

void oofRep::drawFirstPageFooters ( )
void oofRep::drawFirstPageHeaders ( )
void oofRep::drawPageBreak ( )
void oofRep::drawPageFooters ( )
void oofRep::drawPageHeaders ( )
oofRepEnvironment * oofRep::environment ( ) const
inline
oofRepBandList & oofRep::firstPageFooters ( )
inline

Definition at line 1894 of file oofrep.h.

References mFirstPageFooters.

Referenced by draw(), drawPageBreak(), oofRepSection::drawSection(), and oofRepVisitor::visit().

oofRepBandList & oofRep::firstPageHeaders ( )
inline

Definition at line 1887 of file oofrep.h.

References mFirstPageHeaders.

Referenced by draw(), oofRepSection::drawSection(), and oofRepVisitor::visit().

oofRepSettings * oofRep::getLocalSettings ( )

Definition at line 453 of file oofrep1.cpp.

References mSettings.

Referenced by oofRepWindow::DoPrint(), OOF_XMLrepParser::FinishReport(), and useEmptyBody().

bool OOF_mixAdornable::hasAdorners ( ) const
inlineinherited

Definition at line 361 of file oofadorn.h.

References oofAdornerList::count().

Referenced by OOF_repXMLstyleVisitor::VisitDrawable().

void oofRep::incrementIteratingBandLevel ( )
inline

Call when visiting tree enters band implementing OOF_mixIterableBand.

Definition at line 2025 of file oofrep.h.

References mNestedIteratingBandLevel.

Referenced by DrawComplexBand(), and oofRepVisitor::VisitComplexBand().

bool oofRep::isMultiReport ( ) const
virtual
unsigned short oofRep::nestedViewLevel ( ) const
inline
oofRepBandList & oofRep::pageFooters ( )
inline

Definition at line 1881 of file oofrep.h.

References mPageFooters.

Referenced by oofRepRTFEnv::startEnvironment(), and oofRepVisitor::visit().

oofRepBandList & oofRep::pageHeaders ( )
inline

Definition at line 1874 of file oofrep.h.

References mPageHeaders.

Referenced by oofRepRTFEnv::startEnvironment(), and oofRepVisitor::visit().

unsigned long oofRep::pageHeight ( )
inline

Definition at line 1982 of file oofrep.h.

References mPageHeight.

Referenced by drawFirstPageHeaders(), and drawPageHeaders().

void oofRep::pageNumber ( unsigned long  n)
inline

Definition at line 1989 of file oofrep.h.

References mPageNumber.

Referenced by oofRepSection::drawSection().

unsigned long oofRep::pageNumber ( ) const
inline

Definition at line 1919 of file oofrep.h.

References mPageNumber.

unsigned long oofRep::pageWidth ( )
inline

Definition at line 1975 of file oofrep.h.

References mPageWidth.

void oofRep::ProcessBreakList ( oofRepBreakList inList,
bool  beforeRecord 
)
protected
bool oofRep::reportAllowsEditing ( ) const
inline

Definition at line 2049 of file oofrep.h.

References settings().

Referenced by draw(), and ~oofRep().

void oofRep::resetIteratingBandLevel ( )
inline

Quick reset for visitors.

Used by report to ensure that one visitor can't cause problems for another by failing to correctly decrement iteration level back to zero.

Definition at line 2015 of file oofrep.h.

References mNestedIteratingBandLevel.

Referenced by draw(), oofRepMulti::draw(), oofRepSection::drawSection(), oofRepSection::setDimensions(), and oofRepVisitor::visit().

void oofRep::restoreEnvironment ( oofRepEnvironment inEnv)
inline

Use to restore a saved environment when in a print preview.

Needed because may need report to refresh where it will call back to environment (eg: oofWinPictDE::draw) and we have drawn to a new environment such as a printer or oofRepEnvRTF.

Definition at line 1912 of file oofrep.h.

References mDrawingEnv.

const oofRepSettings * oofRep::settings ( ) const
bool oofRep::shouldDrawViewColumnHeaders ( ) const
virtual
unsigned long oofRep::startingPageNumber ( ) const
inline

Definition at line 1926 of file oofrep.h.

References mStartingPageNumber.

Referenced by oofRepRTFEnv::startSection().

void oofRep::startingPageNumber ( unsigned long  n)
inline

Definition at line 1996 of file oofrep.h.

References mStartingPageNumber.

oofRepIterableTreeBand * oofRep::useEmptyBody ( )

Set the main oofRepViewBand to be an empty band.

Use this approach when creating a report solely formatted in the page header. This would be a single page report using mainly oofRepLayoutBand.

Todo:
have a new class that doesn't involve a dbView as trivial empty class.
Returns
generated empty band.

Definition at line 712 of file oofrep1.cpp.

References body(), oofRepSettings::drawHeadingsDownToLevel(), and getLocalSettings().

Member Data Documentation

unsigned long oofRep::mBodyStart
protected
unsigned long oofRep::mBodyWidth
protected

Definition at line 651 of file oofrep.h.

Referenced by bodyWidth(), draw(), oofRepMulti::draw(), and oofRepSection::setDimensions().

oofRepBand* oofRep::mCurrentBand
protected

Definition at line 649 of file oofrep.h.

Referenced by DrawBandList(), DrawBreakList(), and DrawComplexBand().

oofRepBreak* oofRep::mCurrentBreak
protected

Definition at line 650 of file oofrep.h.

oofRepEnvironment* oofRep::mDrawingEnv
protected
bool oofRep::mFinishedConstruction
protected

Definition at line 659 of file oofrep.h.

Referenced by draw(), oofRepMulti::draw(), and ~oofRep().

bool oofRep::mFirstPage
protected

Definition at line 655 of file oofrep.h.

Referenced by draw(), oofRepMulti::draw(), drawPageBreak(), and oofRepSection::drawSection().

unsigned long oofRep::mFirstPageBodyStart
protected
unsigned long oofRep::mFirstPageFooterHeight
protected

Definition at line 651 of file oofrep.h.

Referenced by draw(), oofRepMulti::draw(), and oofRepSection::setDimensions().

oofRepBandList oofRep::mFirstPageFooters
protected
unsigned long oofRep::mFirstPageFootersStartAt
protected
unsigned long oofRep::mFirstPageHeaderHeight
protected

Definition at line 651 of file oofrep.h.

Referenced by draw(), oofRepMulti::draw(), and oofRepSection::setDimensions().

oofRepBandList oofRep::mFirstPageHeaders
protected
unsigned long oofRep::mFootersStartAt
protected
unsigned long oofRep::mHeadersStartAt
protected
oofRepRenderT oofRep::mLastRenderType
protected

Definition at line 660 of file oofrep.h.

Referenced by body(), draw(), and oofRepMulti::draw().

unsigned short oofRep::mNestedIteratingBandLevel
protected

1=in body view as zero allowed for outside the main body view

Definition at line 661 of file oofrep.h.

Referenced by decrementIteratingBandLevel(), incrementIteratingBandLevel(), nestedViewLevel(), resetIteratingBandLevel(), and shouldDrawViewColumnHeaders().

unsigned long oofRep::mPageFooterHeight
protected

Definition at line 651 of file oofrep.h.

Referenced by draw(), oofRepMulti::draw(), and oofRepSection::setDimensions().

oofRepBandList oofRep::mPageFooters
protected
unsigned long oofRep::mPageHeaderHeight
protected

Definition at line 651 of file oofrep.h.

Referenced by draw(), oofRepMulti::draw(), and oofRepSection::setDimensions().

oofRepBandList oofRep::mPageHeaders
protected
unsigned long oofRep::mPageHeight
protected

Definition at line 651 of file oofrep.h.

Referenced by draw(), oofRepMulti::draw(), pageHeight(), and oofRepSection::setDimensions().

unsigned long oofRep::mPageNumber
protected

Definition at line 658 of file oofrep.h.

Referenced by draw(), drawPageBreak(), oofRepSection::drawSection(), and pageNumber().

unsigned long oofRep::mPageWidth
protected

Definition at line 651 of file oofrep.h.

Referenced by draw(), oofRepMulti::draw(), pageWidth(), and oofRepSection::setDimensions().

unsigned short* oofRep::mReferences
protected

owned

Definition at line 664 of file oofrep.h.

Referenced by oofRep(), and ~oofRep().

oofRepData* oofRep::mRepData
protected

owned

Definition at line 662 of file oofrep.h.

Referenced by draw(), oofRepSection::drawSection(), and ~oofRep().

oofRepSettings* oofRep::mSettings
protected

owned

Definition at line 657 of file oofrep.h.

Referenced by describe(), getLocalSettings(), settings(), and ~oofRep().

unsigned long oofRep::mStartingPageNumber
protected

Definition at line 663 of file oofrep.h.

Referenced by draw(), oofRepSection::drawSection(), and startingPageNumber().

oofRepIterableTreeBand* oofRep::mTopBand
protected

owned

Definition at line 648 of file oofrep.h.

Referenced by body(), draw(), oofRepSection::drawSection(), oofRepSection::oofRepSection(), and ~oofRep().

unsigned long oofRep::mVerticalPos
protected
oofRep * oofRep::sCurrentReport
staticprotected

Definition at line 666 of file oofrep.h.

Referenced by becomeCurrent(), and currentReport().


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