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

Link a dbChar field to a LEditField for small text entry. More...

#include <oofpp.h>

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

Public Member Functions

 dbCharLink2EditField (dbChar *fld, LEditField *ctl, bool becomeReadOnly=false)
 
virtual void describe (std::ostream &) const
 Provide human-readable information about object. More...
 
dbFieldfield () const
 purposely non-virtual as subclasses return different types More...
 
bool hidden () const
 
void hide (bool hideIt=true)
 
virtual oofString name () const
 
dbHelperowner () const
 
void owner (dbHelper *)
 not ctor param as can create without helper More...
 
void setField (dbField *inField)
 
mainly used by dbGUIadaptor
void maybeChangeTargetLink ()
 
void maybeDirty ()
 
virtual void tellGUIcareAboutLocking () const
 
mainly used by dbEditHelper
virtual void copyFieldToLink ()
 
virtual void copyLinkToField ()
 
virtual bool linkEqualsField () const
 
virtual bool leaveLink ()
 
virtual void updateDerivedFieldDisplay (bool isNew)
 
virtual void readOnly (bool isReadOnly=true)
 Change readonly state of link to accept or deny data entry. More...
 
virtual bool validToLeaveLink ()
 Validate field contents, overridden if can check just contents. More...
 
virtual bool validToLeaveForm ()
 Validate unique fields to ensure can accept this record without error from database. More...
 
virtual void highlightLink ()
 Visually highlight a link, usually becoming edit focus. More...
 
void markClean ()
 
reflective calls
bool isReadOnly () const
 
bool alwaysReadOnly () const
 
bool isDirty () const
 
bool linkIsEmpty () const
 
dbGUIAdapteradapter () const
 

Protected Attributes

dbGUIAdaptermAdapter
 owned More...
 
bool mAlwaysReadOnly
 for static controls, etc; More...
 
dbFieldmField
 
bool mHidden
 
bool mMaybeDirty
 tentative flag lets us optimise comparisons More...
 
dbHelpermOwner
 
bool mReadOnly
 default is read-write More...
 

Detailed Description

Link a dbChar field to a LEditField for small text entry.

Note
Concrete link used directly by name in previous OOFILE apps and so reimplemented this interface when we moved to the generic structure.
See also
linkField(dbField*, LEditField*) generic link implementation.

Definition at line 512 of file oofpp.h.

Constructor & Destructor Documentation

dbCharLink2EditField::dbCharLink2EditField ( dbChar fld,
LEditField ctl,
bool  becomeReadOnly = false 
)
inline

Definition at line 514 of file oofpp.h.

Member Function Documentation

dbGUIAdapter * dbFieldLink::adapter ( ) const
inlineinherited

Definition at line 815 of file oofgui.h.

References dbFieldLink::mAdapter.

Referenced by dbAbstractEditHelper::getLink().

bool dbFieldLink::alwaysReadOnly ( ) const
inlineinherited

Definition at line 770 of file oofgui.h.

References dbFieldLink::mAlwaysReadOnly.

void dbFieldLink::copyFieldToLink ( )
virtualinherited
void dbFieldLink::copyLinkToField ( )
virtualinherited
void OOF_PublicBase::describe ( std::ostream &  ) const
virtualinherited

Provide human-readable information about object.

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

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

Definition at line 342 of file oof1.cpp.

References OOF_PublicBase::name().

Referenced by OOF_Dictionary::describeVisible().

dbField * dbFieldLink::field ( ) const
inlineinherited

purposely non-virtual as subclasses return different types

Accessor for field being edited.

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

Returns
dbField* to the field we link.

Definition at line 808 of file oofgui.h.

References dbFieldLink::mField.

Referenced by dbFieldLink::copyFieldToLink(), dbBoolLink::copyFieldToLink(), dbFieldLink::copyLinkToField(), dbBoolLink::copyLinkToField(), dbFieldLink::leaveLink(), dbBoolLink::linkEqualsField(), and dbGUIAdaptEditPane::setFieldLink().

bool OOF_PublicBase::hidden ( ) const
inlineinherited

Definition at line 51 of file oof1.h.

Referenced by OOF_Dictionary::EntryMatchesVisibility().

void OOF_PublicBase::hide ( bool  hideIt = true)
inlineinherited

Definition at line 52 of file oof1.h.

