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

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