home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Sample Controls / Menus / CMenuControl.h < prev    next >
Encoding:
Text File  |  1996-12-20  |  1020 b   |  48 lines  |  [TEXT/CWIE]

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. //    CMenuControl.h
  4. //
  5. //
  6.  
  7. #ifndef __CMenuControl__
  8. #define __CMenuControl__
  9.  
  10. #include "BDInterfaces.h"
  11. #include "C3DTextView.h"
  12. #include "CPopupMenuControl.h"
  13.  
  14. ///////////////////////////////////////////////////////////////////////////////
  15. //
  16. // class declaration
  17. //
  18.  
  19. class CMenuControl :
  20.     public C3DTextView, 
  21.     public CPopupMenuControl
  22. {
  23. public:
  24.     
  25.     // *** CMenuControl methods ***
  26.     CMenuControl();
  27.     ~CMenuControl();
  28.  
  29.     // *** IControl methods ***
  30.     STDMETHOD(Draw) (DrawContext* Context);
  31.     STDMETHOD (DoMouse)(THIS_ MouseEventType inMouseET, PlatformEvent* inEvent);
  32.  
  33.     //  *** IPersistPropertyBag methods ***
  34.     STDMETHOD(Load)(IPropertyBag* PropBag, IErrorLog* ErrorLog);
  35.  
  36.     // **** IDoMenuEvents methods
  37.     STDMETHOD (Popup)(THIS_ IUnknown* Source, PlatformEvent* Event);
  38.  
  39. protected:
  40.     void GetMenuLocation(const DrawContext & context, Point * menuLocation);
  41.     
  42. protected:
  43.     char *    mCaption;
  44. };
  45.  
  46.  
  47. #endif // __CMenuControl__
  48.