home *** CD-ROM | disk | FTP | other *** search
- #ifndef _DTJOLEOB_HPP
- #define _DTJOLEOB_HPP
-
- #include "dtjobjct.hpp"
-
- class MetaObject;
- class WStringList;
- struct BindableOlePropInfo;
-
- class METAEXPORTCLASSDEF DTJOleObject : public DTJObject {
- public:
- DTJOleObject( const MetaObject * meta );
- ~DTJOleObject();
-
- 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;
-
- virtual void GenClassName( WString & ) 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 );
-
- virtual void GenerateImports( WStringList&,
- MMJFileGenerationParms * ) const;
-
- public:
- virtual void AmendPopup( WPopupMenu *popup, WBool before );
- virtual void SetForm( DTFormEditBase * );
-
- virtual void GenerateCode( MMJCodeGeneration mmCodeGen,
- WStringList& srcList,
- MMJFileGenerationParms* pGenParms ) const;
-
- 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 DTJOleProgrammableObject : public DTJObject {
- public:
- DTJOleProgrammableObject( const MetaObject * meta );
- ~DTJOleProgrammableObject();
-
- protected:
- virtual void GenerateCode( MMJCodeGeneration mmCodeGen,
- WStringList& srcList,
- MMJFileGenerationParms* pGenParms ) const;
- };
-
- // needed for mdreader
- typedef DTJOleObject DTpowersoft__dot__jcm__dot__ui__dot__JOleObject;
- typedef WOleObject powersoft__dot__jcm__dot__ui__dot__JOleObject;
-
- #endif // _DTJOLEOB_HPP
-