]> www.fi.muni.cz Git - evince.git/blob - pdf/xpdf/xpdf.ltk
Fixup pdfto* programs,
[evince.git] / pdf / xpdf / xpdf.ltk
1 #========================================================================
2 #
3 # xpdf.ltk
4 #
5 # Copyright 1996 Derek B. Noonburg
6 #
7 #========================================================================
8
9 #------------------------------------------------------------------------
10 # main window
11 #------------------------------------------------------------------------
12
13 Window(func:makeWindow title:"xpdf" icon:xpdfIcon) {
14   Box(x:1 y:2 xfill:1 yfill:1) {
15
16     # canvas and scrollbars
17     Box(x:2 y:2 xfill:1 yfill:1) {
18       Box1(xfill:1 yfill:1 sunken) {
19         ScrollingCanvas(name:"canvas" w:100 h:100)
20       }
21       Box1(yfill:1) {
22         Scrollbar(name:"vScrollbar" vert min:0 max:100 move:&scrollVertCbk)
23       }
24       Box1(xfill:1) {
25         Scrollbar(name:"hScrollbar" horiz min:0 max:100 move:&scrollHorizCbk)
26       }
27       Box1() { Empty() }
28     }
29
30     # buttons, page number, etc.
31     Box(x:15 y:1 xfill:1) {
32       Box1() {
33         IconButton(bitmap:backArrow_bits w:backArrow_width
34                    h:backArrow_height press:&backCbk)
35       }
36       Box1() {
37         IconButton(bitmap:dblLeftArrow_bits w:dblLeftArrow_width
38                    h:dblLeftArrow_height press:&prevTenPageCbk)
39       }
40       Box1() {
41         IconButton(bitmap:leftArrow_bits w:leftArrow_width
42                    h:leftArrow_height press:&prevPageCbk)
43       }
44       Box1() {
45         IconButton(bitmap:rightArrow_bits w:rightArrow_width
46                    h:rightArrow_height press:&nextPageCbk)
47       }
48       Box1() {
49         IconButton(bitmap:dblRightArrow_bits w:dblRightArrow_width
50                    h:dblRightArrow_height press:&nextTenPageCbk)
51       }
52       Box1() {
53         IconButton(bitmap:forwardArrow_bits w:forwardArrow_width
54                    h:forwardArrow_height press:&forwardCbk)
55       }
56       Box1() {
57         Label(text:"Page"
58               font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
59       }
60       Box1(sunken left:4 right:4) {
61         TextIn(name:"pageNum" mw:6 done:&pageNumCbk
62                font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
63       }
64       Box1() {
65         Label(name:"numPages" maxLength length:9
66               font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
67       }
68       Box1() {
69         MenuButton(name:"zoom" menu:zoomMenu)
70       }
71       Box1() {
72         IconButton(bitmap:find_bits w:find_width
73                    h:find_height press:&findCbk)
74       }
75       Box1() {
76         IconButton(bitmap:postscript_bits w:postscript_width
77                    h:postscript_height press:&postScriptCbk)
78       }
79       Box1() {
80         IconButton(bitmap:about_bits w:about_width h:about_height
81                    press:&aboutCbk)
82       }
83       Box1(xfill:1) {
84         Label(name:"link" fixedWidth
85               font:"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*")
86       }
87       Box1() { Button(label:"Quit" press:&quitCbk) }
88     }
89   }
90 }
91
92 #------------------------------------------------------------------------
93 # menu for main window
94 #------------------------------------------------------------------------
95
96 Menu(func:makeMenu title:"xpdf" n:7) {
97   MenuItem(text:"Open..."      shortcut:"O"     num:menuOpen
98            select:&menuCbk)
99   MenuItem(text:"Save as..."                    num:menuSavePDF
100            select:&menuCbk)
101   MenuItem(text:NULL)
102   MenuItem(text:"Rotate left"                   num:menuRotateLeft
103            select:&menuCbk)
104   MenuItem(text:"Rotate right"                  num:menuRotateRight
105            select:&menuCbk)
106   MenuItem(text:NULL)
107   MenuItem(text:"Quit"         shortcut:"Q"     num:menuQuit
108            select:&menuCbk)
109 }
110
111 #------------------------------------------------------------------------
112 # popup zoom menu
113 #------------------------------------------------------------------------
114
115 Menu(func:makeZoomMenu title:"zoom" n:14) {
116   MenuItem(text:"-5" num:-5 select:&zoomMenuCbk)
117   MenuItem(text:"-4" num:-4 select:&zoomMenuCbk)
118   MenuItem(text:"-3" num:-3 select:&zoomMenuCbk)
119   MenuItem(text:"-2" num:-2 select:&zoomMenuCbk)
120   MenuItem(text:"-1" num:-1 select:&zoomMenuCbk)
121   MenuItem(text:"0"  num: 0 select:&zoomMenuCbk)
122   MenuItem(text:"+1" num: 1 select:&zoomMenuCbk)
123   MenuItem(text:"+2" num: 2 select:&zoomMenuCbk)
124   MenuItem(text:"+3" num: 3 select:&zoomMenuCbk)
125   MenuItem(text:"+4" num: 4 select:&zoomMenuCbk)
126   MenuItem(text:"+5" num: 5 select:&zoomMenuCbk)
127   MenuItem(text:NULL)
128   MenuItem(text:"fit page"  num:100 select:&zoomMenuCbk)
129   MenuItem(text:"fit width" num:101 select:&zoomMenuCbk)
130 }
131
132 #------------------------------------------------------------------------
133 # "PostScript output" dialog
134 #------------------------------------------------------------------------
135
136 Window(func:makePostScriptDialog dialog:gTrue defWidget:"ok"
137        title:"xpdf: PostScript output") {
138   Box(x:1 y:3) {
139     Box(x:4 y:1) {
140       Box1() { Label(text:"Pages:") }
141       Box1(sunken) {
142         TextIn(name:"firstPage" mw:6 tab:"lastPage"
143                font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
144       }
145       Box1() { Label(text:"to") }
146       Box1(sunken) {
147         TextIn(name:"lastPage" mw:6 tab:"fileName"
148                font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
149       }
150     }
151     Box(x:2 y:1) {
152       Box1() { Label(text:"File:") }
153       Box1(sunken xfill:1) {
154         TextIn(name:"fileName" mw:32
155                font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
156       }
157     }
158     Box(x:3 y:1 top:8) {
159       Box1(left:8) { Button(name:"ok" label:"Ok" press:&psButtonCbk num:1) }
160       Box1(xfill:1) { Empty() }
161       Box1(right:8) { Button(label:"Cancel" press:&psButtonCbk num:0) }
162     }
163   }
164 }
165
166 #------------------------------------------------------------------------
167 # "open" dialog
168 #------------------------------------------------------------------------
169
170 Window(func:makeOpenDialog dialog:gTrue defWidget:"open"
171        title:"xpdf: Open...") {
172   Box(x:1 y:2 xfill:1 yfill:1) {
173     Box1(xfill:1 yfill:1) {
174       FileReq(name:"fileReq" select:openSelectCbk
175               font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
176     }
177     Box(x:3 y:1 top:8 xfill:1) {
178       Box1(left:8) { Button(name:"open" label:"Open" press:&openButtonCbk
179                             num:1) }
180       Box1(xfill:1) { Empty() }
181       Box1(right:8) { Button(label:"Cancel" press:&openButtonCbk num:0) }
182     }
183   }
184 }
185
186 #------------------------------------------------------------------------
187 # "save" dialog
188 #------------------------------------------------------------------------
189
190 Window(func:makeSaveDialog dialog:gTrue defWidget:"save"
191        title:"xpdf: Save as...") {
192   Box(x:1 y:2 xfill:1 yfill:1) {
193     Box1(xfill:1 yfill:1) {
194       FileReq(name:"fileReq" select:saveSelectCbk
195               font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
196     }
197     Box(x:3 y:1 top:8 xfill:1) {
198       Box1(left:8) { Button(name:"save" label:"Save" press:&saveButtonCbk
199                             num:1) }
200       Box1(xfill:1) { Empty() }
201       Box1(right:8) { Button(label:"Cancel" press:&saveButtonCbk num:0) }
202     }
203   }
204 }
205
206 #------------------------------------------------------------------------
207 # "find" window
208 #------------------------------------------------------------------------
209
210 Window(func:makeFindWindow defWidget:"find" title:"xpdf: Find") {
211   Box(x:1 y:3 xfill:1 yfill:1) {
212     Box(x:2 y:1 xfill:1) {
213       Box1() { Label(text:"Text:") }
214       Box1(xfill:1 sunken) {
215         TextIn(name:"text" mw:32
216                font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
217       }
218     }
219     Box1(xfill:1 yfill:1) { Empty() }
220     Box(x:3 y:1 top:8 xfill:1) {
221       Box1(left:8) { Button(name:"find" label:"Find" press:&findButtonCbk
222                             num:1) }
223       Box1(xfill:1) { Empty() }
224       Box1(right:8) { Button(label:"Close" press:&findButtonCbk num:0) }
225     }
226   }
227 }
228
229 #------------------------------------------------------------------------
230 # "about" window
231 #------------------------------------------------------------------------
232
233 Window(func:makeAboutWindow defWidget:"close" title:"About xpdf") {
234   Box(x:1 y:2) {
235     Box(x:1 y:11 left:2 right:2 top:2 bottom:2 sunken) {
236       Box1(bottom:0) {
237         Label(text:"xpdf"
238               font:"-*-times-bold-i-normal-*-24-*-*-*-*-*-*-*")
239       }
240       Box1(bottom:12) {
241         Label(text:["Version " xpdfVersion])
242       }
243       Box1(bottom:0) {
244         Label(text:xpdfCopyright)
245       }
246       Box1(bottom:12) {
247         Label(text:"derekn@foolabs.com")
248       }
249       Box1(bottom:2) {
250         Label(text:["Supports PDF version " pdfVersion "."])
251       }
252       Box1(bottom:0) {
253         Label(text:"The PDF data structures, operators, and specification")
254       }
255       Box1(bottom:12) {
256         Label(text:"are copyright 1995 Adobe Systems Inc.")
257       }
258       Box1(bottom:0) {
259         Label(text:"Mouse button 1: select text / follow link")
260       }
261       Box1(bottom:0) {
262         Label(text:"Mouse button 2: pan window")
263       }
264       Box1(bottom:12) {
265         Label(text:"Mouse button 3: menu")
266       }
267       Box1(bottom:12) {
268         Label(text:"http://www.foolabs.com/xpdf/")
269       }
270     }
271     Box(x:2 y:1) {
272       Box1(xfill:1) { Empty() }
273       Box1() { Button(name:"close" label:"Close" press:&closeAboutCbk) }
274     }
275   }
276 }