
Classes | |
class | MarkupInsertedEvent |
Public Types | |
enum | MarkupType { Freehand = 0, Text = 1, Circle = 2, Rectangle = 3 } |
![]() | |
enum | Priority { Low = 0, Default = 1, High = 2 } |
Public Member Functions | |
void | DeleteMarkups () |
override void | Dispose () |
HPS.RGBColor | GetColor () |
HPS.LineAttributeKit | GetLineAttributes () |
HPS.MarkupOperator.MarkupType | GetMarkupType () |
override string | GetName () |
HPS.SegmentKey | GetSegmentKey () |
HPS.TextAttributeKit | GetTextAttributes () |
bool | IsMarkupActive () |
MarkupOperator (HPS.MouseButtons in_mouse_trigger, HPS.ModifierKeys in_modifier_trigger) | |
MarkupOperator (HPS.MouseButtons in_mouse_trigger) | |
MarkupOperator (HPS.MarkupOperator in_that) | |
override bool | OnKeyDown (HPS.KeyboardState in_state) |
override bool | OnMouseDown (HPS.MouseState in_state) |
override bool | OnMouseMove (HPS.MouseState in_state) |
override bool | OnMouseUp (HPS.MouseState in_state) |
override bool | OnTextInput (string in_text) |
override bool | OnTouchDown (HPS.TouchState in_state) |
override bool | OnTouchMove (HPS.TouchState in_state) |
override bool | OnTouchUp (HPS.TouchState in_state) |
override void | OnViewAttached (HPS.View in_attached_view) |
override void | OnViewDetached (HPS.View in_detached_view) |
void | SetColor (HPS.RGBColor in_color) |
void | SetLineAttribute (HPS.LineAttributeKit in_line_attributes) |
void | SetMarkupType (HPS.MarkupOperator.MarkupType in_markup_type) |
void | SetTextAttribute (HPS.TextAttributeKit in_text_attributes) |
![]() | |
virtual void | Assign (HPS.Operator in_that) |
void | DetachView () |
delegate void | DtorDelegate (IntPtr cPtr) |
override bool | Equals (System.Object obj) |
virtual bool | Equals (HPS.Operator in_that) |
HPS.View | GetAttachedView () |
override int | GetHashCode () |
HPS.ModifierKeys | GetModifierTrigger () |
HPS.MouseButtons | GetMouseTrigger () |
virtual bool | IsMouseTriggered (HPS.MouseState in_state) |
override HPS.Type | ObjectType () |
virtual bool | OnKeyUp (HPS.KeyboardState in_state) |
virtual void | OnModelAttached () |
virtual void | OnModelDetached () |
virtual bool | OnMouseEnter (HPS.MouseState in_state) |
virtual bool | OnMouseLeave (HPS.MouseState in_state) |
virtual bool | OnMouseWheel (HPS.MouseState in_state) |
virtual bool | OnTimerTick (HPS.TimerTickEvent in_event) |
Operator (HPS.MouseButtons in_mouse_trigger, HPS.ModifierKeys in_modifier_trigger) | |
Operator (HPS.MouseButtons in_mouse_trigger) | |
Operator (HPS.Operator in_that) | |
delegate void | RemoveCacheItemDelegate (IntPtr cPtr) |
void | SetModifierTrigger (HPS.ModifierKeys in_modifiers) |
void | SetMouseTrigger (HPS.MouseButtons in_buttons) |
![]() | |
Sprocket (HPS.Sprocket in_that) | |
![]() | |
virtual bool | Empty () |
IntPtr | GetClassID () |
IntPtr | GetInstanceID () |
bool | HasType (HPS.Type in_mask) |
Object (HPS.Object that) | |
virtual void | Reset () |
virtual HPS.Type | Type () |
Additional Inherited Members | |
![]() | |
static bool | operator!= (HPS.Operator a, HPS.Operator b) |
static bool | operator== (HPS.Operator a, HPS.Operator b) |
![]() | |
static IntPtr | ClassID< T > () |
![]() | |
HandleRef | sptr |
![]() | |
bool | cMemOwn |
HandleRef | cptr |
![]() | |
static Dictionary< IntPtr, Operator > | cachedObjects = new Dictionary<IntPtr, Operator>() |
static Dictionary< IntPtr, WeakReference > | cachedWeakRefs = new Dictionary<IntPtr, WeakReference>() |
static ReaderWriterLockSlim | mapLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion) |
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:<itemizedlist><listitem>
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 markup
</listitem><listitem>
Text: 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.
</listitem><listitem>
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 circle
</listitem><listitem>
Rectangle: 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.
</listitem></itemizedlist>
Member Function Documentation
◆ DeleteMarkups()
|
inline |
Deletes all markups
◆ GetColor()
|
inline |
Returns the color of the markup which will be inserted.
- Returns
- The color which will be used for the next markup
◆ GetLineAttributes()
|
inline |
Returns the line attributes of the markup which will be inserted.
- Returns
- The LineAttributeKit which will be used for the next markup
◆ GetMarkupType()
|
inline |
Returns the type of markup the operator will insert.
◆ GetName()
|
inlinevirtual |
Returns the name of the operator.
Reimplemented from HPS.Operator.
◆ 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
◆ GetTextAttributes()
|
inline |
Changes the color of the markup which will be inserted.
- Returns
- The TextAttributeKit which will be used for the next markup
◆ IsMarkupActive()
|
inline |
Whether a markup is currently being inserted.
- Returns
- true if a markup is being inserted, false otherwise.
◆ OnKeyDown()
|
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_state A KeyboardState object describing the current keyboard state.
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS.Operator.
◆ OnMouseDown()
|
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_state A MouseState object describing the current mouse state.
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS.Operator.
◆ OnMouseMove()
|
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_state A MouseState object describing the current mouse state.
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS.Operator.
◆ OnMouseUp()
|
inlinevirtual |
This function is called whenever HPS receives a MouseEvent that signals a mouse button was released.
- Parameters
-
in_state A MouseState object describing the current mouse state.
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS.Operator.
◆ OnTouchDown()
|
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_state A TouchState object describing the current touch state.
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS.Operator.
◆ OnTouchMove()
|
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_state A TouchState object describing the current touch state.
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS.Operator.
◆ OnTouchUp()
|
inlinevirtual |
This function is called whenever HPS receives a TouchEvent that signals a point of contact has been released.
- Parameters
-
in_state A TouchState object describing the current touch state.
- Returns
- true if the input event was handled, false otherwise.
Reimplemented from HPS.Operator.
◆ OnViewAttached()
|
inlinevirtual |
This function is called whenever a view is attached to this operator.
- Parameters
-
in_attached_view The view attached to this operator.
Reimplemented from HPS.Operator.
◆ OnViewDetached()
|
inlinevirtual |
This function is called whenever a view is detached from this operator.
- Parameters
-
in_detached_view The view detached from this operator.
Reimplemented from HPS.Operator.
◆ SetColor()
|
inline |
Changes the color of the markup which will be inserted.
◆ SetLineAttribute()
|
inline |
Changes the color of the markup which will be inserted.
◆ SetMarkupType()
|
inline |
Changes the type of markup the operator will insert.
◆ SetTextAttribute()
|
inline |
Returns the text attributes of the markup which will be inserted.
The documentation for this class was generated from the following file:
- internals/hps_sprk_ops/source/cs/HPS.MarkupOperator.cs