Overview

Sample Code

Programming Guide

API Reference

Support

HPS.MarkupOperator Class Reference

The MarkupOperator class defines an operator which allows the user to insert mark-up text and geometry. This Operator works for both mouse- and touch-driven devices. The markup created through this operator will be deleted when the operator is popped from the View.The MarkupOperator allows users to add the following markup types:Freehand: For mouse driven devices, click and move the mouse to draw freehand markup. For touch driven devices, touch down and move your finger to draw freehand markupText: For mouse driven devices, click where you want to place text. Type with the keyboard and click elsewhere when you are done inserting the note. For touch driven devices, tap where you want to place text. Use the software keyboard to type, and hide the keyboard when you are done inserting the note. When inserting text markup on touch devices, the view will shift while inserting text, to allow you to always see the text you are inserting. The view will reset smoothly once you hide the keyboard.Circle: For mouse driven devices, click where you want to place the circle. Move the mouse while holding down the button associated with the operator to change the radius of the circle. For touch driven devices, there are two options available for inserting circle markups: a. tap where you want to place the circle and move your finger to change the circle radius b. tap with two fingers. Move and pinch with the fingers to change the position and radius of the circleRectangle: For mouse driven devices, click where you want to place the top left corner of the rectangle, Move the mouse while holding down the button associated with the operator to change the position of the bottom right corner of the rectangle. For touch driven devices, there are two options available for inserting rectangle markups: a. tap where you want to place the top left corner of the rectangle and move your finger to change the position of the bottom right corner. b. tap with two fingers. Move and pinch with the fingers to change the position and size of the rectangle.On devices with a keyboard, pressing Escape will delete the markup currently being inserted. An event of type MarkupInsertedEvent in injected after a markup is inserted. More...

Inheritance diagram for HPS.MarkupOperator:
HPS.Operator HPS.Sprocket HPS.Object

Classes

class  MarkupInsertedEvent
 

Public Types

enum  MarkupType { Freehand = 0, Text = 1, Circle = 2, Rectangle = 3 }
 
- Public Types inherited from HPS.Operator
enum  Priority { Low = 0, Default = 1, High = 2 }
 

Public Member Functions

void DeleteMarkups ()
 Deletes all markups More...
 
override void Dispose ()
 
HPS.RGBColor GetColor ()
 Returns the color of the markup which will be inserted. More...
 
HPS.LineAttributeKit GetLineAttributes ()
 Returns the line attributes of the markup which will be inserted. More...
 
HPS.MarkupOperator.MarkupType GetMarkupType ()
 Returns the type of markup the operator will insert. More...
 
override string GetName ()
 Returns the name of the operator. More...
 
HPS.SegmentKey GetSegmentKey ()
 Returns the top markup segment. This segment will not be valid before the operator is attached to the view, and after it is detached from the view. More...
 
HPS.TextAttributeKit GetTextAttributes ()
 Changes the color of the markup which will be inserted. More...
 
 MarkupOperator (HPS.MouseButtons in_mouse_trigger, HPS.ModifierKeys in_modifier_trigger)
 
 MarkupOperator (HPS.MouseButtons in_mouse_trigger)
 
override bool OnKeyDown (HPS.KeyboardState in_state)
 This function is called whenever HPS receives a KeyboardState event that signals a button was pressed. This function is used when to type markups of type Text from a desktop. To signal that you are done writing a note, press ESC. More...
 
override bool OnMouseDown (HPS.MouseState in_state)
 This function is called whenever HPS receives a MouseEvent that signals a mouse button was pressed. This function starts inserting markup. In the case of text markup, this function determines where the text will be inserted. More...
 
