HPS::MouseWheelOperator

class HPS::MouseWheelOperator : public HPS::Operator

Public Functions

inline virtual HPS::UTF8 GetName() const

Returns the name of the Operator.

MouseWheelOperator(ZoomType in_default_type = ZoomType::Accurate, HPS::ModifierKeys in_alternate_type_modifiers = HPS::ModifierKeys::KeyControl())

Constructor for MouseWheelOperator

Parameters
  • in_default_type – The default zoom type for this operator.

  • in_alternate_type_modifiers – The modifier button that, when pressed, will activate the zoom type opposite to that specified in in_default_type. Passing an empty ModifierKey object prevents the zoom type from being anything but what was specified in in_default_type.

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.

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

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

Parameters

in_state – A MouseState object describing the current mouse state.

Returns

true if the input event was handled, false otherwise.

virtual void OnViewAttached(HPS::View const &in_attached_view)

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

Parameters

in_attached_view – The view attached to this operator.

void UpdateZoomLimit()

Call when scene bounds changes to update the mouse wheel zoom limit