#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. | |
HBaseView * | m_pHView |
A pointer to the view object. |
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.
HMarkupManager::HMarkupManager | ( | HBaseView * | view | ) |
Constructs an HMarkupManager object.
Copy an existing layer
virtual void HMarkupManager::DeleteLayer | ( | const char * | layername | ) | [virtual] |
Deletes a markup layer.
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.
layerkey | The key to the layer which needs to be deleted. |
virtual void HMarkupManager::DisableCurrentLayer | ( | bool | emit_message = true | ) | [virtual] |
Turns off the visibility of the currently active layer.
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::DisableCurrentMarkupLayerFromMessage | ( | const char * | data, |
unsigned int | data_length | ||
) | [virtual] |
This method has been deprecated. Function which receives disable current layer message from HNet Server.
data | HNet data |
data_length | length of in_data |
Referenced by HMarkupMessageHandler::ProcessMessage().
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::EmitMarkupSegment | ( | HC_KEY | key | ) | [virtual] |
This method has been deprecated. Sends data from a Markup Operator to other members of a HNet session.
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::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.
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
layername | Named layer to check exist |
virtual char* HMarkupManager::FindValidLayerName | ( | char * | newlayername | ) | [protected, virtual] |
Creates new unique layer name.
newlayername | pointer to new layer name |
Returns the camera for a layer key. If a camera is set, true is returned.
virtual HC_KEY HMarkupManager::GetCurrentLayerKey | ( | ) | const [virtual] |
virtual char const* HMarkupManager::GetCurrentLayerName | ( | ) | const [virtual] |
HC_KEY HMarkupManager::GetDefaultLayerKey | ( | ) | [inline] |
Get default layer. If no layer is open all new markup, geometry will be added to the default layer
References HC_KEY.
virtual char const* HMarkupManager::GetLayerNames | ( | ) | const [virtual] |
Returns a simicolon separated list of view names such as "Default View;View1;View2;Awesome View;"
virtual void HMarkupManager::GetMarkupColor | ( | HPoint & | markup_color | ) | [inline, virtual] |
Returns the existing color of markup data.
markup_color | This method populates the parameter with the color of the markup data. |
References HPoint::Set().
HC_KEY HMarkupManager::GetMarkupKey | ( | ) | [inline] |
Gets the top level markup key.
References HC_KEY.
HC_KEY HMarkupManager::GetMarkupLayerKey | ( | ) | [inline] |
Gets the key to the segment containing the individual markup layers.
References HC_KEY.
virtual float HMarkupManager::GetMarkupWeight | ( | ) | [inline, virtual] |
virtual bool HMarkupManager::GetPreviewImage | ( | char const * | , |
int * | , | ||
int * | , | ||
int * | , | ||
unsigned char const ** | |||
) | [virtual] |
Returns a preview image to the markup
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.
in_data | HNet data |
data_length | length of in_data |
Referenced by HMarkupMessageHandler::ProcessMessage().
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.
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 |
Opens a Markup layer. If the layer does not exist then a new layer will be created
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 void HMarkupManager::OpenLayerInternal | ( | HC_KEY | layerkey, |
bool | setcamera | ||
) | [protected, virtual] |
Switches to new layer and restores camera settings if appropriate
layerkey | layer to open |
setcamera | set camera to stored layer settings |
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.
Renames an existing layer
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
layerkey | The key to the new default layer. |
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.
markup_color | RGB color of Markup data |
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.
data | HNet data |
data_length | length of in_data |
Referenced by HMarkupMessageHandler::ProcessMessage().
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.
weight | the pixel width of the line/edge data |
virtual void HMarkupManager::SetupNewLayer | ( | ) | [protected, virtual] |
Setup default attributes/camera settings for new markup layer.