HMarkupManager

Functions

HMarkupManager

void

ReInit

~HMarkupManager

HC_KEY

OpenLayer

HC_KEY

RenameLayer

HC_KEY

CopyLayer

bool

GetCamera

HC_KEY

OpenLayer

HC_KEY

FindLayer

char const *

GetLayerNames

HC_KEY

GetCurrentLayerKey

char const *

GetCurrentLayerName

void

DisableCurrentLayer

void

DeleteLayer

void

DeleteLayer

void

SetDefaultLayerKey

HC_KEY

GetDefaultLayerKey

HC_KEY

GetMarkupKey

HC_KEY

GetMarkupLayerKey

float

GetMarkupWeight

void

SetMarkupWeight

void

GetMarkupColor

void

SetMarkupColor

void

EmitMarkupSegment

void

InsertMarkupSegmentFromMessage

void

EmitDisableCurrentMarkupLayer

void

DisableCurrentMarkupLayerFromMessage

void

EmitSetMarkupLayer

void

SetMarkupLayerFromMessage

bool

GetPreviewImage

void

UpdatePreviewImage

bool

IsCameraLayer

void

SetLayerCondition

void

UnsetCurrentLayerCondition

void

UnsetLayerCondition

void

SetGeneratePreviewImage

bool

GetGeneratePreviewImage

void

SetNoResetOnCameraChange

bool

GetResetOnCameraChange

Detailed Description

class HMarkupManager

The HMarkupManager class allows users to manage the different Markup operators. Via this class users can save and restore markup information as well as set color and weights on the markup data.

Public Functions

HMarkupManager(HBaseView *view)

Constructs an HMarkupManager object.

void ReInit(HBaseView *view)

If the markup segment is deleted and recreated (for example by an opcode handler in HSF), reinit reinitializes the internals of HMarkupManager to reflect the changes.

virtual ~HMarkupManager()
virtual HC_KEY OpenLayer(char const *layername, bool setcamera = true, bool emit_message = true)

Opens a markup layer. If the layer does not exist then a new layer will be created.

Parameters
  • layername – if layername refers to an existing segment it will be used to restore that layer, otherwise it will be ignored.

  • setcamera – bool indicating whether the camera used when this layer was initially created should also be restored

  • emit_message – bool This parameter has been deprecated. Indicating whether or not a message should be transmitted to possible members of a HNet session

virtual HC_KEY RenameLayer(HC_KEY laykey, char const *new_name)

Renames an existing layer

virtual HC_KEY CopyLayer(HC_KEY laykey, char const *new_name)

Copy an existing layer

virtual bool GetCamera(HC_KEY layerkey, HCamera &cam) const

Returns the camera for a layer key. If a camera is set, true is returned.

virtual HC_KEY OpenLayer(HC_KEY layerkey, bool setcamera = true)

Opens a Markup layer. If the layer does not exist then a new layer will be created

Parameters
  • layerkey – if layerkey refers to an existing segment it will be used to restore that layer, otherwise it will be ignored.

  • setcamera – bool indicating whether the camera used when this layer was initially created should also be restored

virtual HC_KEY FindLayer(char const *layername) const

Check if a named Markup layer exists. If the layer exist return its key, if not, return -1

Parameters

layername – Named layer to check exist

virtual char const *GetLayerNames() const

Returns a simicolon separated list of view names such as “Default View;View1;View2;Awesome View;”

virtual HC_KEY GetCurrentLayerKey() const
Returns

The key to the currently active layer.

virtual char const *GetCurrentLayerName() const
Returns

The name of the currently active layer.

virtual void DisableCurrentLayer(bool emit_message = true)

Turns off the visibility of the currently active layer.

Parameters

emit_message – bool This parameter has been deprecated. Indicating whether or not a message should be transmitted to possible members of a HNet session.

virtual void DeleteLayer(char const *layername)

Deletes a markup layer.

Parameters

layername – name of the layer to be deleted. Name should be the name that was initially provided to OpenLayer.

virtual void DeleteLayer(HC_KEY layerkey)

Deletes a markup layer.

Parameters

layerkey – The key to the layer which needs to be deleted.

inline void SetDefaultLayerKey(HC_KEY layerkey)

Set default layer. If no layer is open, all new markup geometry will be added to the default layer

Parameters

layerkey – The key to the new default layer.

inline HC_KEY GetDefaultLayerKey()

Get default layer. If no layer is open all new markup, geometry will be added to the default layer

Returns

Key to the default layer.

inline HC_KEY GetMarkupKey()

Gets the top level markup key.

Returns

Key to the parent segment for all markup layers.

inline HC_KEY GetMarkupLayerKey()

Gets the key to the segment containing the individual markup layers.

Returns

Key to segment containing the individual markup layers.

inline virtual float GetMarkupWeight()
Returns

The existing line/edge weight of markup data.

virtual void SetMarkupWeight(float weight)

Sets the line and edge weight of Markup data. It is applied to the current active layer and all subsequent layers.

\param weight the pixel width of the line/edge data

inline virtual void GetMarkupColor(HPoint &markup_color)

Returns the existing color of markup data.

Parameters

markup_color – This method populates the parameter with the color of the markup data.

virtual void SetMarkupColor(HPoint markup_color)

Sets the color of Markup Data. It is applied to the current active layer and all subsequent layers.

\param markup_color RGB color of Markup data

virtual void EmitMarkupSegment(HC_KEY key)

This method has been deprecated. Sends data from a Markup Operator to other members of a HNet session.

Parameters

key – key to the markup segment you want to transmit. Note, this is not a layer but rather the segment that a markup operator is inserting geometry.

virtual void InsertMarkupSegmentFromMessage(char const *in_data, unsigned int data_length)

This method has been deprecated. Function which receives markup data from HNet server.

Parameters
  • in_data – HNet data

  • data_length – length of in_data

virtual void EmitDisableCurrentMarkupLayer()

This method has been deprecated. Sends a message to other members of a HNet session to disable the current markup layer.

virtual void DisableCurrentMarkupLayerFromMessage(char const *data, unsigned int data_length)

This method has been deprecated. Function which receives disable current layer message from HNet Server.

Parameters
  • data – HNet data

  • data_length – length of in_data

virtual void EmitSetMarkupLayer(char const *layer)

This method has been deprecated. Sends a message to other members of a HNet session to create/restore a specific markup layer.

virtual void SetMarkupLayerFromMessage(char const *data, unsigned int data_length)

This method has been deprecated. Function which receives the create/restore MarkupLayer message from the HNet Server.

Parameters
  • data – HNet data

  • data_length – length of in_data

virtual bool GetPreviewImage(char const*, int*, int*, int*, unsigned char const**)

Returns a preview image to the markup

virtual void UpdatePreviewImage(bool forceUpdate = false)
bool IsCameraLayer(HC_KEY layerkey)
void SetLayerCondition(HC_KEY layerkey)
void UnsetCurrentLayerCondition()
void UnsetLayerCondition(HC_KEY layerkey)
inline void SetGeneratePreviewImage(bool onoff)
inline bool GetGeneratePreviewImage()
void SetNoResetOnCameraChange()
bool GetResetOnCameraChange(HC_KEY layerkey)