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?: https://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__cpp_ref_class_m_px_selection_context_html

EDIT: Scratch that, MFnDirectionManip seems to be exactly what I need: https://download.autodesk.com/us/maya/2009help/API/class_m_fn_direction_manip.html

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