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

  1. #ifndef _MTOBJECT_HPP
  2. #define _MTOBJECT_HPP
  3.  
  4. #include "mtdef.hpp"
  5. #include "mmcomp.hpp"
  6.  
  7. class WStringList;
  8.  
  9. class DTObject;
  10. class MTPropertyDialog;
  11.  
  12. enum MMBitmapSize {
  13.     MMBmpS_Small,    // 16 x 16
  14.     MMBmpS_Medium,    // 24 x 24
  15.     MMBmpS_Large,    // 32 x 32
  16.     MMBmpS_NumSizes,
  17. };
  18.  
  19. class METACLASSDEF MetaObject : public MMComponent {
  20.     public:
  21.     MetaObject( const MMComponentData * data );
  22.     MetaObject();
  23.     MetaObject( const MetaObject & o );
  24.     MetaObject & operator=( const MetaObject & o );
  25.     virtual ~MetaObject();
  26.  
  27.     virtual WConstantString            GetName() const;
  28.     virtual WBool                GetDerivedFrom( const WString & ) const;
  29.  
  30.     virtual const MMEventList &        EventList() const;
  31.     virtual const MMStyleList &        StyleList() const;
  32.     virtual const MMPropertyList &        PropertyList() const;
  33.     virtual const MMMethodList &        MethodList() const;
  34.     virtual const MMPropertySheetList & PropertySheetList() const;
  35.  
  36.     virtual DTObject *        Instantiate() const;
  37.  
  38.     virtual WBool            GetBitmap( WBitmap & bmp,
  39.                         MMBitmapSize size ) const;
  40.     virtual WBool            GetIcon( WIcon & bmp,
  41.                         MMBitmapSize size ) const;
  42.  
  43.     virtual MTPropertyDialog *    CreatePropDialog() const;
  44.  
  45.     virtual WBool            CreateEventPopupMenu( DTObject *,
  46.                                   WPopupMenu * ) const;
  47.     virtual MetaObject *        GetBaseObject() const;
  48.  
  49.     virtual WStyle            GetMappedMask() const;
  50.     virtual WStyle            GetExMappedMask() const;
  51.  
  52.     virtual MMPropFindFn        GetFindStyleFn() const;
  53.     virtual MMPropFindFn        GetFindPropFn() const;
  54.  
  55.     virtual WUInt            GetNumMappedProperties() const;
  56.     virtual const MMProperty *    GetMappedProperty( WUInt idx ) const;
  57.  
  58.     private:
  59.     virtual WBool        InitMetaObject();
  60.     friend class        MMComponentLib;
  61.  
  62.     private:
  63.     MetaObject *        _base;
  64.     WConstantString        _name;
  65.     WBool            _initialized;
  66.  
  67.     MMEventList           _eventList;
  68.     MMStyleList           _styleList;
  69.     MMPropertyList       _propertyList;
  70.     MMMethodList           _methodList;
  71.     MMPropertySheetList       _propertySheetList;
  72.  
  73.     MMPropertyList        _mappedProperties;
  74. };
  75. typedef MetaObject MetaWObject;
  76.  
  77. #endif // _MTOBJECT_HPP
  78.