HMarkupManager

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.

Methods

HMarkupManager::HMarkupManager(HBaseView *view)

Constructs an HMarkupManager object.

void HMarkupManager::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::~HMarkupManager()

virtual

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

virtual

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 HMarkupManager::RenameLayer(HC_KEY laykey, char const *new_name)

virtual

Renames an existing layer

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

virtual

Copy an existing layer

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

const virtual

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

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

virtual

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 HMarkupManager::FindLayer(char const *layername) const

const virtual

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 *HMarkupManager::GetLayerNames() const

const virtual

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

virtual HC_KEY HMarkupManager::GetCurrentLayerKey() const

const virtual

Returns

The key to the currently active layer.
virtual char const *HMarkupManager::GetCurrentLayerName() const

const virtual

Returns

The name of the currently active layer.
virtual void HMarkupManager::DisableCurrentLayer(bool emit_message = true)

virtual

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 HMarkupManager::DeleteLayer(char const *layername)

virtual

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 HMarkupManager::DeleteLayer(HC_KEY layerkey)

virtual

Deletes a markup layer.

Parameters

layerkey: The key to the layer which needs to be deleted.
void HMarkupManager::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.
HC_KEY HMarkupManager::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.
HC_KEY HMarkupManager::GetMarkupKey()

Gets the top level markup key.

Returns

Key to the parent segment for all markup layers.
HC_KEY HMarkupManager::GetMarkupLayerKey()

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

Returns

Key to segment containing the individual markup layers.
virtual float HMarkupManager::GetMarkupWeight()

virtual

Returns

The existing line/edge weight of markup data.
virtual void HMarkupManager::SetMarkupWeight(float weight)

virtual

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
virtual void HMarkupManager::GetMarkupColor(HPoint &markup_color)

virtual

Returns the existing color of markup data.

Parameters

markup_color: This method populates the parameter with the color of the markup data.
virtual void HMarkupManager::SetMarkupColor(HPoint markup_color)

virtual

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 HMarkupManager::EmitMarkupSegment(HC_KEY key)

virtual

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 HMarkupManager::InsertMarkupSegmentFromMessage(char const *in_data, unsigned int data_length)

virtual

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 HMarkupManager::EmitDisableCurrentMarkupLayer()

virtual

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

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

virtual

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 HMarkupManager::EmitSetMarkupLayer(char const *layer)

virtual

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

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

virtual

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 HMarkupManager::GetPreviewImage(char const*, int*, int*, int*, unsigned char const**)

virtual

Returns a preview image to the markup

virtual void HMarkupManager::UpdatePreviewImage(bool forceUpdate = false)

virtual

bool HMarkupManager::IsCameraLayer(HC_KEY layerkey)
void HMarkupManager::SetLayerCondition(HC_KEY layerkey)
void HMarkupManager::UnsetCurrentLayerCondition()
void HMarkupManager::UnsetLayerCondition(HC_KEY layerkey)
void HMarkupManager::SetGeneratePreviewImage(bool onoff)
bool HMarkupManager::GetGeneratePreviewImage()
void HMarkupManager::SetNoResetOnCameraChange()
bool HMarkupManager::GetResetOnCameraChange(HC_KEY layerkey)
virtual void HMarkupManager::SetupNewLayer()

protected virtual

Setup default attributes/camera settings for new markup layer.

virtual void HMarkupManager::OpenLayerInternal(HC_KEY layerkey, bool setcamera)

protected virtual

Switches to new layer and restores camera settings if appropriate

Parameters

layerkey: layer to open

setcamera: set camera to stored layer settings

virtual char *HMarkupManager::FindValidLayerName(char *newlayername)

protected virtual

Creates new unique layer name.

Parameters

newlayername: pointer to new layer name

Returns

The new layer name.

Variables

HBaseView *HMarkupManager::m_pHView

protected

A pointer to the view object.

HC_KEY HMarkupManager::m_ActiveLayerKey

protected

HC_KEY

Currently open markup layer.

char *HMarkupManager::m_ActiveLayerName

protected

char

Currently open lay name.

HC_KEY HMarkupManager::m_DefaultLayerKey

protected

HC_KEY

Default layer (gets used if no other layer is open)

HC_KEY HMarkupManager::m_MarkupKey

protected

HC_KEY

Key to the top level markup layer.

HC_KEY HMarkupManager::m_MarkupLayerKey

protected

HC_KEY

Key to parent segment of all layers.

HPoint HMarkupManager::m_MarkupColor

protected

Color of markup geometry.

float HMarkupManager::m_fMarkupWeight

protected

float

Weight of markup geometry.

char *HMarkupManager::m_allNames

protected

char
bool HMarkupManager::m_bGeneratePreviewImage

protected

bool