void dbFieldLink::highlightLink ( )
virtualinherited

Visually highlight a link, usually becoming edit focus.

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

Definition at line 1044 of file oofgui.cpp.

References dbGUIAdapter::highlightContents(), and dbFieldLink::mAdapter.

Referenced by dbAbstractEditHelper::ValidateLinks().

bool dbFieldLink::isDirty ( ) const
inlineinherited
bool dbFieldLink::isReadOnly ( ) const
inlineinherited

Definition at line 763 of file oofgui.h.

References dbFieldLink::mReadOnly.

Referenced by dbGUIAdaptLControl::ExecuteSelf(), and dbGUIAdapter::IsReadOnly().

bool dbFieldLink::leaveLink ( )
virtualinherited
bool dbFieldLink::linkEqualsField ( ) const
virtualinherited
bool dbFieldLink::linkIsEmpty ( ) const
inherited
void dbFieldLink::markClean ( )
inlineinherited
void dbFieldLink::maybeChangeTargetLink ( )
inlineinherited
void dbFieldLink::maybeDirty ( )
inlineinherited
oofString OOF_PublicBase::name ( ) const
virtualinherited

Reimplemented in dbConnect, dbTable, OOF_adornerHolder, and dbField.

Definition at line 349 of file oof1.cpp.

Referenced by OOF_PublicBase::describe().

dbHelper * dbFieldLink::owner ( ) const
inlineinherited
void dbFieldLink::owner ( dbHelper inOwner)
inlineinherited

not ctor param as can create without helper

Definition at line 787 of file oofgui.h.

References dbFieldLink::mOwner.

void dbFieldLink::readOnly ( bool  becomeReadOnly = true)
virtualinherited

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

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

Definition at line 1133 of file oofgui.cpp.

References dbTable::getGUI(), dbFieldLink::mAlwaysReadOnly, dbFieldLink::mOwner, dbFieldLink::mReadOnly, dbGUI::recordAvailable(), and dbHelper::table().

Referenced by oofRepLayoutEditLink::getCellText(), oofRepViewEditLink::getCellText(), and oofRepColHeaderEditLink::getCellText().

void dbFieldLink::setField ( dbField inField)
inlineinherited

Definition at line 822 of file oofgui.h.

References dbFieldLink::mField.

void dbFieldLink::tellGUIcareAboutLocking ( ) const
virtualinherited
void dbFieldLink::updateDerivedFieldDisplay ( bool  isNew)
virtualinherited
bool dbFieldLink::validToLeaveForm ( )
virtualinherited

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.

Definition at line 1110 of file oofgui.cpp.

References dbField::copyString(), dbField::fieldIsUniqueIndexed(), dbField::fieldName(), dbFieldLink::mField, dbFieldLink::validToLeaveLink(), and dbField::valueIsDuplicate().

Referenced by dbAbstractEditHelper::ValidateLinks().

bool dbFieldLink::validToLeaveLink ( )
virtualinherited

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 dbDateTimeLink2Editor, and dbDateLink2Editor.

Definition at line 1099 of file oofgui.cpp.

Referenced by dbFieldLink::leaveLink(), dbFieldPickLink::leaveLink(), and dbFieldLink::validToLeaveForm().

Member Data Documentation

dbGUIAdapter* dbFieldLink::mAdapter
protectedinherited
bool dbFieldLink::mAlwaysReadOnly
protectedinherited

for static controls, etc;

Definition at line 238 of file oofgui.h.

Referenced by dbFieldLink::alwaysReadOnly(), and dbFieldLink::readOnly().

dbField* dbFieldLink::mField
protectedinherited
bool OOF_PublicBase::mHidden
protectedinherited

Definition at line 61 of file oof1.h.

bool dbFieldLink::mMaybeDirty
protectedinherited

tentative flag lets us optimise comparisons

Definition at line 236 of file oofgui.h.

Referenced by dbFieldLink::isDirty(), dbFieldLink::leaveLink(), dbFieldLink::markClean(), and dbFieldLink::maybeDirty().

dbHelper* dbFieldLink::mOwner
protectedinherited
bool dbFieldLink::mReadOnly
protectedinherited

default is read-write

Definition at line 237 of file oofgui.h.

Referenced by dbFieldLink::isReadOnly(), and dbFieldLink::readOnly().


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