All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PDFViewCtrl.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2018 by PDFTron Systems Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPPDFPDFViewCtrl
6 #define PDFTRON_H_CPPPDFPDFViewCtrl
7 
8 #include <PDF/PDFDoc.h>
9 #include <PDF/PDFRasterizer.h>
10 #include <PDF/Highlights.h>
11 #include <PDF/LinkInfo.h>
12 #include <PDF/OCG/Context.h>
13 #include <PDF/Selection.h>
14 #include <SDF/ObjSet.h>
15 #include <C/PDF/TRN_PDFViewCtrl.h>
16 #include <vector>
17 #include <PDF/ActionParameter.h>
18 
19 namespace pdftron {
20  namespace PDF {
21 
66 {
67 public:
68 
79  PDFViewCtrl(void* parent_hwnd, void* hinstance, bool compatibility = false);
80  ~PDFViewCtrl();
81 
90  bool SetDoc(PDFDoc& doc, const char* password = 0);
91 
96  void CloseDoc();
97 
101  PDFDoc* GetDoc();
102 
107  void DocLock(bool cancel_threads);
108 
112  void DocUnlock();
113 
119  bool DocTryLock( int milliseconds = 0 );
120 
132  void DocLockRead();
133 
137  void DocUnlockRead();
138 
144  bool DocTryLockRead( int milliseconds = 0 );
145 
150  enum WindowID {
161  };
162 
184  };
185 
186 
191  struct MouseEvent {
192  int m_x;
193  int m_y;
204 
205  // identifies the type of event
207  // identifies which window emitted the event
209  // if TRUE, this event was emitted after PDFViewCtrl has processed it
211  };
212 
217  struct KeyEvent {
218  int m_x;
219  int m_y;
220  long int m_keyCode;
226  // identifies the type of event
228  // this helps you identify which window emitted the event
230  // if TRUE, this event was emitted after PDFViewCtrl has processed it
232  };
233 
238  struct PaintEvent {
239  // platform-dependent device context pointer
240  void* m_hdc;
241  enum TRN_PDFViewCtrlWindowID m_event_window;
243  };
244 
245  struct SizeEvent {
246  int m_width;
247  int m_height;
250  // this helps you identify which window emitted the event
252  };
253 
258  struct WindowEvent {
259  // identifies the type of event
261  // this helps you identify which window emitted the event
263  };
264 
269  bool m_found;
272 
274  : m_event_type(tp),
275  m_event_window(id),
276  m_found(found)
277  {}
278  };
279 
285  // identifies the type of event
287  // this helps you identify which window emitted the event
289 
291  : m_annot(annot),
292  m_event_type(tp),
293  m_event_window(id)
294  {}
295  };
296 
297  // handlers for generic event signals emitted by PDFViewCtrl;
298  // they return boolean, return value of true means no PDFViewCtrl processing should take place
299  typedef UInt8 (*MouseEventHandler) ( struct MouseEvent* evt, void* custom_data );
300  typedef UInt8 (*KeyEventHandler) ( struct KeyEvent* evt, void* custom_data );
301  typedef UInt8 (*PaintEventHandler) ( struct PaintEvent* evt, void* custom_data );
302  typedef UInt8 (*SizeEventHandler) ( struct SizeEvent* evt, void* custom_data );
303  typedef UInt8 (*WindowEventHandler)( struct WindowEvent* evt, void* custom_data);
304  typedef UInt8 (*TextFindDoneHandler)(struct TextFindDoneEvent* evt, void* custom_data);
305  typedef UInt8 (*AnnotationEditPermissionHandler)(struct AnnotationEditPermissionEvent* evt, void* custom_data);
306 
312  {
335 
336  void* custom_data;
337 
338  EventHandlers();
339  };
340 
345  void SetCustomEventHandlers( EventHandlers* handlers );
346 
354  typedef UInt8 (*ActionHandler) ( TRN_Action action, void* custom_data );
355 
360  void SetActionHandler( ActionHandler action_callback, void* custom_data );
361 
367  void ExecuteAction(ActionParameter action_param );
368 
377  typedef void (*CurrentPageHandler) (int current_page, int num_pages, void* data);
378 
387  void SetCurrentPageHandler(CurrentPageHandler curr_pagenum_proc, void* data);
388 
396  typedef void (*CurrentZoomHandler) (double current_zoom, void* data);
397 
406  void SetCurrentZoomHandler(CurrentZoomHandler curr_zoom_proc, void* data);
407 
408  typedef void (*ErrorReportHandler) (const char* message, void* data);
409 
417  void SetErrorReportHandler(ErrorReportHandler error_proc, void* data);
418 
429  void OnSize(int x, int y, int width, int height);
430 
435  void Find();
436 
440  void Copy();
441 
445  void SelectAll();
446 
458  void SetProgressiveRendering(bool progressive=true);
459 
464  void ShowNavPanel(bool show);
465 
469  bool IsNavPanelVisible() const;
470 
475  void EnableScrollbar( bool show );
476 
481  void ShowToolbar( bool show);
482 
487  void ShowStatusBar( bool show);
488 
493  void ShowNavToolbar( bool show);
494 
499  void ShowMenuBar( bool show );
500 
505  void EnableInteractiveForms(bool on);
506 
512  void ShowDialogs(bool show);
513 
514  static const UInt32 e_none=0x00;
515  static const UInt32 e_bookmarks=0x01;
516  static const UInt32 e_layers=0x02;
517  static const UInt32 e_thumbview=0x04;
518  static const UInt32 e_all=0x07;
519  typedef UInt32 PanelType;
520 
525  void SetEnabledPanels(UInt32 panels);
526 
532  UInt32 GetEnabledPanels() const ;
533 
538  void SetSelectedPanel(PanelType panel);
539 
544  PanelType GetSelectedPanel() const ;
545 
550  void SetSplitPosition(int pos);
551 
556  int GetSplitPosition() const ;
557 
563  void Print();
564 
576  void Print(int first_page, int last_page, Page::Rotate rotation,
577  int copies, const char* printer_name);
578 
579 
591  void Print(int first_page, int last_page, Page::Rotate rotation,
592  int copies, const UString& printer_name);
593 
594 
598  void Refresh();
599 
600 
612  void RequestRendering();
613 
614 
618  void CaptureMouse();
619 
623  void ReleaseMouse();
624 
628  bool HasCapture() const;
629 
634  void EnableLinkActivation(bool enable);
635 
641  void LoadCurrentConfiguration( const UString & path );
642 
648  void SaveCurrentConfiguration( const UString & path, Common::ProgressMonitor* progress = 0 );
649 
662  Annot GetDefaultAnnotation( const char* type );
663 
667  void SetWindowBackgroundColor( WindowID winid, const ColorPt& color );
668 #ifdef WIN32
669  void SetWindowCursor( PDFViewCtrl::WindowID winid, HCURSOR cursor );
670 #endif
671 
675  void SetFocus();
676 
677  /* dialogs creation API */
678 
683  void DocProperties();
684 
689  void DeletePages();
690 
695  void InsertPages(const UString& src_name);
696 
701  void InsertBlankPages();
702 
708  void ReplacePages(const UString& src_name = UString());
709 
714  void RotatePages();
715 
719  void ExtractPages();
720 
726  void CropPages();
727 
732  void AddWatermark();
733 
734  /* end of dialogs creation API */
735 
749  {
754  };
755 
762  void SetPageViewMode(PageViewMode mode);
763 
767  PageViewMode GetPageViewMode() const ;
768 
773  {
774  e_single_page = 1, //<<< Display one page at a time.
775  e_single_continuous, //<<< Display the pages in one column.
776  e_facing, //<<< Display the pages two at a time, with odd-numbered pages on the left.
777  e_facing_continuous, //<<< Display the pages in two columns, with odd-numbered pages on the left.
778  e_facing_cover, //<<< Display the pages two at a time, with odd-numbered pages on the right.
779  e_facing_continuous_cover //<<< Display the pages in two columns, with odd-numbered pages on the right.
780  };
781 
789 
794 
805 
810 
814  int GetCurrentPage() const ;
815 
819  int GetPageCount() const ;
820 
826  std::vector<int> GetVisiblePages() const ;
827 
833  bool GotoFirstPage();
834 
840  bool GotoLastPage();
841 
847  bool GotoNextPage();
848 
854  bool GotoPreviousPage();
855 
861  bool SetCurrentPage(int page_num);
862 
870  bool ShowRect( int page_num, const Rect& rect );
871 
877  double GetZoom() const ;
878 
886  bool SetZoom(double zoom);
887 
915  bool SetZoom(int x, int y, double zoom);
916 
933  bool SmartZoom(int x, int y);
934 
938  void RotateClockwise();
939 
943  void RotateCounterClockwise();
944 
948  Page::Rotate GetRotation() const ;
949 
954  int GetPageNumberFromScreenPt(double x, double y) const ;
955 
959  void ConvScreenPtToCanvasPt(double& x, double& y) const ;
960 
964  void ConvCanvasPtToScreenPt(double& x, double& y) const;
965 
973  void ConvCanvasPtToPagePt(double& x, double& y, int page_num = -1) const;
974 
982  void ConvPagePtToCanvasPt(double& x, double& y, int page_num = -1) const;
983 
991  void ConvScreenPtToPagePt(double& x, double& y, int page_num = -1) const;
992 
1000  void ConvPagePtToScreenPt(double& x, double& y, int page_num = -1) const;
1001 
1017  Common::Matrix2D GetDeviceTransform(int page_num = -1) const;
1018 
1022  double GetCanvasWidth() const;
1023 
1027  double GetCanvasHeight() const;
1028 
1032  double GetHScrollPos() const;
1033 
1037  double GetVScrollPos() const;
1038 
1039 
1046  void OnScroll(int pix_dx, int pix_dy);
1047 
1054  void SetHScrollPos(double pos);
1055 
1078  void SetVScrollPos(double pos);
1079 
1091  bool IsFinishedRendering(bool visible_region_only) const;
1092 
1097  void CancelRendering();
1098 
1104  void Update(bool all = false);
1105 
1110  void Update(const Rect& update);
1111 
1117  void Update(const Annot& annot, int page_num);
1118 
1123  void Update(const Field& field);
1124 
1131  void UpdatePageLayout();
1132 
1137  int GetViewWidth() const;
1138 
1143  int GetViewHeight() const;
1144 
1145 
1152  void SetDrawAnnotations(bool render_annots);
1153 
1166  void SetUrlExtraction(bool enabled);
1167 
1180  LinkInfo GetLinkAt(int x, int y);
1181 
1187  void SetHighlightFields(bool highlight_fields);
1188 
1198  void SetAntiAliasing(bool enable_aa);
1199 
1208  void SetPathHinting(bool enable_hinting);
1209 
1220  void SetThinLineAdjustment(bool pixel_grid_fit, bool stroke_adjust);
1221 
1235  void SetImageSmoothing(bool smoothing_enabled = true);
1236 
1244  void SetCaching(bool enabled);
1245 
1255 
1268  void SetGamma(double exp);
1269 
1280 
1296  void SetOCGContext(const OCG::Context& ctx);
1297 
1306 
1311  enum ToolMode
1312  {
1313  e_custom, // Custom tool
1314  e_pan, // Pan tool
1315  e_text_rect_select, // Rectangular text selection tool
1316  e_text_struct_select, // HTML Style text selection tool
1317  e_zoom_in, // Zoom in tool
1318  e_zoom_out, // Zoom out tool
1319  e_annot_edit, // Annotation editing tool
1320  e_line_create, // Line creation tool
1321  e_arrow_create, // Arrow creation tool
1322  e_rect_create, // Rectangle creation tool
1323  e_oval_create, // Oval/Ellipse creation tool
1324  e_ink_create, // Freehand drawing tool
1325  e_text_annot_create, // Text annotation creation tool
1326  e_stamp_create, // Stamp Annotation creation tool
1327  e_highlight_create, // highlight text tool
1328  e_underline_create, // underline text tool
1329  e_strikeout_create, // cross out text tool
1330  e_squiggly_create, // squiggly underline tool
1331  e_text_box_create, // free text creation tool
1332  e_calloutbox_create, // free text with a callout tool
1333  e_polygon_create, // polygon creation tool
1334  e_polyline_create, // polyline creation tool
1335  e_file_attachment, // file attachment creation
1336  e_sound_attachment, // sound annotation creation
1337  e_movie_attachment, // movie annotation creation
1338  e_caret_create, // caret placement tool
1339  e_redaction_create, // redaction placement tool
1340  e_text_field_create, // interactive text field creation
1341  e_check_box_create, // interactive check box creation tool
1342  e_radio_button_create, // interactive radio button tool
1343  e_list_box_create, // interactive list box creation tool
1344  e_combo_box_create, // interactive combo box creation tool
1345  e_button_create, // interactive button creation tool
1346  e_link_create, // create a link annotation
1348  };
1349 
1354  void SetToolMode(ToolMode mode);
1355 
1359  ToolMode GetToolMode() const;
1360 
1370  };
1371 
1377 
1385  bool Select(double x1, double y1, double x2, double y2);
1386 
1395  bool SelectWithSnapping(double x1, double y1, double x2, double y2, bool snap_to_start, bool snap_to_end);
1396 
1404  bool SelectWithSmartSnapping(double x1, double y1, double x2, double y2);
1405 
1413  bool Select(double x1, double y1, int page1, double x2, double y2, int page2);
1414 
1423  bool SelectWithSnapping(double x1, double y1, int page1, double x2, double y2, int page2, bool snap_to_start, bool snap_to_end);
1424 
1432  bool SelectWithSmartSnapping(double x1, double y1, int page1, double x2, double y2, int page2);
1433 
1440  bool Select(const Highlights& highlights);
1441 
1442 
1449  bool Select(const Selection& select);
1450 
1454  bool HasSelection() const;
1455 
1459  void ClearSelection();
1460 
1466  Selection GetSelection( int page = -1 ) const;
1467 
1472  int GetSelectionBeginPage() const ;
1473 
1478  int GetSelectionEndPage() const;
1479 
1484  bool HasSelectionOnPage( int ipage ) const;
1485 
1492  void PrepareWords(int page_num);
1493 
1498  bool WereWordsPrepared(int page_num) const;
1499 
1504  bool IsThereTextInRect(double x1, double y1, double x2, double y2) const;
1505 
1516  void PrepareAnnotsForMouse(int page_num, double distance_threshold, double minimum_line_weight);
1517 
1522  bool WereAnnotsForMousePrepared(int page_num) const;
1523 
1529  Annot::Type GetAnnotTypeUnder(double x, double y);
1530 
1535  void SetPageBorderVisibility(bool border_visible);
1536 
1542  void SetPageTransparencyGrid(bool trans_grid_visible);
1543 
1548  void SetDefaultPageColor(UInt8 r, UInt8 g, UInt8 b);
1549 
1554  void SetBackgroundColor(UInt8 r, UInt8 g, UInt8 b);
1555 
1565  void SetHorizontalAlign(int align);
1566 
1576  void SetVerticalAlign(int align);
1577 
1591  void SetPageSpacing(int horiz_col_space, int vert_col_space, int horiz_pad, int vert_pad);
1592 
1601  Rect GetScreenRectForAnnot(Annot annot, int page_num = -1);
1602 
1611  Annot GetAnnotationAt(int x, int y);
1612 
1620  void SetDownloadReportHandler(DownloadReportHandler download_proc, void* data);
1621 
1636  void OpenURLAsync(const char* url, UString cache_file="", const char* password = 0, const class HTTPRequestOptions* options = 0);
1637 
1648  void SetupThumbnails(bool use_embedded, bool generate_at_runtime, bool use_disk_cache, int thumb_max_side_length, size_t max_abs_cache_size, double max_perc_cache_size);
1649 
1653  void ClearThumbCache();
1654 
1666  typedef void (*ThumbAsyncHandler) (int page_num, bool was_thumb_found, const char* thumb_buf, int thumb_width, int thumb_height, void* custom_data);
1667 
1676  void GetThumbAsync(int page_num, ThumbAsyncHandler proc, void* custom_data);
1677 
1678  /*
1679  * Cancel all pending GetThumbAsync requests. Your callback function will still be called
1680  * for each canceled request, but 'was_thumb_found' will be set to 'false'.
1681  */
1682  void CancelAllThumbRequests();
1683 
1689  typedef void (*RequestRenderInWorkerThreadProc) (void* custom_data);
1690 
1699 #ifdef SWIG
1700  void SetRequestRenderInWorkerThreadProc(Callback* instance);
1701 #else
1703 #endif
1704 
1705 #ifdef SWIG
1706 
1712  void SetFindTextHandler(Callback * instance);
1713 #else
1714 
1719  typedef void (*FindTextAsyncHandler) (bool success, Selection& select, void * custom_data);
1720 
1728  void SetFindTextHandler(FindTextAsyncHandler proc, void * custom_data);
1729 #endif
1730 
1740  void FindTextAsync(const UString& search_str, bool match_case, bool match_whole_word,
1741  bool search_up, bool reg_exp);
1742 
1743 
1745 private:
1746  TRN_PDFViewCtrl mp_view;
1747  TRN_PDFDoc temp_doc;
1748 
1749  // PDFViewCtrl should not be copied
1750  PDFViewCtrl(const PDFViewCtrl& other);
1751  PDFViewCtrl& operator= (const PDFViewCtrl&);
1752 
1753  //For FindTextAsync callback landing pad
1754  FindTextAsyncHandler m_findtext_proc;
1755  void * m_findtext_data;
1756  static void NativeFindTextHandler(unsigned char success, TRN_PDFViewSelection select, void * custom_data);
1758 };
1759 
1764 {
1765 public:
1775  void AddHeader(const UString& header, const UString& val);
1776 protected:
1777  TRN_Obj m_obj;
1778  friend class PDF::PDFViewCtrl;
1780 };
1781 
1782 #include <Impl/PDFViewCtrl.inl>
1783 
1784  } // namespace PDF
1785 } // namespace pdftron
1786 
1787 #endif // PDFTRON_H_CPPPDFPDFViewCtrl
void SetFindTextHandler(FindTextAsyncHandler proc, void *custom_data)
void SetThinLineAdjustment(bool pixel_grid_fit, bool stroke_adjust)
bool SelectWithSnapping(double x1, double y1, double x2, double y2, bool snap_to_start, bool snap_to_end)
bool WereAnnotsForMousePrepared(int page_num) const
void SetWindowBackgroundColor(WindowID winid, const ColorPt &color)
void SetCurrentPageHandler(CurrentPageHandler curr_pagenum_proc, void *data)
bool HasSelectionOnPage(int ipage) const
void SetPagePresentationMode(PagePresentationMode mode)
void SetDownloadReportHandler(DownloadReportHandler download_proc, void *data)
void SetHorizontalAlign(int align)
Page::Rotate GetRotation() const
void ConvPagePtToCanvasPt(double &x, double &y, int page_num=-1) const
PagePresentationMode GetPagePresentationMode() const
void ShowMenuBar(bool show)
void ReplacePages(const UString &src_name=UString())
int GetSelectionBeginPage() const
void ShowNavPanel(bool show)
std::vector< int > GetVisiblePages() const
void InsertPages(const UString &src_name)
void PrepareAnnotsForMouse(int page_num, double distance_threshold, double minimum_line_weight)
enum ControlEventType m_event_type
Definition: PDFViewCtrl.h:206
void SetOverprint(PDFRasterizer::OverprintPreviewMode op)
enum ControlEventType m_event_type
Definition: PDFViewCtrl.h:260
bool IsThereTextInRect(double x1, double y1, double x2, double y2) const
double GetCanvasHeight() const
UInt8(* TextFindDoneHandler)(struct TextFindDoneEvent *evt, void *custom_data)
Definition: PDFViewCtrl.h:304
bool DocTryLock(int milliseconds=0)
void(* CurrentZoomHandler)(double current_zoom, void *data)
Definition: PDFViewCtrl.h:396
void OpenURLAsync(const char *url, UString cache_file="", const char *password=0, const class HTTPRequestOptions *options=0)
bool ShowRect(int page_num, const Rect &rect)
TRN_UInt8 UInt8
Definition: BasicTypes.h:15
void ShowToolbar(bool show)
bool WereWordsPrepared(int page_num) const
void(* ThumbAsyncHandler)(int page_num, bool was_thumb_found, const char *thumb_buf, int thumb_width, int thumb_height, void *custom_data)
Definition: PDFViewCtrl.h:1666
ToolMode GetToolMode() const
void SetHScrollPos(double pos)
int GetPageNumberFromScreenPt(double x, double y) const
void SetPageBorderVisibility(bool border_visible)
void SetCaching(bool enabled)
bool SetCurrentPage(int page_num)
void PrepareWords(int page_num)
void SetPathHinting(bool enable_hinting)
void(* RequestRenderInWorkerThreadProc)(void *custom_data)
Definition: PDFViewCtrl.h:1689
void GetThumbAsync(int page_num, ThumbAsyncHandler proc, void *custom_data)
void EnableScrollbar(bool show)
Annot GetAnnotationAt(int x, int y)
void SetImageSmoothing(bool smoothing_enabled=true)
bool SetDoc(PDFDoc &doc, const char *password=0)
void ExecuteAction(ActionParameter action_param)
LinkInfo GetLinkAt(int x, int y)
enum ControlEventType m_event_type
Definition: PDFViewCtrl.h:227
void SetToolMode(ToolMode mode)
UInt8(* AnnotationEditPermissionHandler)(struct AnnotationEditPermissionEvent *evt, void *custom_data)
Definition: PDFViewCtrl.h:305
Annot::Type GetAnnotTypeUnder(double x, double y)
UInt8(* KeyEventHandler)(struct KeyEvent *evt, void *custom_data)
Definition: PDFViewCtrl.h:300
void SetGamma(double exp)
Selection GetSelection(int page=-1) const
void SetProgressiveRendering(bool progressive=true)
int GetSelectionEndPage() const
double GetCanvasWidth() const
bool IsNavPanelVisible() const
TRN_Unicode Unicode
Definition: BasicTypes.h:22
double GetVScrollPos() const
bool SmartZoom(int x, int y)
void SetRasterizerType(PDFRasterizer::Type type)
void SetDrawAnnotations(bool render_annots)
static const UInt32 e_thumbview
Definition: PDFViewCtrl.h:517
bool SetZoom(double zoom)
void LoadCurrentConfiguration(const UString &path)
UInt8(* SizeEventHandler)(struct SizeEvent *evt, void *custom_data)
Definition: PDFViewCtrl.h:302
void EnableInteractiveForms(bool on)
UInt8(* ActionHandler)(TRN_Action action, void *custom_data)
Definition: PDFViewCtrl.h:354
void SetupThumbnails(bool use_embedded, bool generate_at_runtime, bool use_disk_cache, int thumb_max_side_length, size_t max_abs_cache_size, double max_perc_cache_size)
void SetDefaultPageColor(UInt8 r, UInt8 g, UInt8 b)
bool SelectWithSmartSnapping(double x1, double y1, double x2, double y2)
void OnSize(int x, int y, int width, int height)
TRN_UInt32 UInt32
Definition: BasicTypes.h:13
UInt8(* PaintEventHandler)(struct PaintEvent *evt, void *custom_data)
Definition: PDFViewCtrl.h:301
void ConvScreenPtToPagePt(double &x, double &y, int page_num=-1) const
void SetCurrentZoomHandler(CurrentZoomHandler curr_zoom_proc, void *data)
void Update(bool all=false)
void SetColorPostProcessMode(PDFRasterizer::ColorPostProcessMode mode)
PanelType GetSelectedPanel() const
void SetPageTransparencyGrid(bool trans_grid_visible)
void(* ErrorReportHandler)(const char *message, void *data)
Definition: PDFViewCtrl.h:408
void ConvCanvasPtToPagePt(double &x, double &y, int page_num=-1) const
void SetVScrollPos(double pos)
void SetErrorReportHandler(ErrorReportHandler error_proc, void *data)
void SetSplitPosition(int pos)
void SetUrlExtraction(bool enabled)
Annot GetDefaultAnnotation(const char *type)
bool Select(double x1, double y1, double x2, double y2)
void EnableLinkActivation(bool enable)
bool IsFinishedRendering(bool visible_region_only) const
AnnotationEditPermissionHandler on_edit_annotation
Definition: PDFViewCtrl.h:334
AnnotationEditPermissionEvent(PDFViewCtrl::WindowID id, ControlEventType tp, Annot &annot)
Definition: PDFViewCtrl.h:290
bool HasSelection() const
void(* CurrentPageHandler)(int current_page, int num_pages, void *data)
Definition: PDFViewCtrl.h:377
void SetPageSpacing(int horiz_col_space, int vert_col_space, int horiz_pad, int vert_pad)
void SetBackgroundColor(UInt8 r, UInt8 g, UInt8 b)
void SetHighlightFields(bool highlight_fields)
void(* DownloadReportHandler)(DownloadedType type, PDFDoc *doc, int page_num, int obj_num, const char *message, void *data)
Definition: PDFRasterizer.h:43
void(* FindTextAsyncHandler)(bool success, Selection &select, void *custom_data)
Definition: PDFViewCtrl.h:1719
void SetEnabledPanels(UInt32 panels)
void ShowDialogs(bool show)
Rect GetScreenRectForAnnot(Annot annot, int page_num=-1)
void OnScroll(int pix_dx, int pix_dy)
void SetActionHandler(ActionHandler action_callback, void *custom_data)
static const UInt32 e_bookmarks
Definition: PDFViewCtrl.h:515
PageViewMode GetPageViewMode() const
UInt8(* MouseEventHandler)(struct MouseEvent *evt, void *custom_data)
Definition: PDFViewCtrl.h:299
void ConvScreenPtToCanvasPt(double &x, double &y) const
Common::Matrix2D GetDeviceTransform(int page_num=-1) const
static const UInt32 e_layers
Definition: PDFViewCtrl.h:516
enum TRN_PDFViewCtrlWindowID m_event_window
Definition: PDFViewCtrl.h:241
bool DocTryLockRead(int milliseconds=0)
void SetOCGContext(const OCG::Context &ctx)
UInt8(* WindowEventHandler)(struct WindowEvent *evt, void *custom_data)
Definition: PDFViewCtrl.h:303
void SetTextSelectionMode(TextSelectionMode tm)
void ShowStatusBar(bool show)
TextFindDoneEvent(PDFViewCtrl::WindowID id, ControlEventType tp, bool found)
Definition: PDFViewCtrl.h:273
double GetHScrollPos() const
int GetSplitPosition() const
static const UInt32 e_none
Definition: PDFViewCtrl.h:514
UInt32 GetEnabledPanels() const
void ShowNavToolbar(bool show)
void SetRequestRenderInWorkerThreadProc(RequestRenderInWorkerThreadProc proc, void *custom_data)
PDFRasterizer::ColorPostProcessMode GetColorPostProcessMode() const
void SetCustomEventHandlers(EventHandlers *handlers)
void SaveCurrentConfiguration(const UString &path, Common::ProgressMonitor *progress=0)
void DocLock(bool cancel_threads)
void SetVerticalAlign(int align)
void SetAntiAliasing(bool enable_aa)
void AddHeader(const UString &header, const UString &val)
static const UInt32 e_all
Definition: PDFViewCtrl.h:518
void ConvPagePtToScreenPt(double &x, double &y, int page_num=-1) const
OCG::Context GetOCGContext()
PDFViewCtrl(void *parent_hwnd, void *hinstance, bool compatibility=false)
void ConvCanvasPtToScreenPt(double &x, double &y) const
void FindTextAsync(const UString &search_str, bool match_case, bool match_whole_word, bool search_up, bool reg_exp)
void SetSelectedPanel(PanelType panel)
double GetZoom() const
void SetPageViewMode(PageViewMode mode)

© 2002-2014 PDFTron Systems Inc.