home *** CD-ROM | disk | FTP | other *** search
- Save Format v1.3
- @begin ClassFile "WCMUtil"
- Exported 0;
-
- @begin UserFunction "WCMUtil()"
- GencodeSrcLine 15;
- FunctionName "WCMUtil::WCMUtil()";
- @end;
-
- @begin UserFunction "Prototype for WCMUtil()"
- Private 1;
- GencodeSrcLine 22;
- FunctionName "WCMUtil::Prototype for WCMUtil()";
- @end;
-
- @begin UserFunction "~WCMUtil()"
- GencodeSrcLine 19;
- FunctionName "WCMUtil::~WCMUtil()";
- @end;
-
- @begin UserFunction "Prototype for ~WCMUtil()"
- Private 1;
- GencodeSrcLine 24;
- FunctionName "WCMUtil::Prototype for ~WCMUtil()";
- @end;
-
- @begin UserFunction "SetAllChangeEvents( WForm * form, WEventHandler func )"
- GencodeSrcLine 23;
- FunctionName "WCMUtil::SetAllChangeEvents( WForm * form, WEventHandler func )";
- @end;
-
- @begin UserFunction "Prototype for SetAllChangeEvents( WForm * form, WEventHandler func )"
- Private 1;
- GencodeSrcLine 26;
- FunctionName "WCMUtil::Prototype for SetAllChangeEvents( WForm * form, WEventHandler func )";
- @end;
-
- @begin UserFunction "SetAllTextReadOnly( WForm * form )"
- GencodeSrcLine 52;
- FunctionName "WCMUtil::SetAllTextReadOnly( WForm * form )";
- @end;
-
- @begin UserFunction "Prototype for SetAllTextReadOnly( WForm * form )"
- Private 1;
- GencodeSrcLine 28;
- FunctionName "WCMUtil::Prototype for SetAllTextReadOnly( WForm * form )";
- @end;
-
- @begin HPPPrefixBlock
- @begin-code HPPPrefix
-
- // Declarations added here will be included at the top of the .HPP file
-
- @end-code;
- GencodeSrcLine 11;
- @end;
-
- @begin CPPPrefixBlock
- @begin-code CPPPrefix
-
- // Code added here will be included at the top of the .CPP file
-
- // Include definitions for resources.
- #include "WRes.h"
-
- @end-code;
- GencodeSrcLine 11;
- @end;
-
- @begin ClassContentsBlock
- @begin-code ClassContents
-
- public:
- // add your public instance data here
- private:
- // add your private instance data here
- protected:
- // add your protected instance data here
-
- @end-code;
- GencodeSrcLine 16;
- @end;
-
- @begin-code GeneratedClassContents
-
-
- @end-code;
-
- @begin-code Code "WCMUtil::WCMUtil()"
-
- WCMUtil::WCMUtil()
- {
-
- }
-
- @end-code;
-
- @begin-code Code "WCMUtil::Prototype for WCMUtil()"
-
- public:
- WCMUtil();
-
- @end-code;
-
- @begin-code Code "WCMUtil::~WCMUtil()"
-
- WCMUtil::~WCMUtil()
- {
-
- }
-
- @end-code;
-
- @begin-code Code "WCMUtil::Prototype for ~WCMUtil()"
-
- public:
- ~WCMUtil();
-
- @end-code;
-
- @begin-code Code "WCMUtil::SetAllChangeEvents( WForm * form, WEventHandler func )"
-
- // SetAllChangeEvents
-
- // Install a change event routine on every control on a form. (Controls
- // that don't have a change event will just fail on the set).
-
- // Define a change event handler as a member of the your form:
- //
- // WBool control_Change( WObject *, WEventData * )
- // {
- // _changed = TRUE;
- // return( FALSE );
- // }
-
- // Install the change events:
- //
- // WCMUtil::SetAllChangeEvents( this, (WEventHandler)&Form1::control_Change );
-
-
-
- static void WCMUtil::SetAllChangeEvents( WForm * form, WEventHandler func )
- {
- WInt i;
- WControl * ctrl;
-
- for( i = 0; i < form->GetControlCount(); i ++ ) {
- ctrl = form->GetControl( i );
- ctrl->SetEventHandler( WChangeEvent, form, func );
- }
- }
-
- @end-code;
-
- @begin-code Code "WCMUtil::Prototype for SetAllChangeEvents( WForm * form, WEventHandler func )"
-
- public:
- static void SetAllChangeEvents( WForm * form, WEventHandler func );
-
- @end-code;
-
- @begin-code Code "WCMUtil::SetAllTextReadOnly( WForm * form )"
-
- // SetAllTextReadOnly
-
- // Set all WTextBox and WRichTextBox controls on a form to read-only.
-
- static void WCMUtil::SetAllTextReadOnly( WForm * form )
- {
- WInt i;
- WControl * ctrl;
-
- for( i = 0; i < form->GetControlCount(); i ++ ) {
- ctrl = form->GetControl( i );
- if( ctrl->IsDerivedFrom( WTextBox::ClassID() ) ){
- ((WTextBox *)ctrl)->SetReadOnly( true );
- }
- }
-
- }
-
- @end-code;
-
- @begin-code Code "WCMUtil::Prototype for SetAllTextReadOnly( WForm * form )"
-
- public:
- static void SetAllTextReadOnly( WForm * form );
-
- @end-code;
- @end;
-