Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::MarkupOperator Class Reference

The MarkupOperator class defines an operator which allows the user to insert mark-up text and geometry. More...

#include <sprk_ops.h>

Inheritance diagram for HPS::MarkupOperator:
Collaboration diagram for HPS::MarkupOperator:

Classes

struct  Attributes
 
class  KeyboardHiddenEventHandler
 
class  MarkupInsertedEvent
 

Public Types

enum  MarkupType {
  MarkupType::Freehand,
  MarkupType::Text,
  MarkupType::Circle,
  MarkupType::Rectangle
}
 
enum  Priority {
  Priority::Low,
  Priority::Default,
  Priority::High
}
 

Public Member Functions

 MarkupOperator (MouseButtons in_mouse_trigger=MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger=ModifierKeys())
 
virtual HPS::UTF8 GetName () const override
 Returns the name of the operator. More...
 
virtual void OnViewAttached () override
 This function is called whenever a view is attached to this operator. More...
 
virtual void OnViewDetached () override
 This function is called whenever a view is detached from this operator. More...
 
virtual bool OnMouseDown (MouseState const &in_state) override
 This function is called whenever HPS receives a MouseEvent that signals a mouse button was pressed. More...
 
virtual bool OnMouseUp (MouseState const &in_state) override
 This function is called whenever HPS receives a MouseEvent that signals a mouse button was released. More...
 
virtual bool OnMouseMove (MouseState const &in_state) override
 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. More...
 
virtual bool OnTouchDown (TouchState const &in_state) override
 This function is called whenever HPS receives a TouchEvent that signals the device was touched. More...
 
virtual bool OnTouchUp (TouchState const &in_state) override
 This function is called whenever HPS receives a TouchEvent that signals a point of contact has been released. More...
 
virtual bool OnTouchMove (TouchState const &in_state) override
 This function is called whenever HPS receives a TouchEvent that signals a point of contact has moved. More...
 
virtual bool OnKeyDown (KeyboardState const &in_state) override
 This function is called whenever HPS receives a KeyboardState event that signals a button was pressed. More...
 
virtual bool OnTextInput (HPS::UTF8 const &in_text) override
 This function is called whenever HPS receives a TextInput event that signals a text string was received. More...
 
MarkupType GetMarkupType ()
 Returns the type of markup the operator will insert. More...
 
void SetMarkupType (MarkupType in_markup_type)
 Changes the type of markup the operator will insert. More...
 
RGBColor GetColor ()
 Returns the color of the markup which will be inserted. More...
 
void SetColor (RGBColor const &in_color)
 Changes the color of the markup which will be inserted. More...
 
TextAttributeKit GetTextAttributes ()
 Changes the color of the markup which will be inserted. More...
 
void SetTextAttribute (TextAttributeKit const &in_text_attributes)
 Returns the text attributes of the markup which will be inserted. More...
 
LineAttributeKit GetLineAttributes ()
 Returns the line attributes of the markup which will be inserted. More...
 
void SetLineAttribute (LineAttributeKit const &in_line_attributes)
 Changes the color of the markup which will be inserted. More...
 
SegmentKey GetSegmentKey ()
 Returns the top markup segment. More...
 
void DeleteMarkups ()
 Deletes all markups. More...
 
bool IsMarkupActive ()
 Whether a markup is currently being inserted. More...
 
HPS::Type ObjectType () const
 
virtual void Assign (Operator const &in_that)
 Assigns the parameter in_that to this operator, resulting in a clone. More...
 
virtual bool Equals (Operator const &in_that) const
 Tests this operator for equality against the parameter in_that. More...
 
virtual bool operator!= (Operator const &in_that) const
 Tests this operator for non-equality against the parameter in_that. More...
 
virtual bool operator== (Operator const &in_that) const
 Tests this operator for equality against the parameter in_that. More...
 
void DetachView ()
 Detaches the Operator from the View it was previously attached to. More...
 
View GetAttachedView () const
 Returns the View the Operator is currently attached to. More...
 
