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

The idea of the mixin base is to define a common set of controls and their behaviour so an application can subclass with just a few overrides, supporting with whatever dialog class and layout they fancy. More...

#include <oofrepeditMac.h>

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

Public Member Functions

virtual void maybeChangeTargetLink (dbFieldLink *)
 
virtual bool receiveMsg (OOFmsgT msg, unsigned long senderDefined)
 The default receiveMsg behaviour is to delete yourself when the broadcaster closes. More...
 
void resumeListening ()
 
virtual void subscribeTo (oofBroadcaster *)
 
void suspendListening ()
 
virtual dbTabletable () const
 
virtual void unsubscribe (oofBroadcaster *from=0)
 

Protected Types

enum  movementT {
  eGoFirst, eGoLast, eGoLeft, eGoRight,
  eGoUp, eGoDown
}
 

Protected Member Functions

virtual bool AttemptSaveCellEditField ()
 
void EnterLink (oofRepEditLink *)
 
virtual void FinishCreationByLinkingDataModel (oofRepEditingEnv *, oofRepEditLink *)
 
virtual void GoToAnotherCell (movementT)
 
virtual void GoToAnotherItem (movementT)
 Separate out item movement from cell movement because you may wish to implement one but use default for the other. More...
 
virtual void InitEditControls (dbGUIAdapter *adoptedContentAdapter, LControl *inOK=NULL, LControl *inCancel=NULL)
 
virtual void InitMovementControls (LControl *inFirst, LControl *inLast, LControl *inUp, LControl *inDown, LControl *inLeft, LControl *inRight, LControl *inPrevItem=NULL, LControl *inNextItem=NULL)
 
void LoadAndUpdate ()
 separation of these three steps, which commonly occurs, is example of the Template Method pattern allowing for overriding of minor points More...
 
virtual void LoadCellEditField ()
 Typical reasons to override - want to display location or a different display of the editable state (eg: visible lock icon) More...
 
virtual void maybeDirty (dbFieldLink *)
 
 OOF_mixRepCellEditor ()
 
virtual void UnableToMoveWarning (movementT, bool movingByCell)
 default beep More...
 
virtual void UpdateMovementButtons ()
 We are initialised with a cell position and maintain it ourselves so can query the link and enable buttons to suit. More...
 

Protected Attributes

dbGUIAdaptermAdapter
 
bool mAnyContentDirtied
 
LControl * mCancelButton
 
oofRepEditLinkmCurrentLink
 
oofRepEditingEnvmEnv
 
LControl * mGoDownButton
 
LControl * mGoFirstButton
 
LControl * mGoLastButton
 
LControl * mGoLeftButton
 
LControl * mGoNextItemButton
 
LControl * mGoPrevItemButton
 
LControl * mGoRightCellButton
 
LControl * mGoUpButton
 
oofBroadcastermListensTo
 
LControl * mOKButton
 
unsigned short mSuspendCount
 
oofBroadcastermSuspendedListensTo
 

Detailed Description

The idea of the mixin base is to define a common set of controls and their behaviour so an application can subclass with just a few overrides, supporting with whatever dialog class and layout they fancy.

This is necessary because application code may have dialogs based on LGADialog or other base classes.

Any buttons not initialised will not be implemented so the entire movement approach can be ignored if desired.

Most of the behaviour is cross platform in OOF_mixRepAbstractCellEditor thanks to the cross-platform GUI interface.

Definition at line 30 of file oofrepeditMac.h.

Constructor & Destructor Documentation

OOF_mixRepCellEditor::OOF_mixRepCellEditor ( )
protected

Definition at line 89 of file oofrepeditMac.cpp.

Member Function Documentation

bool OOF_mixRepAbstractCellEditor::AttemptSaveCellEditField ( )
protectedvirtualinherited
void OOF_mixRepAbstractCellEditor::EnterLink ( oofRepEditLink inLink)
protectedinherited
void OOF_mixRepAbstractCellEditor::FinishCreationByLinkingDataModel ( oofRepEditingEnv inEnv,
oofRepEditLink inLink 
)
protectedvirtualinherited
void OOF_mixRepAbstractCellEditor::GoToAnotherCell ( movementT  inMove)
protectedvirtualinherited
void OOF_mixRepAbstractCellEditor::GoToAnotherItem ( movementT  inMove)
protectedvirtualinherited

