Hugin trunk
0.1
Loading...
Searching...
No Matches
hugin1
hugin
Tool.h
Go to the documentation of this file.
1
// -*- c-basic-offset: 4 -*-
2
24
#ifndef _PREVIEWTOOL_H
25
#define _PREVIEWTOOL_H
26
27
#include "
base_wx/wxutils.h
"
28
#include <wx/event.h>
29
30
#include "
ToolHelper.h
"
31
32
/* PreviewTool is an abstract base class for the interactive tools that work
33
* with the OpenGL accelerated preview. They can respond to the users actions
34
* over the preview, or changes in the panorama, and can draw extras above,
35
* below, or instead of the panorama images.
36
*
37
* The *Event functions are only called when the Tool requested a notification.
38
* Tools may do this through an instance of the PreviewToolHelper class which
39
* is passed by pointer on construction. When a tool is decativated, all the
40
* notifications it monitors are removed.
41
*/
42
class
Tool
43
{
44
public
:
48
explicit
Tool
(
ToolHelper
*
helper
);
49
50
virtual
~Tool
();
51
// Lots of stub functions here. Your tools should override a few of them.
52
59
virtual
void
Activate
() = 0;
61
virtual
void
Deactivate
() {}
62
70
virtual
void
MouseMoveEvent
(
double
x,
double
y,
wxMouseEvent
& e) {}
74
virtual
void
MouseButtonEvent
(
wxMouseEvent
&e) {}
78
virtual
void
MouseWheelEvent
(
wxMouseEvent
& e) {}
82
virtual
void
ImagesUnderMouseChangedEvent
() {}
86
virtual
void
KeypressEvent
(
int
keycode
,
int
modifiers
,
bool
pressed
) {}
88
virtual
void
BeforeDrawImagesEvent
() {}
90
virtual
void
AfterDrawImagesEvent
() {}
92
virtual
void
ReallyAfterDrawImagesEvent
() {}
100
virtual
bool
BeforeDrawImageEvent
(
unsigned
int
image) {
return
true
;}
102
virtual
void
AfterDrawImageEvent
(
unsigned
int
image) {}
104
virtual
void
MarkDirty
() {};
105
protected
:
109
ToolHelper
*
helper
;
110
};
111
112
113
class
PreviewTool
:
public
Tool
114
{
115
public
:
116
explicit
PreviewTool
(
PreviewToolHelper
*
helper
);
117
virtual
~PreviewTool
();
118
119
};
120
121
class
OverviewTool
:
public
Tool
122
{
123
public
:
124
125
explicit
OverviewTool
(
OverviewToolHelper
*
helper
);
126
virtual
~OverviewTool
();
127
128
};
129
130
class
PanosphereOverviewTool
:
public
OverviewTool
131
{
132
public
:
133
134
explicit
PanosphereOverviewTool
(
PanosphereOverviewToolHelper
*
helper
);
135
virtual
~PanosphereOverviewTool
();
136
138
virtual
void
BeforeDrawImagesBackEvent
() {}
140
virtual
void
AfterDrawImagesBackEvent
() {}
141
143
virtual
void
BeforeDrawImagesFrontEvent
() {}
145
virtual
void
AfterDrawImagesFrontEvent
() {}
146
147
};
148
149
class
PlaneOverviewTool
:
public
OverviewTool
150
{
151
public
:
152
153
explicit
PlaneOverviewTool
(
PlaneOverviewToolHelper
*
helper
);
154
virtual
~PlaneOverviewTool
();
155
156
};
157
158
159
#endif
160
ToolHelper.h
OverviewToolHelper
Definition
ToolHelper.h:196
OverviewTool
Definition
Tool.h:122
OverviewTool::~OverviewTool
virtual ~OverviewTool()
Definition
Tool.cpp:42
PanosphereOverviewToolHelper
Definition
ToolHelper.h:206
PanosphereOverviewTool
Definition
Tool.h:131
PanosphereOverviewTool::AfterDrawImagesFrontEvent
virtual void AfterDrawImagesFrontEvent()
Draw using opengl anything after drawing the back face culled images.
Definition
Tool.h:145
PanosphereOverviewTool::AfterDrawImagesBackEvent
virtual void AfterDrawImagesBackEvent()
Draw using opengl anything after drawing the front face culled images.
Definition
Tool.h:140
PanosphereOverviewTool::BeforeDrawImagesBackEvent
virtual void BeforeDrawImagesBackEvent()
Draw using opengl anything before drawing the front face culled images.
Definition
Tool.h:138
PanosphereOverviewTool::BeforeDrawImagesFrontEvent
virtual void BeforeDrawImagesFrontEvent()
Draw using opengl anything before drawing the back face culled images.
Definition
Tool.h:143
PanosphereOverviewTool::~PanosphereOverviewTool
virtual ~PanosphereOverviewTool()
Definition
Tool.cpp:46
PlaneOverviewToolHelper
Definition
ToolHelper.h:240
PlaneOverviewTool
Definition
Tool.h:150
PlaneOverviewTool::~PlaneOverviewTool
virtual ~PlaneOverviewTool()
Definition
Tool.cpp:50
PreviewToolHelper
Definition
ToolHelper.h:184
PreviewTool
Definition
Tool.h:114
PreviewTool::~PreviewTool
virtual ~PreviewTool()
Definition
Tool.cpp:38
ToolHelper
Definition
ToolHelper.h:77
Tool
Definition
Tool.h:43
Tool::Deactivate
virtual void Deactivate()
Switch off a tool.
Definition
Tool.h:61
Tool::MarkDirty
virtual void MarkDirty()
Definition
Tool.h:104
Tool::AfterDrawImageEvent
virtual void AfterDrawImageEvent(unsigned int image)
Notification called just after the image was drawn normally.
Definition
Tool.h:102
Tool::~Tool
virtual ~Tool()
Definition
Tool.cpp:34
Tool::ImagesUnderMouseChangedEvent
virtual void ImagesUnderMouseChangedEvent()
Notify when the images directly underneath the mouse pointer have changed.
Definition
Tool.h:82
Tool::BeforeDrawImageEvent
virtual bool BeforeDrawImageEvent(unsigned int image)
Draw what the tool requires just before a given image is drawn.
Definition
Tool.h:100
Tool::KeypressEvent
virtual void KeypressEvent(int keycode, int modifiers, bool pressed)
Notify of a Keypress event.
Definition
Tool.h:86
Tool::MouseWheelEvent
virtual void MouseWheelEvent(wxMouseEvent &e)
Notify of a mouse wheel event on the panorama preview.
Definition
Tool.h:78
Tool::AfterDrawImagesEvent
virtual void AfterDrawImagesEvent()
Draw (using OpenGL) images above the others.
Definition
Tool.h:90
Tool::MouseButtonEvent
virtual void MouseButtonEvent(wxMouseEvent &e)
Notify of a mouse button press on the panorama preview.
Definition
Tool.h:74
Tool::ReallyAfterDrawImagesEvent
virtual void ReallyAfterDrawImagesEvent()
Draw (using OpenGL) the overlays, e.g. crop highlights, guides.
Definition
Tool.h:92
Tool::Activate
virtual void Activate()=0
Switch on a tool.
Tool::MouseMoveEvent
virtual void MouseMoveEvent(double x, double y, wxMouseEvent &e)
Notify when the mouse pointer has moved over the panorama preview.
Definition
Tool.h:70
Tool::BeforeDrawImagesEvent
virtual void BeforeDrawImagesEvent()
Draw using OpenGL anything the tool requires underneath the images.
Definition
Tool.h:88
Tool::helper
ToolHelper * helper
The PreviewToolHelper that uses the same preview window and panorama as the tool should.
Definition
Tool.h:109
threshold
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition
threshold.h:41
wxutils.h
Generated on Sun Sep 6 2026 02:43:00 for Hugin trunk by
1.9.8