OOFILE  1.9
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dbHierBrowseHelper Class Reference

Manage a tree control linked to one or more dbView's. More...

#include <oofpphier.h>

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

Public Member Functions

void appendLevel (dbHierLevel *adoptedLevel)
 
void browseViewWithTable (LOutlineTable *inTable)
 
unsigned long countNestedItemsFromLevel (oidT, unsigned short) const
 
 dbHierBrowseHelper (LOutlineTable *inTable=0)
 
unsigned short deepestIndent () const
 
void deleteAllLevels ()
 
void deleteContentsCache ()
 
virtual void deleteSelection (const dbSelection &inSel)
 
const char * getCachedContents (unsigned long cacheIndex, fieldNumT fieldNum)
 
OOF_mixOutlineItemhighlightedItem () const
 
oidT highlightedOID () const
 
virtual unsigned long highlightedRecNo () const
 
virtual dbSelection highlightedSelection () const
 
virtual void highlightNothing () const
 
virtual void highlightRecNo (unsigned long, bool bSelect=TRUE) const
 
void initCacheRow (unsigned long cacheIndex, fieldNumT numFields)
 
virtual void insertItemsBelow (LOutlineItem *, OOF_mixOutlineItem *)
 
bool itemIsAtBottom (const OOF_mixOutlineItem *theItem) const
 
dbHierLevellevel (unsigned short) const
 
dbHierLevellowestLevel () const
 
virtual void maybeChangeTargetLink (dbFieldLink *)
 
virtual void maybeDirty (dbFieldLink *)
 
unsigned long nextCacheIndex ()
 
dbHierBrowseHelperoperator<< (dbHierLevel *)
 
virtual bool receiveMsg (OOFmsgT msg, unsigned long senderDefined)
 The default receiveMsg behaviour is to delete yourself when the broadcaster closes. More...
 
virtual void refreshBrowser ()
 
void resetTableAfterViewRestructure ()
 
void resumeListening ()
 
bool selectItemRecord ()
 
void setCachedContents (unsigned long cacheIndex, fieldNumT fieldNum, char *adoptedStr)
 
virtual void subscribeTo (oofBroadcaster *)
 
void suspendListening ()
 
virtual dbTabletable () const
 
virtual void unsubscribe (oofBroadcaster *from=0)
 
virtual void updateBrowserSelection () const
 
virtual dbViewview () const
 
dbViewviewAtLevel (unsigned short) const
 
virtual ~dbHierBrowseHelper ()
 

Protected Member Functions

oidT FirstOIDBelowItem (unsigned short inIndentLevel, oidT inOID) const
 
void IncludeAllBelowItem (unsigned short inIndentLevel, oidT, dbSelection &) const
 

Protected Attributes

OOF_ExpandableLongArray mContentsCache
 
OOF_ExpandableLongArray mHierLevels
 
oofBroadcastermListensTo
 
unsigned long mNextCacheIndex
 
LOutlineTable * mOutlineTable
 
unsigned short mSuspendCount
 
oofBroadcastermSuspendedListensTo
 

Detailed Description

Manage a tree control linked to one or more dbView's.

Lots of abstraction of how data is mapped to each item in tree and how independent it may be at each level.

Definition at line 96 of file oofpphier.h.

Constructor & Destructor Documentation

dbHierBrowseHelper::dbHierBrowseHelper ( LOutlineTable *  inTable = 0)

Definition at line 232 of file oofpphier.cpp.

dbHierBrowseHelper::~dbHierBrowseHelper ( )
virtual

Definition at line 241 of file oofpphier.cpp.

References deleteAllLevels(), and mOutlineTable.

Member Function Documentation

void dbHierBrowseHelper::appendLevel ( dbHierLevel adoptedLevel)
void dbHierBrowseHelper::browseViewWithTable ( LOutlineTable *  inTable)

Definition at line 389 of file oofpphier.cpp.

References mOutlineTable, and resetTableAfterViewRestructure().

unsigned long dbHierBrowseHelper::countNestedItemsFromLevel ( oidT  inOID,
unsigned short  inLevel 
) const

Definition at line 414 of file oofpphier.cpp.

References dbHierLevel::countNestedItemsFor(), and level().

unsigned short dbHierBrowseHelper::deepestIndent ( ) const
inline
void dbHierBrowseHelper::deleteAllLevels ( )
void dbHierBrowseHelper::deleteContentsCache ( )
void dbAbstractBrowseHelper::deleteSelection ( const dbSelection inSel)
virtualinherited
oidT dbHierBrowseHelper::FirstOIDBelowItem ( unsigned short  inIndentLevel,
oidT  inOID 
) const
protected
const char * dbHierBrowseHelper::getCachedContents ( unsigned long  cacheIndex,
fieldNumT  fieldNum 
)
OOF_mixOutlineItem * dbHierBrowseHelper::highlightedItem ( ) const

Definition at line 627 of file oofpphier.cpp.

