home *** CD-ROM | disk | FTP | other *** search
- #ifndef _MMDATA_HPP
- #define _MMDATA_HPP
-
- #ifndef _WNO_PRAGMA_PUSH
- #pragma pack(push,4);
- #pragma enum int;
- #endif
-
- #include "mmdef.hpp"
-
-
- struct MMSize {
- int w; // width
- int h; // height
- };
-
- /************************
- *** Type definitions ***
- ************************/
-
- enum MMDataFlags {
- MTF_None = 0x00000000,
-
- MTF_TypeEnum = 0x00000001, // enumeration type
-
- // component flags
- MTF_ComponentNonVisual = 0x00000002, // component is not a WWindow
- MTF_ComponentNeedClass = 0x00000004, // need GetRegisteredClass call
- MTF_ComponentIsComponent = 0x00000008, // is a "Component"
- MTF_ComponentInvisible = 0x00000010, // not a visible class
-
- // parameter flags
- MTF_ParmOptional = 0x00000020, // parameter not required
- MTF_MethodCtor = 0x00000001, // method is constructor
- MTF_MethodDtor = 0x00000002, // method is destructor
-
- // property flags
- MTF_PropRunTimeCode = 0x00000040, // code required to set
- MTF_PropRunTimeOnly = 0x00000080, // not available at design time
- MTF_PropStyle = 0x00000100, // a style property
- MTF_PropRedrawRequired = 0x00000200, // changing property needs redraw
- MTF_PropReadOnly = 0x00000400, // property is read-only
- MTF_PropWriteOnly = 0x00000800, // property is write-only
- MTF_PropSaved = 0x00001000, // property is saved to file?
- MTF_PropMapped = 0x00002000, // not live at design time
- MTF_PropExtended = 0x00004000, // extended style
- MTF_PropClone = 0x00008000, // clone on set
-
- // method flags
- MTF_MethodDefaultRet = 0x00010000,
-
- // object flags
- MTF_ObjectPublish = 0x00020000,
-
- // property control flags
- MTF_PropCtrlStyle = 0x00040000, // property control for a style
- MTF_PropCtrlHasPush = 0x00080000, // has associated command button
-
- MTF_PropCtrlCheck = 0x00100000, // checkbox
- MTF_PropCtrlRadio = 0x00200000, // radio button
- MTF_PropCtrlCombo = 0x00300000, // combo box
- MTF_PropCtrlEdit = 0x00400000, // edit box
- MTF_PropCtrlTypeMask = 0x00700000, // mask bits for type
- MTF_PropCtrlFirstOption = 0x00800000, // first option button in a group
- MTF_PropCtrlLastOption = 0x01000000, // last option button in a group
-
- // property sheet thunks
- MTF_PropSheetThunkSnapped = 0x02000000, // reference resolved
-
- // reference item flags
- MTF_RefItemComponent = 0x10000000, // MMComponent *
- MTF_RefItemMethod = 0x20000000, // MMMethod *
- MTF_RefItemStyle = 0x30000000, // MMStyle *
- MTF_RefItemProperty = 0x40000000, // MMProperty *
- MTF_RefItemTypeMask = 0x70000000,
-
- MTF_EventOLE = 0x80000000, // event is an OLE event
- MTF_LibraryOLE = MTF_EventOLE, // library is an OLE library
- };
-
-
- /********************
- *** MMCommonData ***
- ********************/
-
- struct MMCommonData {
- MMIndex index; // index of this object
- MMString name; // NULL is invalid
- MMDataFlags flags; // bit-field of flags
- };
-
-
-
- /**********************
- *** MMBaseTypeData ***
- **********************/
-
- struct MMBaseTypeData : public MMCommonData { // 16
- };
-
- /************************
- *** MMEnumeratorData ***
- ************************/
-
- struct MMEnumeratorData : public MMCommonData {
- WDWord value;
- };
-
- /******************
- *** MMTypeData ***
- ******************/
-
- struct MMTypeData : public MMBaseTypeData {
- unsigned numValues; // number of enumerators
- MMIndex firstValue; // index of the first one
- MMString browseName; // name for browse button
- MMDTTypeFnIndex makeFn; // function to make type
- };
-
- /*******************
- *** MMEventData ***
- *******************/
-
- struct MMEventData : public MMCommonData {
- MMString eventIdentifier;
- MMString eventStruct;
- MMString description;
- };
-
- /***********************
- *** MMParameterData ***
- ***********************/
-
- struct MMParameterData : public MMCommonData {
- MMIndex type; // (MMTypeData *)required -- not NULL
- MMString defVal; // default value as text
- };
-
- /**************************
- *** MMParameterSetData ***
- **************************/
-
- struct MMParameterSetData : public MMCommonData {
- MMIndex returnType; // (MMTypeData *)
- unsigned numParameters;
- MMIndex parameters; // (MMParameterData *)
- };
-
- /**************************
- *** MMBasePropertyData ***
- **************************/
-
- struct MMBasePropertyData : public MMCommonData {
- MMIndex type; // (MMTypeData *) pointer to type resolved later
- MMSetFnIndex setFn; // (MMSetPropFn)
- MMGetFnIndex getFn; // (MMGetPropFn)
- MMPropDefFnIndex defFn; // (MMPropDefault)
- WLong defCookie; // default cookie
- WLong priority;
- };
-
- /*******************
- *** MMStyleData ***
- *******************/
-
- struct MMStyleData : public MMBasePropertyData {
- WStyle style;
- WStyle mask;
- MMString resString;
- };
-
-
- /****************
- *** MMHelpID ***
- ****************/
-
- struct MMHelpID {
- MMString file;
- WHelpType command;
- WDWord data;
- };
-
- /**********************
- *** MMPropertyData ***
- **********************/
-
- struct MMPropertyData : public MMBasePropertyData {
- unsigned numParameterSets;
- MMIndex parameterSets; //(MMParameterSetData *)
- MMHelpID helpID;
- MMString defaultMapped;
- };
-
- /********************
- *** MMMethodData ***
- ********************/
-
- struct MMMethodData : public MMCommonData {
- unsigned numParameterSets;
- MMIndex parameterSets; // (MMParameterSetData *)
- MMHelpID helpID;
- };
-
- /*****************************
- *** MMPropertyControlData ***
- *****************************/
-
- struct MMPropertyControlData : public MMCommonData {
- WDWord resourceID;
- MMIndex property; // (const MMBasePropertyData *)
- MMPropCtrlFnIndex makeControl; // (MMMakePropControl)
- WLong priority;
- };
-
- /****************************
- *** MMPropertySheetThunk ***
- ****************************/
-
- struct MMPropertySheetThunk : public MMCommonData {
- MMString component;
- MMString sheet;
- MMIndex snapped;
- };
-
- /***************************
- *** MMPropertySheetData ***
- ***************************/
-
- struct MMPropertySheetData : public MMCommonData {
- MMPropSheetFnIndex makeSheet; // (MMMakePropSheet)
- MMString desc;
- WDWord resourceID;
- unsigned numCtrls;
- MMIndex ctrls; // (const MMPropertyControlData *)
- };
-
- /***************************
- *** MMReferenceNodeData ***
- ***************************/
-
- struct MMReferenceNodeData : public MMCommonData {
- MMIndex item; // (const MMCommonData *)
- MMIndex sibling; // (const MMReferenceNodeData *)
- MMIndex child; // (const MMReferenceNodeData *)
- };
-
-
- /***********************
- *** MMComponentData ***
- ***********************/
-
- enum MMComponentDataSets {
- MMCDS_Events, //(const MMEventData *)
- MMCDS_HotEvents, //(const MMEventData *)
- MMCDS_Styles, //(const MMStyleData *)
- MMCDS_Properties, //(const MMPropertyData *)
- MMCDS_Methods, //(const MMMethodData *)
- MMCDS_PropertySheets, //(const MMPropertySheetData *)
- MMCDS_Includes, // MMIndex *
- MMCDS_DDXTypes, // MMIndex *
- MMCDS_Last
- };
-
- struct MMComponentDataSet {
- WUInt numElements;
- MMIndex elements;
- };
-
- struct MMComponentData : public MMCommonData {
- MMString desc;
- MMString varname;
- MMString toolPage;
- WInt toolPriority;
- MMString refTag;
- MMString baseObject;
- WDWord toolBitmaps[ 3 ];
-
- MMComponentDataSet dataSets[ MMCDS_Last ];
-
- MMIndex ddxProperty;//(const MMPropertyData *)
- MMIndex refNodes; // full hierarchy
-
- MMHelpID helpID;
- WDWord nonVisualResID;
-
- MMSize defSize; // default component size
- MMDTInstFnIndex makeDT; // function index to make DTObj
- MMFindPropFnIndex findProp; // find a property
- MMFindPropFnIndex findStyle; // find a style
- };
-
- /*********************
- *** MMLibraryData ***
- *********************/
-
- enum MMLibraryDataSets {
- MMDS_Enumerators,
- MMDS_Types,
- MMDS_Events,
- MMDS_Styles,
- MMDS_Properties,
- MMDS_Methods,
- MMDS_Parameters,
- MMDS_ParameterSets,
- MMDS_PropertyControls,
- MMDS_PropertySheetThunks,
- MMDS_PropertySheets,
- MMDS_Components,
- MMDS_ReferenceNodes,
- MMDS_StringTables,
- MMDS_Indices,
- MMDS_Library,
- MMDS_Last,
- };
-
- struct MMLibraryDataSet {
- WUInt numElements;
- MMOffset elements;
- };
-
- struct MMLibraryData : public MMCommonData {
- MMLibraryDataSet dataSets[ MMDS_Last ];
-
- //
- WUInt numGblMethods;
- MMIndex gblMethods;
-
- MMIndex refRoot; // root of hierarchy
- MMString refTag;
- MMString description; // describe the library
-
- WUInt numIncludes;
- MMIndex includes; // (MMString *)
- };
-
-
- /***************************
- *** Function Prototypes ***
- ***************************/
-
- extern DTType * METADEF MMStyleGet( const DTObject *, const MMBaseProperty * );
- extern WBool METADEF MMStyleSet( DTObject *, const DTType *,
- const MMBaseProperty * );
- extern MTPropertySheetBase * METADEF MakePropertySheet( const MMPropertySheet * );
- extern MTPropertyControl * METADEF MakePropertyControl( const MMPropertyControl * );
-
- #ifndef _WNO_PRAGMA_PUSH
- #pragma enum pop;
- #pragma pack(pop);
- #endif
-
-
- #endif // _MMDATA_HPP
-