#include <HMarkupManager.h>

Public Member Functions

virtual HC_KEY CopyLayer (HC_KEY laykey, char const *new_name)
 
virtual void DeleteLayer (const char *layername)
 
virtual void DeleteLayer (HC_KEY layerkey)
 
virtual void DisableCurrentLayer (bool emit_message=true)
 
virtual void DisableCurrentMarkupLayerFromMessage (const char *data, unsigned int data_length)
 
virtual void EmitDisableCurrentMarkupLayer ()
 
virtual void EmitMarkupSegment (HC_KEY key)
 
virtual void EmitSetMarkupLayer (const char *layer)
 
virtual HC_KEY FindLayer (const char *layername) const
 
virtual bool GetCamera (HC_KEY layerkey, HCamera &cam) const
 
virtual HC_KEY GetCurrentLayerKey () const
 
virtual char const * GetCurrentLayerName () const
 
HC_KEY GetDefaultLayerKey ()
 
bool GetGeneratePreviewImage ()
 
virtual char const * GetLayerNames () const
 
virtual void GetMarkupColor (HPoint &markup_color)
 
HC_KEY GetMarkupKey ()
 
HC_KEY GetMarkupLayerKey ()
 
virtual float GetMarkupWeight ()
 
virtual bool GetPreviewImage (char const *, int *, int *, int *, unsigned char const **)
 
bool GetResetOnCameraChange (HC_KEY layerkey)
 
 HMarkupManager (HBaseView *view)
 
virtual void InsertMarkupSegmentFromMessage (const char *in_data, unsigned int data_length)
 
bool IsCameraLayer (HC_KEY layerkey)
 
virtual HC_KEY OpenLayer (const char *layername, bool setcamera=true, bool emit_message=true)
 
virtual HC_KEY OpenLayer (HC_KEY layerkey, bool setcamera=true)
 
void ReInit (HBaseView *view)
 
virtual HC_KEY RenameLayer (HC_KEY laykey, char const *new_name)
 
void SetDefaultLayerKey (HC_KEY layerkey)
 
void SetGeneratePreviewImage (bool onoff)
 
void SetLayerCondition (HC_KEY layerkey)
 
virtual void SetMarkupColor (HPoint markup_color)
 
virtual void SetMarkupLayerFromMessage (const char *data, unsigned int data_length)
 
virtual void SetMarkupWeight (float weight)
 
void SetNoResetOnCameraChange ()
 
void UnsetCurrentLayerCondition ()
 
void UnsetLayerCondition (HC_KEY layerkey)
 
virtual void UpdatePreviewImage (bool forceUpdate=false)
 

Protected Member Functions

virtual char * FindValidLayerName (char *newlayername)
 
virtual void OpenLayerInternal (HC_KEY layerkey, bool setcamera)
 
virtual void SetupNewLayer ()
 

Protected Attributes

HC_KEY m_ActiveLayerKey
 Currently open markup layer.
 
char * m_ActiveLayerName
 Currently open lay name.
 
char * m_allNames
 
bool m_bGeneratePreviewImage
 
HC_KEY m_DefaultLayerKey
 Default layer (gets used if no other layer is open)
 
float m_fMarkupWeight
 Weight of markup geometry.
 
HPoint m_MarkupColor
 Color of markup geometry.
 
HC_KEY m_MarkupKey
 Key to the top level markup layer.
 
HC_KEY m_MarkupLayerKey
 Key to parent segment of all layers.
 
HBaseViewm_pHView
 A pointer to the view object.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ HMarkupManager()

HMarkupManager::HMarkupManager ( HBaseView view)

Constructs an HMarkupManager object.

Member Function Documentation

◆ CopyLayer()

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

Copy an existing layer

◆ DeleteLayer() [1/2]

virtual void HMarkupManager::DeleteLayer ( const char *  layername)
virtual

Deletes a markup layer.

Parameters
layernamename of the layer to be deleted. Name should be the name that was initially provided to OpenLayer.

◆ DeleteLayer() [2/2]

virtual void HMarkupManager::DeleteLayer ( HC_KEY  layerkey)
virtual

Deletes a markup layer.

Parameters
layerkeyThe key to the layer which needs to be deleted.

◆ DisableCurrentLayer()

