home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Libraries / Aidan's Class Libraries / Source / Window & Dialog Classes / DrawSlate.cpp < prev    next >
Encoding:
Text File  |  1997-05-18  |  971 b   |  69 lines  |  [TEXT/CWIE]

  1. //Copyright (c) 1997 Aidan Cully
  2. //All rights reserved
  3.  
  4. #include "CLDrawSlate.h"
  5.  
  6. TDrawSlate *TDrawSlate::shCurFocus=0;
  7.  
  8. TDrawSlate::TDrawSlate()
  9. {
  10.     mhCount = 0;
  11.     mhOldFocus = 0;
  12.     mhOrigin.h= 0;
  13.     mhOrigin.v= 0;
  14. }
  15.  
  16. TDrawSlate::~TDrawSlate()
  17. {
  18.     while( shCurFocus == this )
  19.         ReleaseDrawFocus();
  20. }
  21.  
  22. Boolean TDrawSlate::GetDrawFocus()
  23. {
  24.     if( shCurFocus != this ) {
  25.         if( !GetDrawSelf() )
  26.             return( false );
  27.         mhOldFocus = shCurFocus;
  28.         shCurFocus = this;
  29.     }
  30.     mhCount++;
  31.     return( true );
  32. }
  33.  
  34. Boolean TDrawSlate::ReleaseDrawFocus()
  35. {
  36.     Boolean retVal= true;
  37.  
  38.     if( shCurFocus == this ) {
  39.         mhCount--;
  40.         if( !mhCount ) {
  41.             retVal= ReleaseDrawSelf();
  42.             shCurFocus = mhOldFocus;
  43.         }
  44.     } else
  45.         return( false );
  46.     return( retVal );
  47. }
  48.  
  49. Boolean TDrawSlate::GetDrawSelf()
  50. {
  51.     return( true );
  52. }
  53.  
  54. Boolean TDrawSlate::ReleaseDrawSelf()
  55. {
  56.     return( true );
  57. }
  58.  
  59. void TDrawSlate::MarkChanged( Rect )
  60. {
  61. }
  62.  
  63. void TDrawSlate::LocalToGlobal( Point* )
  64. {
  65. }
  66.  
  67. void TDrawSlate::GlobalToLocal( Point* )
  68. {
  69. }