home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / dtjoleob.hpp < prev    next >
C/C++ Source or Header  |  1996-12-12  |  3KB  |  95 lines

  1. #ifndef _DTJOLEOB_HPP
  2. #define _DTJOLEOB_HPP
  3.  
  4. #include "dtjobjct.hpp"
  5.  
  6. class MetaObject;
  7. class WStringList;
  8. struct BindableOlePropInfo;
  9.  
  10. class METAEXPORTCLASSDEF DTJOleObject : public DTJObject {
  11.     public:
  12.     DTJOleObject( const MetaObject * meta );
  13.     ~DTJOleObject();
  14.  
  15.     virtual WBool        Create( WWindow * parent, const WRect & r,
  16.                         const WChar * text, WStyle style,
  17.                     WStyle exStyle, void * data = NULL,
  18.                     WBool isLoading = FALSE );
  19.  
  20.     virtual void        DTGetRectangle( WRect & r, WBool abs = FALSE ) const;
  21.     virtual void        DTGetClientRectangle( WRect & r ) const;
  22.     virtual void        DTSetRectangle( const WRect & r );
  23.     virtual void        DTBringToTop();
  24.     virtual void        DTRepaint();
  25.     virtual WWindow *    DTGetParent() const;
  26.     virtual WBool         DTSetEventHandler( WEventID id,
  27.                          WObject * object,
  28.                          WEventHandler handler,
  29.                          void *userdata=NULL );
  30.  
  31.     virtual WStyle        GetStyle() const;
  32.     virtual WBool        SetStyle( WStyle stl, WBool clone=FALSE );
  33.     virtual WStyle        GetDefaultStyle() const;
  34.  
  35.     virtual WStyle        GetExtendedStyle() const;
  36.     virtual WBool        SetExtendedStyle( WStyle style, WBool clone=FALSE );
  37.     virtual WStyle        GetDefaultExtendedStyle() const;
  38.  
  39.     virtual void        GenClassName( WString & ) const;
  40.  
  41.     // Save and Load DTInfo
  42.     virtual WBool        HasDTInfo();
  43.     virtual WBool        SaveDTInfo( SaveSource & );
  44.     virtual WBool        LoadDTInfo( SaveBlock *, WBool );
  45.  
  46.     virtual WBool        GetIsResizeable();
  47.     virtual WBool        CreateEventPopupMenu( WPopupMenu * popup );
  48.  
  49.     virtual WBool        GetOLEPropertyList( WInt *num, BindableOlePropInfo **propList );
  50.  
  51.     // Overrides
  52.     virtual void         DTSetName( const WString & name );
  53.  
  54.     virtual void GenerateImports( WStringList&,
  55.                       MMJFileGenerationParms * ) const;
  56.  
  57.     public:
  58.     virtual void        AmendPopup( WPopupMenu *popup, WBool before );
  59.     virtual void        SetForm( DTFormEditBase * );
  60.  
  61.         virtual void GenerateCode( MMJCodeGeneration mmCodeGen,
  62.                    WStringList& srcList,
  63.                    MMJFileGenerationParms* pGenParms ) const;
  64.  
  65.     protected:
  66.     WOleObject *        GetWOleObject() const;
  67.     WBool            HdlOleMenuTrampoline( WObject * src, WEventData * data );
  68.  
  69.     private:
  70.     WBool            _loadFromFile;
  71.     WString            _oleID;
  72.     WInt            _lastOleMenuItem;
  73.     BindableOlePropInfo *    _propList;
  74.     WInt            _numProps;
  75.     WStringArray        _dtProps;
  76.     WStringArray        _dtPropValues;
  77. };
  78.  
  79. class METAEXPORTCLASSDEF DTJOleProgrammableObject :  public DTJObject {
  80.     public:
  81.         DTJOleProgrammableObject( const MetaObject * meta );
  82.         ~DTJOleProgrammableObject();
  83.  
  84.     protected:
  85.         virtual void GenerateCode( MMJCodeGeneration mmCodeGen,
  86.                    WStringList& srcList,
  87.                    MMJFileGenerationParms* pGenParms ) const;
  88. };
  89.  
  90. // needed for mdreader
  91. typedef DTJOleObject DTpowersoft__dot__jcm__dot__ui__dot__JOleObject;
  92. typedef WOleObject powersoft__dot__jcm__dot__ui__dot__JOleObject;
  93.  
  94. #endif // _DTJOLEOB_HPP
  95.