home *** CD-ROM | disk | FTP | other *** search
- #ifndef _DTOLEOBJ_HPP
- #define _DTOLEOBJ_HPP
-
- #include "dtwobj.hpp"
-
- class MetaObject;
- class WStringList;
-
- typedef struct BindableOlePropInfo {
- WString name;
- WDispID id;
- WBool defaultBindable;
- WBool bindable;
- WBool isCursorProperty;
- WBool hidden;
- WBool displayBind;
- WString tmpObject;
- WString boundObject;
- } BindableOlePropInfo;
-
- class METAEXPORTCLASSDEF DTWOleObject : public DTWObject {
- public:
- DTWOleObject( const MetaObject * meta );
- ~DTWOleObject();
-
- virtual WBool Create( WWindow * parent, const WRect & r,
- const WChar * text, WStyle style,
- WStyle exStyle, void * data = NULL,
- WBool isLoading = FALSE );
-
- virtual void DTGetRectangle( WRect & r, WBool abs = FALSE ) const;
- virtual void DTGetClientRectangle( WRect & r ) const;
- virtual void DTSetRectangle( const WRect & r );
- virtual void DTBringToTop();
- virtual void DTRepaint();
- virtual WWindow * DTGetParent() const;
- virtual WBool DTSetEventHandler( WEventID id,
- WObject * object,
- WEventHandler handler,
- void *userdata=NULL );
-
- virtual WStyle GetStyle() const;
- virtual WBool SetStyle( WStyle stl, WBool clone=FALSE );
- virtual WStyle GetDefaultStyle() const;
-
- virtual WStyle GetExtendedStyle() const;
- virtual WBool SetExtendedStyle( WStyle style, WBool clone=FALSE );
- virtual WStyle GetDefaultExtendedStyle() const;
-
- // Save and Load DTInfo
- virtual WBool HasDTInfo();
- virtual WBool SaveDTInfo( SaveSource & );
- virtual WBool LoadDTInfo( SaveBlock *, WBool );
-
- virtual WBool GetIsResizeable();
- virtual WBool CreateEventPopupMenu( WPopupMenu * popup );
-
- virtual WBool GetOLEPropertyList( WInt *num, BindableOlePropInfo **propList );
-
- // Overrides
- virtual void DTSetName( const WString & name );
-
- public:
- virtual void AmendPopup( WPopupMenu *popup, WBool before );
- virtual void SetForm( DTFormEditBase * );
- virtual void GenerateCode( MMCodeGeneration, ostream &, MMCodeGenerationParms & );
-
- protected:
- WOleObject * GetWOleObject() const;
- WBool HdlOleMenuTrampoline( WObject * src, WEventData * data );
-
- private:
- WBool _loadFromFile;
- WString _oleID;
- WInt _lastOleMenuItem;
- BindableOlePropInfo * _propList;
- WInt _numProps;
- WStringArray _dtProps;
- WStringArray _dtPropValues;
- };
-
- class METAEXPORTCLASSDEF DTWOleProgrammableObject : public DTWObject {
- public:
- DTWOleProgrammableObject( const MetaObject * meta );
-
- virtual void GenerateCode( MMCodeGeneration, ostream &, MMCodeGenerationParms & );
- };
-
- #endif // _DTOLEOBJ_HPP
-