View bands may have custom draw objects for a specific column which may not be instantiated in the program that's read in an XML-saved report. A pointer so an interested edit interface can query the type.
Future ideas - would be nice to abstract content even further and also add abstract property iteration for invisible properties such as column widths, sizes, view column headings enabling.
A link to a drawable with multiple dbViews may present those views as adjacent and so edited as contiguous cells either horizontally or vertically.
Remember all rows and cols are zero-based as normal.
outIsEditable is used to provide additional user feedback (eg: a locked symbol) that the cell is locked. However the adapter is used to disable and enable the cell without depending on user code.
|
cell content access methods |
| virtual oofString | getCellText (bool *outIsEditable=0, oofString *outLocationName=0, long row=-1, short col=-1)=0 |
| virtual void | setCellText (const oofString &, long row=-1, short col=-1)=0 |
init and cleanup code when edit dialog launches and if it changes links |
| virtual void | enterLink (dbGUIAdapter *) |
| virtual bool | leaveLink () |
style access |
| virtual oofRepTextStyle * | textStyle () 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 oofRepTextStyle * | localTextStyle () const |
| virtual bool | allowsCellTextStyles () const |
reflective methods to query link |
| virtual bool | hasCustomViewDrawers () const |
| virtual oofRepCustomViewDrawer * | customViewDrawer (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 |
| virtual bool | getRightOfCurrent (short &outCol, long &outRow) const |
| virtual bool | getUpFromCurrent (short &outCol, long &outRow) const |
| virtual bool | getDownFromCurrent (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 |
| dbGUIAdapter * | adapter () const |
Public Member Functions |
| | oofRepEditLink (oofRepDrawable *) |
| | Bunch of default methods as can't implement this class - must subclass to at least provide getCellText and setCellText.
|
| virtual | ~oofRepEditLink () |
| void | getCurrentCoords (short &outCol, long &outRow) const |
| void | setCurrentCoords (short inCol, long inRow) |
| virtual void | tellGUIcareAboutLocking () const |
| dbHelper * | owner () const |
| void | owner (dbHelper *) |
| | not ctor param as can create without helper
|
| dbField * | field () 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 Attributes |
| oofRepDrawable * | mDrawable |
| long | mCurrentRow |
| long | mLastRow |
| short | mCurrentCol |
| short | mLastCol |
| dbField * | mField |
| dbGUIAdapter * | mAdapter |
| | owned
|
| dbHelper * | mOwner |
| 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
|