home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Frameworks / ShowcaseApp 1.2a / CSApplication.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-06  |  2.2 KB  |  117 lines  |  [TEXT/KAHL]

  1. /*  CSApplication.h
  2.  *    
  3.  *  Copyright 1992, tcl-talk@brown.edu
  4.  *
  5.  */
  6.  
  7. #define    _H_CSApplication
  8. #include <CApplication.h>
  9. #include <CDirector.h>
  10. #include <CPane.h>
  11. #include <CTable.h>
  12.  
  13.  
  14. class CSDirector;
  15.  
  16.  
  17. //***************************************************************************
  18.                                                     // C O N S T A N T S
  19. #define        kExtraMasters        4
  20. #define        kRainyDayFund        20480
  21. #define        kCriticalBalance    20480
  22. #define        kToolboxBalance        20480
  23.  
  24. #define        kInfoResType        'EXCs'
  25.  
  26. #define        kMENUShowcase        1024
  27. #define     cmdOpenShowcase        1024L
  28. #define     cmdLastShowcase        2000L
  29.  
  30. //***************************************************************************
  31.                                                     // A P P L I C A T I O N
  32. struct CSApplication : CApplication {
  33.  
  34.  
  35.     void    ISApplication(void);
  36.     
  37.     void    CreateDocument(void);
  38.     void    RemoveDirector( CDirector *aDirector);
  39.     
  40.     void    SetUpMenus(void); 
  41.     void    UpdateMenus(void); 
  42.  
  43.     void    DoCommand(long theCommand);
  44.     
  45.     void    ForceClassReferences( void);
  46.     
  47.     void    Exit(void);
  48.     
  49.     
  50.     CSDirector        *itsNewDocWindow;
  51.  
  52. };
  53.  
  54.  
  55. //***************************************************************************
  56.                                                     // D I R E C T O R
  57.  
  58. class CSPane;
  59. class CSDirector : public CDirector {
  60.  
  61. public:
  62.  
  63.     CSPane        *itsPane;
  64.     
  65.     
  66.     void        ISDirector( void);
  67.     virtual void        Dispose(void);
  68.  
  69.     virtual void        DoCommand(long theCommand);
  70.     virtual void        UpdateMenus(void);
  71.     
  72. };
  73.  
  74.  
  75. //***************************************************************************
  76.                                                     // P A N E
  77.  
  78. class CSPane : public CPane {
  79.  
  80. public:    
  81.     
  82.     void        ISPane( CView *anEnclosure, CBureaucrat *aSupervisor);
  83.     virtual void        Dispose(void);
  84.  
  85. };
  86.  
  87.  
  88. //***************************************************************************
  89.                                                     // T A B L E
  90.  
  91. class CSTable : public CTable {
  92.  
  93. public:    
  94.     
  95.     void        ISTable( CView *anEnclosure, CBureaucrat *aSupervisor,
  96.                 short aWidth, short aHeight,
  97.                 short aHEncl, short aVEncl);
  98.                 
  99.     virtual void        Dispose(void);
  100.  
  101.     virtual void        DoCommand( long aCmd);
  102.     virtual void        DrawCell( Cell theCell, Rect *cellRect);
  103.  
  104. };
  105.  
  106.  
  107. //***************************************************************************
  108.                                                 // D E M O   D I R E C T O R
  109.  
  110. class CShowcaseDemoDir : public CDirector {
  111.  
  112. public:
  113.  
  114.     virtual void    INewDemo( CDirectorOwner *aSupervisor);
  115.  
  116. };
  117.