OOFILE  1.9
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dbGUIAdapter Class Referenceabstract

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

#include <oofgui.h>

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

Public Member Functions

 dbGUIAdapter ()
 
dbFieldLinkfieldLink () const
 in case someone needs to access it More...
 
bool isValuePicker () const
 
virtual void setValueList (dbView &)
 Null virtual method for subclasses to override, eg dbGUIAdaptLPopupButton. More...
 
virtual ~dbGUIAdapter ()
 
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
 

Protected Member Functions

bool IsReadOnly () const
 

Protected Attributes

dbFieldLinkmFieldLink
 reference, maybe null More...
 
bool mIsValuePicker
 set at construction to indicate behaviour is picking from list vs entry More...
 

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

Definition at line 74 of file oofgui.h.

Constructor & Destructor Documentation

dbGUIAdapter::dbGUIAdapter ( )
inline

Definition at line 709 of file oofgui.h.

virtual dbGUIAdapter::~dbGUIAdapter ( )
inlinevirtual

Definition at line 77 of file oofgui.h.

Member Function Documentation

bool dbGUIAdapter::adaptsControl ( void *  ) const
virtual

Reimplemented in dbGUIAdaptEditPane, and dbGUIAdaptLControl.

Definition at line 908 of file oofgui.cpp.

Referenced by dbAbstractEditHelper::getLink().

virtual dbGUIAdapter* dbGUIAdapter::clone ( ) const
pure virtual
bool dbGUIAdapter::equalsString ( const oofString inString) const
virtual

Reimplemented in dbGUIAdaptLargeEditPane, dbGUIAdaptEditPane, and dbGUIAdaptControl.

Definition at line 871 of file oofgui.cpp.

References getString().

Referenced by dbFieldLink::linkEqualsField().

bool dbGUIAdapter::equalsValue ( int  inValue) const
virtual

Definition at line 899 of file oofgui.cpp.

References getValue().

dbFieldLink * dbGUIAdapter::fieldLink ( ) const
inline

in case someone needs to access it

Definition at line 723 of file oofgui.h.

References mFieldLink.

virtual oofString dbGUIAdapter::getString ( ) const
pure virtual
int dbGUIAdapter::getValue ( ) const
virtual
virtual void dbGUIAdapter::highlightContents ( )
inlinevirtual

Reimplemented in dbGUIAdaptEditPane.

Definition at line 94 of file oofgui.h.

Referenced by dbFieldLink::highlightLink().

bool dbGUIAdapter::IsReadOnly ( ) const
inlineprotected

Definition at line 716 of file oofgui.h.

References dbFieldLink::isReadOnly(), and mFieldLink.

Referenced by dbGUIAdaptEditPane::ExecuteSelf().

bool dbGUIAdapter::isValuePicker ( ) const
inline
virtual void dbGUIAdapter::readOnly ( bool  )
inlinevirtual

Reimplemented in dbGUIAdaptLCaption, dbGUIAdaptEditPane, and dbGUIAdaptLControl.

Definition at line 95 of file oofgui.h.

Referenced by dbGUIAdaptLCaption::readOnly().

void dbGUIAdapter::setFieldLink ( dbFieldLink inLink)
virtual
virtual void dbGUIAdapter::setString ( const oofString )
pure virtual
void dbGUIAdapter::setValue ( int  inValue)
virtual
void dbGUIAdapter::setValueList ( dbView )
virtual

Null virtual method for subclasses to override, eg dbGUIAdaptLPopupButton.

Reimplemented in dbGUIAdaptLPopupButton, and dbGUIAdaptLStdPopupMenu.

Definition at line 918 of file oofgui.cpp.

Referenced by dbFieldPickLink::copyFieldToLink().

Member Data Documentation

dbFieldLink* dbGUIAdapter::mFieldLink
protected
bool dbGUIAdapter::mIsValuePicker
protected

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

Definition at line 113 of file oofgui.h.

Referenced by dbGUIAdaptLPopupButton::dbGUIAdaptLPopupButton(), dbGUIAdaptLStdPopupMenu::dbGUIAdaptLStdPopupMenu(), and isValuePicker().


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