Custom Manipulator For Custom Node

hi. i'm working on a plugin for a custom light node for which i also need to create a custom manipulator. for now i only need free point triad, direction and state. i have managed to create the manip node and to attach it to my node so that it appears when i press "t". i have some questions, however:
1. how can i use the values of the free point triad and direction manips to get rotation values so that my light always point to the direction manipulator? (like when you use the maya manipulator tool to orient a spot light)
2. the state manip icon is exactly at the object's pivot, so it's kinda hard to click on it. how can i move it around a bit?
3. how can i query the state and do stuff accordingly when i click on the state manip? later on i would like to change between different manipulators (free point triad, circle sweep, distance etc)

that's pretty much it so far.
thanks.

Simpy you odnt the wahtever the manipulator manipulates is a node nodes expose attributes. Nodes calculate the data form attributes, so the purpose of the manip is to push attributes to your node so the ned result is binding attributes to the manipulator rest is indifferent to maya.

QUOTE
3. how can i query the state and do stuff accordingly when i click on the state manip? later on i would like to change between different manipulators (free point triad, circle sweep, distance etc)

You switch to do something else to the attrbutes. So the answer would be just like you do anything else in maya. Attributes matter how you do it is inconsequential. Manipulators just modify attributes. No attributes in place no manipulation.

The thing is you need to design the node to be intelligent what the manipulator does on top of that is a no issue. If you know what your node does, and you have right attributes to do stuff with, then all rest flows out easily.

So design your node then all rest is easy. I fyou cant design the node the its meaningless to ask about manipulators.