Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

oofRepLayoutEditLink Class Reference

#include <oofrepeditx.h>

Inheritance diagram for oofRepLayoutEditLink:

Inheritance graph
[legend]
Collaboration diagram for oofRepLayoutEditLink:

Collaboration graph
[legend]
List of all members.

Detailed Description

oofRepEditLink to oofRepLayoutBand - multiple blocks in a single row.


init and cleanup code when edit dialog launches and if it changes links

virtual void enterLink (dbGUIAdapter *)
virtual bool leaveLink ()

style access

virtual oofRepTextStyletextStyle () const
 textStyle returns a writeable pointer so allows updates HOWEVER the cascading style model means this may be a pointer to a parent style so it is NOT recommended to update this value.

virtual oofRepTextStylelocalTextStyle () const

reflective methods to query link

virtual bool hasCustomViewDrawers () const
virtual oofRepCustomViewDrawercustomViewDrawer (long col) const

movement testing

virtual bool atFirst () const
 might override atFirst if you had irregular shape allowing first cell to be further along first row, but usually use this base method

virtual bool getLastCoords (short &outCol, long &outRow) const
 Return true to indicate we are at the last cell already, same as atFirst().

virtual bool getLeftOfCurrent (short &outCol, long &outRow) const

mainly used by dbGUIadaptor

void maybeChangeTargetLink ()
void maybeDirty ()

mainly used by dbEditHelper

virtual void copyFieldToLink ()
virtual void copyLinkToField ()
virtual bool linkEqualsField () const
virtual void updateDerivedFieldDisplay (bool isNew)
virtual void readOnly (bool isReadOnly=true)
 Change readonly state of link to accept or deny data entry.

virtual bool validToLeaveLink ()
 Validate field contents, overridden if can check just contents.

virtual bool validToLeaveForm ()
 Validate unique fields to ensure can accept this record without error from database.

virtual void highlightLink ()
 Visually highlight a link, usually becoming edit focus.

void markClean ()

reflective calls

bool isReadOnly () const
bool alwaysReadOnly () const
bool isDirty () const
bool linkIsEmpty () const
dbGUIAdapteradapter () const

Public Member Functions

 oofRepLayoutEditLink (oofRepLayoutBand *)
void initMapping ()
 Our mapping may have holes in it but we treat them as short rows rather than trying to correspond to the centring or right-alignment (which have to be in terms of the max number of cols in the entire layout!).

virtual oofString getCellText (bool *outIsEditable=0, oofString *outLocationName=0, long row=-1, short col=-1)
virtual void setCellText (const oofString &, long row=-1, short col=-1)
virtual bool allowsCellTextStyles () const
void getFirstCoordsForBlock (oofRepBlock *, short &col, short &row) const
virtual bool getRightOfCurrent (short &outCol, long &outRow) const
virtual bool getUpFromCurrent (short &outCol, long &outRow) const
virtual bool getDownFromCurrent (short &outCol, long &outRow) const
void getCurrentCoords (short &outCol, long &outRow) const
void setCurrentCoords (short inCol, long inRow)
virtual void tellGUIcareAboutLocking () const
dbHelperowner () const
void owner (dbHelper *)
 not ctor param as can create without helper

dbFieldfield () const
 purposely non-virtual as subclasses return different types

void setField (dbField *inField)
bool hidden () const
void hide (bool hideIt=true)
virtual void describe (std::ostream &) const
 Provide human-readable information about object.

virtual oofString name () const
void incRefs ()
void decRefs ()

Protected Member Functions

oofRepLayoutBandDrawable () const
oofRepBlockMapCoordsToBlock (long row, short col, short &outCellInBlock) const

Protected Attributes

OOF_RepBlockCellRows mRows
oofRepDrawablemDrawable
long mCurrentRow
long mLastRow
short mCurrentCol
short mLastCol
dbFieldmField
dbGUIAdaptermAdapter
 owned

dbHelpermOwner
bool mMaybeDirty
 tentative flag lets us optimise comparisons

bool mReadOnly
 default is read-write

bool mAlwaysReadOnly
 for static controls, etc;

bool mHidden
unsigned int mReferences

Friends

class dbAbstractEditHelper
 so it can call PreApprovedReadOnly


Constructor & Destructor Documentation

