Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PreviewCameraTool Class Reference

tool for the manipulation of the opengl 'camera' properties It handles zooming in/out of the main preview window More...

#include <PreviewCameraTool.h>

Inheritance diagram for PreviewCameraTool:
Inheritance graph

Public Member Functions

 PreviewCameraTool (PreviewToolHelper *helper)
 
virtual ~PreviewCameraTool ()
 
void Activate ()
 Switch on a tool. More...
 
void MouseWheelEvent (wxMouseEvent &)
 event for mouse wheel processing More...
 
void MouseButtonEvent (wxMouseEvent &e)
 event for mouse button processing More...
 
void MouseMoveEvent (double x, double y, wxMouseEvent &e)
 event for mouse move More...
 
- Public Member Functions inherited from PreviewTool
 PreviewTool (PreviewToolHelper *helper)
 
virtual ~PreviewTool ()
 
- Public Member Functions inherited from Tool
 Tool (ToolHelper *helper)
 Construct keeping a pointer to a PreviewToolHelper. More...
 
virtual ~Tool ()
 
virtual void ImagesUnderMouseChangedEvent ()
 Notify when the images directly underneath the mouse pointer have changed. More...
 
virtual void KeypressEvent (int keycode, int modifiers, bool pressed)
 Notify of a Keypress event. More...
 
virtual void BeforeDrawImagesEvent ()
 Draw using OpenGL anything the tool requires underneath the images. More...
 
virtual void AfterDrawImagesEvent ()
 Draw (using OpenGL) images above the others. More...
 
virtual void ReallyAfterDrawImagesEvent ()
 Draw (using OpenGL) the overlays, e.g. crop highlights, guides. More...
 
virtual bool BeforeDrawImageEvent (unsigned int image)
 Draw what the tool requires just before a given image is drawn. More...
 
virtual void AfterDrawImageEvent (unsigned int image)
 Notification called just after the image was drawn normally. More...
 
virtual void MarkDirty ()
 

Private Member Functions

void ChangeZoomLevel (bool zoomIn, const hugin_utils::FDiff2D &scrollPos)
 update zoom level More...
 
void UpdateCenter (const hugin_utils::FDiff2D &moveDist)
 update center, used for panning More...
 

Private Attributes

bool m_moving
 flag to indicate that we are moving the view with middle mouse button More...
 
hugin_utils::FDiff2D m_lastScreenPos
 last screen position during moving , needed for real-time update More...
 

Additional Inherited Members

- Protected Attributes inherited from Tool
ToolHelperhelper
 The PreviewToolHelper that uses the same preview window and panorama as the tool should. More...
 

Detailed Description

tool for the manipulation of the opengl 'camera' properties It handles zooming in/out of the main preview window

Definition at line 34 of file PreviewCameraTool.h.

Constructor & Destructor Documentation

PreviewCameraTool::PreviewCameraTool ( PreviewToolHelper helper)
inlineexplicit

Definition at line 37 of file PreviewCameraTool.h.

virtual PreviewCameraTool::~PreviewCameraTool ( )
inlinevirtual

Definition at line 38 of file PreviewCameraTool.h.

Member Function Documentation

void PreviewCameraTool::Activate ( )
virtual

Switch on a tool.

Inherited classes also register events they want to respond to with the PreviewToolHelper. As events are lost when the tool is deactivated without notification to the PreviewTool, things from the last activation can be cleaned up here too.

Implements Tool.

Definition at line 29 of file PreviewCameraTool.cpp.

References Tool::helper, m_moving, ToolHelper::MOUSE_MOVE, ToolHelper::MOUSE_PRESS, ToolHelper::MOUSE_WHEEL, and ToolHelper::NotifyMe().

void PreviewCameraTool::ChangeZoomLevel ( bool  zoomIn,
const hugin_utils::FDiff2D scrollPos 
)
private
void PreviewCameraTool::MouseButtonEvent ( wxMouseEvent &  e)
virtual

event for mouse button processing

Reimplemented from Tool.

Definition at line 80 of file PreviewCameraTool.cpp.

References ToolHelper::GetMouseScreenPosition(), Tool::helper, ToolHelper::IsMouseOverPano(), m_lastScreenPos, m_moving, and UpdateCenter().

void PreviewCameraTool::MouseMoveEvent ( double  x,
double  y,
wxMouseEvent &  e 
)
virtual
void PreviewCameraTool::MouseWheelEvent ( wxMouseEvent &  e)
virtual

event for mouse wheel processing

Reimplemented from Tool.

Definition at line 59 of file PreviewCameraTool.cpp.

References ChangeZoomLevel(), ToolHelper::GetMousePanoPosition(), Tool::helper, and ToolHelper::IsMouseOverPano().

void PreviewCameraTool::UpdateCenter ( const hugin_utils::FDiff2D moveDist)
private

Member Data Documentation

hugin_utils::FDiff2D PreviewCameraTool::m_lastScreenPos
private

last screen position during moving , needed for real-time update

Definition at line 56 of file PreviewCameraTool.h.

Referenced by MouseButtonEvent(), and MouseMoveEvent().

bool PreviewCameraTool::m_moving
private

flag to indicate that we are moving the view with middle mouse button

Definition at line 54 of file PreviewCameraTool.h.

Referenced by Activate(), MouseButtonEvent(), and MouseMoveEvent().


The documentation for this class was generated from the following files: