Hugintrunk
0.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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;
60
68
virtual
void
MouseMoveEvent
(
double
x,
double
y, wxMouseEvent & e) {}
72
virtual
void
MouseButtonEvent
(wxMouseEvent &e) {}
76
virtual
void
MouseWheelEvent
(wxMouseEvent & e) {}
80
virtual
void
ImagesUnderMouseChangedEvent
() {}
84
virtual
void
KeypressEvent
(
int
keycode,
int
modifiers,
bool
pressed) {}
86
virtual
void
BeforeDrawImagesEvent
() {}
88
virtual
void
AfterDrawImagesEvent
() {}
90
virtual
void
ReallyAfterDrawImagesEvent
() {}
98
virtual
bool
BeforeDrawImageEvent
(
unsigned
int
image) {
return
true
;}
100
virtual
void
AfterDrawImageEvent
(
unsigned
int
image) {}
102
virtual
void
MarkDirty
() {};
103
protected
:
107
ToolHelper
*
helper
;
108
};
109
110
111
class
PreviewTool
:
public
Tool
112
{
113
public
:
114
explicit
PreviewTool
(
PreviewToolHelper
*
helper
);
115
virtual
~PreviewTool
();
116
117
};
118
119
class
OverviewTool
:
public
Tool
120
{
121
public
:
122
123
explicit
OverviewTool
(
OverviewToolHelper
*
helper
);
124
virtual
~OverviewTool
();
125
126
};
127
128
class
PanosphereOverviewTool
:
public
OverviewTool
129
{
130
public
:
131
132
explicit
PanosphereOverviewTool
(
PanosphereOverviewToolHelper
*
helper
);
133
virtual
~PanosphereOverviewTool
();
134
136
virtual
void
BeforeDrawImagesBackEvent
() {}
138
virtual
void
AfterDrawImagesBackEvent
() {}
139
141
virtual
void
BeforeDrawImagesFrontEvent
() {}
143
virtual
void
AfterDrawImagesFrontEvent
() {}
144
145
};
146
147
class
PlaneOverviewTool
:
public
OverviewTool
148
{
149
public
:
150
151
explicit
PlaneOverviewTool
(
PlaneOverviewToolHelper
*
helper
);
152
virtual
~PlaneOverviewTool
();
153
154
};
155
156
157
#endif
158
ToolHelper
Definition:
ToolHelper.h:76
PanosphereOverviewTool::AfterDrawImagesFrontEvent
virtual void AfterDrawImagesFrontEvent()
Draw using opengl anything after drawing the back face culled images.
Definition:
Tool.h:143
Tool::~Tool
virtual ~Tool()
Definition:
Tool.cpp:34
PanosphereOverviewToolHelper
Definition:
ToolHelper.h:205
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:68
OverviewTool
Definition:
Tool.h:119
PanosphereOverviewTool
Definition:
Tool.h:128
PreviewTool::~PreviewTool
virtual ~PreviewTool()
Definition:
Tool.cpp:38
Tool::Activate
virtual void Activate()=0
Switch on a tool.
OverviewTool::~OverviewTool
virtual ~OverviewTool()
Definition:
Tool.cpp:42
OverviewTool::OverviewTool
OverviewTool(OverviewToolHelper *helper)
Definition:
Tool.cpp:40
ToolHelper.h
PanosphereOverviewTool::AfterDrawImagesBackEvent
virtual void AfterDrawImagesBackEvent()
Draw using opengl anything after drawing the front face culled images.
Definition:
Tool.h:138
PanosphereOverviewTool::~PanosphereOverviewTool
virtual ~PanosphereOverviewTool()
Definition:
Tool.cpp:46
wxutils.h
PlaneOverviewTool::~PlaneOverviewTool
virtual ~PlaneOverviewTool()
Definition:
Tool.cpp:50
Tool::ReallyAfterDrawImagesEvent
virtual void ReallyAfterDrawImagesEvent()
Draw (using OpenGL) the overlays, e.g. crop highlights, guides.
Definition:
Tool.h:90
Tool::AfterDrawImageEvent
virtual void AfterDrawImageEvent(unsigned int image)
Notification called just after the image was drawn normally.
Definition:
Tool.h:100
Tool::ImagesUnderMouseChangedEvent
virtual void ImagesUnderMouseChangedEvent()
Notify when the images directly underneath the mouse pointer have changed.
Definition:
Tool.h:80
Tool::helper
ToolHelper * helper
The PreviewToolHelper that uses the same preview window and panorama as the tool should.
Definition:
Tool.h:102
Tool::MouseButtonEvent
virtual void MouseButtonEvent(wxMouseEvent &e)
Notify of a mouse button press on the panorama preview.
Definition:
Tool.h:72
Tool::KeypressEvent
virtual void KeypressEvent(int keycode, int modifiers, bool pressed)
Notify of a Keypress event.
Definition:
Tool.h:84
PlaneOverviewTool::PlaneOverviewTool
PlaneOverviewTool(PlaneOverviewToolHelper *helper)
Definition:
Tool.cpp:48
PlaneOverviewToolHelper
Definition:
ToolHelper.h:239
Tool
Definition:
Tool.h:42
PreviewTool
Definition:
Tool.h:111
Tool::MarkDirty
virtual void MarkDirty()
Definition:
Tool.h:102
PanosphereOverviewTool::BeforeDrawImagesBackEvent
virtual void BeforeDrawImagesBackEvent()
Draw using opengl anything before drawing the front face culled images.
Definition:
Tool.h:136
Tool::MouseWheelEvent
virtual void MouseWheelEvent(wxMouseEvent &e)
Notify of a mouse wheel event on the panorama preview.
Definition:
Tool.h:76
Tool::Tool
Tool(ToolHelper *helper)
Construct keeping a pointer to a PreviewToolHelper.
Definition:
Tool.cpp:29
PreviewToolHelper
Definition:
ToolHelper.h:183
PanosphereOverviewTool::BeforeDrawImagesFrontEvent
virtual void BeforeDrawImagesFrontEvent()
Draw using opengl anything before drawing the back face culled images.
Definition:
Tool.h:141
PlaneOverviewTool
Definition:
Tool.h:147
OverviewToolHelper
Definition:
ToolHelper.h:195
Tool::AfterDrawImagesEvent
virtual void AfterDrawImagesEvent()
Draw (using OpenGL) images above the others.
Definition:
Tool.h:88
Tool::BeforeDrawImagesEvent
virtual void BeforeDrawImagesEvent()
Draw using OpenGL anything the tool requires underneath the images.
Definition:
Tool.h:86
PreviewTool::PreviewTool
PreviewTool(PreviewToolHelper *helper)
Definition:
Tool.cpp:36
Tool::BeforeDrawImageEvent
virtual bool BeforeDrawImageEvent(unsigned int image)
Draw what the tool requires just before a given image is drawn.
Definition:
Tool.h:98
PanosphereOverviewTool::PanosphereOverviewTool
PanosphereOverviewTool(PanosphereOverviewToolHelper *helper)
Definition:
Tool.cpp:44
Generated on Sun Nov 10 2024 01:25:38 for Hugintrunk by
1.8.5