# IRsToolManagerHook Struct Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | OnInitialize (void)
HRESULT | OnSelectTool ([in] RtToolMsg eToolMsg,[in] RtMouseEvent *pMouseEvent,[out, retval] IRsTool **ppNewTool)
HRESULT | OnDestroy (void)

## Detailed Description

Parameters:

  | IRsToolManagerHook | Tool management hook.

## Member Function Documentation

HRESULT IRsToolManagerHook::OnInitialize | ( | void |  | ) |

Initialize this hook

HRESULT IRsToolManagerHook::OnSelectTool | ( | [in] RtToolMsg | eToolMsg,
|  | [in] RtMouseEvent * | pMouseEvent,
|  | [out, retval] IRsTool ** | ppNewTool |
| ) |  |  |

Return prefered tool specified by tool manager state and mouse event.

Parameters:

  | eToolMsg | [in] Tool manager state machine state.
  | pMouseEvent | [in] Mouse event for which tool is requested.

Returns:
  ppNewTool [out,retval] Tool to use to process this message.

  S_OK if succeed. Otherwise tool manager will select tool according to it's internal rules.

HRESULT IRsToolManagerHook::OnDestroy | ( | void |  | ) |

Destroy this hook.