GME  13
GMEStd.h
Go to the documentation of this file.
00001 #ifndef _GMESTD_INCLUDED_
00002 #define _GMESTD_INCLUDED_
00003 
00004 #include "afxcoll.h"
00005 #include "afxtempl.h"
00006 
00007 #include "meta.h"
00008 #define IMgaContainer IMgaObject
00009 #include "mga.h"
00010 #include "..\Annotator\AnnotationDefs.h"
00011 #include "..\..\SDK\Decoratorlib\DecoratorDefs.h"
00012 #include "CommonSmart.h"
00013 
00014 /*
00015         ATTENTION !
00016 
00017         There is a similar file in Annotator, MgaDecorators, SDK/DecoratorLib (DecoratorStd.h) and in GMEView (GMEViewStd.h)
00018         Modify/extend this file carefully !
00019 */
00020 typedef enum { GME_EDIT_MODE, GME_AUTOCONNECT_MODE, GME_DISCONNECT_MODE, GME_SET_MODE, GME_ZOOM_MODE, GME_VISUAL_MODE, GME_SHORTAUTOCONNECT_MODE, GME_SHORTDISCONNECT_MODE } GMEModeCode;
00021 typedef enum { GME_CMD_CONTEXT } GMECommandCode;
00022 typedef enum { GME_LEFT_SIDE, GME_TOP_SIDE, GME_RIGHT_SIDE, GME_BOTTOM_SIDE, GME_SIDE_NUM } GMESizeCode;
00023 typedef enum { GME_RIGHT_DIRECTION = 0, GME_LEFT_DIRECTION, GME_DOWN_DIRECTION, GME_UP_DIRECTION, GME_DIRECTION_NUM } GMEDirectionCode;
00024 typedef enum { GME_NAME_FONT = 0, GME_PORTNAME_FONT, GME_CONNLABEL_FONT, GME_FONT_KIND_NUM } GMEFontKind;
00025 typedef enum { GME_LINE_SOLID = 0, GME_LINE_DASH, GME_LINE_CUSTOMIZED } GMEConnLineType;
00026 
00027 #define GME_BACKGROUND_COLOR            RGB(0xff, 0xff, 0xff)
00028 #define GME_BORDER_COLOR                        RGB(0x00, 0x00, 0x00)
00029 #define GME_MODEL_COLOR                         RGB(0xc0, 0xc0, 0xc0)
00030 #define GME_NAME_COLOR                          RGB(0x00, 0x00, 0x00)
00031 #define GME_PORTNAME_COLOR                      RGB(0x60, 0x60, 0x60)
00032 #define GME_CONNECTION_COLOR            RGB(0x00, 0x00, 0x00)
00033 #define GME_GREYEDOUT_COLOR             RGB(0xd0, 0xd0, 0xd0)
00034 #define GME_GRID_COLOR                          RGB(0xd0, 0xd0, 0xd0)
00035 #define GME_BLACK_COLOR                         RGB(0x00, 0x00, 0x00)
00036 #define GME_WHITE_COLOR                         RGB(0xff, 0xff, 0xff)
00037 #define GME_RED_COLOR                           RGB(0xff, 0x00, 0x00)
00038 #define GME_DARKRED_COLOR                       RGB(0x80, 0x00, 0x00)
00039 #define GME_GREY_COLOR                          RGB(0xc0, 0xc0, 0xc0)
00040 #define GME_GRAYED_OUT_COLOR            RGB(0xde, 0xde, 0xde)
00041 
00042 #define GME_GRID_SIZE                           7
00043 #define GME_PORT_SIZE                           11
00044 #define GME_PORT_OFFSET                         3
00045 #define GME_PORT_BORDER_OFFSET          10
00046 #define GME_GRID_BORDER_OFFSET          3
00047 #define GME_MODEL_WIDTH                         113
00048 #define GME_MODEL_HEIGHT                        70
00049 #define GME_3D_BORDER_SIZE                      3
00050 
00051 #define GRIDBITS
00052 #ifdef GRIDBITS
00053 #define GME_MAX_GRID_DIM                        4*2048
00054 #else
00055 #define GME_MAX_GRID_DIM                        1024
00056 #endif
00057 
00058 #define GME_BUTT_END                            0
00059 #define GME_ARROW_END                           1
00060 #define GME_DIAMOND_END                         2
00061 #define GME_APEX_END                            3
00062 #define GME_BULLET_END                          4
00063 #define GME_EMPTYDIAMOND_END            5
00064 #define GME_EMPTYAPEX_END                       6
00065 #define GME_EMPTYBULLET_END                     7
00066 #define GME_HALFARROWLEFT_END       8
00067 #define GME_HALFARROWRIGHT_END      9
00068 
00069 
00070 #define GME_HOTSPOT_RADIUS                      10
00071 #define GME_HOTSPOT_VISUAL_RADIUS       3
00072 #define GME_CONNSELECT_WIDTH            2
00073 
00074 
00075 #define GME_DYN_MENU_MINID                      0x1001
00076 #define DECORATOR_CTX_MENU_MINID        0x4001
00077 #define DECORATOR_CTX_MENU_MAXID        0x4101
00078 
00079 //#define GME_MAX_ZOOM_PERCENT          300
00080 //#define GME_MIN_ZOOM_PERCENT          10
00081 
00082 #define EXTENT_ERROR_CORR       1.1 // ?? masks an error of extent calculation
00083 
00084 #define ZOOM_WIDTH      -1
00085 #define ZOOM_HEIGHT     -2
00086 #define ZOOM_ALL        -3
00087 #define ZOOM_MIN        5
00088 #define ZOOM_MAX        500
00089 #define ZOOM_NO         100
00090 
00091 //#define GME_ZOOM_LEVEL_0                      GME_MIN_ZOOM_PERCENT
00092 //#define GME_ZOOM_LEVEL_1                      25
00093 //#define GME_ZOOM_LEVEL_2                      50
00094 //#define GME_ZOOM_LEVEL_3                      75
00095 //#define GME_ZOOM_LEVEL_4                      100
00096 //#define GME_ZOOM_LEVEL_5                      150
00097 //#define GME_ZOOM_LEVEL_6                      200
00098 //#define GME_ZOOM_LEVEL_7                      GME_MAX_ZOOM_PERCENT
00099 //#define GME_ZOOM_LEVEL_NUM                    8
00100 //#define GME_ZOOM_LEVEL_MED                    4
00101 
00102 #define GME_NORTH                                       0                       // Must match PopupPropDlg radiobutton stuff!
00103 #define GME_NORTHEAST                           1
00104 #define GME_EAST                                        2
00105 #define GME_SOUTHEAST                           3
00106 #define GME_SOUTH                                       4
00107 #define GME_SOUTHWEST                           5
00108 #define GME_WEST                                        6
00109 #define GME_NORTHWEST                           7
00110 #define GME_CENTER                                      8
00111 #define GME_NAMELOC_NUM                         9
00112 
00113 #define GME_START_NORTH                         0                       // Must match AutoRouter preferences stuff
00114 #define GME_START_EAST                          1
00115 #define GME_START_SOUTH                         2
00116 #define GME_START_WEST                          3
00117 #define GME_END_NORTH                           4
00118 #define GME_END_EAST                            5
00119 #define GME_END_SOUTH                           6
00120 #define GME_END_WEST                            7
00121 #define GME_AR_NUM                                      8
00122 
00123 #define GME_ANIM_EVENT_ID                       74
00124 #define GME_ANIM_INTERVAL                       250                     // in milliseconds
00125 
00126 #define GME_AUTOSAVE_EVENT_ID           75
00127 
00128 
00129 #define GME_NAME_DISPLAY_LNG            64
00130 
00131 #define HELP_PREF                                       "help"
00132 #define COLOR_PREF                                      "color"
00133 #define CONN_SRC_END_STYLE_PREF         "srcStyle"
00134 #define CONN_DST_END_STYLE_PREF         "dstStyle"
00135 #define CONN_LINE_TYPE_PREF                     "lineType"
00136 #define MODEL_BACKGROUND_COLOR_PREF     "backgroundColor"
00137 #define MODEL_BORDER_COLOR_PREF         "borderColor"
00138 #define PORT_NAME_COLOR_PREF            "portColor"
00139 #define NAME_COLOR_PREF                         "nameColor"
00140 #define CONN_LABEL_FORMATSTR_PREF       "labelFormatStr"
00141 #define CONN_SRC_LABEL1_PREF            "srcLabel1"
00142 #define CONN_SRC_LABEL2_PREF            "srcLabel2"
00143 #define CONN_DST_LABEL1_PREF            "dstLabel1"
00144 #define CONN_DST_LABEL2_PREF            "dstLabel2"
00145 #define NAME_POS_PREF                           "namePosition"
00146 #define AUTOROUTER_PREF                         "autorouterPref"
00147 #define ICON_PREF                                       "icon"
00148 #define PORT_ICON_PREF                          "porticon"
00149 #define DECORATOR_PREF                          "decorator"
00150 #define HOTSPOT_PREF                            "isHotspotEnabled"
00151 #define HOTSPOT_FALSE                           "false"
00152 #define CUSTOMCONNECTIONDATA            "customConnectionData"
00153 #define CONNECTIONAUTOROUTING           "isAutoRouted"
00154 #define MODELAUTOROUTING                        "isModelAutoRouted"
00155 
00156 #define GME_AUTOSAVE_EXTENSION          ".bak"
00157 
00158 
00159 #define GME_CONN_SRC_LABEL1                     0
00160 #define GME_CONN_SRC_LABEL2                     1
00161 #define GME_CONN_DST_LABEL1                     2
00162 #define GME_CONN_DST_LABEL2                     3
00163 #define GME_CONN_MAIN_LABEL                     4
00164 #define GME_CONN_LABEL_NUM                      5
00165 
00166 #define GME_DEFAULT_DECORATOR           "MGA.BoxDecorator"
00167 
00168 class CGuiMetaProject;
00169 class CGuiMetaBase;
00170 class CGuiMetaFolder;
00171 class CGuiMetaAttribute;
00172 class CGuiMetaFco;
00173 class CGuiMetaModel;
00174 class CGuiMetaAspect;
00175 
00176 class CGuiBase;
00177 class CGuiAspect;
00178 class CGuiAnnotator;
00179 class CGuiFco;
00180 class CGuiConnection;
00181 class CGuiConnectionLabel;
00182 class CGuiConnectionLabelSet;
00183 class CGuiObject;
00184 class CGuiCompound;
00185 class CGuiModel;
00186 class CGuiCompoundReference;
00187 class CGuiSimpleReference;
00188 class CGuiPort;
00189 
00190 class CDynMenu;
00191 class CDynMenuItem;
00192 
00193 class CGuiDepCtrlDesc;
00194 class CGuiPreference;
00195 class CGuiPreferenceSet;
00196 
00197 class CGMEView;
00198 
00199 class CPendingRequest;
00200 
00201 typedef CList<CComObjPtr<IMgaFCO>, CComObjPtr<IMgaFCO> >                                CMgaFcoList;
00202 typedef CList<CComObjPtr<IMgaAttribute>, CComObjPtr<IMgaAttribute> >    CMgaAttributeList;
00203 
00204 typedef CTypedPtrMap<CMapPtrToPtr, void *, CGuiMetaBase *>                              CGuiMetaBaseTable;
00205 typedef CTypedPtrList<CPtrList, CGuiMetaBase *>                                                 CGuiMetaBaseList;
00206 
00207 typedef CTypedPtrList<CPtrList, CGMEView*>                                                              CViewList;
00208 
00209 typedef CTypedPtrList<CPtrList, CGuiMetaAspect*>                                                CGuiMetaAspectList;
00210 typedef CTypedPtrList<CPtrList, CGuiMetaAttribute*>                                             CGuiMetaAttributeList;
00211 typedef CTypedPtrList<CPtrList, CGuiMetaFco*>                                                   CGuiMetaFcoList;
00212 
00213 typedef CTypedPtrList<CPtrList, CGuiFco*>                                                               CGuiFcoList;
00214 typedef CTypedPtrList<CPtrList, CGuiObject*>                                                    CGuiObjectList;
00215 typedef CTypedPtrList<CPtrList, CGuiAspect*>                                                    CGuiAspectList;
00216 typedef CTypedPtrList<CPtrList, CGuiPort*>                                                              CGuiPortList;
00217 typedef CTypedPtrList<CPtrList, CGuiAnnotator*>                                                 CGuiAnnotatorList;
00218 typedef CTypedPtrList<CPtrList, CGuiConnection*>                                                CGuiConnectionList;
00219 
00220 typedef CTypedPtrList<CPtrList, CGuiDepCtrlDesc*>                                               CGuiDepCtrlDescList;
00221 
00222 typedef CTypedPtrMap<CMapStringToPtr, CString, CGuiPreference *>                CGuiPreferenceTable;
00223 typedef CTypedPtrList<CPtrList, CGuiPreference*>                                                CGuiPreferenceList;
00224 
00225 typedef CTypedPtrList<CPtrList, CRect *>                                                                CRectList;
00226 typedef CTypedPtrList<CPtrList, CButton *>                                                              CButtonList;
00227 typedef CTypedPtrList<CPtrList, CFont *>                                                                CFontList;
00228 
00229 typedef CTypedPtrList<CPtrList, CPendingRequest *>                                              CPendingRequestList;
00230 
00231 typedef CList<CPoint, CPoint&>                                                                                  CPointList;
00232 
00233 typedef CTypedPtrMap<CMapPtrToPtr, void *, CPen *>                                              CPenTable;
00234 typedef CTypedPtrMap<CMapPtrToPtr, void *, CBrush *>                                    CBrushTable;
00235 
00236 typedef CList<bool, bool &>                                                                                             CBoolList;
00237 
00238 #define chSTR(x) #x
00239 #define chSTR2(x) chSTR(x)
00240 
00241 #endif // whole file