마우스 도구를 정의하고 MCG 도구의 롤아웃에서 호출할 수 있습니다.
이렇게 하려면 일반적인 방법으로 마우스 도구를 정의하고 사용자 정의 UI 특성에서 이 도구를 호출할 버튼을 추가하면 됩니다.
예를 들면 다음과 같습니다.
-- Define mouse tool before it is called
tool myMouseCapture
(
on mousePoint click do
(
format "Captured click!!! % \n" click
)
--Right-Click to stop
)
rollout params "Parameters"
(
-- Restore the default rollout
<<ParamUIDefs>>
<<RolloutParamsHanders>>
-- Define button to start mouse tool
button ToolStart "Begin Mouse Capture" width:140
on ToolStart pressed do
(
startTool myMouseCapture
)
)