Senocular's Transform Tool - constrain dragging to a given area

Does anyone has a modified version of this awesome tool that can limit the dragging of the objects to a given area? or can point me in the right direction on how to accomplish this, which class i need to modify.

Kind regards!