#include <sprk_ops.h>
Classes | |
class | MarkupInsertedEvent |
Public Types | |
enum | MarkupType { Freehand, Text, Circle, Rectangle } |
![]() | |
enum | Priority { Low, Default, High } |
Public Member Functions | |
void | DeleteMarkups () |
RGBColor | GetColor () |
LineAttributeKit | GetLineAttributes () |
MarkupType | GetMarkupType () |
virtual HPS::UTF8 | GetName () const OVERRIDE |
SegmentKey | GetSegmentKey () |
TextAttributeKit | GetTextAttributes () |
MarkupOperator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys()) | |
virtual bool | OnKeyDown (KeyboardState const &in_state) OVERRIDE |
virtual bool | OnMouseDown (MouseState const &in_state) OVERRIDE |
virtual bool | OnMouseMove (MouseState const &in_state) OVERRIDE |
virtual bool | OnMouseUp (MouseState const &in_state) OVERRIDE |
virtual bool | OnTextInput (HPS::UTF8 const &in_text) OVERRIDE |
virtual bool | OnTouchDown (TouchState const &in_state) OVERRIDE |
virtual bool | OnTouchMove (TouchState const &in_state) OVERRIDE |
virtual bool | OnTouchUp (TouchState const &in_state) OVERRIDE |
virtual void | OnViewAttached () OVERRIDE |
virtual void | OnViewDetached () OVERRIDE |
void | SetColor (RGBColor const &in_color) |
void | SetLineAttribute (LineAttributeKit const &in_line_attributes) |
void | SetMarkupType (MarkupType in_markup_type) |
void | SetTextAttribute (TextAttributeKit const &in_text_attributes) |
![]() | |
virtual void | Assign (Operator const &in_that) |
void | DetachView () |
virtual bool | Equals (Operator const &in_that) const |
View | GetAttachedView () const |
ModifierKeys | GetModifierTrigger () const |
MouseButtons | GetMouseTrigger () const |
virtual bool | IsMouseTriggered (MouseState const &in_state) |
HPS::Type | ObjectType () const |
virtual bool | OnKeyUp (KeyboardState const &in_state) |
virtual void | OnModelAttached () |
virtual void | OnModelDetached () |
virtual bool | OnMouseEnter (MouseState const &in_state) |
virtual bool | OnMouseLeave (MouseState const &in_state) |
virtual bool | OnMouseWheel (MouseState const &in_state) |
virtual bool | OnTimerTick (HPS::TimerTickEvent const &in_event) |
Operator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys()) | |
Operator (Operator const &in_that) | |
virtual bool | operator!= (Operator const &in_that) const |
virtual Operator & | operator= (Operator const &in_that) |
virtual bool | operator== (Operator const &in_that) const |
void | SetModifierTrigger (ModifierKeys in_modifiers) |
void | SetMouseTrigger (MouseButtons in_buttons) |
![]() | |
Sprocket (HPS::Sprocket const &in_that)=default | |
Sprocket (Sprocket &&in_that) | |
![]() | |
virtual bool | Empty () const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (HPS::Type in_mask) const |
Object (Object const &that) | |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
HPS::Type | Type () const |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
![]() | |
HPS::ModifierKeys | modifier_trigger |
HPS::MouseButtons | mouse_trigger |
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:
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.
void HPS::MarkupOperator::DeleteMarkups | ( | ) |
Deletes all markups
|
inline |
Returns the color of the markup which will be inserted.
|
inline |
Returns the line attributes of the markup which will be inserted.
|
inline |
Returns the type of markup the operator will insert.
|
inlinevirtual |
Returns the name of the operator.
Reimplemented from HPS::Operator.
|
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.
|
inline |
Changes the color of the markup which will be inserted.
|
virtual |
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.
in_state | A KeyboardState object describing the current keyboard state. |
Reimplemented from HPS::Operator.
|
virtual |
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.
in_state | A MouseState object describing the current mouse state. |
Reimplemented from HPS::Operator.
|
virtual |
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.
in_state | A MouseState object describing the current mouse state. |
Reimplemented from HPS::Operator.
|
virtual |
This function is called whenever HPS receives a MouseEvent that signals a mouse button was released.
in_state | A MouseState object describing the current mouse state. |
Reimplemented from HPS::Operator.
|
virtual |
This function is called whenever HPS receives a TextInput event that signals a text string was received. This function is used when to type markups of type Text from a mobile device. To signal that you are done writing a note, inject a HideKeyboardEvent.
in_text | The text string received. |
Reimplemented from HPS::Operator.
|
virtual |
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.
in_state | A TouchState object describing the current touch state. |
Reimplemented from HPS::Operator.
|
virtual |
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.
in_state | A TouchState object describing the current touch state. |
Reimplemented from HPS::Operator.
|
virtual |
This function is called whenever HPS receives a TouchEvent that signals a point of contact has been released.
in_state | A TouchState object describing the current touch state. |
Reimplemented from HPS::Operator.
|
virtual |
This function is called whenever a view is attached to this operator.
Reimplemented from HPS::Operator.
|
virtual |
This function is called whenever a view is detached from this operator.
Reimplemented from HPS::Operator.
|
inline |
Changes the color of the markup which will be inserted.
|
inline |
Changes the color of the markup which will be inserted.
|
inline |
Changes the type of markup the operator will insert.
|
inline |
Returns the text attributes of the markup which will be inserted.