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

  1. /******************************************************************************
  2.  CChoicesButton.h
  3.  
  4.         Interface for the ChoicesButton Class
  5.         
  6.         Copyright © 1989 Symantec Corporation. All rights reserved.
  7.         
  8.     TCL 1.1 CHANGES
  9.     [
  10.         - added INewChoicesButton initialization method for to support creation
  11.           without a CNTL resource.
  12.         - added IChoicesButtonX method to handle initialization common to
  13.           IChoicesButton and INewChoicesButton
  14.         - added GetClickCmd, SetDefault methods
  15.     ]
  16.     TCL 1.1.3 Changes
  17.     [
  18.         - use #pragma once
  19.     ]
  20.  ******************************************************************************/
  21.  
  22. #pragma once
  23.  
  24. #include "CButton.h"                    /* Interface for its superclass        */
  25.  
  26. class CChoicesButton : public CButton {                /* Class Declaration                */
  27.  
  28. protected:
  29.     Boolean        dialogIsBig;        /* TRUE if button reads “Fewer Choies” */
  30.     
  31.     long        firstToHide,        /* First view to hide */
  32.                 lastToHide;            /* Last view to hide */
  33.                 
  34.     long        firstToMoveUp,        /* First view to move up */
  35.                 lastToMoveUp;        /* Last view to move up */
  36.                 
  37.     long        distanceToMove;        /* How far to move items up and down */    
  38.  
  39. public:
  40.                                 /** Instance Methods **/
  41.                                     /** Construction **/
  42.     void        IChoicesButton(short CNTLid, CView *anEnclosure,
  43.                             CBureaucrat        *aSupervisor);
  44.     void        INewChoicesButton( short aWidth, short aHeight, short aHEncl, short aVEncl, 
  45.                     StringPtr title, Boolean fVisible, short procID,
  46.                     CView *anEnclosure, CBureaucrat    *aSupervisor);
  47.     void        IChoicesButtonX( void);
  48.     virtual void        
  49.                 IViewTemp(CView *anEnclosure, CBureaucrat *aSupervisor,    Ptr viewData);
  50.                                     /** Information and Control **/
  51.     void        UpdateButtonText( void);
  52.     
  53.     Boolean        IsDialogBig( void);
  54.     
  55.     virtual void        SetViewsToHide (long first, long last);
  56.     virtual void        SetViewsToMoveUp (long first, long last);
  57.     
  58.                                     /** Click Handling **/
  59.     virtual void        DoFewerChoices( void);
  60.     virtual void        DoMoreChoices( void);
  61.     virtual void        DoGoodClick(short whichPart);
  62.  
  63. };
  64.  
  65. typedef struct    {                        /* Pane template                    */
  66.     PaneTemp        sPaneTemp;
  67.     long            firstToHide,
  68.                     lastToHide,
  69.                     firstToMoveUp,
  70.                     lastToMoveUp;
  71. } ChoicesButtonTemp, *ChoicesButtonTempP;
  72.  
  73. #define        cmdToggleChoicesButton            3000
  74.  
  75. #define        kChoicesButtonStrings            134