tsc_JobMapPaintReasons

This is an enumeration of values used in a bit-map, and describes the events that have previously occurred to cause a Job Map OnPaint event to be raised.

When a plugin processes the OnPaint event, it must decide to what extent it's additional map layers need to be redrawn.  For instance, a plugin displaying additional background information does not need to recreate it's layer image when the user selects a database item or drags out the selection marquee. Instead it can simply reuse the image drawn during the previous OnPaint.

On the other hand, if a plugin is displaying some item located at a given grid coordinate, it must redraw the image any time the item moves on the screen - during a pan or zoom operation for example.

The following bit values (a.k.a. flags) may be present in the OnPaint() reasons parameter:

tsc_JobMapPaintEntityChanged = 0x0001
A visible database entity was modified.  This includes entity deletion, undeletion, insertion, or a change of position.

tsc_JobMapPaintFeatureChanged = 0x0002
A feature code has changed, may require the linework to be redrawn.  May also indicate that a different feature/attributes library has been loaded.

tsc_JobMapPaintConfigChanged = 0x0004
A configuration setting has changed, which may be range from a simple change of horizontal units to a completely new coordinate system.

tsc_JobMapPaintBackdropChanged = 0x0008
A backdrop item or image has changed.

tsc_JobMapPaintPositionChanged = 0x0010
The current sensor position has changed in relation to the map, indicating that the current position cross-hair or the total station ray must be redrawn.  Note that this event is no guarantee that the actual current 2D position has changed, a station height could have changed for example.  This event also occurs if the map is panned or zoomed, since this will also require a position redraw (but not a full redraw).  Because positions are constantly changing, this event is likely to occur several times per second.

tsc_JobMapPaintSelectionChanged = 0x0020
One or more visible entities were selected or deselected.   A new list of selected items may be obtained by calling tsc_JobMap::GetSelections.

tsc_JobMapPaintPan = 0x0040
The window is being panned.  This changes the relationship between the map window and grid coordinates, and means all displayed entities will have moved and a full redraw is required for anything that is plotted by grid coordinate.  This occurs for each pixel that the map is dragged.

tsc_JobMapPaintPanEnd = 0x0080
Panning the window has finished.  This reason may generally be ignored, since at least one tsc_JobMapPaintPan event will have occurred prior to this.  tsc_JobMapPaintPanEnd is useful when a layer takes a long time to draw; by ignoring tsc_JobMapPaintPan and drawing on this event instead, it is possible for the user to drag the map to the new location, and the full redraw of the layer occurs only once, when the mouse is released.  Panning is almost impossible for the user if the redraw takes too long.

tsc_JobMapPaintZoom = 0x0100
The window has been zoomed.  This changes the relationship between the map window and grid coordinates, and means all displayed entities will have moved and a full redraw is required for anything that is plotted by grid coordinate.

tsc_JobMapPaintMarquee = 0x0200
The marquee corner has been dragged.  Generally only the marquee layer is redrawn in this situation; nothing else has changed.  A plugin could change the appearance of items within the marquee if that was desired.  Note that the marquee is used for various purposes; use the tsc_JobMapStateEventArgs::GetMarqueeMode method to discover the current mode.

tsc_JobMapPaintInitial = 0x0400
The first draw of this map for this plugin.  This should always cause a complete redraw of all images, apart from completely static items.

tsc_JobMapPaintRequested = 0x0800
The plugin has called tsc_JobMap::Repaint().  This is never set except by the plugin, and can be used for any purpose.  Typically it is used to signal to the map that something that is unknown to the map has changed and the plugin wishes to redraw one or more layers.

tsc_JobMapPaintMore = 0x1'000
A continuation of the previous paint.  When a job or backdrop consists of large numbers of entities, they will be drawn in batches to prevent excessive CPU load and sluggish UI.  Each batch of entities after the first will have this flag set.

tsc_JobMapPaintContinue = 0x2'000
A continuation of the previous paint requested by the plugin.  When a plugin requires a long time (say > 1 sec) to draw a layer, it be drawn in batches to prevent slow UI and excessive CPU load.  Calling tsc_JobMapPaintEventArgs::Continue() will generate another call to OnPaint() after a short delay, which will also have this flag set. The plugin itself must determine what is to be drawn next, and it should return to the start at any time OnPaint() is called with this flag off.

tsc_JobMapPointAppActivated = 0x4'000
Your application has become active and the map suggests that a redraw may be necessary.

tsc_JobMapBackdropRedraw = 0x8'000
The backdrops have not changed and do not need to be reloaded or calculated but some aspect requires a redraw. 

tsc_JobMapPaintPointCloud = 0x01'0000
The point clouds presented in the map have changed.

tsc_JobMapPaintStakeText = 0x02'0000
The stake details text presented in the map has changed.

tsc_JobMapPaintInitialView = 0x04'0000
The map is being drawn for the first time for the current window and job. Note: This is a good way to tell if a new job has been opened.

tsc_JobMapBackdropDrawn = 0x08'0000
A backdrop has been added, removed, or done some drawing, so the map view is being refreshed. This rarely affects the plugin .

tsc_JobMapPaintStationSetup = 0x10'0000
A station setup has been completed.

tsc_JobMapPaintCogo = 0x20'0000
The Cogo graphics have changed. "Cogo graphics" are the coloured highlights that appear when an object is selected.

tsc_JobMapPaintZoomActiveRoad = 0x40'0000
A zoom has been performed on a road being defined or staked.

tsc_JobMapPaintResize = 0x80'0000
The application window has been resized. This can be caused by manual window resizing or rotation of the screen, depending on the device type.

To be better documented...

tsc_JobMapPaintPointCloudMoved  = 0x0100'0000, // Position/orientation of point cloud has changed.

tsc_JobMapPaintOffsetChanged    = 0x0200'0000, // Map false northing/easting has changed.

tsc_JobMapPaintAppendUpdate     = 0x0400'0000, // Database has changed but only new items

tsc_JobMapPaintStakeoutList     = 0x0800'0000, // Stakeout list has changed

tsc_JobMapPaintInspections      = 0x1000'0000, // Visible surface inspections have changed

tsc_JobMapPaintInspectionResult = 0x8000'0000, // Inspection result added/removed