Maya API - Making a manipulator for a vector

Using OpenMaya, I would like to create a manipulator for changing the orientation of a vector. My tool will read this vector and do a series of operation on a mesh based on the vector orientation (and position in world space).
I need some pointers on where to start and what to go for. MPxSelectionContext seems to be the thing?: Help

EDIT: Scratch that, MFnDirectionManip seems to be exactly what I need: Maya API: MFnDirectionManip Class Reference

Second question: Say that I want the manipulator to appear in the textureWindow instead of a modelPanel - what to do?