Go to
the documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024
00025 #include "point3.h"
00026 #include <limits.h>
00027 #include "CoreExport.h"
00028 #include "maxheap.h"
00029 #include "strbasic.h"
00030
00031
00032 class ShapeObject;
00033 class Spline3D;
00034
00035
00036
00037 enum STYPE { SPACE_CENTER, SPACE_EDGE };
00038 enum OTYPE { NODE_CPY, NODE_INST, NODE_REF };
00039 enum CTYPE { CTXT_FREE, CTXT_CNTRCOUNT, CTXT_CNTRSPACE,
00040 CTXT_END, CTXT_ENDCOUNT, CTXT_ENDSPACE,
00041 CTXT_START, CTXT_STARTCOUNT, CTXT_STARTSPACE,
00042 CTXT_FULLSPACE, CTXT_FULLCOUNT, CTXT_ENDLOCK,
00043 CTXT_ENDLOCKCOUNT, CTXT_ENDLOCKSPACE, CTXT_STARTLOCK,
00044 CTXT_STARTLOCKCOUNT, CTXT_STARTLOCKSPACE,
00045 CTXT_FULLLOCKSPACE, CTXT_FULLLOCKCOUNT,};
00046
00047
00048
00050
00051
00067 class SpaceArrayCallback: public MaxHeapOperators
00068 {
00069 private:
00070 ShapeObject * path;
00071 float start, end, space;
00072 int count;
00073 OTYPE oType;
00074 bool follow;
00075 STYPE sType;
00076 CTYPE context;
00077 float width;
00078 char buffer[100];
00079 int countLimit;
00080
00081 public:
00086 SpaceArrayCallback() { path = NULL; start = end = space = 0.0f; count = 1; oType = NODE_CPY; sType = SPACE_CENTER; follow = false;
00087 context = CTXT_FREE; width = 0.0f; countLimit = INT_MAX; }
00089 virtual ~SpaceArrayCallback() {}
00090
00091
00096 virtual bool isModal(void) { return true; }
00101 virtual bool doPickPath(void) { return false; }
00106 virtual MCHAR * dialogTitle(void) { return _M(""); }
00112 virtual MCHAR * startMessage(void) { return _M(""); }
00117 virtual MCHAR * buttonText(void) { return _M("OK"); }
00124 virtual bool isSilent(void) { return false; }
00130 virtual bool doObjectType(void) { return true; }
00137 virtual void proc(void) {}
00138
00139
00142 ShapeObject * getPath(void) { return path; }
00148 void setPath(ShapeObject * p) { path = p; }
00156 CoreExport void setPath(Point3 pt1, Point3 pt2);
00162 CoreExport void setPath(Spline3D *s);
00165 float getStart(void) { return start; }
00168 float getEnd(void) { return end; }
00171 float getSpace(void) { return space; }
00174 int getCount(void) { return count; }
00177 int getContext(void) { return context; }
00182 float getWidth(void) { return width; }
00188 void setStart(float f) { start = f; }
00194 void setEnd(float f) { end = f; }
00200 void setSpace(float f) { space = f; }
00206 void setCount(int n) { count = n > countLimit ? countLimit : n; }
00209 bool getFollow(void) { return follow; }
00215 void setFollow(bool t) { follow = t; }
00240 void setContext(CTYPE c) { context = c; }
00246 OTYPE getObjectCreationType(void) { return oType; }
00252 void setObjectCreationType(OTYPE t) { oType = t; }
00257 STYPE getSpacingType(void){ return sType; }
00265 void setSpacingType(STYPE s) { sType = s; }
00268 CoreExport void setMessage(char * buf);
00274 void setWidth(float nWidth) { width = nWidth; }
00280 void setCountLimit(int limit) { countLimit = limit; }
00283 int getCountLimit(void) { return countLimit; }
00284 };
00285