Can Editor Utility Widgets change editor preferences??

I’m trying to make an Editor Utility Widget that lets the user set a series of editor preferences (and Sequencer settings) with a single click.

But I’m finding it difficult to find answers on whether this is possible.

Has anyone tried it?

For example, I know by right-clicking and choosing formal name that one of the options I want to change is:
bInvertMiddleMousePan

How do I find out the current value of that within an Editor Utility Widget, and how do I set it?

Thanks for any advice you can spare!