home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / MTOBJECT.HPP < prev    next >
C/C++ Source or Header  |  1997-01-21  |  3KB  |  93 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. class MTHashTable;
  12.  
  13. enum MMBitmapSize {
  14.     MMBmpS_Small,       // 16 x 16
  15.     MMBmpS_Medium,      // 24 x 24
  16.     MMBmpS_Large,       // 32 x 32
  17.     MMBmpS_NumSizes,
  18. };
  19.  
  20. class METACLASSDEF MetaObject : public MMComponent {
  21.     public:
  22.         MetaObject( const MMComponentData * data );
  23.         MetaObject();
  24.         MetaObject( const MetaObject & o );
  25.         MetaObject & operator=( const MetaObject & o );
  26.         virtual ~MetaObject();
  27.  
  28.         virtual WConstantString             GetName() const;
  29.         virtual WBool                       GetDerivedFrom( const WString & ) const;
  30.  
  31.         virtual const MMEventList &         EventList() const;
  32.         virtual const MMStyleList &         StyleList() const;
  33.         virtual const MMPropertyList &      PropertyList() const;
  34.         virtual const MMMethodList &        MethodList() const;
  35.         virtual const MMPropertySheetList & PropertySheetList() const;
  36.         virtual const MMPropertyList &      FDXPropertyList() const;
  37.  
  38.         virtual DTObject *              Instantiate() const;
  39.  
  40.         virtual WBool                   GetBitmap( WBitmap & bmp,
  41.                                                 MMBitmapSize size ) const;
  42.         virtual WBool                   GetIcon( WIcon & bmp,
  43.                                                 MMBitmapSize size ) const;
  44.  
  45.         virtual MTPropertyDialog *      CreatePropDialog() const;
  46.  
  47.         virtual WBool                   CreateEventPopupMenu( DTObject *,
  48.                                                               WPopupMenu * ) const;
  49.         virtual MetaObject *            GetBaseObject() const;
  50.  
  51.         virtual WStyle                  GetMappedMask() const;
  52.         virtual WStyle                  GetExMappedMask() const;
  53.  
  54.         virtual const MMProperty *      FindProperty( const char * ) const;
  55.         virtual const MMStyle *         FindStyle( const char * ) const;
  56.  
  57.         virtual WUInt                   GetNumMappedProperties() const;
  58.         virtual const MMProperty *      GetMappedProperty( WUInt idx ) const;
  59.  
  60.     private:
  61.         virtual WBool           InitMetaObject();
  62.         void                    InitFindProps();
  63.         friend class            MMComponentLib;
  64.  
  65.     private:
  66.         MetaObject *            _base;
  67.         WConstantString         _name;
  68.         WBool                   _initialized;
  69.  
  70.         WBool                   _eventListInit;
  71.         WBool                   _styleListInit;
  72.         WBool                   _propertyListInit;
  73.         WBool                   _methodListInit;
  74.         WBool                   _propertySheetListInit;
  75.         WBool                   _mappedPropertyListInit;
  76.         WBool                   _fdxPropertyListInit;
  77.  
  78.         MMEventList             _eventList;
  79.         MMStyleList             _styleList;
  80.         MMPropertyList          _propertyList;
  81.         MMMethodList            _methodList;
  82.         MMPropertySheetList     _propertySheetList;
  83.  
  84.         MMPropertyList          _mappedProperties;
  85.         MMPropertyList          _fdxProperties;
  86.  
  87.         MTHashTable *           _findProperties;
  88.         MTHashTable *           _findStyles;
  89. };
  90. typedef MetaObject MetaWObject;
  91.  
  92. #endif // _MTOBJECT_HPP
  93.