home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************************
- CExpanderButton.h
-
- Copyright © 1994 B-Ray Software. All rights reserved.
- Developed using Symantec C++ 7.0.2 and Symantec's TCL library.
- Portions of this code courtesy Symantec, Inc.
-
- This code may be freely distributed as long as this notice remains. This code
- may not be used in any commercial software without the consent of B-Ray Software.
-
- ---
-
- Header for CExpanderButton class.
-
- ***********************************************************************************/
- #pragma once
-
-
- #include "CExpanderPane.h"
-
-
- class CExpanderButton : public CExpanderPane {
-
- TCL_DECLARE_CLASS
-
- private:
-
- typedef enum {
- kUnexpandedDisabled = 1,
- kUnexpandedEnabled,
- kUnexpandedHilited,
- kExpandedDisabled,
- kExpandedEnabled,
- kExpandedHilited,
- kTwirly,
- kMaxIconIndex = kTwirly
- } ExpanderButtonIconIndex;
-
- //
- // class global variables
- //
- static short numInstances;
- static CIconHandle icons[ kMaxIconIndex ];
-
- Boolean usingColor;
- Boolean value;
-
- void IExpanderButton( Boolean useColor );
- short CalcIconIndex( void );
-
- protected:
- virtual void DrawIcon( short index );
-
- public:
- CExpanderButton();
- CExpanderButton( CView *anEnclosure, CBureaucrat *aSupervisor,
- short aWidth = 0, short vWidth = 0,
- short aHLoc = 0, short aVLoc = 0,
- SizingOption aHSizing = sizFIXEDSTICKY, SizingOption aVSizing = sizFIXEDSTICKY,
- Boolean useColor = TRUE );
- virtual ~CExpanderButton();
-
- virtual void SetEnabled( Boolean fEnabled );
- virtual Boolean GetEnabled( void ) { return wantsClicks; };
-
- virtual void SetValue( Boolean aValue );
- virtual Boolean GetValue( void ) { return value; };
-
- virtual void Draw( Rect *area );
- virtual void DoClick( Point hitPt, short modifierKeys, long when );
-
- virtual void PutTo( CStream &stream );
- virtual void GetFrom( CStream &stream );
- };
-
-
-