gizmo-type code in c++ ...