home *** CD-ROM | disk | FTP | other *** search
- #ifndef _PROPSHT_HPP
- #define _PROPSHT_HPP
-
- #include "mmpropst.hpp"
- #include "propctrl.hpp"
-
- class MTPropertyDialog;
-
- // MTPropertySheetBase:
- // Abstract base class for a property sheet. This is a base
- // class of TabControlEditor etc. as well as for MTPropertySheet
-
- class METACLASSDEF MTPropertySheetBase {
- public:
- virtual inline ~MTPropertySheetBase();
- virtual WBool Create( MTPropertyDialog * prt ) = 0;
- virtual WBool Refresh( const DTObject * obj ) = 0;
- virtual WBool Validate( WString & errMsg ) = 0;
- virtual WBool Update( DTObject * obj ) = 0;
- virtual WBool UpdatePropertyRect() = 0;
- virtual WString GetDescription() = 0;
- virtual WWindow * GetWindow() = 0;
- virtual void PropertyChanged( const WString & name ) = 0;
- };
-
- inline MTPropertySheetBase::~MTPropertySheetBase() {}
-
-
-
- // MTPropertySheet:
- // Implementation of auto-generated property sheets
-
- class METACLASSDEF MTPropertySheet : public WModelessDialog,
- public MTPropertySheetBase
- {
- public:
- MTPropertySheet( const MMPropertySheet * data );
- ~MTPropertySheet();
-
- virtual WBool Create( MTPropertyDialog * prt );
- virtual WString GetDescription();
-
- virtual WBool Refresh( const DTObject * obj );
- virtual WBool Validate( WString & errMsg );
- virtual WBool Update( DTObject * obj );
-
- virtual WBool UpdatePropertyRect();
- virtual void PropertyChanged( const WString & name );
-
- virtual WWindow * GetWindow() { return this; }
- virtual void FocusFirst();
- virtual const MMPropertySheet* GetData() const;
-
- virtual WUInt GetNumControls();
- virtual MTPropertyControl * GetControl( WUInt i );
-
- private:
- const MMPropertySheet * _data;
- MTPropertyControl ** _controls;
- };
-
- #endif // _PROPSHT_HPP
-