[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PreviewTool Class Reference

#include <PreviewTool.h>

Inheritance diagram for PreviewTool:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PreviewTool (PreviewToolHelper *helper)
 Construct keeping a pointer to a PreviewToolHelper.
virtual ~PreviewTool ()
virtual void Activate ()=0
 Switch on a tool.
virtual void MouseMoveEvent (double x, double y, wxMouseEvent &e)
 Notify when the mouse pointer has moved over the panorama preview.
virtual void MouseButtonEvent (wxMouseEvent &e)
 Notify of a mouse button press on the panorama preview.
virtual void ImagesUnderMouseChangedEvent ()
 Notify when the images directly underneath the mouse pointer have changed.
virtual void KeypressEvent (int keycode, int modifiers, bool pressed)
 Notify of a Keypress event.
virtual void BeforeDrawImagesEvent ()
 Draw using OpenGL anything the tool requires underneath the images.
virtual void AfterDrawImagesEvent ()
 Draw (using OpenGL) images above the others.
virtual void ReallyAfterDrawImagesEvent ()
 Draw (using OpenGL) the overlays, e.g. crop highlights, guides.
virtual bool BeforeDrawImageEvent (unsigned int image)
 Draw what the tool requires just before a given image is drawn.
virtual void AfterDrawImageEvent (unsigned int image)
 Notification called just after the image was drawn normally.

Protected Attributes

PreviewToolHelperhelper
 The PreviewToolHelper that uses the same preview window and panorama as the tool should.

Constructor & Destructor Documentation

PreviewTool::PreviewTool PreviewToolHelper helper  ) 
 

Construct keeping a pointer to a PreviewToolHelper.

Child classes should use this to ensure helper is set.

PreviewTool::~PreviewTool  )  [virtual]
 


Member Function Documentation

virtual void PreviewTool::Activate  )  [pure 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.

Implemented in PreviewControlPointTool, PreviewCropTool, PreviewDifferenceTool, PreviewDragTool, PreviewIdentifyTool, PreviewLayoutLinesTool, and PreviewPanoMaskTool.

virtual void PreviewTool::AfterDrawImageEvent unsigned int  image  )  [inline, virtual]
 

Notification called just after the image was drawn normally.

virtual void PreviewTool::AfterDrawImagesEvent  )  [inline, virtual]
 

Draw (using OpenGL) images above the others.

Reimplemented in PreviewControlPointTool, PreviewDifferenceTool, PreviewIdentifyTool, and PreviewLayoutLinesTool.

virtual bool PreviewTool::BeforeDrawImageEvent unsigned int  image  )  [inline, virtual]
 

Draw what the tool requires just before a given image is drawn.

This can be used to modify how the images are drawn, prevent drawing of the image, or change the order of the image drawing (with another event to draw the image when it is needed).

Returns:
false if the tool does not want the image drawn normally, or true when the image should be drawn normally.

Reimplemented in PreviewDifferenceTool, PreviewIdentifyTool, and PreviewLayoutLinesTool.

virtual void PreviewTool::BeforeDrawImagesEvent  )  [inline, virtual]
 

Draw using OpenGL anything the tool requires underneath the images.

Reimplemented in PreviewLayoutLinesTool, and PreviewPanoMaskTool.

virtual void PreviewTool::ImagesUnderMouseChangedEvent  )  [inline, virtual]
 

Notify when the images directly underneath the mouse pointer have changed.

It is monitored by the PreviewToolHelper.

Reimplemented in PreviewDifferenceTool, and PreviewIdentifyTool.

virtual void PreviewTool::KeypressEvent int  keycode,
int  modifiers,
bool  pressed
[inline, virtual]
 

Notify of a Keypress event.

Currently unused as the preview cannot get keyboard input focus.

virtual void PreviewTool::MouseButtonEvent wxMouseEvent &  e  )  [inline, virtual]
 

Notify of a mouse button press on the panorama preview.

Parameters:
e The event created by wxWidgets.

Reimplemented in PreviewCropTool, PreviewDragTool, PreviewIdentifyTool, and PreviewLayoutLinesTool.

virtual void PreviewTool::MouseMoveEvent double  x,
double  y,
wxMouseEvent &  e
[inline, virtual]
 

Notify when the mouse pointer has moved over the panorama preview.

The coordinates are in the space of the panorama output at full size, with no output cropping.

Parameters:
x The horizontal position of the mouse pointer in panorama pixels.
y The vertical position of the mouse pointer in panorama pixels.
e The event created by wxWidgets.

Reimplemented in PreviewCropTool, PreviewDragTool, and PreviewLayoutLinesTool.

virtual void PreviewTool::ReallyAfterDrawImagesEvent  )  [inline, virtual]
 

Draw (using OpenGL) the overlays, e.g. crop highlights, guides.

Reimplemented in PreviewCropTool, PreviewDragTool, and PreviewPanoMaskTool.


Member Data Documentation

PreviewToolHelper* PreviewTool::helper [protected]
 

The PreviewToolHelper that uses the same preview window and panorama as the tool should.


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

Generated on Mon Sep 20 01:01:35 2010 for Hugintrunk by doxygen 1.3.9.1