[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

CPImageCtrl Class Reference

brief description. More...

#include <CPImageCtrl.h>

List of all members.

Public Types

enum  ImageRotation { ROT0 = 0, ROT90, ROT180, ROT270 }
 image rotation. More...

Public Member Functions

 CPImageCtrl ()
 ctor.
bool Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel"))
void Init (CPEditorPanel *parent)
 ~CPImageCtrl ()
 dtor.
void SetZoomView (CPZoomDisplayPanel *display)
 associate a zoomed display with this image
void setImage (const std::string &filename, ImageRotation rot)
 display img.
void setCtrlPoints (const std::vector< hugin_utils::FDiff2D > &points)
 control point inside this image
void clearNewPoint ()
 clear new point
void setNewPoint (const hugin_utils::FDiff2D &p)
 set new point to a specific point
void selectPoint (unsigned int)
 select a point for usage
void deselect ()
 remove selection.
void mousePressLMBEvent (wxMouseEvent &mouse)
void mouseReleaseLMBEvent (wxMouseEvent &mouse)
void mouseReleaseRMBEvent (wxMouseEvent &mouse)
void mouseMoveEvent (wxMouseEvent &mouse)
void mousePressMMBEvent (wxMouseEvent &mouse)
void mouseReleaseMMBEvent (wxMouseEvent &mouse)
wxSize DoGetBestSize () const
void setScale (double factor)
 set the scaling factor for cp display.
double getScale ()
 return scale factor, 0 for autoscale
void showPosition (hugin_utils::FDiff2D point, bool warpPointer=false)
 Show point x, y.
void showSearchArea (bool show=true)
 show/hide the search area rectangle
void showTemplateArea (bool show=true)
hugin_utils::FDiff2D getNewPoint ()
 get the new point
void update ()
 initiate redraw
void ScrollDelta (const wxPoint &delta)
 scroll the window by delta pixels
wxPoint MaxScrollDelta (wxPoint delta)
 calculate maximum delta that is allowed when scrolling

Protected Member Functions

wxRect drawPoint (wxDC &p, const hugin_utils::FDiff2D &point, int i, bool selected=false) const
wxBitmap generateMagBitmap (hugin_utils::FDiff2D point, wxPoint canvasPos) const
void OnDraw (wxDC &dc)
void OnSize (wxSizeEvent &e)
void OnKey (wxKeyEvent &e)
void OnKeyDown (wxKeyEvent &e)
void OnMouseLeave (wxMouseEvent &e)
void OnMouseEnter (wxMouseEvent &e)
void OnTimer (wxTimerEvent &e)
bool emit (CPEvent &ev)
 helper func to emit a region
double getScaleFactor () const
 get scale factor (calculates factor when fit to window is active)
double calcAutoScaleFactor (wxSize size)
 calculate new scale factor for this image
void rescaleImage ()


Detailed Description

brief description.

What this does


Member Enumeration Documentation

enum CPImageCtrl::ImageRotation
 

image rotation.

Useful to display images depending on their roll setting. rotation is clockwise

Enumeration values:
ROT0 
ROT90 
ROT180 
ROT270 


Constructor & Destructor Documentation

CPImageCtrl::CPImageCtrl  )  [inline]
 

ctor.

CPImageCtrl::~CPImageCtrl  ) 
 

dtor.


Member Function Documentation

double CPImageCtrl::calcAutoScaleFactor wxSize  size  )  [protected]
 

calculate new scale factor for this image

void CPImageCtrl::clearNewPoint  ) 
 

clear new point

bool CPImageCtrl::Create wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxT("panel")
 

void CPImageCtrl::deselect  ) 
 

remove selection.

wxSize CPImageCtrl::DoGetBestSize  )  const
 

wxRect CPImageCtrl::drawPoint wxDC &  p,
const hugin_utils::FDiff2D point,
int  i,
bool  selected = false
const [protected]
 

bool CPImageCtrl::emit CPEvent ev  )  [protected]
 

helper func to emit a region

wxBitmap CPImageCtrl::generateMagBitmap hugin_utils::FDiff2D  point,
wxPoint  canvasPos
const [protected]
 

FDiff2D CPImageCtrl::getNewPoint  ) 
 

get the new point

double CPImageCtrl::getScale  )  [inline]
 

return scale factor, 0 for autoscale

double CPImageCtrl::getScaleFactor  )  const [protected]
 

get scale factor (calculates factor when fit to window is active)

void CPImageCtrl::Init CPEditorPanel parent  ) 
 

wxPoint CPImageCtrl::MaxScrollDelta wxPoint  delta  ) 
 

calculate maximum delta that is allowed when scrolling

void CPImageCtrl::mouseMoveEvent wxMouseEvent &  mouse  ) 
 

void CPImageCtrl::mousePressLMBEvent wxMouseEvent &  mouse  ) 
 

void CPImageCtrl::mousePressMMBEvent wxMouseEvent &  mouse  ) 
 

void CPImageCtrl::mouseReleaseLMBEvent wxMouseEvent &  mouse  ) 
 

void CPImageCtrl::mouseReleaseMMBEvent wxMouseEvent &  mouse  ) 
 

void CPImageCtrl::mouseReleaseRMBEvent wxMouseEvent &  mouse  ) 
 

void CPImageCtrl::OnDraw wxDC &  dc  )  [protected]
 

void CPImageCtrl::OnKey wxKeyEvent &  e  )  [protected]
 

void CPImageCtrl::OnKeyDown wxKeyEvent &  e  )  [protected]
 

void CPImageCtrl::OnMouseEnter wxMouseEvent &  e  )  [protected]
 

void CPImageCtrl::OnMouseLeave wxMouseEvent &  e  )  [protected]
 

void CPImageCtrl::OnSize wxSizeEvent &  e  )  [protected]
 

void CPImageCtrl::OnTimer wxTimerEvent &  e  )  [protected]
 

void CPImageCtrl::rescaleImage  )  [protected]
 

void CPImageCtrl::ScrollDelta const wxPoint &  delta  ) 
 

scroll the window by delta pixels

void CPImageCtrl::selectPoint unsigned  int  ) 
 

select a point for usage

void CPImageCtrl::setCtrlPoints const std::vector< hugin_utils::FDiff2D > &  points  ) 
 

control point inside this image

void CPImageCtrl::setImage const std::string &  filename,
ImageRotation  rot
 

display img.

every CPImageCtrl has a wxBitmap with its current image

void CPImageCtrl::setNewPoint const hugin_utils::FDiff2D p  ) 
 

set new point to a specific point

void CPImageCtrl::setScale double  factor  ) 
 

set the scaling factor for cp display.

Parameters:
factor zoom factor, 0 means fit to window.

void CPImageCtrl::SetZoomView CPZoomDisplayPanel display  ) 
 

associate a zoomed display with this image

void CPImageCtrl::showPosition hugin_utils::FDiff2D  point,
bool  warpPointer = false
 

Show point x, y.

Scrolls the windows so that x,y is shown in the center if warpPointer is true, the mouse pointer is moved to that position as well

void CPImageCtrl::showSearchArea bool  show = true  ) 
 

show/hide the search area rectangle

void CPImageCtrl::showTemplateArea bool  show = true  ) 
 

void CPImageCtrl::update  ) 
 

initiate redraw


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

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