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,
91  } Flags;
92 
93 
99  explicit ReflowPage(const PDFPage& page);
100 
106  ReflowPage(const ReflowPage& other);
107 
115  ReflowPage& operator = (const ReflowPage& other);
123  bool operator == (const ReflowPage& other) const ;
131  bool operator != (const ReflowPage& other) const ;
133  ~ReflowPage();
134 
142  bool IsEmpty() const;
154  void SetScreenSize(float width, float height);
155 
171  void SetScreenMargin(int left, int top, int right, int bottom);
172 
187  void SetZoom(int zoom);
188 
199  void SetParseFlags(uint32 flags);
200 
209  void SetLineSpace(float line_space);
210 
222  void SetTopSpace(float top_space);
223 
241 
247  float GetContentWidth() const;
248 
254  float GetContentHeight() const;
255 
268  Matrix GetDisplayMatrix(float offset_x, float offset_y) const;
269 
289  String GetFocusData(const Matrix& matrix, const PointF& point) const;
290 
312  PointF GetFocusPosition(const Matrix& matrix, const char* focus_data) const;
313 
320  bool IsParsed() const;
321 
322  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
323  explicit ReflowPage(FS_HANDLE handle = NULL);
324 };
325 } // namespace pdf
326 } // namespace foxit
327 #endif // FS_REFLOWPAGE_H_
328 
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.
Definition: fx_coordinates.h:30
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:90
Definition: fx_basic.h:3690
Definition: fs_common.h:385
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:198
Definition: fs_pdfpage.h:307
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
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:342
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:773
ReflowPage(const PDFPage &page)
Constructor, from a parsed PDF page.
Definition: fx_coordinates.h:1053

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