override bool OnMouseMove (HPS.MouseState in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse moved When the user is inserting freehand markup, this function continues the markup. When the user is inserting a circle, this function changes the circle's radius. When the user is inserting a rectangle, this function changes the rectangle's size. More...
 
override bool OnMouseUp (HPS.MouseState in_state)
 This function is called whenever HPS receives a MouseEvent that signals a mouse button was released. More...
 
override bool OnTextInput (string in_text)
 
override bool OnTouchDown (HPS.TouchState in_state)
 This function is called whenever HPS receives a TouchEvent that signals the device was touched. This function starts inserting markup. In the case of text markup, this function determines where the text will be inserted. More...
 
override bool OnTouchMove (HPS.TouchState in_state)
 This function is called whenever HPS receives a TouchEvent that signals a point of contact has moved. When the user is inserting freehand markup, this function continues the markup. When the user is inserting a circle, this function changes the circle's radius. When the user is inserting a rectangle, this function changes the rectangle's size. More...
 
override bool OnTouchUp (HPS.TouchState in_state)
 This function is called whenever HPS receives a TouchEvent that signals a point of contact has been released. More...
 
override void OnViewAttached ()
 This function is called whenever a view is attached to this operator. More...
 
override void OnViewDetached ()
 This function is called whenever a view is detached from this operator. More...
 
void SetColor (HPS.RGBColor in_color)
 Changes the color of the markup which will be inserted. More...
 
void SetLineAttribute (HPS.LineAttributeKit in_line_attributes)
 Changes the color of the markup which will be inserted. More...
 
void SetMarkupType (HPS.MarkupOperator.MarkupType in_markup_type)
 Changes the type of markup the operator will insert. More...
 
void SetTextAttribute (HPS.TextAttributeKit in_text_attributes)
 Returns the text attributes of the markup which will be inserted. More...
 
- Public Member Functions inherited from HPS.Operator
virtual void Assign (HPS.Operator in_that)
 Assigns the parameter in_that to this operator, resulting in a clone. More...
 
void DetachView ()
 Detaches the Operator from the View it was previously attached to. More...
 
delegate void DtorDelegate (IntPtr cPtr)
 
override bool Equals (System.Object obj)
 
virtual bool Equals (HPS.Operator in_that)
 Tests this operator for equality against the parameter in_that. Same as Operator::operator== More...
 
HPS.View GetAttachedView ()
 Returns the View the Operator is currently attached to. More...
 
override int GetHashCode ()
 
HPS.ModifierKeys GetModifierTrigger ()
 Gets the modifier trigger associated with this operator. More...
 
HPS.MouseButtons GetMouseTrigger ()
 Gets the mouse trigger associated with this operator. More...
 
virtual bool IsMouseTriggered (HPS.MouseState in_state)
 Returns true if the MouseButtons and ModifierKeys are active. More...
 
override HPS.Type ObjectType ()
 This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object. More...
 
virtual bool OnKeyUp (HPS.KeyboardState in_state)
 This function is called whenever HPS receives a KeyboardEvent that signals a key was released. More...
 
virtual void OnModelAttached ()
 This function is called whenever a model is attached to the view that is attached to this operator. If no view is attached to this operator, this function will not be called. More...
 
virtual void OnModelDetached ()
 This function is called whenever a model is detached from the view that is attached to this operator. If no view is attached to this operator, this function will not be called. More...
 
virtual bool OnMouseEnter (HPS.MouseState in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse entered the window. More...
 
virtual bool OnMouseLeave (HPS.MouseState in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse left the window. More...
 
virtual bool OnMouseWheel (HPS.MouseState in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse wheel was scrolled. More...
 
virtual bool OnTimerTick (HPS.TimerTickEvent in_event)
 This function is called whenever HPS receives a TimerTickEvent. More...
 
 Operator (HPS.MouseButtons in_mouse_trigger, HPS.ModifierKeys in_modifier_trigger)
 
 Operator (HPS.MouseButtons in_mouse_trigger)
 
 Operator (HPS.Operator in_that)
 
delegate HPS.Type OperatorDelegate_0 ()
 
delegate void OperatorDelegate_1 (IntPtr in_that)
 
delegate bool OperatorDelegate_10 (IntPtr in_state)
 
delegate bool OperatorDelegate_11 (IntPtr in_state)
 
delegate bool OperatorDelegate_12 (IntPtr in_state)
 
delegate bool OperatorDelegate_13 (IntPtr in_state)
 
delegate bool OperatorDelegate_14 (IntPtr in_state)
 
delegate bool OperatorDelegate_15 (string in_text)
 
delegate bool OperatorDelegate_16 (IntPtr in_event)
 
delegate void OperatorDelegate_17 ()
 
delegate void OperatorDelegate_18 ()
 
delegate void OperatorDelegate_19 ()
 
delegate bool OperatorDelegate_2 (IntPtr in_that)
 
delegate void OperatorDelegate_20 ()
 
delegate bool OperatorDelegate_21 (IntPtr in_state)
 
delegate bool OperatorDelegate_22 ()
 
delegate void OperatorDelegate_23 ()
 
delegate int OperatorDelegate_3 (int ret_maxsize, IntPtr ret_str)
 
delegate bool OperatorDelegate_4 (IntPtr in_state)
 
delegate bool OperatorDelegate_5 (IntPtr in_state)
 
delegate bool OperatorDelegate_6 (IntPtr in_state)
 
delegate bool OperatorDelegate_7 (IntPtr in_state)
 
delegate bool OperatorDelegate_8 (IntPtr in_state)
 
delegate bool OperatorDelegate_9 (IntPtr in_state)
 
void SetModifierTrigger (HPS.ModifierKeys in_modifiers)
 Sets the modifier trigger associated with this operator. More...
 
void SetMouseTrigger (HPS.MouseButtons in_buttons)
 Sets the mouse trigger for this operator More...
 
- Public Member Functions inherited from HPS.Sprocket
 Sprocket (HPS.Sprocket in_that)
 
- Public Member Functions inherited from HPS.Object
virtual bool Empty ()
 Indicates whether this object has any values set on it. More...
 
IntPtr GetClassID ()
 
IntPtr GetInstanceID ()
 Returns an identifier that can be used to identify which instance of a class an object is. Different keys and controls will return the same value if they are backed by the same database resource. More...
 
bool HasType (HPS.Type in_mask)
 This function indicates whether this Object has the given Type mask. More...
 
 Object (HPS.Object that)
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
HPS.Type Type ()
 This function returns the true type of the underlying object. This function is useful for finding the type of smart pointer objects that have been cast to more generic types. More...
 

Protected Member Functions

override void deleteCptr ()
 
- Protected Member Functions inherited from HPS.Operator
void DtorCallback (IntPtr p)
 
override IntPtr GetNonDirectorClassID ()
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS.Operator
static bool operator!= (HPS.Operator a, HPS.Operator b)
 
static bool operator== (HPS.Operator a, HPS.Operator b)
 
- Static Public Member Functions inherited from HPS.Object
static IntPtr ClassID< T > ()
 
- Protected Attributes inherited from HPS.Object
bool cMemOwn
 
HandleRef cptr
 
HandleRef scptr
 

Detailed Description

The MarkupOperator class defines an operator which allows the user to insert mark-up text and geometry. This Operator works for both mouse- and touch-driven devices. The markup created through this operator will be deleted when the operator is popped from the View.The MarkupOperator allows users to add the following markup types:Freehand: For mouse driven devices, click and move the mouse to draw freehand markup. For touch driven devices, touch down and move your finger to draw freehand markupText: For mouse driven devices, click where you want to place text. Type with the keyboard and click elsewhere when you are done inserting the note. For touch driven devices, tap where you want to place text. Use the software keyboard to type, and hide the keyboard when you are done inserting the note. When inserting text markup on touch devices, the view will shift while inserting text, to allow you to always see the text you are inserting. The view will reset smoothly once you hide the keyboard.Circle: For mouse driven devices, click where you want to place the circle. Move the mouse while holding down the button associated with the operator to change the radius of the circle. For touch driven devices, there are two options available for inserting circle markups: a. tap where you want to place the circle and move your finger to change the circle radius b. tap with two fingers. Move and pinch with the fingers to change the position and radius of the circleRectangle: For mouse driven devices, click where you want to place the top left corner of the rectangle, Move the mouse while holding down the button associated with the operator to change the position of the bottom right corner of the rectangle. For touch driven devices, there are two options available for inserting rectangle markups: a. tap where you want to place the top left corner of the rectangle and move your finger to change the position of the bottom right corner. b. tap with two fingers. Move and pinch with the fingers to change the position and size of the rectangle.On devices with a keyboard, pressing Escape will delete the markup currently being inserted. An event of type MarkupInsertedEvent in injected after a markup is inserted.

Member Function Documentation

void HPS.MarkupOperator.DeleteMarkups ( )
inline

Deletes all markups

HPS.RGBColor HPS.MarkupOperator.GetColor ( )
inline

Returns the color of the markup which will be inserted.

Returns
The color which will be used for the next markup
HPS.LineAttributeKit HPS.MarkupOperator.GetLineAttributes ( )
inline

Returns the line attributes of the markup which will be inserted.

Returns
The LineAttributeKit which will be used for the next markup
HPS.MarkupOperator.MarkupType HPS.MarkupOperator.GetMarkupType ( )
inline

Returns the type of markup the operator will insert.

override string HPS.MarkupOperator.GetName ( )
inlinevirtual

Returns the name of the operator.

Reimplemented from HPS.Operator.

HPS.SegmentKey HPS.MarkupOperator.GetSegmentKey ( )
inline

Returns the top markup segment. This segment will not be valid before the operator is attached to the view, and after it is detached from the view.

Returns
The segment containing all the markups inserted by this operator
HPS.TextAttributeKit HPS.MarkupOperator.GetTextAttributes ( )
inline

Changes the color of the markup which will be inserted.

Returns
The TextAttributeKit which will be used for the next markup
override bool HPS.MarkupOperator.OnKeyDown ( HPS.KeyboardState  in_state)
inlinevirtual

This function is called whenever HPS receives a KeyboardState event that signals a button was pressed. This function is used when to type markups of type Text from a desktop. To signal that you are done writing a note, press ESC.

Parameters
in_stateA KeyboardState object describing the current keyboard state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from HPS.Operator.

override bool HPS.MarkupOperator.OnMouseDown ( HPS.MouseState  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals a mouse button was pressed. This function starts inserting markup. In the case of text markup, this function determines where the text will be inserted.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from HPS.Operator.

override bool HPS.MarkupOperator.OnMouseMove ( HPS.MouseState  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals the mouse moved When the user is inserting freehand markup, this function continues the markup. When the user is inserting a circle, this function changes the circle's radius. When the user is inserting a rectangle, this function changes the rectangle's size.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from HPS.Operator.

override bool HPS.MarkupOperator.OnMouseUp ( HPS.MouseState  in_state)
inlinevirtual

This function is called whenever HPS receives a MouseEvent that signals a mouse button was released.

Parameters
in_stateA MouseState object describing the current mouse state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from HPS.Operator.

override bool HPS.MarkupOperator.OnTouchDown ( HPS.TouchState  in_state)
inlinevirtual

This function is called whenever HPS receives a TouchEvent that signals the device was touched. This function starts inserting markup. In the case of text markup, this function determines where the text will be inserted.

Parameters
in_stateA TouchState object describing the current touch state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from HPS.Operator.

override bool HPS.MarkupOperator.OnTouchMove ( HPS.TouchState  in_state)
inlinevirtual

This function is called whenever HPS receives a TouchEvent that signals a point of contact has moved. When the user is inserting freehand markup, this function continues the markup. When the user is inserting a circle, this function changes the circle's radius. When the user is inserting a rectangle, this function changes the rectangle's size.

Parameters
in_stateA TouchState object describing the current touch state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from HPS.Operator.

override bool HPS.MarkupOperator.OnTouchUp ( HPS.TouchState  in_state)
inlinevirtual

This function is called whenever HPS receives a TouchEvent that signals a point of contact has been released.

Parameters
in_stateA TouchState object describing the current touch state.
Returns
true if the input event was handled, false otherwise.

Reimplemented from HPS.Operator.

override void HPS.MarkupOperator.OnViewAttached ( )
inlinevirtual

This function is called whenever a view is attached to this operator.

Reimplemented from HPS.Operator.

override void HPS.MarkupOperator.OnViewDetached ( )
inlinevirtual

This function is called whenever a view is detached from this operator.

Reimplemented from HPS.Operator.

void HPS.MarkupOperator.SetColor ( HPS.RGBColor  in_color)
inline

Changes the color of the markup which will be inserted.

void HPS.MarkupOperator.SetLineAttribute ( HPS.LineAttributeKit  in_line_attributes)
inline

Changes the color of the markup which will be inserted.

void HPS.MarkupOperator.SetMarkupType ( HPS.MarkupOperator.MarkupType  in_markup_type)
inline

Changes the type of markup the operator will insert.

void HPS.MarkupOperator.SetTextAttribute ( HPS.TextAttributeKit  in_text_attributes)
inline

Returns the text attributes of the markup which will be inserted.


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