ultimatepp/uppdev/GatoFax/TiffViewCtrl.h
cxl 4a1c627474 Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

62 lines
1.2 KiB
C++

#ifndef _TiffViewCtrl_h_
#define _TiffViewCtrl_h_
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
// forward declaration
class TiffCtrl;
//#############################################################################################
// Tiff view ctrl class
class TiffViewCtrl : public Ctrl
{
public :
typedef TiffViewCtrl CLASSNAME;
private :
// Associated control
TiffCtrl *tiffCtrl;
// scrollbars
ScrollBar hScrollBar, vScrollBar;
// images scale -- in percent of real size
int imageScale;
// total dimension of image file, in unscaled pixels
int tiffWidth, tiffHeight;
// scrollbar handler
void OnScroll(void);
// paint routine
virtual void Paint(Draw &d);
// buffer to speed up scroll/pan operations
ImageBuffer imageCache;
int cacheLeft, cacheTop;
bool cacheValid;
// shifts the image in cache
void ShiftCache(const Size &amount);
// repaint images on image cache
void PaintCache(void);
public :
// constructor
TiffViewCtrl(TiffCtrl *t);
// destructor
~TiffViewCtrl();
// handles changes in images or ctrl
virtual void Layout(void);
} ; // END class TiffViewCtrl
#endif