fs_reflowpage.h
Go to the documentation of this file.
1 
15 #ifndef FS_REFLOWPAGE_H_
16 #define FS_REFLOWPAGE_H_
17 
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfpage.h"
20 
26 namespace foxit {
30 namespace pdf {
60 class ReflowPage FS_FINAL : public Base {
61  public:
67  typedef enum _Flags {
69  e_Normal = 0x0,
71  e_WithImage = 0x1,
92  } Flags;
93 
94 
100  explicit ReflowPage(const PDFPage& page);
101 
107  ReflowPage(const ReflowPage& other);
108 
116  ReflowPage& operator = (const ReflowPage& other);
124  bool operator == (const ReflowPage& other) const ;
132  bool operator != (const ReflowPage& other) const ;
134  ~ReflowPage();
135 
143  bool IsEmpty() const;
155  void SetScreenSize(float width, float height);
156 
172  void SetScreenMargin(int left, int top, int right, int bottom);
173 
188  void SetZoom(int zoom);
189 
200  void SetParseFlags(uint32 flags);
201 
210  void SetLineSpace(float line_space);
211 
223  void SetTopSpace(float top_space);
224 
242 
248  float GetContentWidth() const;
249 
255  float GetContentHeight() const;
256 
269  Matrix GetDisplayMatrix(float offset_x, float offset_y) const;
270 
290  String GetFocusData(const Matrix& matrix, const PointF& point) const;
291 
313  PointF GetFocusPosition(const Matrix& matrix, const char* focus_data) const;
314 
321  bool IsParsed() const;
322 
323  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
324  explicit ReflowPage(FS_HANDLE handle = NULL);
325 };
326 } // namespace pdf
327 } // namespace foxit
328 #endif // FS_REFLOWPAGE_H_
329 
bool operator!=(const ReflowPage &other) const
Not equal operator.
common::Progressive StartParse(common::PauseCallback *pause=0)
Start to parse current reflow page.
Definition: fs_reflowpage.h:60
float GetContentWidth() const
Get content width after current reflow page object has been parsed.
float GetContentHeight() const
Get content height after current reflow page object has been parsed.
bool IsEmpty() const
Check whether current object is empty or not.
void SetParseFlags(uint32 flags)
Set the parsing flag. This can be called before calling function ReflowPage::StartParse.
bool operator==(const ReflowPage &other) const
Equal operator.
Matrix GetDisplayMatrix(float offset_x, float offset_y) const
Get the display matrix, according to the offset of top side between current reflow page and screen...
String GetFocusData(const Matrix &matrix, const PointF &point) const
Get focus data corresponding to a given position in device coordinate system.
bool IsParsed() const
Check if current reflow page has been parsed or not.
void SetTopSpace(float top_space)
Set the top space. This can be called before calling function ReflowPage::StartParse.
PointF GetFocusPosition(const Matrix &matrix, const char *focus_data) const
Get the position in device coordinate system corresponding to a given focus data. ...
void SetZoom(int zoom)
Set zoom factor. This can be called before calling function ReflowPage::StartParse.
ReflowPage & operator=(const ReflowPage &other)
Assign operator.
void SetScreenSize(float width, float height)
Set screen size. This should be called before calling function ReflowPage::StartParse.
void SetLineSpace(float line_space)
Set line space. This can be called before calling function ReflowPage::StartParse.
Parsing flag to decide whether to allow to truncate the first/last image or line of text within the s...
Definition: fs_reflowpage.h:91
CFX_PointF PointF
Point information, in float.
Definition: fs_basictypes.h:353
Definition: fx_basic.h:3566
Definition: fs_common.h:382
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
Definition: fs_pdfpage.h:306
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
Header file for common definitions and classes.
void SetScreenMargin(int left, int top, int right, int bottom)
Set margin. This can be called before calling function ReflowPage::StartParse.
Parsing flag for image mode.
Definition: fs_reflowpage.h:71
~ReflowPage()
Destructor.
Definition: fs_basictypes.h:333
Header file for PDF page related definitions and classes.
Flags
Enumeration for parsing flags used for a reflow page.
Definition: fs_reflowpage.h:67
Foxit namespace.
Definition: fs_connectedpdf.h:26
Parsing flag for normal mode, without image.
Definition: fs_reflowpage.h:69
BYTE STRING CLASS.
Definition: fx_string.h:317
#define NULL
The null-pointer value.
Definition: fx_system.h:767
ReflowPage(const PDFPage &page)
Constructor, from a parsed PDF page.
Definition: fx_coordinates.h:914

Foxit Software Corporation Logo
@2018 Foxit Software Incorporated. All rights reserved.