fsleyes.profiles.lightboxviewprofile

This module provides the LightBoxViewProfile class, an interaction Profile for LightBoxPanel views.

class fsleyes.profiles.lightboxviewprofile.LightBoxViewProfile(viewPanel, overlayList, displayCtx)[source]

Bases: fsleyes.profiles.Profile

The LightBoxViewProfile is an interaction profile for LightBoxPanel views. It defines mouse/keyboard handlers which allow the user to navigate through the LightBoxPanel display of the overlays in the OverlayList.

LightBoxViewProfile defines two modes (see the Profile class documentation):

view

The user can change the DisplayContext.location via left mouse drags, and can change the LightBoxCanvasOpts.topRow via the mouse wheel.

zoom

The user can change the LightBoxCanvasOpts.ncols property with the mouse wheel (effectively zooming in/out of the canvas).

static supportedView()[source]

Returns the LightBoxPanel class.

static tempModes()[source]

Returns the temporary mode map for the LightBoxViewProfile, which controls the use of modifier keys to temporarily enter other interaction modes.

static altHandlers()[source]

Returns the alternate handlers map, which allows event handlers defined in one mode to be re-used whilst in another mode.

__init__(viewPanel, overlayList, displayCtx)[source]

Create a LightBoxViewProfile.

Parameters
getEventTargets()[source]

Returns the LightBoxCanvas contained in the LightBoxPanel, which is the target for all mouse/keyboard events.

_viewModeMouseWheel(ev, canvas, wheel, mousePos=None, canvasPos=None)[source]

Handles mouse wheel events in view mode.

Updates the :attr:.LightBoxCanvasOpts.topRow` property, thus scrolling through the slices displayed on the canvas.

_viewModeLeftMouseDrag(ev, canvas, mousePos, canvasPos)[source]

Handles left mouse drags in view mode.

Updates the DisplayContext.location property to track the mouse location.

_zoomModeMouseWheel(ev, canvas, wheel, mousePos=None, canvasPos=None)[source]

Handles mouse wheel events in zoom mode.

Zooms in/out of the canvas by updating the SceneOpts.zoom property.

__module__ = 'fsleyes.profiles.lightboxviewprofile'