How does ModeTools works?

I was building a plugin. And I need to add control widget to the components in mine custom editor viewport. But it getting me confuse. How can I get control widget work and use it to move the components in mine custom editor viewport.

201422-捕获.png

Fe. Give the control widget a component and I can move the component in the viewport just like the editor?