MeVisLab Toolbox Reference
SoView2DSlicePan.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2012, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13
15
16#pragma once
17
19
20//------------------------------------------------------------------
22
24{
25 SO_NODE_HEADER(SoView2DSlicePan);
26
27public:
32
36
38 static void initClass();
39
42
45 View2DEvent* ec, View2DEventPhase phase) override;
46
47protected:
48 void doPan(const SbVec2f& diff, SoView2D* view2d, View2DSliceList* slicelist);
49
52 void startPressAt(const SoPointerPosition& pos) override;
53 void dragMoveTo(const SoPointerPosition& pos) override;
54 SoPointingAction* endPress(int clickCount) override;
56
59
62};
View2DEventPhase
event phase for simple extensions that grab the focus, do something (motion) and are released afterwa...
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
SoView2DInteractionExtension is base class for all SoView2DExtensions that want to support the Manage...
Allows to pan the slice by mouse movement inside of a SoView2D.
bool evalEvent(SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase) override
reimplemented from SoView2DExtension
void dragMoveTo(const SoPointerPosition &pos) override
SoSFBool editX
pan in x
void startPressAt(const SoPointerPosition &pos) override
interface forwarded from SoPointingAction:
SoSFBool editY
pan in y
bool _started
set to true if EVENT_START was called
SoSFBool evalStarted
if true _started is evaluated during event handling.
void doPan(const SbVec2f &diff, SoView2D *view2d, View2DSliceList *slicelist)
SbVec2f _oldPos
previous position
SoView2DSlicePan()
constructor
SoPointingAction * endPress(int clickCount) override
static void initClass()
inventor runtime type system
SoView2D is a 2D viewer for image data.
Definition SoView2D.h:62
View2DEvent stores all information on an event on a SoView2D.
a list that holds all View2DSlice objects (lazily created) of a SoView2D
Target mlrange_cast(Source arg)
Generic version of checked ML casts.