oofRepLayoutEditLink::oofRepLayoutEditLink oofRepLayoutBand  ) 
 


Member Function Documentation

dbGUIAdapter * dbFieldLink::adapter  )  const [inline, inherited]
 

bool oofRepLayoutEditLink::allowsCellTextStyles  )  const [virtual]
 

Reimplemented from oofRepEditLink.

bool dbFieldLink::alwaysReadOnly  )  const [inline, inherited]
 

bool oofRepEditLink::atFirst  )  const [virtual, inherited]
 

might override atFirst if you had irregular shape allowing first cell to be further along first row, but usually use this base method

void dbFieldLink::copyFieldToLink  )  [virtual, inherited]
 

Reimplemented in dbFieldPickLink, and dbBoolLink.

void dbFieldLink::copyLinkToField  )  [virtual, inherited]
 

Reimplemented in dbFieldPickLink, and dbBoolLink.

oofRepCustomViewDrawer * oofRepEditLink::customViewDrawer long  col  )  const [virtual, inherited]
 

Reimplemented in oofRepViewEditLink.

void OOF_mixRefCount::decRefs  )  [inherited]
 

void OOF_PublicBase::describe std::ostream &  os  )  const [virtual, inherited]
 

Provide human-readable information about object.

Overriden to provide much more detail particularly for dbTable::describe() which provides full schema.

Reimplemented in dbTable, dbConnect, dbField, dbChar, dbFixedBinary, and dbRelRefBase.

oofRepLayoutBand * oofRepLayoutEditLink::Drawable  )  const [inline, protected]
 

void oofRepEditLink::enterLink dbGUIAdapter  )  [virtual, inherited]
 

Reimplemented in oofRepViewEditLink.

dbField * dbFieldLink::field  )  const [inline, inherited]
 

purposely non-virtual as subclasses return different types

Used by dbGUIAdapters such as dbGUIAdaptEditPane::setFieldLink to get the field in order to query database characteristics.

Returns:
dbField* to the field we link.

Reimplemented in dbUshortLink.

oofString oofRepLayoutEditLink::getCellText bool *  outIsEditable = 0,
oofString outLocationName = 0,
long  row = -1,
short  col = -1
[virtual]
 

Implements oofRepEditLink.

void oofRepEditLink::getCurrentCoords short &  outCol,
long &  outRow
const [inline, inherited]
 

bool oofRepLayoutEditLink::getDownFromCurrent short &  outCol,
long &  outRow
const [virtual]
 

Reimplemented from oofRepEditLink.

void oofRepLayoutEditLink::getFirstCoordsForBlock oofRepBlock ,
short &  col,
short &  row
const
 

bool oofRepEditLink::getLastCoords short &  outCol,
long &  outRow
const [virtual, inherited]
 

Return true to indicate we are at the last cell already, same as atFirst().

bool oofRepEditLink::getLeftOfCurrent short &  outCol,
long &  outRow
const [virtual, inherited]
 

bool oofRepLayoutEditLink::getRightOfCurrent short &  outCol,
long &  outRow
const [virtual]
 

Reimplemented from oofRepEditLink.

bool oofRepLayoutEditLink::getUpFromCurrent short &  outCol,
long &  outRow
const [virtual]
 

Reimplemented from oofRepEditLink.

bool oofRepEditLink::hasCustomViewDrawers  )  const [virtual, inherited]
 

Reimplemented in oofRepViewEditLink.

bool OOF_PublicBase::hidden  )  const [inline, inherited]
 

void OOF_PublicBase::hide bool  hideIt = true  )  [inline, inherited]
 

void dbFieldLink::highlightLink  )  [virtual, inherited]
 

Visually highlight a link, usually becoming edit focus.

dbAbstractEditHelper::ValidateLinks calls us to highlight the first invalid link it finds.

void OOF_mixRefCount::incRefs  )  [inline, inherited]
 

void oofRepLayoutEditLink::initMapping  ) 
 

Our mapping may have holes in it but we treat them as short rows rather than trying to correspond to the centring or right-alignment (which have to be in terms of the max number of cols in the entire layout!).

bool dbFieldLink::isDirty  )  const [inline, inherited]
 

bool dbFieldLink::isReadOnly  )  const [inline, inherited]
 

bool oofRepEditLink::leaveLink  )  [virtual, inherited]
 

Reimplemented from dbFieldLink.

