OOFILE  1.9
Public Types | Public Member Functions | Static Public Member Functions | List of all members
CControlEnablingEditField Class Reference

enables and disables the attached LControl when the field is empty. More...

#include <CControlEnablingEditField.h>

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

Public Types

enum  { class_ID = 'ened' }
 

Public Member Functions

 CControlEnablingEditField ()
 
 CControlEnablingEditField (const CControlEnablingEditField &inOriginal)
 
 CControlEnablingEditField (const SPaneInfo &inPaneInfo, Str255 inString, ResIDT inTextTraitsID, SInt16 inMaxChars, Boolean inHasBox, Boolean inHasWordWrap, KeyFilterFunc inKeyFilter, LCommander *inSuper)
 
 CControlEnablingEditField (const SPaneInfo &inPaneInfo, Str255 inString, ResIDT inTextTraitsID, SInt16 inMaxChars, UInt8 inAttributes, KeyFilterFunc inKeyFilter, LCommander *inSuper)
 
 CControlEnablingEditField (LStream *inStream)
 
void disableWhenEmpty ()
 
LControl * enablesControl ()
 
void enablesControl (LControl *, unsigned long ticksTimeout=0)
 
Boolean enablesWhenEmpty ()
 
void enableWhenEmpty ()
 
virtual void UserChangedText ()
 
virtual ~CControlEnablingEditField ()
 

Static Public Member Functions

static CControlEnablingEditFieldCreateControlEnablingEditFieldStream (LStream *inStream)
 

Detailed Description

enables and disables the attached LControl when the field is empty.

INSTRUCTIONS in FinishCreateSelf() 1) create the control with a cast like: mFindField = (CControlEnablingEditField *)FindPaneByID('Edit');

instead of the normal mFindField = (LEditField *)FindPaneByID('Edit');

2) tell the field which control it enables, eg: mFindField->enablesControl(mFindButton);

3) if you want to reverse the sense of when the control should be enabled/disabled mFindField->disableWhenEmpty()

Definition at line 41 of file CControlEnablingEditField.h.

Member Enumeration Documentation

anonymous enum
Enumerator
class_ID 

Definition at line 43 of file CControlEnablingEditField.h.

Constructor & Destructor Documentation

CControlEnablingEditField::CControlEnablingEditField ( )
CControlEnablingEditField::CControlEnablingEditField ( const CControlEnablingEditField inOriginal)
CControlEnablingEditField::CControlEnablingEditField ( const SPaneInfo &  inPaneInfo,
Str255  inString,
ResIDT  inTextTraitsID,
SInt16  inMaxChars,
Boolean  inHasBox,
Boolean  inHasWordWrap,
KeyFilterFunc  inKeyFilter,
LCommander inSuper 
)
CControlEnablingEditField::CControlEnablingEditField ( const SPaneInfo &  inPaneInfo,
Str255  inString,
ResIDT  inTextTraitsID,
SInt16  inMaxChars,
UInt8  inAttributes,
KeyFilterFunc  inKeyFilter,
LCommander inSuper 
)
CControlEnablingEditField::CControlEnablingEditField ( LStream *  inStream)
virtual CControlEnablingEditField::~CControlEnablingEditField ( )
virtual

Member Function Documentation

static CControlEnablingEditField* CControlEnablingEditField::CreateControlEnablingEditFieldStream ( LStream *  inStream)
static
void CControlEnablingEditField::disableWhenEmpty ( )
LControl* CControlEnablingEditField::enablesControl ( )
void CControlEnablingEditField::enablesControl ( LControl *  ,
unsigned long  ticksTimeout = 0 
)
Boolean CControlEnablingEditField::enablesWhenEmpty ( )
void CControlEnablingEditField::enableWhenEmpty ( )
virtual void CControlEnablingEditField::UserChangedText ( )
virtual

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