Separate out item movement from cell movement because you may wish to implement one but use default for the other.

eg: use default moves to items but custom cells because you have fancy report objects in your application.

Definition at line 1118 of file oofrepedit.cpp.

References OOF_mixRepAbstractCellEditor::eGoDown, OOF_mixRepAbstractCellEditor::eGoUp, OOF_mixRepAbstractCellEditor::EnterLink(), oofRepEditLink::leaveLink(), OOF_mixRepAbstractCellEditor::mCurrentLink, and OOF_mixRepAbstractCellEditor::UnableToMoveWarning().

void OOF_mixRepCellEditor::InitEditControls ( dbGUIAdapter adoptedContentAdapter,
LControl *  inOK = NULL,
LControl *  inCancel = NULL 
)
protectedvirtual
void OOF_mixRepCellEditor::InitMovementControls ( LControl *  inFirst,
LControl *  inLast,
LControl *  inUp,
LControl *  inDown,
LControl *  inLeft,
LControl *  inRight,
LControl *  inPrevItem = NULL,
LControl *  inNextItem = NULL 
)
protectedvirtual
void OOF_mixRepAbstractCellEditor::LoadAndUpdate ( )
protectedinherited

separation of these three steps, which commonly occurs, is example of the Template Method pattern allowing for overriding of minor points

Definition at line 1103 of file oofrepedit.cpp.

References OOF_mixRepAbstractCellEditor::LoadCellEditField(), dbFieldLink::markClean(), OOF_mixRepAbstractCellEditor::mCurrentLink, and OOF_mixRepAbstractCellEditor::UpdateMovementButtons().

Referenced by OOF_mixRepAbstractCellEditor::EnterLink(), and OOF_mixRepAbstractCellEditor::GoToAnotherCell().

void OOF_mixRepAbstractCellEditor::LoadCellEditField ( )
protectedvirtualinherited

Typical reasons to override - want to display location or a different display of the editable state (eg: visible lock icon)

Definition at line 1024 of file oofrepedit.cpp.

References oofRepEditLink::getCellText(), oofString::lineEndingsCurrentPlatform(), OOF_mixRepAbstractCellEditor::mAdapter, OOF_mixRepAbstractCellEditor::mCurrentLink, and dbGUIAdapter::setString().

Referenced by OOF_mixRepAbstractCellEditor::LoadAndUpdate().

void dbHelper::maybeChangeTargetLink ( dbFieldLink )
virtualinherited

Reimplemented in dbAbstractEditHelper.

Definition at line 278 of file oofgui.cpp.

Referenced by dbFieldLink::maybeChangeTargetLink().

void OOF_mixRepAbstractCellEditor::maybeDirty ( dbFieldLink )
protectedvirtualinherited

Reimplemented from dbHelper.

Definition at line 1147 of file oofrepedit.cpp.

References OOF_mixRepAbstractCellEditor::mAnyContentDirtied.

bool oofSingleListener::receiveMsg ( OOFmsgT  msg,
unsigned long  senderDefined 
)
virtualinherited

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.

Implements oofReceiver.

Reimplemented in dbRelMaintainer, dbCloneCleanup, OOF_recordCacheCopier, dbFieldCopier, dbAbstractEditHelper, dbAbstractBrowseHelper, dbBrowseHelper, oofPromisedGraphSettings, oofPromisedRepTextStyle, oofRepData, oofE_Table, dbHierBrowseHelper, dbRelRefBase, and dbTableViewDisplay.

Definition at line 275 of file oofmsg.cpp.

References oofSingleListener::mListensTo, and OOFmsg_BroadcasterClosing.

Referenced by dbRelRefBase::receiveMsg(), oofPromisedGraphSettings::receiveMsg(), dbFieldCopier::receiveMsg(), and dbRelMaintainer::receiveMsg().

