fsleyes.profiles.lightboxviewprofile
¶
This module provides the LightBoxViewProfile
class, an interaction
Profile
for LightBoxPanel
views.
-
class
fsleyes.profiles.lightboxviewprofile.
LightBoxViewProfile
(viewPanel, overlayList, displayCtx)¶ Bases:
fsleyes.profiles.Profile
The
LightBoxViewProfile
is an interaction profile forLightBoxPanel
views. It defines mouse/keyboard handlers which allow the user to navigate through theLightBoxPanel
display of the overlays in theOverlayList
.LightBoxViewProfile
defines two modes (see theProfile
class documentation):view
The user can change the DisplayContext.location
via left mouse drags, and can change theLightBoxCanvasOpts.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).-
__init__
(viewPanel, overlayList, displayCtx)¶ Create a
LightBoxViewProfile
.Parameters: - viewPanel – A
LightBoxPanel
instance. - overlayList – The
OverlayList
instance. - displayCtx – The
DisplayContext
instance.
- viewPanel – A
-
getEventTargets
()¶ Returns the
LightBoxCanvas
contained in theLightBoxPanel
, which is the target for all mouse/keyboard events.
-
_viewModeMouseWheel
(ev, canvas, wheel, mousePos=None, canvasPos=None)¶ 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)¶ 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)¶ Handles mouse wheel events in
zoom
mode.Zooms in/out of the canvas by updating the
SceneOpts.zoom
property.
-
__module__
= 'fsleyes.profiles.lightboxviewprofile'¶
-