home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 10 / ioProg_10.iso / soft / optima / hpp.z / DTPOPMEN.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-04  |  1.8 KB  |  71 lines

  1. /*
  2.    DTPOPMEN Class
  3. */
  4.  
  5.  
  6. #ifndef _DTPOPMEN_HPP_INCLUDED
  7. #define _DTPOPMEN_HPP_INCLUDED
  8.  
  9. #include "strlist.hpp"
  10. #include "dtobject.hpp"
  11. #include "dtmenubs.hpp"
  12.  
  13. class SaveSource;
  14. class SaveBlock;
  15. class DTWMenuObject; 
  16. class MenuEdit;
  17. class MMEvent;
  18.  
  19. class METADEF DTWPopupMenu : public DTWMenuBase {
  20.  
  21.     public:
  22.     DTWPopupMenu( const MetaObject * );
  23.         // Constructor.
  24.     ~DTWPopupMenu();
  25.         // Destructor.
  26.         
  27.     virtual WBool    Create( WWindow * parent, const WRect &,
  28.                 const WChar *, WStyle,
  29.                 WStyle, void *d=NULL,
  30.                 WBool isLoading = FALSE );
  31.         // Create Function to instantiate control.
  32.  
  33.     virtual WMenu *        GetWMenu() { return _wmenu; }
  34.         // Get the actual WMenu that the design time model
  35.         //  modifies.
  36.  
  37.     public:
  38.     /* Code Generation */
  39.     virtual void GenClassName( WString & ) const;
  40.         // Generate the class name of the object.
  41.         
  42.     public:
  43.     /*  Save & Load  functionality */
  44.     virtual WBool Save( SaveSource & );
  45.         // Save the design time information.
  46.     virtual WBool LoadMenu( SaveBlock * );
  47.         // Load the design time information.
  48.     
  49.     protected:
  50.     virtual void GenRCMainLevel( WStringList &, int & ) const;
  51.         // Generates the main level resource code.
  52.     virtual void CreateMenuRes( DTWMenuObject *head,
  53.                 int indentLevel,
  54.                 WStringList &buff ) const;
  55.         // Function that creates the menu resource.
  56.     virtual void MakeConstructor( WStringList &buff ) const;
  57.         // Function for MM_CG_InitCreate code gen.
  58.     virtual void MakeDestructor( WStringList &buff ) const;
  59.         // Function for MM_CG_FiniDelete code gen.
  60.  
  61.     /*  Recursive functions used by the code generators.  */
  62.     virtual void ConstructMenu( DTWMenuObject *head,
  63.                 const WString &name,
  64.                 WStringList &buff ) const;
  65.  
  66.     private:    // data
  67.         WPopupMenu *    _wmenu;
  68. };
  69.  
  70. #endif   //_DTPOPMEN_HPP_INCLUDED
  71.