void oofSingleListener::resumeListening ( )
inherited
void oofSingleListener::subscribeTo ( oofBroadcaster broad)
virtualinherited
void oofSingleListener::suspendListening ( )
inherited
dbTable * dbHelper::table ( ) const
virtualinherited

Reimplemented in dbAbstractEditHelper, and dbAbstractBrowseHelper.

Definition at line 292 of file oofgui.cpp.

Referenced by dbFieldLink::readOnly().

void OOF_mixRepAbstractCellEditor::UnableToMoveWarning ( movementT  ,
bool  movingByCell 
)
protectedvirtualinherited

default beep

Warning method called when try to trigger a movement and we can't move in that direction (eg: GoLeftCell when already at leftmost cell).

You may wish to override with an alert.

Definition at line 1010 of file oofrepedit.cpp.

References oofRuntimeEnv::beep().

Referenced by OOF_mixRepAbstractCellEditor::GoToAnotherCell(), and OOF_mixRepAbstractCellEditor::GoToAnotherItem().

void oofSingleListener::unsubscribe ( oofBroadcaster from = 0)
virtualinherited
void OOF_mixRepCellEditor::UpdateMovementButtons ( )
protectedvirtual

We are initialised with a cell position and maintain it ourselves so can query the link and enable buttons to suit.

If you don't want your buttons disabled, don't pass them into the InitMovementControls.

Reimplemented from OOF_mixRepAbstractCellEditor.

Definition at line 143 of file oofrepeditMac.cpp.

References mGoNextItemButton, and mGoPrevItemButton.

Member Data Documentation

dbGUIAdapter* OOF_mixRepAbstractCellEditor::mAdapter
protectedinherited
bool OOF_mixRepAbstractCellEditor::mAnyContentDirtied
protectedinherited

Definition at line 160 of file oofrepedit.h.

Referenced by OOF_mixRepAbstractCellEditor::maybeDirty().

LControl* OOF_mixRepCellEditor::mCancelButton
protected

Definition at line 51 of file oofrepeditMac.h.

Referenced by InitEditControls().

oofRepEditLink* OOF_mixRepAbstractCellEditor::mCurrentLink
protectedinherited
oofRepEditingEnv* OOF_mixRepAbstractCellEditor::mEnv
protectedinherited
LControl* OOF_mixRepCellEditor::mGoDownButton
protected

Definition at line 55 of file oofrepeditMac.h.

Referenced by InitMovementControls().

LControl* OOF_mixRepCellEditor::mGoFirstButton
protected

Definition at line 52 of file oofrepeditMac.h.

Referenced by InitMovementControls().

LControl* OOF_mixRepCellEditor::mGoLastButton
protected

Definition at line 53 of file oofrepeditMac.h.

Referenced by InitMovementControls().

LControl* OOF_mixRepCellEditor::mGoLeftButton
protected

Definition at line 56 of file oofrepeditMac.h.

Referenced by InitMovementControls().

LControl* OOF_mixRepCellEditor::mGoNextItemButton
protected

Definition at line 59 of file oofrepeditMac.h.

Referenced by InitMovementControls(), and UpdateMovementButtons().

LControl* OOF_mixRepCellEditor::mGoPrevItemButton
protected

Definition at line 58 of file oofrepeditMac.h.

Referenced by InitMovementControls(), and UpdateMovementButtons().

LControl* OOF_mixRepCellEditor::mGoRightCellButton
protected

Definition at line 57 of file oofrepeditMac.h.

Referenced by InitMovementControls().

LControl* OOF_mixRepCellEditor::mGoUpButton
protected

Definition at line 54 of file oofrepeditMac.h.

Referenced by InitMovementControls().

oofBroadcaster* oofSingleListener::mListensTo
protectedinherited
LControl* OOF_mixRepCellEditor::mOKButton
protected

Definition at line 50 of file oofrepeditMac.h.

Referenced by InitEditControls().

unsigned short oofSingleListener::mSuspendCount
protectedinherited
oofBroadcaster* oofSingleListener::mSuspendedListensTo
protectedinherited

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