Custom zoom/pan behaviour?

I’m writing an application to visualise some of my data. I would like the zoom and pan behaviour to be consistent with other software we already use.

Zoom in: press top left, drag and release bottom right to draw a rectangle defining the region to zoom in to.
Zoom out: press bottom right and drag to top left. Unzooms to the full extent of the data.
Pan: right click and drag. The data then moves within the window.

Where do I need to start looking to begin implementing such behaviour?

Thanks

Matthew