00001 /** 00002 * \file gre/base.h <gre/base.h> 00003 * \brief Base GRE definitions 00004 * 00005 * \if NODOC 00006 * $Id: base.h_v 1.56 2006/12/11 16:28:12 mju Exp $ 00007 * 00008 * $Log: base.h_v $ 00009 * Revision 1.56 2006/12/11 16:28:12 mju 00010 * Remove unused deprecated typedefs. 00011 * 00012 * Revision 1.55 2006/12/08 14:29:57 mju 00013 * Remove unused legacy typedefs. 00014 * 00015 * Revision 1.54 2006/12/05 16:05:50 mju 00016 * Remove unused deprecated typedef. 00017 * 00018 * Revision 1.53 2006/09/28 13:47:34 mju 00019 * Don't need elemparms hdr here anymore. 00020 * 00021 * Revision 1.52 2006/09/27 17:03:43 mju 00022 * Remove unused legacy names. 00023 * 00024 * Revision 1.51 2006/09/21 22:00:42 mju 00025 * Move element parameters and their required headers to elemparms hdr. 00026 * 00027 * Revision 1.50 2006/09/18 13:53:02 mju 00028 * Use styletype hdr. 00029 * 00030 * Revision 1.49 2006/09/15 17:57:46 mju 00031 * Add geometric3d decl. 00032 * 00033 * Revision 1.48 2006/09/15 15:29:30 mju 00034 * Add serializerbase hdr. 00035 * 00036 * Revision 1.47 2006/09/14 17:18:12 mju 00037 * Fwd decl scriptcontext. 00038 * 00039 * Revision 1.46 2006/09/08 20:03:04 mju 00040 * Fwd declare wireframe. 00041 * 00042 * Revision 1.45 2006/04/13 16:24:28 dwilliss 00043 * doxygen problem 00044 * 00045 * Revision 1.44 2006/03/31 16:14:46 mju 00046 * Had red/blue swapped in uicolor values. 00047 * 00048 * Revision 1.43 2006/03/24 16:17:02 mju 00049 * Add datatip predefined enum and member. 00050 * 00051 * Revision 1.42 2006/02/21 18:35:21 mju 00052 * Mark datatipparms.unitSTored for deletion. 00053 * 00054 * Revision 1.41 2006/01/10 21:27:30 mju 00055 * Add uicolor defns. 00056 * 00057 * Revision 1.40 2005/11/14 21:49:30 mju 00058 * Exclude deprecated items if deprecate_all defined. 00059 * 00060 * Revision 1.39 2005/11/11 22:51:25 mju 00061 * Remove group namelen constant. 00062 * 00063 * Revision 1.38 2005/11/04 18:51:38 mju 00064 * Put rest of gre enums in namespace. 00065 * 00066 * Revision 1.37 2005/11/03 15:41:11 mju 00067 * Remove last mfc defn. 00068 * 00069 * Revision 1.36 2005/11/02 23:00:34 mju 00070 * Remove objmgr stuff. 00071 * 00072 * Revision 1.35 2005/11/02 21:32:02 mju 00073 * Remove most mfc stuff. 00074 * 00075 * Revision 1.34 2005/10/27 13:31:28 mju 00076 * Deprecate legacy typedefs. 00077 * 00078 * Revision 1.33 2005/10/14 17:29:53 mju 00079 * GRE namespace. 00080 * 00081 * Revision 1.31 2005/09/14 21:52:59 mju 00082 * Add rendertarget_GroupActiveElems. 00083 * 00084 * Revision 1.30 2005/07/19 17:05:54 mju 00085 * Add rendertarget_GroupMatte. 00086 * 00087 * Revision 1.29 2005/05/20 20:31:47 mju 00088 * Change datatip member to positive name. 00089 * 00090 * Revision 1.28 2005/05/17 17:35:58 mju 00091 * Add noHighlight to datatipparms. 00092 * 00093 * Revision 1.27 2005/05/03 15:02:17 mju 00094 * Add rendertarget_None. 00095 * 00096 * Revision 1.26 2005/05/02 17:43:28 mju 00097 * Add drawflag_useDataTipColor. 00098 * 00099 * Revision 1.25 2005/04/29 18:07:10 mju 00100 * Fix enum order. 00101 * 00102 * Revision 1.24 2005/04/29 17:49:06 mju 00103 * Add rendertarget enum. 00104 * 00105 * Revision 1.23 2005/03/31 16:57:05 fileserver!dwilliss 00106 * Rename one of our types to MIUNICODE because it conflicted with a Microsoft #define 00107 * 00108 * Revision 1.22 2005/03/01 22:59:45 scowan 00109 * Removed unused all background flag. 00110 * 00111 * Revision 1.21 2005/03/01 14:20:27 mju 00112 * Remove unused/unneeded drawflag values. 00113 * 00114 * Revision 1.20 2005/02/24 18:52:07 mju 00115 * Add drawflag_erase. 00116 * 00117 * Revision 1.19 2005/02/23 16:55:45 mju 00118 * Add drawflag_onlyHighlighted. 00119 * 00120 * Revision 1.18 2005/02/21 18:45:55 mju 00121 * Add drawflags for noHighlighting and includeUnhighlighted. 00122 * 00123 * Revision 1.17 2005/02/18 22:34:10 mju 00124 * Add drawflag_ViewInView. 00125 * 00126 * Revision 1.16 2005/02/18 17:05:51 mju 00127 * Add drawflag_NoUpdateScreen. 00128 * 00129 * Revision 1.15 2005/02/15 15:37:50 mju 00130 * Remove unused drawflags. 00131 * 00132 * Revision 1.14 2005/02/14 18:52:31 mju 00133 * Add groupview decl. 00134 * 00135 * Revision 1.13 2005/01/20 16:53:37 mju 00136 * Add enums for listpos, drawflags, highlightmode. 00137 * Move some defns here from mdisp. 00138 * 00139 * Revision 1.12 2004/07/21 21:55:39 mju 00140 * Add layerview decl, move labelplacement decls here. 00141 * 00142 * Revision 1.11 2004/04/30 14:04:23 mju 00143 * Fwd declare callback_msg. 00144 * 00145 * Revision 1.10 2004/03/12 20:51:01 mju 00146 * Add copy ctor/op= for datatipparms. 00147 * 00148 * Revision 1.9 2004/03/12 18:19:26 mju 00149 * Change datatipparms prefix/suffix to be mistring. 00150 * 00151 * Revision 1.8 2004/03/04 18:57:24 mju 00152 * Move more shared stuff here. 00153 * 00154 * Revision 1.7 2004/02/06 16:00:50 mju 00155 * Add GRE_FIND_FLAGS enum. 00156 * 00157 * Revision 1.4 2003/09/15 13:48:59 fileserver!dwilliss 00158 * Doxygen 00159 * 00160 * Revision 1.3 2003/07/30 14:43:49 mju 00161 * Ignore forward decls. 00162 * 00163 * Revision 1.1 2003/06/16 19:39:13 mju 00164 * Initial revision 00165 * \endif 00166 **/ 00167 00168 #ifndef INC_GRE_BASE_H 00169 #define INC_GRE_BASE_H 00170 00171 #ifndef INC_MI32_STDDEFNS_H 00172 #include <mi32/stddefns.h> 00173 #endif 00174 00175 00176 #ifndef GENERATING_DOXYGEN_OUTPUT 00177 // Forward-declare classes. 00178 00179 namespace GRE { 00180 struct AUTOLABELPARMS; 00181 class CTRL_TREEVIEW; 00182 struct DATATIPPARMS; 00183 class ELEMSAMPLE_DC; 00184 class GEOMETRIC3D; 00185 class GROUP; 00186 class GROUPVIEW; 00187 struct LABELPARMS; 00188 class LABELPLACE; 00189 class LABELPLACEMENT; 00190 class LAYER; 00191 class LAYER_CAD; 00192 class LAYER_FORMULA; 00193 class LAYER_LEGEND; 00194 class LAYER_LEGEND2; 00195 class LAYER_MAPGRID; 00196 class LAYER_PINMAP; 00197 class LAYER_RASTER; 00198 class LAYER_REGION; 00199 class LAYER_SCALEBAR; 00200 class LAYER_SCRIPT; 00201 class LAYER_SHAPE; 00202 class LAYER_SKETCH; 00203 class LAYER_SURFACE; 00204 class LAYER_TEXT; 00205 class LAYER_TIN; 00206 class LAYER_VECTOR; 00207 class LAYERDC; 00208 class LAYERVIEW; 00209 class LAYOUT; 00210 class LEGEND; 00211 struct LEGENDPARMS; 00212 struct LINEPARMS; 00213 class MSG; 00214 class OBJECT; 00215 struct POINTPARMS; 00216 struct POLYPARMS; 00217 class SCRIPTCONTEXT_DRAW; 00218 class SCRIPTCONTEXT_STYLE; 00219 struct SELECTPARMS; 00220 struct STYLEPARMS; 00221 class TOOL; 00222 class VIEW; 00223 class VIEWABLE; 00224 class VIEWPOINT3D; 00225 class WIREFRAME; 00226 } 00227 00228 #endif // GENERATING_DOXYGEN_OUTPUT 00229 00230 00231 #define GRE_SERIAL_VERSION 3 00232 00233 namespace GRE { 00234 00235 //! Position in list for use in creation and reordering. 00236 enum LISTPOS { 00237 LISTPOS_First = 0, 00238 LISTPOS_After = 1, 00239 LISTPOS_Before = 2, 00240 LISTPOS_Last = 3 00241 }; 00242 00243 //! Condition for redrawing views. 00244 enum DRAWCONDITION { 00245 DRAWCONDITION_Always, //!< Always draw 00246 DRAWCONDITION_IfNeeded, //!< Only draw if has changed 00247 DRAWCONDITION_IfAutoUpdate //!< Only draw if auto-update preference is on and has changed 00248 }; 00249 00250 //! Drawing flags. 00251 enum DRAWFLAGS { 00252 DRAWFLAG_None = 0x00000000, 00253 DRAWFLAG_ViewInView = 0x00000001, //!< Draw to view-in-view buffer 00254 DRAWFLAG_OnlyHighlighted = 0x00000002, //!< Only draw 'highlighted' elements 00255 DRAWFLAG_Erase = 0x00000010, //!< Erase elements (for GRE::VIEW::DrawLayerElement/s) 00256 DRAWFLAG_ForceDraw = 0x00000020, //!< Force all specified elements to draw even if not "selected" 00257 DRAWFLAG_UpdateSearchTree = 0x00000040, //!< Update search tree when drawing even if in tree already 00258 DRAWFLAG_UpdateScreen = 0x00000080, //!< Refresh screen after drawing 00259 DRAWFLAG_NoUpdateScreen = 0x00000100, //!< Disable screen refresh after drawing 00260 DRAWFLAG_NoHighlighting = 0x00000200, //!< Draw elements without highlighting 00261 DRAWFLAG_UpdateBuffers = 0x00000400, //!< Update render buffers 00262 DRAWFLAG_SelectChanged = DRAWFLAG_UpdateBuffers, 00263 DRAWFLAG_AllNonLocViews = 0x00001000, //!< Draw all non-locator views 00264 DRAWFLAG_NoMessage = 0x00004000, //!< Don't display messages while drawing 00265 DRAWFLAG_Wireframe = 0x00008000, //!< Only draw wireframes 00266 DRAWFLAG_NoResumeTool = 0x00010000, //!< Don't "resume" tool after drawing view 00267 DRAWFLAG_NoBlankScreen = 0x00040000, //!< Don't "blank" screen when start drawing view 00268 DRAWFLAG_NoCallbacks = 0x00400000, //!< Don't invoke callback lists while drawing 00269 DRAWFLAG_CheckDrawnSet = 0x00800000, //!< Check "drawn" set for highlighting 00270 DRAWFLAG_ReduceSpeckle3D = 0x01000000, //!< Perform 3D background speckle reduction 00271 DRAWFLAG_UseDataTipColor = 0x02000000, //!< Draw in 'datatip element' color. 00272 DRAWFLAG_UseHighlightColor = 0x04000000, //!< Draw elements in "highlight" color 00273 DRAWFLAG_UseActiveColor = 0x08000000, //!< Draw element in "active" color 00274 DRAWFLAG_NoCheckVisible = 0x10000000, //!< Don't check visiblity of layer/group in view 00275 DRAWFLAG_LabelPlacementPass = 0x20000000, //!< Internal use: 2nd pass to render just labels 00276 }; 00277 DEFINE_ENUM_OP_BITWISE(DRAWFLAGS) 00278 00279 //! Flags for "find" methods. 00280 enum FINDFLAGS { 00281 FINDFLAG_ViewCoords = 0x0000, //!< Point given in "view" coordinates 00282 FINDFLAG_DisplayCoords = 0x0001, //!< Point given in "display" coordinates 00283 FINDFLAG_LayerCoords = 0x0002, //!< Point given in "layer" (object) coordinates 00284 FINDFLAG_UseClosest = 0x0004, //!< Return closest if no other found 00285 FINDFLAG_NoSingleLayer = 0x0008, //!< Don't check single-layer groups 00286 FINDFLAG_No3D = 0x0010, //!< Don't check 3-D groups 00287 FINDFLAG_SearchDrawnSet = 0x0020, //!< Only search the "drawn" element set 00288 FINDFLAG_MapCoords = 0x0040 //!< Point given in "map" coordinates 00289 }; 00290 DEFINE_ENUM_OP_BITWISE(FINDFLAGS) 00291 00292 //! Targets for rendering individual elements. 00293 enum RENDERTARGET { 00294 RENDERTARGET_None = 0x0000, 00295 RENDERTARGET_LayerNormal = 0x0001, //!< Layer buffer for unhighlighted elements 00296 RENDERTARGET_LayerHighlight = 0x0002, //!< Layer buffer for highlighted elements 00297 RENDERTARGET_LayerLabel = 0x0004, //!< Layer buffer for labels 00298 RENDERTARGET_LayerAll = 0x0007, //!< All layer buffers 00299 RENDERTARGET_Group = 0x0010, //!< Group combined buffer 00300 RENDERTARGET_GroupActiveElems = 0x0020, //!< Group 'active elements' buffer 00301 RENDERTARGET_GroupMatte = 0x0040, //!< Group matte buffer 00302 RENDERTARGET_GroupOverlay = 0x0080, //!< Group overlay buffer 00303 RENDERTARGET_GroupAll = 0x00F0, //!< All group buffers 00304 RENDERTARGET_ViewMemory = 0x1000, //!< View memory buffer 00305 RENDERTARGET_ViewScreen = 0x8000 //!< View screen (unbuffered) 00306 }; 00307 DEFINE_ENUM_OP_BITWISE(RENDERTARGET) 00308 00309 //! Mode for highlighing elements. 00310 enum HIGHLIGHTMODE { 00311 HIGHLIGHTMODE_NotSet = 0, //!< Not set, use parent's setting 00312 HIGHLIGHTMODE_Replace = 1, //!< Replace selected set with elements provided 00313 HIGHLIGHTMODE_Add = 2, //!< Add elements provided to selected set 00314 HIGHLIGHTMODE_Subtract = 3, //!< Subtract elements from selected set 00315 HIGHLIGHTMODE_Toggle = 4, //!< Toggle selection status of elements 00316 }; 00317 00318 // Colors for user interface elements. 00319 const UINT32 UICOLOR_TextNormal = 0x00000000; 00320 const UINT32 UICOLOR_TextDim = 0x00505050; // Gray 00321 const UINT32 UICOLOR_TextNotVisibleAtScale = 0x00208020; // Dark Green 00322 const UINT32 UICOLOR_TextNotInExtent = 0x00800000; // Dark Blue 00323 const UINT32 UICOLOR_TextNotYetRendered = 0x000000A0; // Red 00324 const UINT32 UICOLOR_TextEditable = 0x00800080; // Purple 00325 00326 00327 #define MDISPSELECT_ViewCoords 0x0000 //!< Point(s) in "view" coordinates 00328 #define MDISPSELECT_DisplayCoords 0x0001 //!< Point(s) in "display" coordinates 00329 #define MDISPSELECT_AutoOpenDefaultLayer 0x0002 //!< Automatically make "default" layer elements selectable 00330 #define MDISPSELECT_AutoOpenActiveLayer 0x0004 //!< Automatically make "active" layer elements selectable 00331 #define MDISPSELECT_AutoOpenTable 0x0008 //!< Automatically open table(s) for selectable element types 00332 00333 #define MDISPVISIBLE_AllViews 0xFFFFFFFF 00334 #define MDISPVISIBLE_Locator 0x00000001 00335 #define MDISPVISIBLE_Hardcopy 0x80000000 00336 00337 //=================================================================================================================== 00338 } // End namespace GRE 00339 00340 #endif // INC_GRE_BASE_H
1.5.2