References mOutlineTable.

oidT dbHierBrowseHelper::highlightedOID ( ) const
virtual unsigned long dbHierBrowseHelper::highlightedRecNo ( ) const
virtual
virtual dbSelection dbHierBrowseHelper::highlightedSelection ( ) const
virtual
virtual void dbHierBrowseHelper::highlightNothing ( ) const
virtual
virtual void dbHierBrowseHelper::highlightRecNo ( unsigned  long,
bool  bSelect = TRUE 
) const
virtual
void dbHierBrowseHelper::IncludeAllBelowItem ( unsigned short  inIndentLevel,
oidT  inOID,
dbSelection addTo 
) const
protected
void dbHierBrowseHelper::initCacheRow ( unsigned long  cacheIndex,
fieldNumT  numFields 
)
void dbHierBrowseHelper::insertItemsBelow ( LOutlineItem inSuper,
OOF_mixOutlineItem inSuperDataManager 
)
virtual
bool dbHierBrowseHelper::itemIsAtBottom ( const OOF_mixOutlineItem theItem) const
inline
dbHierLevel * dbHierBrowseHelper::level ( unsigned short  inLevel) const
inline
dbHierLevel * dbHierBrowseHelper::lowestLevel ( ) const
inline
void dbHelper::maybeChangeTargetLink ( dbFieldLink )
virtualinherited

Reimplemented in dbAbstractEditHelper.

Definition at line 278 of file oofgui.cpp.

Referenced by dbFieldLink::maybeChangeTargetLink().

void dbHelper::maybeDirty ( dbFieldLink )
virtualinherited

Reimplemented in dbAbstractEditHelper, and OOF_mixRepAbstractCellEditor.

Definition at line 285 of file oofgui.cpp.

Referenced by dbFieldLink::maybeDirty().

unsigned long dbHierBrowseHelper::nextCacheIndex ( )

Definition at line 325 of file oofpphier.cpp.

References mNextCacheIndex.

dbHierBrowseHelper & dbHierBrowseHelper::operator<< ( dbHierLevel adoptedLevel)
inline

Definition at line 260 of file oofpphier.h.

References appendLevel().

virtual bool dbHierBrowseHelper::receiveMsg ( OOFmsgT  msg,
unsigned long  senderDefined 
)
virtual

The default receiveMsg behaviour is to delete yourself when the broadcaster closes.

In many user subclasses oofSingleListener is a mixin and you have a class owned elsewhere, not self-deleting.

\warning If a subclass is not self-deleting it MUST override receiveMsg 
handling of the msg OOFmsg_BroadcasterClosing to prevent runtime error.

However it is still important to set mListensTo=0 otherwise when you finally get around to deleting your oofSingleListener, it will try to update a deleted oofBroadcaster and cause a crash.

Reimplemented from dbAbstractBrowseHelper.

void dbHierBrowseHelper::refreshBrowser ( )
virtual

Implements dbAbstractBrowseHelper.

Definition at line 316 of file oofpphier.cpp.

References deleteContentsCache(), and mOutlineTable.

void dbHierBrowseHelper::resetTableAfterViewRestructure ( )
void oofSingleListener::resumeListening ( )
inherited
bool dbHierBrowseHelper::selectItemRecord ( )
void dbHierBrowseHelper::setCachedContents ( unsigned long  cacheIndex,
fieldNumT  fieldNum,
char *  adoptedStr 
)
void oofSingleListener::subscribeTo ( oofBroadcaster broad)
virtualinherited
void oofSingleListener::suspendListening ( )
inherited
dbTable * dbAbstractBrowseHelper::table ( ) const
virtualinherited

Reimplemented from dbHelper.

Definition at line 308 of file oofgui.cpp.

References dbView::table(), and dbAbstractBrowseHelper::view().

Referenced by dbAbstractBrowseHelper::deleteSelection().

void oofSingleListener::unsubscribe ( oofBroadcaster from = 0)
virtualinherited
virtual void dbHierBrowseHelper::updateBrowserSelection ( ) const
virtual
virtual dbView* dbHierBrowseHelper::view ( ) const
virtual
dbView * dbHierBrowseHelper::viewAtLevel ( unsigned short  inLevel) const

Member Data Documentation

OOF_ExpandableLongArray dbHierBrowseHelper::mContentsCache
protected
OOF_ExpandableLongArray dbHierBrowseHelper::mHierLevels
protected
oofBroadcaster* oofSingleListener::mListensTo
protectedinherited
unsigned long dbHierBrowseHelper::mNextCacheIndex
protected

Definition at line 145 of file oofpphier.h.

Referenced by deleteContentsCache(), and nextCacheIndex().

LOutlineTable* dbHierBrowseHelper::mOutlineTable
protected
unsigned short oofSingleListener::mSuspendCount
protectedinherited
oofBroadcaster* oofSingleListener::mSuspendedListensTo
protectedinherited

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