18 #ifndef __otbMouseClickActionHandler_h
19 #define __otbMouseClickActionHandler_h
33 template <
class TModel,
class TView>
67 typename ViewType::ImageWidgetType::Pointer source;
71 source =
m_View->GetScrollWidget();
75 source =
m_View->GetFullWidget();
79 source =
m_View->GetZoomWidget();
82 if (source.IsNotNull() &&
event == FL_PUSH && Fl::event_button() ==
m_MouseButton)
85 typename ViewType::ImageWidgetType::PointType screenPoint, imagePoint;
86 screenPoint = source->GetMousePosition();
89 imagePoint = source->GetScreenToImageTransform()->TransformPoint(screenPoint);
92 typename ViewType::IndexType index;
93 index[0] =
static_cast<int>(imagePoint[0]);
94 index[1] =
static_cast<int>(imagePoint[1]);
113 itkSetClampMacro(MouseButton,
int, 1, 3);
114 itkGetMacro(MouseButton,
int);
116 itkSetMacro(ActiveOnScrollWidget,
bool);
117 itkGetMacro(ActiveOnScrollWidget,
bool);
118 itkBooleanMacro(ActiveOnScrollWidget);
120 itkSetMacro(ActiveOnFullWidget,
bool);
121 itkGetMacro(ActiveOnFullWidget,
bool);
122 itkBooleanMacro(ActiveOnFullWidget);
124 itkSetMacro(ActiveOnZoomWidget,
bool);
125 itkGetMacro(ActiveOnZoomWidget,
bool);
126 itkBooleanMacro(ActiveOnZoomWidget);