This article describes main concept of Keymap SDK.
Figure: Keymap SDK Architecture Overview
The highest in the library hierarchy is the CMapT class.
We say that CMapT object is a map. Every map maintains a list of pointers
to map layers, i.e. CMapLayer objects. In Keymap SDK each layer is one
database. CMapT draws map using window handle provided by an application.
CMUIMap is window class (view) containing one CMapT object.
In the Keymap SDK we define following types of map objects:
arc, chord, pie
spline
rectangle, rounded rectangle, ellipse: CMapObjRect
text: CMapText
image: CMapImage
node: CMapNode
line: CMapLine
polyline: CMapPolyline
a set of polylines: CMapPolyPolyline
single contour polygon: CMapPolygon
a set of polygons: CMapPolyPolygon
A Keymap SDK layer can have various attributes. A map layer can be either visible or invisible. If a layer is selectable, user can select objects of this layer via the graphic user interface. A layer can have the Override property, then Keymap SDK will draw all objects using layer properties. The Editable property allows users to modify the map objects via GUI. If a layer is labeled, each map object in the layer has its own label (i.e. CMapLabel object).
If user selects some map object via GUI, we say that the object is in the selected state.
We define two terms those are intensively used in the Keymap SDK, the point and the handle.
The point, generally, refers to a point in the map (map point) or a point in the screen (screen window point). But in context of Keymap polyline, or polygon, a point represents a vertex, not random point in the polyline or polygon, if no special stipulations.
The handle is different category. Each point is a handle, but some handles are not points. For example, a rectangle has 8 handles, but has no points (see the figure). You can move selected handle, and thus resize the object. From database organization point of view, each Keymap layer is a database. Depends on kind of map objects, each layer consists of 1, 2, 3 or 4 files (with .mpl, .xtree, .geo and .kdtree extensions). Each map defines a set of map layers. Map also called as workspace. Map (workspace) file has .mpw extension. The workspace file and all layers inside the map should located in the same folder, however layers can be in different subfolders.