home *** CD-ROM | disk | FTP | other *** search
- /*
- DTPOPMEN Class
- */
-
-
- #ifndef _DTPOPMEN_HPP_INCLUDED
- #define _DTPOPMEN_HPP_INCLUDED
-
- #include "strlist.hpp"
- #include "dtobject.hpp"
- #include "dtmenubs.hpp"
-
- class SaveSource;
- class SaveBlock;
- class DTWMenuObject;
- class MenuEdit;
- class MMEvent;
-
- class METADEF DTWPopupMenu : public DTWMenuBase {
-
- public:
- DTWPopupMenu( const MetaObject * );
- // Constructor.
- ~DTWPopupMenu();
- // Destructor.
-
- virtual WBool Create( WWindow * parent, const WRect &,
- const WChar *, WStyle,
- WStyle, void *d=NULL,
- WBool isLoading = FALSE );
- // Create Function to instantiate control.
-
- virtual WMenu * GetWMenu() { return _wmenu; }
- // Get the actual WMenu that the design time model
- // modifies.
-
- public:
- /* Code Generation */
- virtual void GenClassName( WString & ) const;
- // Generate the class name of the object.
-
- public:
- /* Save & Load functionality */
- virtual WBool Save( SaveSource & );
- // Save the design time information.
- virtual WBool LoadMenu( SaveBlock * );
- // Load the design time information.
-
- protected:
- virtual void GenRCMainLevel( WStringList &, int & ) const;
- // Generates the main level resource code.
- virtual void CreateMenuRes( DTWMenuObject *head,
- int indentLevel,
- WStringList &buff ) const;
- // Function that creates the menu resource.
- virtual void MakeConstructor( WStringList &buff ) const;
- // Function for MM_CG_InitCreate code gen.
- virtual void MakeDestructor( WStringList &buff ) const;
- // Function for MM_CG_FiniDelete code gen.
-
- /* Recursive functions used by the code generators. */
- virtual void ConstructMenu( DTWMenuObject *head,
- const WString &name,
- WStringList &buff ) const;
-
- private: // data
- WPopupMenu * _wmenu;
- };
-
- #endif //_DTPOPMEN_HPP_INCLUDED
-