bool dbFieldLink::linkEqualsField  )  const [virtual, inherited]
 

Reimplemented in dbFieldPickLink, and dbBoolLink.

bool dbFieldLink::linkIsEmpty  )  const [inherited]
 

oofRepTextStyle * oofRepEditLink::localTextStyle  )  const [virtual, inherited]
 

oofRepBlock * oofRepLayoutEditLink::MapCoordsToBlock long  row,
short  col,
short &  outCellInBlock
const [protected]
 

void dbFieldLink::markClean  )  [inline, inherited]
 

void dbFieldLink::maybeChangeTargetLink  )  [inline, inherited]
 

void dbFieldLink::maybeDirty  )  [inline, inherited]
 

oofString OOF_PublicBase::name  )  const [virtual, inherited]
 

Reimplemented in dbTable, dbConnect, dbField, and OOF_adornerHolder.

void dbFieldLink::owner dbHelper  )  [inline, inherited]
 

not ctor param as can create without helper

dbHelper * dbFieldLink::owner  )  const [inline, inherited]
 

void dbFieldLink::readOnly bool  becomeReadOnly = true  )  [virtual, inherited]
 

Change readonly state of link to accept or deny data entry.

Won't allow enabling editing if can't edit record due to locking.

void oofRepLayoutEditLink::setCellText const oofString ,
long  row = -1,
short  col = -1
[virtual]
 

Implements oofRepEditLink.

void oofRepEditLink::setCurrentCoords short  inCol,
long  inRow
[inline, inherited]
 

void dbFieldLink::setField dbField inField  )  [inline, inherited]
 

void oofRepEditLink::tellGUIcareAboutLocking  )  const [virtual, inherited]
 

Reimplemented from dbFieldLink.

oofRepTextStyle * oofRepEditLink::textStyle  )  const [virtual, inherited]
 

textStyle returns a writeable pointer so allows updates HOWEVER the cascading style model means this may be a pointer to a parent style so it is NOT recommended to update this value.

See OOFRep_DesignDecisions.txt for discussion of issues

void dbFieldLink::updateDerivedFieldDisplay bool  isNew  )  [virtual, inherited]
 

Reimplemented in dbNumericFieldLink, dbDateLink2Editor, and dbDateTimeLink2Editor.

bool dbFieldLink::validToLeaveForm  )  [virtual, inherited]
 

Validate unique fields to ensure can accept this record without error from database.

Warning:
you probably still want to call this method if you override.

Reimplemented in dbFieldPickLink.

bool dbFieldLink::validToLeaveLink  )  [virtual, inherited]
 

Validate field contents, overridden if can check just contents.

Lightweight check that allows tabbing between fields in open record.

See also:
validToLeaveForm for heavier check.

dbDateLink2Editor::validToLeaveLink

Reimplemented in dbDateLink2Editor, and dbDateTimeLink2Editor.


Friends And Related Function Documentation

friend class dbAbstractEditHelper [friend, inherited]
 

so it can call PreApprovedReadOnly


Member Data Documentation

dbGUIAdapter* dbFieldLink::mAdapter [protected, inherited]
 

owned

bool dbFieldLink::mAlwaysReadOnly [protected, inherited]
 

for static controls, etc;

short oofRepEditLink::mCurrentCol [protected, inherited]
 

long oofRepEditLink::mCurrentRow [protected, inherited]
 

oofRepDrawable* oofRepEditLink::mDrawable [protected, inherited]
 

dbField* dbFieldLink::mField [protected, inherited]
 

bool OOF_PublicBase::mHidden [protected, inherited]
 

short oofRepEditLink::mLastCol [protected, inherited]
 

long oofRepEditLink::mLastRow [protected, inherited]
 

bool dbFieldLink::mMaybeDirty [protected, inherited]
 

tentative flag lets us optimise comparisons

dbHelper* dbFieldLink::mOwner [protected, inherited]
 

bool dbFieldLink::mReadOnly [protected, inherited]
 

default is read-write

unsigned int OOF_mixRefCount::mReferences [protected, inherited]
 

OOF_RepBlockCellRows oofRepLayoutEditLink::mRows [protected]
 


The documentation for this class was generated from the following files:
Generated on Thu Jan 1 21:51:07 2004 for OOFILE by doxygen 1.3.5