home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / Expander / Expander Classes / CExpanderLabel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.6 KB  |  65 lines  |  [TEXT/KAHL]

  1. /***********************************************************************************
  2.     CExpanderLabel.h
  3.  
  4.     Copyright © 1994 B-Ray Software. All rights reserved.
  5.     Developed using Symantec C++ 7.0.2 and Symantec's TCL library.
  6.     Portions of this code courtesy Symantec, Inc.
  7.  
  8.     This code may be freely distributed as long as this notice remains. This code
  9.     may not be used in any commercial software without the consent of B-Ray Software.
  10.  
  11.     ---
  12.  
  13.     Header file for CExpanderLabel class.
  14.  
  15. ***********************************************************************************/
  16. #pragma once
  17.  
  18.  
  19. #include "CExpanderText.h"
  20.  
  21.  
  22. class CExpanderLabel : public CExpanderText {
  23.  
  24. TCL_DECLARE_CLASS
  25.  
  26. private:
  27.     long            itsCommand;        // command to issue when double-clicked
  28.  
  29. protected:
  30.     Handle            itsText;
  31.  
  32.     virtual void    MakeEnvironment( void );
  33.     virtual short    CalcFrameWidth( void );
  34.     virtual void    DrawLabel( Rect *area );
  35.  
  36. public:
  37.     CExpanderLabel();
  38.     CExpanderLabel( CView *anEnclosure, CBureaucrat *aSupervisor,
  39.                     short aWidth = 0, short aHeight = 0, short aHLoc = 0, short aVLoc = 0,
  40.                     SizingOption aHSizing = sizFIXEDSTICKY, 
  41.                     SizingOption aVSizing = sizFIXEDSTICKY );
  42.     virtual ~CExpanderLabel();
  43.  
  44.     virtual void    SetLabelTextRsrcID( short rsrcID );
  45.  
  46.     virtual void    SetDblClickCmd( long theCommand ) { itsCommand = theCommand; };
  47.     virtual long    GetDblClickCmd( void ) { return itsCommand; };
  48.  
  49.     virtual void    Draw( Rect *area );
  50.  
  51.     /*
  52.      * Pane overrides
  53.      */
  54.     virtual void    DoClick( Point hitPt, short modifierKeys, long when );
  55.  
  56.     virtual void    Activate( void );
  57.     virtual void    Deactivate( void );
  58.  
  59.     /*
  60.      * Stream methods
  61.      */
  62.     virtual void    PutTo( CStream &stream );
  63.     virtual void    GetFrom( CStream &stream );
  64. };
  65.