virtual bool OnMouseWheel (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse wheel was scrolled. More...
 
virtual bool OnMouseEnter (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse entered the window. More...
 
virtual bool OnMouseLeave (MouseState const &in_state)
 This function is called whenever HPS receives a MouseEvent that signals the mouse left the window. More...
 
virtual bool OnKeyUp (KeyboardState const &in_state)
 This function is called whenever HPS receives a KeyboardEvent that signals a key was released. More...
 
virtual bool OnTimerTick (HPS::TimerTickEvent const &in_event)
 This function is called whenever HPS receives a TimerTickEvent. More...
 
virtual void OnModelAttached ()
 This function is called whenever a model is attached to the view that is attached to this operator. More...
 
virtual void OnModelDetached ()
 This function is called whenever a model is detached from the view that is attached to this operator. More...
 
void SetMouseTrigger (MouseButtons in_buttons)
 Sets the mouse trigger for this operator. More...
 
MouseButtons GetMouseTrigger () const
 Gets the mouse trigger associated with this operator. More...
 
void SetModifierTrigger (ModifierKeys in_modifiers)
 Sets the modifier trigger associated with this operator. More...
 
ModifierKeys GetModifierTrigger () const
 Gets the modifier trigger associated with this operator. More...
 
virtual bool IsMouseTriggered (MouseState const &in_state)
 Returns true if the MouseButtons and ModifierKeys are active. More...
 
virtual HPS::Type Type () const
 This function returns the true type of the underlying object. More...
 
virtual bool Empty () const
 Indicates whether this object has any values set on it. More...
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
bool HasType (HPS::Type in_mask) const
 This function indicates whether this Object has the given Type mask. More...
 
intptr_t GetClassID () const
 Returns a unique identifier that is shared by all objects of the same class. More...
 
intptr_t GetInstanceID () const
 Returns an identifier that can be used to identify which instance of a class an object is. More...
 

Static Public Member Functions

template<typename T >
static intptr_t ClassID ()
 Unique identifier for this class. More...
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::Operator
 

Private Member Functions

bool SetupConstructionSegments ()
 
void LookupSegment ()
 
void CreateNewMarkupSegment ()
 
void DrawFreehand (Point const &location)
 
void DrawText ()
 
void DrawCircle (Point const &location)
 
void DrawCircleFromTwoPoints (Point const &point_one, Point const &point_two)
 
void DrawRectangleFromTwoPoints (Point const &point_one, Point const &point_two)
 
void DrawRectangle (Point const &location)
 
void CenterCameras (Point const &main_camera_center, Point const &markup_camera_center)
 
void ResetCameras ()
 
void EndTextNote ()
 

Private Attributes

std::unordered_multimap< RGBColor, SegmentKeyattribute_map
 
MouseButtons mouse_trigger
 
ModifierKeys modifier_trigger
 
MarkupType markup_type
 
SegmentKey markup_segment
 
SegmentKey current_segment
 
Attributes current_attributes
 
Point start_point
 
bool start_new_line
 
LineKey current_line
 
size_t current_line_size
 
CircleKey current_circle
 
LineKey current_circle_line
 
LineKey current_rectangle
 
View last_attached_view
 
bool start_new_note
 
bool keyboard_active
 
TextKey default_text
 
TextKey current_text
 
SizeTArray text_columns
 
size_t current_text_row
 
bool operator_active
 
TouchID tracked_touch_id
 
TouchID second_tracked_touch_id
 
CameraKit original_camera
 
CameraKit original_markup_camera
 
KeyboardHiddenEventHandler handler
 

Static Private Attributes

static const RGBColor default_color
 
static const TextAttributeKit default_text_attributes
 
static const LineAttributeKit default_line_attributes
 

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 markup
  • 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.
  • 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
  • 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.

Member Enumeration Documentation

◆ MarkupType

Enumerator
Freehand 
Text 
Circle 
Rectangle 

◆ Priority

enum HPS::Operator::Priority
stronginherited
Enumerator
Low 
Default 
High 

Constructor & Destructor Documentation

◆ MarkupOperator()

HPS::MarkupOperator::MarkupOperator ( MouseButtons  in_mouse_trigger = MouseButtons::ButtonLeft(),
ModifierKeys  in_modifier_trigger = ModifierKeys() 
)

Member Function Documentation

◆ Assign()

virtual void HPS::Operator::Assign ( Operator const &  in_that)
virtualinherited

Assigns the parameter in_that to this operator, resulting in a clone.

◆ CenterCameras()

void HPS::MarkupOperator::CenterCameras ( Point const &  main_camera_center,
Point const &  markup_camera_center 
)
private

◆ ClassID()

template<typename T >
static intptr_t HPS::Object::ClassID ( )
inlinestaticinherited

Unique identifier for this class.

Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.

◆ CreateNewMarkupSegment()

void HPS::MarkupOperator::CreateNewMarkupSegment ( )
private

◆ DeleteMarkups()

void HPS::MarkupOperator::DeleteMarkups ( )

Deletes all markups.

◆ DetachView()

void HPS::Operator::DetachView ( )
inherited

Detaches the Operator from the View it was previously attached to.

◆ DrawCircle()

void HPS::MarkupOperator::DrawCircle ( Point const &  location)
private

◆ DrawCircleFromTwoPoints()

void HPS::MarkupOperator::DrawCircleFromTwoPoints ( Point const &  point_one,
Point const &  point_two 
)
private

◆ DrawFreehand()

void HPS::MarkupOperator::DrawFreehand ( Point const &  location)
private

◆ DrawRectangle()

void HPS::MarkupOperator::DrawRectangle ( Point const &  location)
private

◆ DrawRectangleFromTwoPoints()

void HPS::MarkupOperator::DrawRectangleFromTwoPoints ( Point const &  point_one,
Point const &  point_two 
)
private

◆ DrawText()

void HPS::MarkupOperator::DrawText ( )
private

◆ Empty()

virtual bool HPS::Object::Empty ( ) const
inlinevirtualinherited

Indicates whether this object has any values set on it.

Returns
true if no values are set on this object, false otherwise.

Reimplemented in HPS::STL::ImportResultsKit, HPS::STL::ImportOptionsKit, HPS::OBJ::ImportResultsKit, HPS::OBJ::ImportOptionsKit, HPS::Hardcopy::File::ExportOptionsKit, HPS::Stream::ExportOptionsKit, HPS::Stream::ImportResultsKit, HPS::Stream::ImportOptionsKit, HPS::PointCloud::ImportOptionsKit, HPS::PointCloud::ImportResultsKit, HPS::UpdateOptionsKit, HPS::HighlightSearchOptionsKit, HPS::HighlightOptionsKit, HPS::SelectionOptionsKit, HPS::SearchOptionsKit, HPS::CutGeometryGatheringOptionsKit, HPS::ShapeKit, HPS::ShaderKit, HPS::Shader::ImportOptionsKit, HPS::ImageKit, HPS::Image::ImportOptionsKit, HPS::Image::ExportOptionsKit, HPS::TextureOptionsKit, HPS::LinePatternKit, HPS::LinePatternParallelKit, HPS::LinePatternOptionsKit, HPS::GlyphKit, HPS::ApplicationWindowOptionsKit, HPS::OffScreenWindowOptionsKit, HPS::StandAloneWindowOptionsKit, HPS::GridKit, HPS::PolygonKit, HPS::MeshKit, HPS::ShellKit, HPS::ShellRelationResultsKit, HPS::ShellRelationOptionsKit, HPS::ShellOptimizationOptionsKit, HPS::TextKit, HPS::EllipticalArcKit, HPS::EllipseKit, HPS::TrimKit, HPS::NURBSSurfaceKit, HPS::NURBSCurveKit, HPS::SpotlightKit, HPS::InfiniteLineKit, HPS::CuttingSectionKit, HPS::CircularWedgeKit, HPS::CircularArcKit, HPS::CircleKit, HPS::SphereKit, HPS::CylinderKit, HPS::DistantLightKit, HPS::MarkerKit, HPS::LineKit, HPS::AttributeLockKit, HPS::FontInfoState, HPS::WindowInfoKit, HPS::DebuggingKit, HPS::SubwindowKit, HPS::ContourLineKit, HPS::VisualEffectsKit, HPS::TransformMaskKit, HPS::PostProcessEffectsKit, HPS::DrawingAttributeKit, HPS::HiddenLineAttributeKit, HPS::PerformanceKit, HPS::NURBSSurfaceAttributeKit, HPS::MaterialKit, HPS::MaterialMappingKit, HPS::MatrixKit, HPS::CurveAttributeKit, HPS::EdgeAttributeKit, HPS::LineAttributeKit, HPS::TextAttributeKit, HPS::CuttingSectionAttributeKit, HPS::CylinderAttributeKit, HPS::LightingAttributeKit, HPS::SphereAttributeKit, HPS::MarkerAttributeKit, HPS::CullingKit, HPS::ColorInterpolationKit, HPS::TransparencyKit, HPS::SelectabilityKit, HPS::CameraKit, HPS::VisibilityKit, HPS::BoundingKit, HPS::SegmentOptimizationOptionsKit, HPS::Publish::ExportOptionsKit, HPS::Publish::TextFieldKit, HPS::Publish::SignatureFieldKit, HPS::Publish::DropDownListKit, HPS::Exchange::TessellationOptionsKit, HPS::Publish::ListBoxKit, HPS::Exchange::ExportSTEPOptionsKit, HPS::Exchange::ExportParasolidOptionsKit, HPS::Publish::RadioButtonKit, HPS::Exchange::ExportIGESOptionsKit, HPS::Exchange::ExportXMLOptionsKit, HPS::Publish::CheckBoxKit, HPS::Exchange::ExportU3DOptionsKit, HPS::Exchange::ExportSTLOptionsKit, HPS::Publish::ButtonKit, HPS::Exchange::ExportPRCOptionsKit, HPS::Publish::LinkKit, HPS::Exchange::ExportJTOptionsKit, HPS::Publish::SlideTableKit, HPS::Exchange::ExportACISOptionsKit, HPS::Publish::TableKit, HPS::Exchange::Export3MFOptionsKit, HPS::Publish::ImageKit, HPS::Publish::TextKit, HPS::Exchange::ModelFileImportOptionsKit, HPS::Publish::ViewKit, HPS::Exchange::TranslationOptionsKit, HPS::Publish::ArtworkKit, HPS::Publish::AnnotationKit, HPS::ComponentPath, HPS::Exchange::ImportOptionsKit, HPS::Parasolid::ExportOptionsKit, HPS::Exchange::NURBSConversionOptionsKit, HPS::Parasolid::LineTessellationKit, HPS::Exchange::Configuration, HPS::Publish::PageKit, HPS::Parasolid::FacetTessellationKit, HPS::Publish::DocumentKit, HPS::Parasolid::ImportOptionsKit, HPS::DWG::ImportOptionsKit, HPS::OOC::ImportOptionsKit, HPS::Sketchup::ImportOptionsKit, and HPS::Sketchup::ImportResultsKit.

◆ EndTextNote()

void HPS::MarkupOperator::EndTextNote ( )
private

◆ Equals()

virtual bool HPS::Operator::Equals ( Operator const &  in_that) const
virtualinherited

Tests this operator for equality against the parameter in_that.

Same as Operator::operator==

◆ GetAttachedView()

View HPS::Operator::GetAttachedView ( ) const
inherited

Returns the View the Operator is currently attached to.

◆ GetClassID()

intptr_t HPS::Object::GetClassID ( ) const
inherited

Returns a unique identifier that is shared by all objects of the same class.

Returns
A unique value shared by all objects of the same class.

◆ GetColor()

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

◆ GetInstanceID()

intptr_t HPS::Object::GetInstanceID ( ) const
inherited

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.

Returns
A value unique to an instance of an object and all objects that are backed by the same database resource.

◆ GetLineAttributes()

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

◆ GetMarkupType()

MarkupType HPS::MarkupOperator::GetMarkupType ( )
inline

Returns the type of markup the operator will insert.

◆ GetModifierTrigger()

ModifierKeys HPS::Operator::GetModifierTrigger ( ) const
inlineinherited

Gets the modifier trigger associated with this operator.

◆ GetMouseTrigger()

MouseButtons HPS::Operator::GetMouseTrigger ( ) const
inlineinherited

Gets the mouse trigger associated with this operator.

◆ GetName()

virtual HPS::UTF8 HPS::MarkupOperator::GetName ( ) const
inlineoverridevirtual

Returns the name of the operator.

Reimplemented from HPS::Operator.

◆ GetSegmentKey()

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

◆ GetTextAttributes()

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

◆ HasType()

bool HPS::Object::HasType ( HPS::Type  in_mask) const
inherited

This function indicates whether this Object has the given Type mask.

Parameters
in_maskThe Type mask to check against this Object.
Returns
true if this Object has the given Type mask, false otherwise.

◆ IsMarkupActive()

bool HPS::MarkupOperator::IsMarkupActive ( )
inline

Whether a markup is currently being inserted.

Returns
true if a markup is being inserted, false otherwise.

◆ IsMouseTriggered()

virtual bool HPS::Operator::IsMouseTriggered ( MouseState const &  in_state)
inlinevirtualinherited

Returns true if the MouseButtons and ModifierKeys are active.

Reimplemented in HPS::SimpleWalkOperator.

Here is the call graph for this function:

◆ LookupSegment()

void HPS::MarkupOperator::LookupSegment ( )
private

◆ ObjectType()

HPS::Type HPS::Operator::ObjectType ( ) const
inlinevirtualinherited

Reimplemented from HPS::Object.

Here is the call graph for this function:

◆ OnKeyDown()

virtual bool HPS::MarkupOperator::OnKeyDown ( KeyboardState const &  in_state)
overridevirtual

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.

◆ OnKeyUp()

virtual bool HPS::Operator::OnKeyUp ( KeyboardState const &  in_state)
inlinevirtualinherited

This function is called whenever HPS receives a KeyboardEvent that signals a key was released.

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

Reimplemented in HPS::SimpleWalkOperator, and HPS::FlyOperator.

◆ OnModelAttached()

virtual void HPS::Operator::OnModelAttached ( )
inlinevirtualinherited

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.

Reimplemented in HPS::NavigationCubeOperator, HPS::CuttingSectionOperator, HPS::SimpleWalkOperator, HPS::WalkOperator, HPS::FlyOperator, and HPS::MouseWheelOperator.

◆ OnModelDetached()

virtual void HPS::Operator::OnModelDetached ( )
inlinevirtualinherited

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.

◆ OnMouseDown()

virtual bool HPS::MarkupOperator::OnMouseDown ( MouseState const &  in_state)
overridevirtual

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.

◆ OnMouseEnter()

virtual bool HPS::Operator::OnMouseEnter ( MouseState const &  in_state)
inlinevirtualinherited

This function is called whenever HPS receives a MouseEvent that signals the mouse entered the window.

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

Reimplemented in HPS::SimpleWalkOperator.

◆ OnMouseLeave()

virtual bool HPS::Operator::OnMouseLeave ( MouseState const &  in_state)
inlinevirtualinherited

This function is called whenever HPS receives a MouseEvent that signals the mouse left the window.

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

Reimplemented in HPS::SimpleWalkOperator.

◆ OnMouseMove()

virtual bool HPS::MarkupOperator::OnMouseMove ( MouseState const &  in_state)
overridevirtual

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.

◆ OnMouseUp()

virtual bool HPS::MarkupOperator::OnMouseUp ( MouseState const &  in_state)
overridevirtual

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.

◆ OnMouseWheel()

virtual bool HPS::Operator::OnMouseWheel ( MouseState const &  in_state)
inlinevirtualinherited

This function is called whenever HPS receives a MouseEvent that signals the mouse wheel was scrolled.

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

Reimplemented in HPS::SimpleWalkOperator, HPS::FlyOperator, HPS::TurntableOperator, and HPS::MouseWheelOperator.

◆ OnTextInput()

virtual bool HPS::MarkupOperator::OnTextInput ( HPS::UTF8 const &  in_text)
overridevirtual

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.

Parameters
in_textThe text string received.
Returns
true if the input event was handled, false otherwise.

Reimplemented from HPS::Operator.

◆ OnTimerTick()

virtual bool HPS::Operator::OnTimerTick ( HPS::TimerTickEvent const &  in_event)
inlinevirtualinherited

This function is called whenever HPS receives a TimerTickEvent.

Parameters
in_eventA TimerTickEvent object describing the current event state.
Returns
true if the input event was handled, false otherwise.

Reimplemented in HPS::CuttingSectionOperator, HPS::SimpleWalkOperator, HPS::WalkOperator, and HPS::FlyOperator.

◆ OnTouchDown()

virtual bool HPS::MarkupOperator::OnTouchDown ( TouchState const &  in_state)
overridevirtual

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.

◆ OnTouchMove()

virtual bool HPS::MarkupOperator::OnTouchMove ( TouchState const &  in_state)
overridevirtual

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.

◆ OnTouchUp()

virtual bool HPS::MarkupOperator::OnTouchUp ( TouchState const &  in_state)
overridevirtual

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.

◆ OnViewAttached()

virtual void HPS::MarkupOperator::OnViewAttached ( )
overridevirtual

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

Reimplemented from HPS::Operator.

◆ OnViewDetached()

virtual void HPS::MarkupOperator::OnViewDetached ( )
overridevirtual

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

Reimplemented from HPS::Operator.

◆ operator!=()

virtual bool HPS::Operator::operator!= ( Operator const &  in_that) const
virtualinherited

Tests this operator for non-equality against the parameter in_that.

◆ operator==()

virtual bool HPS::Operator::operator== ( Operator const &  in_that) const
virtualinherited

Tests this operator for equality against the parameter in_that.

Same as Operator::Equals.

◆ Reset()

◆ ResetCameras()

void HPS::MarkupOperator::ResetCameras ( )
private

◆ SetColor()

void HPS::MarkupOperator::SetColor ( RGBColor const &  in_color)
inline

Changes the color of the markup which will be inserted.

◆ SetLineAttribute()

void HPS::MarkupOperator::SetLineAttribute ( LineAttributeKit const &  in_line_attributes)
inline

Changes the color of the markup which will be inserted.

◆ SetMarkupType()

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

Changes the type of markup the operator will insert.

◆ SetModifierTrigger()

void HPS::Operator::SetModifierTrigger ( ModifierKeys  in_modifiers)
inlineinherited

Sets the modifier trigger associated with this operator.

Parameters
in_modifiersThe modifier keys that are used to trigger this operator.

◆ SetMouseTrigger()

void HPS::Operator::SetMouseTrigger ( MouseButtons  in_buttons)
inlineinherited

Sets the mouse trigger for this operator.

◆ SetTextAttribute()

void HPS::MarkupOperator::SetTextAttribute ( TextAttributeKit const &  in_text_attributes)
inline

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

◆ SetupConstructionSegments()

bool HPS::MarkupOperator::SetupConstructionSegments ( )
private

◆ Type()

Member Data Documentation

◆ attribute_map

std::unordered_multimap<RGBColor, SegmentKey> HPS::MarkupOperator::attribute_map
private

◆ current_attributes

Attributes HPS::MarkupOperator::current_attributes
private

◆ current_circle

CircleKey HPS::MarkupOperator::current_circle
private

◆ current_circle_line

LineKey HPS::MarkupOperator::current_circle_line
private

◆ current_line

LineKey HPS::MarkupOperator::current_line
private

◆ current_line_size

size_t HPS::MarkupOperator::current_line_size
private

◆ current_rectangle

LineKey HPS::MarkupOperator::current_rectangle
private

◆ current_segment

SegmentKey HPS::MarkupOperator::current_segment
private

◆ current_text

TextKey HPS::MarkupOperator::current_text
private

◆ current_text_row

size_t HPS::MarkupOperator::current_text_row
private

◆ default_color

const RGBColor HPS::MarkupOperator::default_color
staticprivate

◆ default_line_attributes

const LineAttributeKit HPS::MarkupOperator::default_line_attributes
staticprivate

◆ default_text

TextKey HPS::MarkupOperator::default_text
private

◆ default_text_attributes

const TextAttributeKit HPS::MarkupOperator::default_text_attributes
staticprivate

◆ handler

KeyboardHiddenEventHandler HPS::MarkupOperator::handler
private

◆ keyboard_active

bool HPS::MarkupOperator::keyboard_active
private

◆ last_attached_view

View HPS::MarkupOperator::last_attached_view
private

◆ markup_segment

SegmentKey HPS::MarkupOperator::markup_segment
private

◆ markup_type

MarkupType HPS::MarkupOperator::markup_type
private

◆ modifier_trigger

ModifierKeys HPS::MarkupOperator::modifier_trigger
private

◆ mouse_trigger

MouseButtons HPS::MarkupOperator::mouse_trigger
private

◆ operator_active

bool HPS::MarkupOperator::operator_active
private

◆ original_camera

CameraKit HPS::MarkupOperator::original_camera
private

◆ original_markup_camera

CameraKit HPS::MarkupOperator::original_markup_camera
private

◆ second_tracked_touch_id

TouchID HPS::MarkupOperator::second_tracked_touch_id
private

◆ start_new_line

bool HPS::MarkupOperator::start_new_line
private

◆ start_new_note

bool HPS::MarkupOperator::start_new_note
private

◆ start_point

Point HPS::MarkupOperator::start_point
private

◆ staticType

const HPS::Type HPS::Operator::staticType = HPS::Type::Operator
staticinherited

◆ text_columns

SizeTArray HPS::MarkupOperator::text_columns
private

◆ tracked_touch_id

TouchID HPS::MarkupOperator::tracked_touch_id
private

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