modal add-on : select constrainst axis like in grab, rot, scale etc.

Hey guys !
I’m writing this post because I’d like to script an “inset scale” add-on. I wish to make the user able to select an axis (or plan) constraints with exactly the same ‘event handler’ than the grab, rotation or scale operators (in the modal function). I saw nowhere how it is done…
And I think that these operators are built-in, so no python source to see… Moreover, I didn’t find any plug-gin using these inputs…
I don’t see what to type in the api documentation’s search engine to get it…
Thanks in advance for your responses !

re-building the constraint functionality with python would take quiet a lot experience and knowledge with python and opengl. Maybe you can create a macro and use existing modal operators one after another to achieve the same goal?

What shall “inset scale” do exactly? Can you provide a before/after picture?

Have a look here: