Hugin trunk 0.1
Loading...
Searching...
No Matches
PreviewIdentifyTool.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
22#ifndef _PREVIEWIDENTIFYTOOL_H
23#define _PREVIEWIDENTIFYTOOL_H
24
25#include "Tool.h"
26#include <set>
27#include <vector>
28
29class GLPreviewFrame;
30
44{
45public:
55 void Activate();
58 bool BeforeDrawImageEvent(unsigned int image);
62 void ShowImageNumber(unsigned int image);
64 void StopShowingImages();
67
68 void MouseMoveEvent(double x, double y, wxMouseEvent & e);
69
70 void KeypressEvent(int keycode, int modifiers, int pressed);
71
73
74 void UpdateWithNewImageSet(std::set<unsigned int> new_image_set);
75 void ForceRedraw();
76private:
78 void HighlightColour(unsigned int index, unsigned int count,
79 unsigned char &red, unsigned char &green,
80 unsigned char &blue);
81 static bool texture_created;
83 static unsigned int circle_border_tex;
85 static unsigned int rectangle_border_tex;
87 static unsigned int font_tex;
89 static unsigned int font_list;
91 static std::vector<int> m_glyphWidth;
92
94 std::set<unsigned int> m_image_set;
97 unsigned int m_mouse_over_image;
99
100 void StopUpdating();
101 void ContinueUpdating();
102
104 //user has clicked and is holding left button while over panorama
106
108
111};
112
113#endif
114
The OpenGL preview frame.
Visually connect the image numbers with the image on the preview.
void MouseMoveEvent(double x, double y, wxMouseEvent &e)
Notify when the mouse pointer has moved over the panorama preview.
void AfterDrawImagesEvent()
Draw (using OpenGL) images above the others.
void setConstantOn(bool constant_on_in)
bool BeforeDrawImageEvent(unsigned int image)
Draw what the tool requires just before a given image is drawn.
std::set< unsigned int > m_image_set
Set of image numbers of the images we are displaying highlighted.
void UpdateWithNewImageSet(std::set< unsigned int > new_image_set)
static unsigned int font_list
OpenGL call list id for font.
GLPreviewFrame * m_preview_frame
void Activate()
Switch on a tool.
static unsigned int font_tex
OpenGL texture name for the font texture.
static unsigned int circle_border_tex
OpenGL texture name for the circular border texture.
unsigned int m_mouse_over_image
The image the user last placed their mouse over the button for.
static std::vector< int > m_glyphWidth
glyph width for font
void ImagesUnderMouseChangedEvent()
Notify when the images directly underneath the mouse pointer have changed.
void MouseButtonEvent(wxMouseEvent &e)
Show control point editor if mouse is over two images.
void KeypressEvent(int keycode, int modifiers, int pressed)
void HighlightColour(unsigned int index, unsigned int count, unsigned char &red, unsigned char &green, unsigned char &blue)
Generate a colour given how many colours we need and an index.
void StopShowingImages()
Notification for when moving the mouse off an image button.
static unsigned int rectangle_border_tex
OpenGL texture name for the rectangular border texture.
void ShowImageNumber(unsigned int image)
Notification for when moving the mouse on an image button.
Definition Tool.h:43
ToolHelper * helper
The PreviewToolHelper that uses the same preview window and panorama as the tool should.
Definition Tool.h:109
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