]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/lib/pdfwin.py
Fixed typo, patch from Will
[wxWidgets.git] / wxPython / wx / lib / pdfwin.py
1 #----------------------------------------------------------------------
2 # Name: wx.lib.pdfwin
3 # Purpose: A class that allows the use of the Acrobat PSF reader
4 # ActiveX control
5 #
6 # Author: Robin Dunn
7 #
8 # Created: 22-March-2004
9 # RCS-ID: $Id$
10 # Copyright: (c) 2004 by Total Control Software
11 # Licence: wxWindows license
12 #----------------------------------------------------------------------
13 # This module was generated by the wx.activex.GernerateAXModule class
14 # (See also the genaxmodule script.)
15
16 import wx
17 import wx.activex
18
19 clsID = '{CA8A9780-280D-11CF-A24D-444553540000}'
20 progID = 'PDF.PdfCtrl.5'
21
22
23
24 # Derive a new class from ActiveXWindow
25 class PDFWindow(wx.activex.ActiveXWindow):
26 def __init__(self, parent, ID=-1, pos=wx.DefaultPosition,
27 size=wx.DefaultSize, style=0, name='PDFWindow'):
28 wx.activex.ActiveXWindow.__init__(self, parent,
29 wx.activex.CLSID('{CA8A9780-280D-11CF-A24D-444553540000}'),
30 ID, pos, size, style, name)
31
32 # Methods exported by the ActiveX object
33 def LoadFile(self, fileName):
34 return self.CallAXMethod('LoadFile', fileName)
35
36 def setShowToolbar(self, On):
37 return self.CallAXMethod('setShowToolbar', On)
38
39 def gotoFirstPage(self):
40 return self.CallAXMethod('gotoFirstPage')
41
42 def gotoLastPage(self):
43 return self.CallAXMethod('gotoLastPage')
44
45 def gotoNextPage(self):
46 return self.CallAXMethod('gotoNextPage')
47
48 def gotoPreviousPage(self):
49 return self.CallAXMethod('gotoPreviousPage')
50
51 def setCurrentPage(self, n):
52 return self.CallAXMethod('setCurrentPage', n)
53
54 def goForwardStack(self):
55 return self.CallAXMethod('goForwardStack')
56
57 def goBackwardStack(self):
58 return self.CallAXMethod('goBackwardStack')
59
60 def setPageMode(self, pageMode):
61 return self.CallAXMethod('setPageMode', pageMode)
62
63 def setLayoutMode(self, layoutMode):
64 return self.CallAXMethod('setLayoutMode', layoutMode)
65
66 def setNamedDest(self, namedDest):
67 return self.CallAXMethod('setNamedDest', namedDest)
68
69 def Print(self):
70 return self.CallAXMethod('Print')
71
72 def printWithDialog(self):
73 return self.CallAXMethod('printWithDialog')
74
75 def setZoom(self, percent):
76 return self.CallAXMethod('setZoom', percent)
77
78 def setZoomScroll(self, percent, left, top):
79 return self.CallAXMethod('setZoomScroll', percent, left, top)
80
81 def setView(self, viewMode):
82 return self.CallAXMethod('setView', viewMode)
83
84 def setViewScroll(self, viewMode, offset):
85 return self.CallAXMethod('setViewScroll', viewMode, offset)
86
87 def setViewRect(self, left, top, width, height):
88 return self.CallAXMethod('setViewRect', left, top, width, height)
89
90 def printPages(self, from_, to):
91 return self.CallAXMethod('printPages', from_, to)
92
93 def printPagesFit(self, from_, to, shrinkToFit):
94 return self.CallAXMethod('printPagesFit', from_, to, shrinkToFit)
95
96 def printAll(self):
97 return self.CallAXMethod('printAll')
98
99 def printAllFit(self, shrinkToFit):
100 return self.CallAXMethod('printAllFit', shrinkToFit)
101
102 def setShowScrollbars(self, On):
103 return self.CallAXMethod('setShowScrollbars', On)
104
105 def AboutBox(self):
106 return self.CallAXMethod('AboutBox')
107
108
109 # PROPERTIES
110 # --------------------
111 #
112 #
113 #
114 # METHODS
115 # --------------------
116 # LoadFile
117 # retType: bool
118 # params:
119 # fileName
120 # in:False out:False optional:False type:string
121 #
122 # setShowToolbar
123 # retType: VT_VOID
124 # params:
125 # On
126 # in:False out:False optional:False type:bool
127 #
128 # gotoFirstPage
129 # retType: VT_VOID
130 #
131 # gotoLastPage
132 # retType: VT_VOID
133 #
134 # gotoNextPage
135 # retType: VT_VOID
136 #
137 # gotoPreviousPage
138 # retType: VT_VOID
139 #
140 # setCurrentPage
141 # retType: VT_VOID
142 # params:
143 # n
144 # in:False out:False optional:False type:int
145 #
146 # goForwardStack
147 # retType: VT_VOID
148 #
149 # goBackwardStack
150 # retType: VT_VOID
151 #
152 # setPageMode
153 # retType: VT_VOID
154 # params:
155 # pageMode
156 # in:False out:False optional:False type:string
157 #
158 # setLayoutMode
159 # retType: VT_VOID
160 # params:
161 # layoutMode
162 # in:False out:False optional:False type:string
163 #
164 # setNamedDest
165 # retType: VT_VOID
166 # params:
167 # namedDest
168 # in:False out:False optional:False type:string
169 #
170 # Print
171 # retType: VT_VOID
172 #
173 # printWithDialog
174 # retType: VT_VOID
175 #
176 # setZoom
177 # retType: VT_VOID
178 # params:
179 # percent
180 # in:False out:False optional:False type:double
181 #
182 # setZoomScroll
183 # retType: VT_VOID
184 # params:
185 # percent
186 # in:False out:False optional:False type:double
187 # left
188 # in:False out:False optional:False type:double
189 # top
190 # in:False out:False optional:False type:double
191 #
192 # setView
193 # retType: VT_VOID
194 # params:
195 # viewMode
196 # in:False out:False optional:False type:string
197 #
198 # setViewScroll
199 # retType: VT_VOID
200 # params:
201 # viewMode
202 # in:False out:False optional:False type:string
203 # offset
204 # in:False out:False optional:False type:double
205 #
206 # setViewRect
207 # retType: VT_VOID
208 # params:
209 # left
210 # in:False out:False optional:False type:double
211 # top
212 # in:False out:False optional:False type:double
213 # width
214 # in:False out:False optional:False type:double
215 # height
216 # in:False out:False optional:False type:double
217 #
218 # printPages
219 # retType: VT_VOID
220 # params:
221 # from
222 # in:False out:False optional:False type:int
223 # to
224 # in:False out:False optional:False type:int
225 #
226 # printPagesFit
227 # retType: VT_VOID
228 # params:
229 # from
230 # in:False out:False optional:False type:int
231 # to
232 # in:False out:False optional:False type:int
233 # shrinkToFit
234 # in:False out:False optional:False type:bool
235 #
236 # printAll
237 # retType: VT_VOID
238 #
239 # printAllFit
240 # retType: VT_VOID
241 # params:
242 # shrinkToFit
243 # in:False out:False optional:False type:bool
244 #
245 # setShowScrollbars
246 # retType: VT_VOID
247 # params:
248 # On
249 # in:False out:False optional:False type:bool
250 #
251 # AboutBox
252 # retType: VT_VOID
253 #
254 #
255 #
256 #
257 # EVENTS
258 # --------------------
259 #
260 #
261 #