home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C++ / Frameworks / Sprocket Framework DR2 / Sprocket Framework Interfaces / DialogWindow.h < prev    next >
Encoding:
Text File  |  1996-06-03  |  1.1 KB  |  54 lines  |  [TEXT/CWIE]

  1. // Sprocket Framework header file
  2. // DialogWindow.h
  3.  
  4.  
  5.  
  6. #ifndef        _DIALOGWINDOW_
  7. #define        _DIALOGWINDOW_
  8.  
  9. #ifndef        _WINDOW_
  10. #include    "Window.h"
  11. #endif
  12.  
  13. #ifndef        __DIALOGS__
  14. #include    <Dialogs.h>
  15. #endif
  16.  
  17. typedef    short    DialogTemplateID;
  18. typedef    short    DialogItemID;
  19.  
  20.  
  21. class    TDialogWindow    :    public    TWindow
  22. {
  23. protected:
  24.  
  25.     DialogTemplateID    fTemplateID;
  26.     
  27.     //    Protect the constructor, because this is an abstract class
  28.  
  29.                         TDialogWindow(DialogTemplateID theDialogTemplate);
  30.  
  31. public:
  32.  
  33.     virtual    Boolean        EventFilter(EventRecord *theEvent);
  34.     virtual    Boolean        FilterDialogEvent(EventRecord *theEvent, short *itemHit );
  35.  
  36.     virtual WindowRef    MakeNewWindow(WindowRef behindWindow);
  37.     virtual    Boolean        Close(void);
  38.  
  39.     virtual void        Activate(Boolean activating);
  40.     virtual void        Draw(void);
  41.     virtual void        Click(EventRecord *anEvent);
  42.  
  43.     virtual    void        AdjustMenusBeforeMenuSelection(void);
  44.     virtual Boolean        DoCommand(CommandID command);
  45.     
  46. //    New methods that MUST be overridden:
  47.  
  48.     virtual    void        ItemHit(short theItem) = 0;
  49.     
  50.     inline DialogRef    GetDialogRef(void)    { return (DialogRef) fWindow; }
  51.     };
  52.  
  53. #endif
  54.