home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / CarbonizedMenus / headers / RootMenu.h < prev   
Encoding:
C/C++ Source or Header  |  1999-06-26  |  1.3 KB  |  82 lines  |  [TEXT/CWIE]

  1. /****************************************************************************************
  2.     RootMenu.h
  3.     
  4.     Copyright © 1999 Red Shed Software. All rights reserved.
  5.     by Jonathan 'Wolf' Rentzsch (jon@redshed.net)
  6.     
  7.     Commenter    Date                Comment
  8.     ---------    -----------------    -----------------------------------------------------
  9.     wolf        Fri, Jun 25, 1999    Created.
  10.     
  11.     ************************************************************************************/
  12.  
  13. #ifndef        _RootMenu_
  14. #define        _RootMenu_
  15.  
  16. #include    "list.h"
  17.  
  18. class    AbstractMenuWindow    {
  19.     public:
  20.         AbstractMenuWindow();
  21.         
  22.             virtual
  23.         ~AbstractMenuWindow();
  24.         
  25.             virtual
  26.             void
  27.         Draw(){}
  28.         
  29.             virtual
  30.             void
  31.         MouseDown(
  32.             EventRecord    */*event*/ ){}
  33.         
  34.             virtual
  35.             WindowPtr
  36.         window() const
  37.         {    return( (WindowPtr) &window_ ); }
  38.     protected:
  39.         WindowRecord    window_;
  40. };
  41.  
  42. class    RootMenu : public AbstractMenuWindow {
  43.     public:
  44.         RootMenu();
  45.         
  46.             virtual
  47.             void
  48.         Draw();
  49.         
  50.             virtual
  51.             void
  52.         MouseDown(
  53.             EventRecord    *event );
  54. };
  55.  
  56. class    NormalMenu : public AbstractMenuWindow {
  57.     public:
  58.         NormalMenu(
  59.             MenuHandle menu,
  60.             bool       apple = false );
  61.         
  62.             virtual
  63.             void
  64.         Draw();
  65.         
  66.             virtual
  67.             void
  68.         MouseDown(
  69.             EventRecord    *event );
  70.     protected:
  71.         MenuHandle    menu_;
  72.         bool        apple_;
  73. };
  74.  
  75. extern    list< AbstractMenuWindow* >    gMenus;
  76.     
  77. class    CleanUp    {
  78.     public:
  79.         ~CleanUp();
  80. };
  81.  
  82. #endif    //    _RootMenu_