Possible to add custom controls/buttons in the gutter?

Is it possible to expand the gutter, and for example add custom checkboxes/switches in there?

Yes, see setGutterMarker.