home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-05-18 | 971 b | 69 lines | [TEXT/CWIE] |
- //Copyright (c) 1997 Aidan Cully
- //All rights reserved
-
- #include "CLDrawSlate.h"
-
- TDrawSlate *TDrawSlate::shCurFocus=0;
-
- TDrawSlate::TDrawSlate()
- {
- mhCount = 0;
- mhOldFocus = 0;
- mhOrigin.h= 0;
- mhOrigin.v= 0;
- }
-
- TDrawSlate::~TDrawSlate()
- {
- while( shCurFocus == this )
- ReleaseDrawFocus();
- }
-
- Boolean TDrawSlate::GetDrawFocus()
- {
- if( shCurFocus != this ) {
- if( !GetDrawSelf() )
- return( false );
- mhOldFocus = shCurFocus;
- shCurFocus = this;
- }
- mhCount++;
- return( true );
- }
-
- Boolean TDrawSlate::ReleaseDrawFocus()
- {
- Boolean retVal= true;
-
- if( shCurFocus == this ) {
- mhCount--;
- if( !mhCount ) {
- retVal= ReleaseDrawSelf();
- shCurFocus = mhOldFocus;
- }
- } else
- return( false );
- return( retVal );
- }
-
- Boolean TDrawSlate::GetDrawSelf()
- {
- return( true );
- }
-
- Boolean TDrawSlate::ReleaseDrawSelf()
- {
- return( true );
- }
-
- void TDrawSlate::MarkChanged( Rect )
- {
- }
-
- void TDrawSlate::LocalToGlobal( Point* )
- {
- }
-
- void TDrawSlate::GlobalToLocal( Point* )
- {
- }