00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #pragma once
00016 #include "maxheap.h"
00017 #include <WTypes.h>
00018 #include "maxtypes.h"
00019 #include "coreexp.h"
00020 #include "custcont.h"
00021 #include "paramtype.h"
00022
00023
00024 class IParamMap;
00025 class IRendParams;
00026 class IParamArray;
00027 class ParamDimension;
00028 CoreExport extern ParamDimension* defaultDim;
00029
00030
00031
00032
00039 class ParamMapUserDlgProc: public MaxHeapOperators {
00040 public:
00042 virtual ~ParamMapUserDlgProc() {}
00062 virtual INT_PTR DlgProc(TimeValue t,IParamMap *map,HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)=0;
00066 virtual void DeleteThis()=0;
00081 virtual void Update(TimeValue t) { UNUSED_PARAM(t); }
00082 };
00083
00084
00085 #define REDRAW_VIEWS 2
00086
00087
00088
00100 class IParamMap: public MaxHeapOperators {
00101 public:
00103 virtual ~IParamMap() {}
00104
00105
00110 virtual void Invalidate()=0;
00111
00112
00126 virtual void SetParamBlock(IParamArray* pb)=0;
00127
00128
00129
00130
00131
00143 virtual void SetUserDlgProc(ParamMapUserDlgProc *proc=NULL)=0;
00144 virtual ParamMapUserDlgProc *GetUserDlgProc()=0;
00145
00146
00160 virtual void SetPBlockIndex(int mapIndex, int blockIndex)=0;
00161
00162
00165 virtual HWND GetHWnd()=0;
00166
00167
00171 virtual IParamArray *GetParamBlock()=0;
00172
00173
00174 virtual BOOL DlgActive()=0;
00175 };
00176
00177
00178
00179
00180
00181 #define SPIN_AUTOSCALE -1.0f
00182
00192 class ParamUIDesc: public MaxHeapOperators {
00193 public:
00194
00227 CoreExport ParamUIDesc(
00228 int index,EditSpinnerType spinType,int idEdit,int idSpin,
00229 float lowLim,float highLim,float scale,ParamDimension* dim = defaultDim);
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00266 CoreExport ParamUIDesc(
00267 int index, ControlType type, int* ctrlIDs, int count, int* vals = NULL);
00268
00269
00270
00288 CoreExport ParamUIDesc(int index,ControlType type,int id);
00289
00290
00331 CoreExport ParamUIDesc(int index,
00332 EditSpinnerType spinType,
00333 int idEdit1,int idSpin1,
00334 int idEdit2,int idSpin2,
00335 int idEdit3,int idSpin3,
00336 float lowLim, float highLim, float scale,
00337 ParamDimension* dim = defaultDim);
00338
00339
00340 int pbIndex;
00341 ParamType ptype;
00342 ControlType ctype;
00343 int id[6];
00344 int *ids;
00345 int *vals;
00346 int count;
00347
00348 EditSpinnerType spinType;
00349 float lowLim;
00350 float highLim;
00351 float scale;
00352 ParamDimension *dim;
00353 };
00354
00355
00356
00357
00358
00384 CoreExport BOOL CreateModalParamMap(
00385 ParamUIDesc *desc,int count,
00386 IParamArray *pb,
00387 TimeValue t,
00388 HINSTANCE hInst,
00389 MCHAR *dlgTemplate,
00390 HWND hParent,
00391 ParamMapUserDlgProc *proc=NULL);
00392
00393
00394
00395
00396
00397
00398
00422 CoreExport IParamMap *CreateCPParamMap(
00423 ParamUIDesc *desc,int count,
00424 IParamArray *pb,
00425 Interface *ip,
00426 HINSTANCE hInst,
00427 MCHAR *dlgTemplate,
00428 MCHAR *title,
00429 DWORD flags);
00430
00431
00457 CoreExport IParamMap *ReplaceCPParamMap(
00458 HWND oldhw,
00459 ParamUIDesc *desc,int count,
00460 IParamArray *pb,
00461 Interface *ip,
00462 HINSTANCE hInst,
00463 MCHAR *dlgTemplate,
00464 MCHAR *title,
00465 DWORD flags);
00466
00472 CoreExport void DestroyCPParamMap(IParamMap *m);
00473
00474
00475
00476
00500 CoreExport IParamMap *CreateRParamMap(
00501 ParamUIDesc *desc,int count,
00502 IParamArray *pb,
00503 IRendParams *ip,
00504 HINSTANCE hInst,
00505 MCHAR *dlgTemplate,
00506 MCHAR *title,
00507 DWORD flags);
00514 CoreExport void DestroyRParamMap(IParamMap *m);
00515
00516 class IMtlParams;
00517
00518
00519
00544 CoreExport IParamMap *CreateMParamMap(
00545 ParamUIDesc *desc,int count,
00546 IParamArray *pb,
00547 IMtlParams *ip,
00548 HINSTANCE hInst,
00549 MCHAR *dlgTemplate,
00550 MCHAR *title,
00551 DWORD flags);
00558 CoreExport void DestroyMParamMap(IParamMap *m);
00559
00560
00561
00562
00563
00564