API to recreate Animation Window Preview mode in my custom tool?

I am making a component and I’d love to add a preview in the editor. Animation window cleverly “locks” all animated properties while in Preview Mode and marks them with a special colour. When Preview Mode is disengaged, all values go back to their previous value. On top of that, Wnity won’t save new values if you ctrl+s while in preview mode.

How that is implemented? Is there any API I can use to reproduce the Preview mode of the Animation window?
8505179--1132895--image_2022-10-11_131831805.png

Pretty please, anyone? :frowning:

maybe could try searching different keywords from c# sources, if can find how they do that tint or highlight