# IRsWidgetController Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | GetToolPriority ([in] RtMouseEvent *pMouseEvent,[in] IRsNode *pViewNode,[out] RtUlong *pPriority)
HRESULT | OnToolRemove ()
HRESULT | OnFocusLost ()
HRESULT | OnFocus ()
HRESULT | IsToolLocked (RtBool *pbLocked)
HRESULT | ProcessMouseEvent ([in] RtMouseEvent *pMouseEvent,[in] IRsNode *pViewNode)

## Detailed Description

IRsToolEx interface for Widgets. Widgets do not support IRsTool interface.
Methods are the same as in IRsToolEx without IRsTool.

## Member Function Documentation

HRESULT IRsWidgetController::GetToolPriority | ( | [in] RtMouseEvent * | pMouseEvent,
|  | [in] IRsNode * | pViewNode,
|  | [out] RtUlong * | pPriority |
| ) |  |  |

Tool priority for automatic override management. Widgets subsystem uses priority 1000.
Setting priority above this value will not activate widget when clicking on it's control surface.

Parameters:

  | pMouseEvent | [in] .
  | pViewNode | [in] .
  | pPriority | [out] .

HRESULT IRsWidgetController::OnToolRemove | ( |  | ) |

Notify tool, that it will be removed from tool manager, so it can perform some cleanups.

HRESULT IRsWidgetController::OnFocusLost | ( |  | ) |

Notify tool, that it will not receive mouse messages.

HRESULT IRsWidgetController::OnFocus | ( |  | ) |

Notify tool, that it becomes active again.

HRESULT IRsWidgetController::IsToolLocked | ( | RtBool * | pbLocked | ) |

Test tool, if it is in locked state.
This method is used to perform synchronization with IRsTool interface and is used to evaluate tool manager state.
When returing S_OK, pbLocked defines whether tool is in Drag state (true) or Click state (false).
When in drag state, tool manager does not try to terminate the tool.

Return E_NOTIMPL to use internal tool manager mechanism.

HRESULT IRsWidgetController::ProcessMouseEvent | ( | [in] RtMouseEvent * | pMouseEvent,
|  | [in] IRsNode * | pViewNode |
| ) |  |  |

Process mouse event. Return value that differs from S_OK will cause tool deactivation.

Parameters:

  | pMouseEvent | [in] .
  | pViewNode | [in] .