📄 mapbasic.bas
字号:
Attribute VB_Name = "Module3"
'============================================================================
' MapInfo version 5.0 - System defines
'----------------------------------------------------------------------------
' This file contains defines useful when programming in the MapBasic
' language. There are three versions of this file:
' MAPBASIC.DEF - MapBasic syntax
' MAPBASIC.BAS - Visual Basic syntax
' MAPBASIC.H - C/C++ syntax
'----------------------------------------------------------------------------
' The defines in this file are organized into the following sections:
' General Purpose defines:
' Macros, Logical constants, Angle conversion, Colors
' ButtonPadInfo() defines
' ColumnInfo() defines
' CommandInfo() defines
' FileAttr() defines
' IntersectNodes() parameters
' LayerInfo() defines
' MapperInfo() defines
' MenuItemInfoByID() and MenuItemInfoByHandler() defines
' ObjectGeography() defines
' ObjectInfo() defines
' SearchInfo() defines
' SelectionInfo() defines
' Server statement and function defines
' StringCompare() return values
' StyleAttr() defines
' SystemInfo() defines
' TableInfo() defines
' WindowInfo() defines
' LabelInfo() defines
' LegendInfo() defines
' LegendFrameInfo() defines
' LegendStyleInfo() defines
' DateWindow() defines
' Set Next Document Style defines
' Abbreviated list of error codes
' Backward Compatibility defines
'============================================================================
' This file is converted into MAPBASIC.H by doing the following:
' - concatenate MAPBASIC.DEF and MENU.DEF into MAPBASIC.H
' - search & replace "'" at begining of a line with "//"
' - search & replace "Define" at begining of a line with "#define"
' - delete the following sections:
' * General Purpose defines: Macros, Logical Constants, Angle Conversions
' * Abbreviated list of error codes
' * Backward Compatibility defines
' * Menu constants whose names have changed
' * Obsolete menu items
'============================================================================
' This file is converted into MAPBASIC.BAS by doing the following:
' - concatenate MAPBASIC.DEF and MENU.DEF into MAPBASIC.BAS
' - search & replace "Define <name>" with "Global Const <name> ="
' e.g. "<Define {[!-z]+} +{[!-z]}" with "Global Const \0 = \1" using Brief
' - delete the following sections:
' * General Purpose defines: Macros, Logical Constants, Angle Conversions
' * Abbreviated list of error codes
' * Backward Compatibility defines
' * Menu constants whose names have changed
' * Obsolete menu items
'============================================================================
'============================================================================
' General Purpose defines
'============================================================================
'----------------------------------------------------------------------------
' Colors
'----------------------------------------------------------------------------
Global Const BLACK = 0
Global Const WHITE = 16777215
Global Const RED = 16711680
Global Const GREEN = 65280
Global Const BLUE = 255
Global Const CYAN = 65535
Global Const MAGENTA = 16711935
Global Const YELLOW = 16776960
'============================================================================
' ButtonPadInfo() defines
'============================================================================
Global Const BTNPAD_INFO_FLOATING = 1
Global Const BTNPAD_INFO_WIDTH = 2
Global Const BTNPAD_INFO_NBTNS = 3
Global Const BTNPAD_INFO_X = 4
Global Const BTNPAD_INFO_Y = 5
Global Const BTNPAD_INFO_WINID = 6
'============================================================================
' ColumnInfo() defines
'============================================================================
Global Const COL_INFO_NAME = 1
Global Const COL_INFO_NUM = 2
Global Const COL_INFO_TYPE = 3
Global Const COL_INFO_WIDTH = 4
Global Const COL_INFO_DECPLACES = 5
Global Const COL_INFO_INDEXED = 6
Global Const COL_INFO_EDITABLE = 7
'----------------------------------------------------------------------------
' Column type defines, returned by ColumnInfo(<col_ref>, COL_INFO_TYPE)
'----------------------------------------------------------------------------
Global Const COL_TYPE_CHAR = 1
Global Const COL_TYPE_DECIMAL = 2
Global Const COL_TYPE_INTEGER = 3
Global Const COL_TYPE_SMALLINT = 4
Global Const COL_TYPE_DATE = 5
Global Const COL_TYPE_LOGICAL = 6
Global Const COL_TYPE_GRAPHIC = 7
Global Const COL_TYPE_FLOAT = 8
'============================================================================
' CommandInfo() defines
'============================================================================
Global Const CMD_INFO_X = 1
Global Const CMD_INFO_Y = 2
Global Const CMD_INFO_SHIFT = 3
Global Const CMD_INFO_CTRL = 4
Global Const CMD_INFO_X2 = 5
Global Const CMD_INFO_Y2 = 6
Global Const CMD_INFO_TOOLBTN = 7
Global Const CMD_INFO_MENUITEM = 8
Global Const CMD_INFO_WIN = 1
Global Const CMD_INFO_SELTYPE = 1
Global Const CMD_INFO_ROWID = 2
Global Const CMD_INFO_INTERRUPT = 3
Global Const CMD_INFO_STATUS = 1
Global Const CMD_INFO_MSG = 1000
Global Const CMD_INFO_DLG_OK = 1
Global Const CMD_INFO_DLG_DBL = 1
Global Const CMD_INFO_FIND_RC = 3
Global Const CMD_INFO_FIND_ROWID = 4
Global Const CMD_INFO_XCMD = 1
Global Const CMD_INFO_CUSTOM_OBJ = 1
Global Const CMD_INFO_TASK_SWITCH = 1
Global Const CMD_INFO_EDIT_TABLE = 1
Global Const CMD_INFO_EDIT_STATUS = 2
Global Const CMD_INFO_EDIT_ASK = 1
Global Const CMD_INFO_EDIT_SAVE = 2
Global Const CMD_INFO_EDIT_DISCARD = 3
'----------------------------------------------------------------------------
' Task Switch, returned by CommandInfo(CMD_INFO_TASK_SWITCH)
'----------------------------------------------------------------------------
Global Const SWITCHING_OUT_OF_MAPINFO = 0
Global Const SWITCHING_INTO_MAPINFO = 1
'============================================================================
' FileAttr() defines
'============================================================================
Global Const FILE_ATTR_MODE = 1
Global Const FILE_ATTR_FILESIZE = 2
'----------------------------------------------------------------------------
' File Access modes, returned by FileAttr(<file_id>, FILE_ATTR_MODE)
'----------------------------------------------------------------------------
Global Const MODE_INPUT = 0
Global Const MODE_OUTPUT = 1
Global Const MODE_APPEND = 2
Global Const MODE_RANDOM = 3
Global Const MODE_BINARY = 4
'============================================================================
' IntersectNodes(obj1, obj2, mode) parameters
'============================================================================
Global Const INCL_CROSSINGS = 1
Global Const INCL_COMMON = 6
Global Const INCL_ALL = 7
'============================================================================
' LayerInfo() defines
'============================================================================
Global Const LAYER_INFO_NAME = 1
Global Const LAYER_INFO_EDITABLE = 2
Global Const LAYER_INFO_SELECTABLE = 3
Global Const LAYER_INFO_ZOOM_LAYERED = 4
Global Const LAYER_INFO_ZOOM_MIN = 5
Global Const LAYER_INFO_ZOOM_MAX = 6
Global Const LAYER_INFO_COSMETIC = 7
Global Const LAYER_INFO_PATH = 8
Global Const LAYER_INFO_DISPLAY = 9
Global Const LAYER_INFO_OVR_LINE = 10
Global Const LAYER_INFO_OVR_PEN = 11
Global Const LAYER_INFO_OVR_BRUSH = 12
Global Const LAYER_INFO_OVR_SYMBOL = 13
Global Const LAYER_INFO_OVR_FONT = 14
Global Const LAYER_INFO_LBL_EXPR = 15
Global Const LAYER_INFO_LBL_LT = 16
Global Const LAYER_INFO_LBL_CURFONT = 17
Global Const LAYER_INFO_LBL_FONT = 18
Global Const LAYER_INFO_LBL_PARALLEL = 19
Global Const LAYER_INFO_LBL_POS = 20
Global Const LAYER_INFO_ARROWS = 21
Global Const LAYER_INFO_NODES = 22
Global Const LAYER_INFO_CENTROIDS = 23
Global Const LAYER_INFO_TYPE = 24
Global Const LAYER_INFO_LBL_VISIBILITY = 25
Global Const LAYER_INFO_LBL_ZOOM_MIN = 26
Global Const LAYER_INFO_LBL_ZOOM_MAX = 27
Global Const LAYER_INFO_LBL_AUTODISPLAY = 28
Global Const LAYER_INFO_LBL_OVERLAP = 29
Global Const LAYER_INFO_LBL_DUPLICATES = 30
Global Const LAYER_INFO_LBL_OFFSET = 31
Global Const LAYER_INFO_LBL_MAX = 32
Global Const LAYER_INFO_LBL_PARTIALSEGS = 33
'----------------------------------------------------------------------------
' Display Modes, returned by LayerInfo() for LAYER_INFO_DISPLAY
'----------------------------------------------------------------------------
Global Const LAYER_INFO_DISPLAY_OFF = 0
Global Const LAYER_INFO_DISPLAY_GRAPHIC = 1
Global Const LAYER_INFO_DISPLAY_GLOBAL = 2
Global Const LAYER_INFO_DISPLAY_VALUE = 3
'----------------------------------------------------------------------------
' Label Linetypes, returned by LayerInfo() for LAYER_INFO_LBL_LT
'----------------------------------------------------------------------------
Global Const LAYER_INFO_LBL_LT_NONE = 0
Global Const LAYER_INFO_LBL_LT_SIMPLE = 1
Global Const LAYER_INFO_LBL_LT_ARROW = 2
'----------------------------------------------------------------------------
' Label Positions, returned by LayerInfo() for LAYER_INFO_LBL_POS
'----------------------------------------------------------------------------
Global Const LAYER_INFO_LBL_POS_CC = 0
Global Const LAYER_INFO_LBL_POS_TL = 1
Global Const LAYER_INFO_LBL_POS_TC = 2
Global Const LAYER_INFO_LBL_POS_TR = 3
Global Const LAYER_INFO_LBL_POS_CL = 4
Global Const LAYER_INFO_LBL_POS_CR = 5
Global Const LAYER_INFO_LBL_POS_BL = 6
Global Const LAYER_INFO_LBL_POS_BC = 7
Global Const LAYER_INFO_LBL_POS_BR = 8
'----------------------------------------------------------------------------
' Layer Types, returned by LayerInfo() for LAYER_INFO_TYPE
'----------------------------------------------------------------------------
Global Const LAYER_INFO_TYPE_NORMAL = 0
Global Const LAYER_INFO_TYPE_COSMETIC = 1
Global Const LAYER_INFO_TYPE_IMAGE = 2
Global Const LAYER_INFO_TYPE_THEMATIC = 3
Global Const LAYER_INFO_TYPE_GRID = 4
'----------------------------------------------------------------------------
' Label visibility modes, returned by LayerInfo() for LAYER_INFO_LBL_VISIBILITY
'----------------------------------------------------------------------------
Global Const LAYER_INFO_LBL_VIS_OFF = 1
Global Const LAYER_INFO_LBL_VIS_ZOOM = 2
Global Const LAYER_INFO_LBL_VIS_ON = 3
'============================================================================
' MapperInfo() defines
'============================================================================
Global Const MAPPER_INFO_ZOOM = 1
Global Const MAPPER_INFO_SCALE = 2
Global Const MAPPER_INFO_CENTERX = 3
Global Const MAPPER_INFO_CENTERY = 4
Global Const MAPPER_INFO_MINX = 5
Global Const MAPPER_INFO_MINY = 6
Global Const MAPPER_INFO_MAXX = 7
Global Const MAPPER_INFO_MAXY = 8
Global Const MAPPER_INFO_LAYERS = 9
Global Const MAPPER_INFO_EDIT_LAYER = 10
Global Const MAPPER_INFO_XYUNITS = 11
Global Const MAPPER_INFO_DISTUNITS = 12
Global Const MAPPER_INFO_AREAUNITS = 13
Global Const MAPPER_INFO_SCROLLBARS = 14
Global Const MAPPER_INFO_DISPLAY = 15
Global Const MAPPER_INFO_NUM_THEMATIC = 16
Global Const MAPPER_INFO_COORDSYS_CLAUSE = 17
Global Const MAPPER_INFO_COORDSYS_NAME = 18
Global Const MAPPER_INFO_MOVE_DUPLICATE_NODES = 19
Global Const MAPPER_INFO_DIST_CALC_TYPE = 20
Global Const MAPPER_INFO_DISPLAY_DMS = 21
Global Const MAPPER_INFO_COORDSYS_CLAUSE_WITH_BOUNDS = 22
Global Const MAPPER_INFO_CLIP_REGION = 23
'----------------------------------------------------------------------------
' Display Modes, returned by MapperInfo() for MAPPER_INFO_DISPLAY
'----------------------------------------------------------------------------
Global Const MAPPER_INFO_DISPLAY_SCALE = 0
Global Const MAPPER_INFO_DISPLAY_ZOOM = 1
Global Const MAPPER_INFO_DISPLAY_POSITION = 2
'----------------------------------------------------------------------------
' Distance Calculation Types
'----------------------------------------------------------------------------
Global Const MAPPER_INFO_DIST_SPHERICAL = 0
Global Const MAPPER_INFO_DIST_CARTESIAN = 1
'----------------------------------------------------------------------------
' Clip Type
'----------------------------------------------------------------------------
Global Const MAPPER_INFO_CLIP_DISPLAY_ALL = 0
Global Const MAPPER_INFO_CLIP_DISPLAY_POLYOBJ = 1
Global Const MAPPER_INFO_CLIP_OVERLAY = 2
'============================================================================
' MenuItemInfoByID() and MenuItemInfoByHandler() defines
'============================================================================
Global Const MENUITEM_INFO_ENABLED = 1
Global Const MENUITEM_INFO_CHECKED = 2
Global Const MENUITEM_INFO_CHECKABLE = 3
Global Const MENUITEM_INFO_SHOWHIDEABLE = 4
Global Const MENUITEM_INFO_ACCELERATOR = 5
Global Const MENUITEM_INFO_TEXT = 6
Global Const MENUITEM_INFO_HELPMSG = 7
Global Const MENUITEM_INFO_HANDLER = 8
Global Const MENUITEM_INFO_ID = 9
'============================================================================
' ObjectGeography() defines
'============================================================================
Global Const OBJ_GEO_MINX = 1
Global Const OBJ_GEO_LINEBEGX = 1
Global Const OBJ_GEO_POINTX = 1
Global Const OBJ_GEO_MINY = 2
Global Const OBJ_GEO_LINEBEGY = 2
Global Const OBJ_GEO_POINTY = 2
Global Const OBJ_GEO_MAXX = 3
Global Const OBJ_GEO_LINEENDX = 3
Global Const OBJ_GEO_MAXY = 4
Global Const OBJ_GEO_LINEENDY = 4
Global Const OBJ_GEO_ARCBEGANGLE = 5
Global Const OBJ_GEO_TEXTLINEX = 5
Global Const OBJ_GEO_ROUNDRADIUS = 5
Global Const OBJ_GEO_ARCENDANGLE = 6
Global Const OBJ_GEO_TEXTLINEY = 6
Global Const OBJ_GEO_TEXTANGLE = 7
'============================================================================
' ObjectInfo() defines
'============================================================================
Global Const OBJ_INFO_TYPE = 1
Global Const OBJ_INFO_PEN = 2
Global Const OBJ_INFO_SYMBOL = 2
Global Const OBJ_INFO_TEXTFONT = 2
Global Const OBJ_INFO_BRUSH = 3
Global Const OBJ_INFO_NPNTS = 20
Global Const OBJ_INFO_TEXTSTRING = 3
Global Const OBJ_INFO_SMOOTH = 4
Global Const OBJ_INFO_FRAMEWIN = 4
Global Const OBJ_INFO_NPOLYGONS = 21
Global Const OBJ_INFO_TEXTSPACING = 4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -