home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 October
/
Chip_1997-10_cd.bin
/
tema
/
sybase
/
powerj
/
hpp.z
/
MMDATA.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-01-27
|
14KB
|
428 lines
#ifndef _MMDATA_HPP
#define _MMDATA_HPP
#ifndef _WNO_PRAGMA_PUSH
#pragma pack(push,4);
#pragma enum int;
#endif
#include "mmdef.hpp"
//
// If you modify MMData layout or MDReader output, up this version #!
//
#define CURRENT_COMPDLL_VERSION (0xfeed0004)
struct MMSize {
int w; // width
int h; // height
};
/************************
*** Type definitions ***
************************/
#pragma enum int;
//
// Talk to Ivan before adding to this enum. I mean it.
//
enum MMDataFlags {
MTF_None = 0x00000000,
MTF_TypeEnum = 0x00000001, // enumeration type
MTF_TypeDesignTime = 0x00000002, // type is available at DT
// MMComponent flags
MTF_ComponentNonVisual = 0x00000001, // component is not a WWindow
MTF_ComponentNeedClass = 0x00000002, // need GetRegisteredClass call
MTF_ComponentIsComponent = 0x00000004, // is a "Component"
MTF_ComponentInvisible = 0x00000008, // not a visible class
MTF_ComponentRequireForm = 0x00000010, // don't put it on a visual class
MTF_ComponentEventOverride= 0x00000020, // event data structure overrides
// MMParameter flags
MTF_ParmOptional = 0x00000001, // parameter not required
// MMProperty flags
MTF_PropRunTimeCode = 0x00000001, // code required to set
MTF_PropRunTimeOnly = 0x00000002, // not available at design time
MTF_PropStyle = 0x00000004, // a style property
MTF_PropRedrawRequired = 0x00000008, // changing property needs redraw
MTF_PropReadOnly = 0x00000010, // property is read-only
MTF_PropWriteOnly = 0x00000020, // property is write-only
MTF_PropSaved = 0x00000040, // property is saved to file?
MTF_PropMapped = 0x00000080, // not live at design time
MTF_PropExtended = 0x00000100, // extended style
MTF_PropClone = 0x00000200, // clone on set
MTF_PropFDXEnabled = 0x00000400, // property can be FDX enabled
// MMMethod flags
MTF_MethodDefaultRet = 0x00000001,
// MMEvent flags
MTF_EventOverride = 0x00000001, // event data structure overrides
MTF_EventOLE = 0x00000002, // event is an OLE event
// MMPropertyControl flags
MTF_PropCtrlStyle = 0x00000001, // property control for a style
MTF_PropCtrlHasPush = 0x00000002, // has associated command button
MTF_PropCtrlFirstOption = 0x00000004, // first option button in a group
MTF_PropCtrlLastOption = 0x00000008, // last option button in a group
MTF_PropCtrlCustom = 0x00000010, // custom control
MTF_PropCtrlHalfWidth = 0x00000020, // takes full dialog width
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
// MMPropertyGroup flags
MTF_PropGroupHasGroupbox = 0x00000001, // group displays a groupbox
MTF_PropGroupHalfWidth = 0x00000002, // group occupies full width
// MMPropertySheet flags
MTF_PropSheetCustom = 0x00000001, // page is custom
// MMPropertySheetThunk flags
MTF_PropSheetThunkSnapped = 0x00000001, // reference resolved
// MMReferenceItem flags
MTF_RefItemComponent = 0x10000000, // MMComponent *
MTF_RefItemMethod = 0x20000000, // MMMethod *
MTF_RefItemStyle = 0x30000000, // MMStyle *
MTF_RefItemProperty = 0x40000000, // MMProperty *
MTF_RefItemTypeMask = 0x70000000,
// MMFunction flags
MTF_FunctionSnapped = 0x00000001, // string was snapped into pointer
// MMLibrary tags
MTF_LibraryOLE = 0x00000001, // library is an OLE library
MTF_HasNoRuntime = 0x00000002, // has a runtime
};
#pragma enum pop;
/********************
*** MMCommonData ***
********************/
struct MMCommonData {
MMIndex index; // index of this object
MMString name; // NULL is invalid
MMDataFlags flags; // bit-field of flags
};
/**********************
*** MMFunctionData ***
**********************/
typedef void (*MMFnPtr)();
struct MMFunctionData {
MMFnPtr function;
MMString name; // NULL is invalid
MMDataFlags flags; // bit-field of flags
MMString libraryName;// may not be valid if already snapped
};
/**********************
*** MMBaseTypeData ***
**********************/
struct MMBaseTypeData : public MMCommonData { // 12
};
/************************
*** MMEnumeratorData ***
************************/
struct MMEnumeratorData : public MMCommonData { // 16
WDWord value;
};
/******************
*** MMTypeData ***
******************/
struct MMTypeData : public MMBaseTypeData { // 28
unsigned numValues; // number of enumerators
MMIndex firstValue; // index of the first one
MMString browseName; // name for browse button
MMDTTypeFnIndex makeFn; // function to make type
MMString typeName; // the friendly name of the DT-Type class
};
/*******************
*** MMEventData ***
*******************/
struct MMEventData : public MMCommonData {
MMString eventIdentifier;
MMString eventStruct;
MMString description;
MMIndex firstEventOverride;
MMIndex parameterSets; // (MMParameterSetData *)
};
/***************************
*** MMOverrideEventData ***
***************************/
struct MMEventOverrideData : public MMCommonData {
MMIndex event;
MMIndex metaObject;
};
/***********************
*** 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 *)
};
/****************
*** MMHelpID ***
****************/
struct MMHelpID {
MMString file;
WHelpType command;
WDWord data;
};
/**************************
*** 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;
WLong contextHelpID;
};
/*******************
*** MMStyleData ***
*******************/
struct MMStyleData : public MMBasePropertyData {
WStyle style;
WStyle mask;
MMString resString;
};
/**********************
*** MMPropertyData ***
**********************/
struct MMPropertyData : public MMBasePropertyData {
unsigned numParameterSets;
MMIndex parameterSets; //(MMParameterSetData *)
MMHelpID helpID;
MMString defaultMapped; // initial value if deferred
MMPropMakeEditorFnIndex makeEditorFn; // (MMPropMakeEditor)
};
/********************
*** MMMethodData ***
********************/
struct MMMethodData : public MMCommonData {
unsigned numParameterSets;
MMIndex parameterSets; // (MMParameterSetData *)
MMHelpID helpID;
};
/*****************************
*** MMPropertyControlData ***
*****************************/
struct MMPropertyControlData : public MMCommonData {
WDWord resourceID;
MMIndex property; // (const MMBasePropertyData *)
MMString label;
MMPropCtrlFnIndex makeControl; // (MMMakePropControl)
WLong priority;
};
/***************************
*** MMPropertyGroupData ***
***************************/
struct MMPropertyGroupData : public MMCommonData {
MMString description;
MMIndex firstControl;
WUInt numControl;
};
/****************************
*** MMPropertySheetThunk ***
****************************/
struct MMPropertySheetThunk : public MMCommonData {
MMString component;
MMString sheet;
MMIndex snapped;
};
/***************************
*** MMPropertySheetData ***
***************************/
struct MMPropertySheetData : public MMCommonData {
MMPropSheetFnIndex makeSheet; // (MMMakePropSheet)
MMString desc;
WDWord resourceID;
WUInt numCtrls;
MMIndex ctrls; // (const MMPropertyControlData *)
WUInt numGroups;
MMIndex firstGroup;
};
/***************************
*** 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;
MMString toolPalette;
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
MMString reserved;
};
/*********************
*** MMLibraryData ***
*********************/
enum MMLibraryDataSets {
MMDS_Enumerators,
MMDS_Types,
MMDS_Events,
MMDS_EventOverrides,
MMDS_Styles,
MMDS_Properties,
MMDS_Methods,
MMDS_Parameters,
MMDS_ParameterSets,
MMDS_PropertyControls,
MMDS_PropertyGroups,
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 {
WULong compdllVersion;
WULong libVersion;
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 *)
MMLanguage language; // Cpp or Java or ...
};
/***************************
*** Function Prototypes ***
***************************/
extern DTType * METAEXPORTDEF MMStyleGet( const DTObject *, const MMBaseProperty * );
extern WBool METAEXPORTDEF MMStyleSet( DTObject *, const DTType *,
const MMBaseProperty * );
extern MTPropertySheetBase * METAEXPORTDEF MakePropertySheet( const MMPropertySheet * );
extern MTPropertyControl * METAEXPORTDEF MakePropertyControl( const MMPropertyControl * );
#ifndef _WNO_PRAGMA_PUSH
#pragma enum pop;
#pragma pack(pop);
#endif
#endif // _MMDATA_HPP