virtual void HMarkupManager::DisableCurrentLayer ( bool  emit_message = true)
virtual

Turns off the visibility of the currently active layer.

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

◆ DisableCurrentMarkupLayerFromMessage()

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

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

Parameters
dataHNet data
data_lengthlength of in_data

Referenced by HMarkupMessageHandler::ProcessMessage().

◆ EmitDisableCurrentMarkupLayer()

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.

◆ EmitMarkupSegment()

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
keykey 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.

◆ EmitSetMarkupLayer()

virtual void HMarkupManager::EmitSetMarkupLayer ( const char *  layer)
virtual

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

◆ FindLayer()

virtual HC_KEY HMarkupManager::FindLayer ( const char *  layername) const
virtual

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

Parameters
layernameNamed layer to check exist

◆ FindValidLayerName()

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

Creates new unique layer name.

Parameters
newlayernamepointer to new layer name
Returns
The new layer name.

◆ GetCamera()

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

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

◆ GetCurrentLayerKey()

virtual HC_KEY HMarkupManager::GetCurrentLayerKey ( ) const
virtual
Returns
The key to the currently active layer.

◆ GetCurrentLayerName()

virtual char const* HMarkupManager::GetCurrentLayerName ( ) const
virtual
Returns
The name of the currently active layer.

◆ GetDefaultLayerKey()

HC_KEY HMarkupManager::GetDefaultLayerKey ( )
inline

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.

◆ GetLayerNames()

virtual char const* HMarkupManager::GetLayerNames ( ) const
virtual

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

◆ GetMarkupColor()

virtual void HMarkupManager::GetMarkupColor ( HPoint markup_color)
inlinevirtual

Returns the existing color of markup data.

Parameters
markup_colorThis method populates the parameter with the color of the markup data.

References HPoint::Set().

◆ GetMarkupKey()

HC_KEY HMarkupManager::GetMarkupKey ( )
inline

Gets the top level markup key.

Returns
Key to the parent segment for all markup layers.

◆ GetMarkupLayerKey()

HC_KEY HMarkupManager::GetMarkupLayerKey ( )
inline

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

Returns
Key to segment containing the individual markup layers.

◆ GetMarkupWeight()

virtual float HMarkupManager::GetMarkupWeight ( )
inlinevirtual
Returns
The existing line/edge weight of markup data.

◆ GetPreviewImage()

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

Returns a preview image to the markup

◆ InsertMarkupSegmentFromMessage()

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

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

Parameters
in_dataHNet data
data_lengthlength of in_data

Referenced by HMarkupMessageHandler::ProcessMessage().

◆ OpenLayer() [1/2]

virtual HC_KEY HMarkupManager::OpenLayer ( const char *  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
layernameif layername refers to an existing segment it will be used to restore that layer, otherwise it will be ignored.
setcamerabool indicating whether the camera used when this layer was initially created should also be restored
emit_messagebool This parameter has been deprecated. Indicating whether or not a message should be transmitted to possible members of a HNet session

◆ OpenLayer() [2/2]

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
layerkeyif layerkey refers to an existing segment it will be used to restore that layer, otherwise it will be ignored.
setcamerabool indicating whether the camera used when this layer was initially created should also be restored

◆ OpenLayerInternal()

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

Switches to new layer and restores camera settings if appropriate

Parameters
layerkeylayer to open
setcameraset camera to stored layer settings

◆ ReInit()

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.

◆ RenameLayer()

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

Renames an existing layer

◆ SetDefaultLayerKey()

void HMarkupManager::SetDefaultLayerKey ( HC_KEY  layerkey)
inline

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

Parameters
layerkeyThe key to the new default layer.

◆ SetMarkupColor()

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.

Parameters
markup_colorRGB color of Markup data

◆ SetMarkupLayerFromMessage()

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

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

Parameters
dataHNet data
data_lengthlength of in_data

Referenced by HMarkupMessageHandler::ProcessMessage().

◆ SetMarkupWeight()

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.

Parameters
weightthe pixel width of the line/edge data

◆ SetupNewLayer()

virtual void HMarkupManager::SetupNewLayer ( )
protectedvirtual

Setup default attributes/camera settings for new markup layer.


The documentation for this class was generated from the following file: