# ConstructRectangleOperator

class ConstructRectangleOperator : public HPS::Operator

  Subclassed by HPS::SelectAreaOperator, HPS::ZoomBoxOperator

  Public Functions

  ConstructRectangleOperator(MouseButtons in_mouse_trigger = MouseButtons::ButtonLeft(), ModifierKeys in_modifier_trigger = ModifierKeys(), bool draw_faces = false)
  inline HPS::Rectangle GetInnerWindowRectangle() const

    Returns the rectangle associated with this operator in inner window coordinates. If there is only one view, this is the same as GetWindowRectangle(). If there are multiple views, this is useful for operations done on the inner window level, such as drawing.

  inline virtual HPS::UTF8 GetName() const

    Returns the name of the Operator.

  inline HPS::Rectangle GetWindowRectangle() const

    Returns the rectangle associated with this operator in window coordinates. If there is only one view, this is the same as GetInnerWindowRectangle(). If there are multiple views, this is useful for operations done on the window level, such as selection.

  inline bool IsRectangleValid() const
  virtual bool OnMouseDown(MouseState const &in_state)

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

    Parameters:

      in_state – A MouseState object describing the current mouse state.

    Returns:

      true if the input event was handled, false otherwise.

  virtual bool OnMouseMove(MouseState const &in_state)

    This function is called whenever HPS receives a MouseEvent that signals the mouse moved

    Parameters:

      in_state – A MouseState object describing the current mouse state.

    Returns:

      true if the input event was handled, false otherwise.

  virtual bool OnMouseUp(MouseState const &in_state)

    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.

  virtual bool OnTouchDown(TouchState const &in_state)

    This function is called whenever HPS receives a TouchEvent that signals the device was touched.

    Parameters:

      in_state – A TouchState object describing the current touch state.

    Returns:

      true if the input event was handled, false otherwise.

  virtual bool OnTouchMove(TouchState const &in_state)

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

    Parameters:

      in_state – A TouchState object describing the current touch state.

    Returns:

      true if the input event was handled, false otherwise.

  virtual bool OnTouchUp(TouchState const &in_state)

    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.

  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.

Hello I'm HOOPSY!

HOOPSY BETA

Hello I am HOOPSY! your Docs generative AI assistant.

Ask me anything about HOOPS Visualize HPS or choose a sample question below to start a conversation:

Additional info

HOOPSY may store chats to provide and maintain the service according to OpenAI's data policy.

This feature is currently experimental. While we are continually enhancing its performance and quality, the underlying AI model may generate inaccurate or fabricated responses, especially if prompted to do so.

New Conversation
Continue generating