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

dbGUIAdapter Class Reference
[OOFILE GUI forms interface.]

#include <oofgui.h>

Inheritance diagram for dbGUIAdapter:

Inheritance graph
[legend]
Collaboration diagram for dbGUIAdapter:

Collaboration graph
[legend]
List of all members.

Detailed Description

Links a dbField to a known control type or I/O mechanism.

Subclass to provide an interface between OOFILE and your own GUI control. Makes no assumptions about control class - controls do not have to be part of any existing view hierarchy. Maps all values to string or int to communicate with the field.

Note:
whilst we implement dbGUIAdapter subclasses to talk to controls and users will normally do so, it's a generic interface and could hide things like a serial port to a hardware button.
See also:
dbFieldLink
Todo:
map other binary types without going via string


generic Adapter mandatory overrides

virtual dbGUIAdapterclone () const=0
virtual oofString getString () const=0
virtual void setString (const oofString &)=0

generic Adapter optional overrides

virtual void highlightContents ()
virtual void readOnly (bool)
virtual void setFieldLink (dbFieldLink *)
virtual bool equalsString (const oofString &) const
virtual bool adaptsControl (void *) const

Control Adapter overrides- defaults defined in terms of string methods

virtual int getValue () const
virtual void setValue (int)
virtual bool equalsValue (int) const

Public Member Functions

 dbGUIAdapter ()
virtual ~dbGUIAdapter ()
dbFieldLinkfieldLink () const
 in case someone needs to access it

bool isValuePicker () const
virtual void setValueList (dbView &)
 Null virtual method for subclasses to override, eg dbGUIAdaptLPopupButton.


Protected Member Functions

bool IsReadOnly () const

Protected Attributes

dbFieldLinkmFieldLink
 reference, maybe null

bool mIsValuePicker
 set at construction to indicate behaviour is picking from list vs entry


Constructor & Destructor Documentation

dbGUIAdapter::dbGUIAdapter  )  [inline]
 

virtual dbGUIAdapter::~dbGUIAdapter  )  [inline, virtual]
 


Member Function Documentation

bool dbGUIAdapter::adaptsControl void *   )  const [virtual]
 

Reimplemented in dbGUIAdaptLControl, and dbGUIAdaptEditPane.

virtual dbGUIAdapter* dbGUIAdapter::clone  )  const [pure virtual]
 

Implemented in dbGUIAdaptLControl, dbGUIAdaptLCaption, dbGUIAdaptLTextEdit, and dbGUIAdaptLEditField.

bool dbGUIAdapter::equalsString const oofString  )  const [virtual]
 

Reimplemented in dbGUIAdaptControl, dbGUIAdaptEditPane, and dbGUIAdaptLargeEditPane.

bool dbGUIAdapter::equalsValue int   )  const [virtual]
 

dbFieldLink * dbGUIAdapter::fieldLink  )  const [inline]
 

in case someone needs to access it

virtual oofString dbGUIAdapter::getString  )  const [pure virtual]
 

Implemented in dbGUIAdaptControl, dbGUIAdaptEditPane, and dbGUIAdaptLargeEditPane.

int dbGUIAdapter::getValue  )  const [virtual]
 

Reimplemented in dbGUIAdaptLControl.

virtual void dbGUIAdapter::highlightContents  )  [inline, virtual]
 

Reimplemented in dbGUIAdaptEditPane.

bool dbGUIAdapter::IsReadOnly  )  const [inline, protected]
 

bool dbGUIAdapter::isValuePicker  )  const [inline]
 

virtual void dbGUIAdapter::readOnly bool   )  [inline, virtual]
 

Reimplemented in dbGUIAdaptLControl, dbGUIAdaptEditPane, and dbGUIAdaptLCaption.

void dbGUIAdapter::setFieldLink dbFieldLink  )  [virtual]
 

Reimplemented in dbGUIAdaptLControl, dbGUIAdaptEditPane, and dbGUIAdaptLCaption.

virtual void dbGUIAdapter::setString const oofString  )  [pure virtual]
 

Implemented in dbGUIAdaptControl, dbGUIAdaptEditPane, and dbGUIAdaptLargeEditPane.

void dbGUIAdapter::setValue int   )  [virtual]
 

Reimplemented in dbGUIAdaptLControl.

void dbGUIAdapter::setValueList dbView  )  [virtual]
 

Null virtual method for subclasses to override, eg dbGUIAdaptLPopupButton.

Reimplemented in dbGUIAdaptLStdPopupMenu, and dbGUIAdaptLPopupButton.


Member Data Documentation

dbFieldLink* dbGUIAdapter::mFieldLink [protected]
 

reference, maybe null

bool dbGUIAdapter::mIsValuePicker [protected]
 

set at construction to indicate behaviour is picking from list vs entry


The documentation for this class was generated from the following files:
Generated on Fri Jan 2 01:00:19 2004 for OOFILE by doxygen 1.3.5