00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef LAYOUTMGR_H_
00020 #define LAYOUTMGR_H_
00021
00022 #include "PageInfo.h"
00023
00024
00026
00027
00029 struct Controller;
00030 class CLayoutMgr
00031 {
00032 private:
00033 rectangle bound;
00034 rectangle* posTab;
00035 int posLen;
00036
00037 public:
00038 CLayoutMgr(void);
00039 ~CLayoutMgr(void);
00040
00041 public:
00042 void clear();
00043
00045 void getPageRect(const int page, rectangle & rect);
00046 const rectangle & getPageRect(const int page) const;
00047 double initPagesPosition(Controller * ctrl);
00048 int getPagesVisible(int & start, int & end, const rectangle & rect);
00049 int hitTest(const point & pt, const int start , const int end);
00050 int hitTest(const int x, const int y, const int start , const int end);
00051
00053 void updatePageRect(const int x, const int y, const int width, const int height);
00054 GBool hitTest(const int x, const int y);
00055
00057 void screenToVirtualScreen(Controller * ctrl, rectangle & rect);
00058 void screenToVirtualScreen(Controller * ctrl, point & pt);
00059 void virtualScreenToScreen(Controller * ctrl, const rectangle & rect);
00060 void getVirtualScreen(rectangle & rect) { rect = bound; }
00061 const rectangle & getVirtualScreen() const { return bound; }
00062
00063
00064 void rotate(Controller * ctrl, const int angle);
00065
00066 };
00067
00068 #endif