wxMaxima
Loading...
Searching...
No Matches
pdflinks.h
Go to the documentation of this file.
1
2// Name: pdflinks.h
3// Purpose:
4// Author: Ulrich Telle
5// Created: 2009-06-24
6// Copyright: (c) Ulrich Telle
7// Licence: wxWindows licence
9
11
12#ifndef _PDF_LINKS_H_
13#define _PDF_LINKS_H_
14
15// wxWidgets headers
16#include <wx/string.h>
17
18// wxPdfDocument headers
19#include "wx/pdfdocdef.h"
20
22class WXDLLIMPEXP_PDFDOC wxPdfLink
23{
24public:
26
30 wxPdfLink(int linkRef);
31
33
37 wxPdfLink(const wxString& linkURL);
38
40 wxPdfLink(const wxPdfLink& pdfLink);
41
43 wxPdfLink& operator=(const wxPdfLink& pdfLink);
44
46 virtual ~wxPdfLink();
47
49 bool IsValid() const { return m_isValid; }
50
52 bool IsLinkRef() const { return m_isRef; }
53
55 int GetLinkRef() const { return m_linkRef; }
56
58 const wxString GetLinkURL() const { return m_linkURL; }
59
61 void SetLink(int page, double ypos) { m_page = page; m_ypos = ypos; }
62
64
67 int GetPage() { return m_page; }
68
70
73 double GetPosition() { return m_ypos; }
74
75private:
76 bool m_isValid;
77 bool m_isRef;
78 int m_linkRef;
79 wxString m_linkURL;
80 int m_page;
81 double m_ypos;
82};
83
85class WXDLLIMPEXP_PDFDOC wxPdfPageLink : public wxPdfLink
86{
87public:
89 wxPdfPageLink(double x, double y, double w, double h, const wxPdfLink& pdfLink);
90
92 virtual ~wxPdfPageLink();
93
95
98 double GetX() { return m_x; }
99
101
104 double GetY() { return m_y; }
105
107
110 double GetWidth() { return m_w; }
111
113
116 double GetHeight() { return m_h; }
117
118private:
119 double m_x;
120 double m_y;
121 double m_w;
122 double m_h;
123};
124
125#endif
Compile time switches for the wxPdfDocument component.