00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Cristin Barghiel 00008 * Side Effects Software Inc. 00009 * 20 Maud St. 00010 * Toronto, Ontario, M5V 2M5 00011 * Canada 00012 * 416-366-4607 00013 * 00014 * NAME: GEO rendering library (C++) 00015 * 00016 * COMMENTS: 00017 * Colors and materials for all kinds of handles. 00018 * 00019 */ 00020 00021 #ifndef __GR_HandleParts_H__ 00022 #define __GR_HandleParts_H__ 00023 00024 #include "GR_API.h" 00025 class UT_Color; 00026 class RE_Material; 00027 class GR_CommonDispOption; 00028 00029 typedef const UT_Color & (GR_CommonDispOption::*GR_CommonColor)(void) const; 00030 00031 class GR_API GR_HandleParts 00032 { 00033 public: 00034 GR_HandleParts(const GR_CommonDispOption &dopt); 00035 ~GR_HandleParts(); 00036 00037 void clearAndDestroy(); 00038 00039 RE_Material &activeMat (int ghost = 0); 00040 RE_Material &selectedMat(int ghost = 0); 00041 RE_Material &inactiveMat(int ghost = 0); 00042 RE_Material &guideMat (int ghost = 0); 00043 00044 RE_Material &boxMat (int ghost = 0); 00045 RE_Material &axisMat (int ghost = 0); 00046 RE_Material &xAxisMat (int ghost = 0); 00047 RE_Material &yAxisMat (int ghost = 0); 00048 RE_Material &zAxisMat (int ghost = 0); 00049 RE_Material &pivotMat (int ghost = 0); 00050 00051 RE_Material &cplaneHandleBorderMat(int ghost = 0); 00052 RE_Material &cplaneHandleXlateMat (int ghost = 0); 00053 RE_Material &cplaneHandleRotateMat(int ghost = 0); 00054 00055 UT_Color &activeColor (int ghost = 0); 00056 UT_Color &selectedColor(int ghost = 0); 00057 UT_Color &inactiveColor(int ghost = 0); 00058 UT_Color &guideColor (int ghost = 0); 00059 00060 UT_Color &axisColor (int ghost = 0); 00061 UT_Color &xAxisColor (int ghost = 0); 00062 UT_Color &yAxisColor (int ghost = 0); 00063 UT_Color &zAxisColor (int ghost = 0); 00064 UT_Color &pivotColor (int ghost = 0); 00065 00066 UT_Color &cplaneHandleBorderColor(int ghost = 0); 00067 UT_Color &cplaneHandleXlateColor (int ghost = 0); 00068 UT_Color &cplaneHandleRotateColor(int ghost = 0); 00069 00070 RE_Material &sliderKnobMaxMat(int ghost = 0); 00071 UT_Color &sliderKnobMaxColor(int ghost = 0); 00072 00073 private: 00074 UT_Color &getColor(int ghost, UT_Color *&color, 00075 UT_Color *&ghostcolor, 00076 GR_CommonColor get); 00077 RE_Material *createAxisMat(const UT_Color &color); 00078 00079 RE_Material *myActiveMat; 00080 RE_Material *mySelectedMat; 00081 RE_Material *myInactiveMat; 00082 RE_Material *myGuideMat; 00083 00084 RE_Material *myBoxMat; 00085 RE_Material *myAxisMat; 00086 RE_Material *myXAxisMat; 00087 RE_Material *myYAxisMat; 00088 RE_Material *myZAxisMat; 00089 RE_Material *myPivotMat; 00090 00091 UT_Color *myActiveColor; 00092 UT_Color *mySelectedColor; 00093 UT_Color *myInactiveColor; 00094 UT_Color *myGuideColor; 00095 00096 UT_Color *myAxisColor; 00097 UT_Color *myXAxisColor; 00098 UT_Color *myYAxisColor; 00099 UT_Color *myZAxisColor; 00100 UT_Color *myPivotColor; 00101 00102 RE_Material *myGhostActiveMat; 00103 RE_Material *myGhostSelectedMat; 00104 RE_Material *myGhostInactiveMat; 00105 RE_Material *myGhostGuideMat; 00106 00107 RE_Material *myGhostBoxMat; 00108 RE_Material *myGhostAxisMat; 00109 RE_Material *myGhostXAxisMat; 00110 RE_Material *myGhostYAxisMat; 00111 RE_Material *myGhostZAxisMat; 00112 RE_Material *myGhostPivotMat; 00113 00114 UT_Color *myGhostActiveColor; 00115 UT_Color *myGhostSelectedColor; 00116 UT_Color *myGhostInactiveColor; 00117 UT_Color *myGhostGuideColor; 00118 00119 UT_Color *myGhostAxisColor; 00120 UT_Color *myGhostXAxisColor; 00121 UT_Color *myGhostYAxisColor; 00122 UT_Color *myGhostZAxisColor; 00123 UT_Color *myGhostPivotColor; 00124 00125 RE_Material *myCplaneHandleXlateMat; 00126 RE_Material *myCplaneHandleRotateMat; 00127 RE_Material *myCplaneHandleBorderMat; 00128 00129 RE_Material *myGhostCplaneHandleXlateMat; 00130 RE_Material *myGhostCplaneHandleRotateMat; 00131 RE_Material *myGhostCplaneHandleBorderMat; 00132 00133 UT_Color *myCplaneHandleXlateColor; 00134 UT_Color *myCplaneHandleRotateColor; 00135 UT_Color *myCplaneHandleBorderColor; 00136 00137 UT_Color *myGhostCplaneHandleXlateColor; 00138 UT_Color *myGhostCplaneHandleRotateColor; 00139 UT_Color *myGhostCplaneHandleBorderColor; 00140 00141 RE_Material *mySliderKnobMaxMat; 00142 RE_Material *myGhostSliderKnobMaxMat; 00143 UT_Color *mySliderKnobMaxColor; 00144 UT_Color *myGhostSliderKnobMaxColor; 00145 00146 const GR_CommonDispOption &myDisplayOpt; // our color source 00147 }; 00148 00149 #endif
1.5.9