Custom Empty Object

Hi all,
I wonder if is possible to customize/write a new empty object
Possibly I would like to be able to draw a Cylinder in the viewport and update is width and height in the viewport
Something like the CylinderGizmo in 3dsmax
How can I do this? with class should I look to write in the viewport?