1 #========================================================================
5 # Copyright 1997 Derek B. Noonburg
7 #========================================================================
9 #------------------------------------------------------------------------
11 #------------------------------------------------------------------------
13 Window(func:makeWindow title:"xpdf" icon:xpdfIcon) {
14 Box(x:2 y:1 xfill:1 yfill:1) {
16 # canvas, scrollbars, page number
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)
22 Scrollbar(name:"vScrollbar" vert min:0 max:100 move:&scrollVertCbk)
27 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
29 Box1(sunken left:4 right:4) {
30 TextIn(name:"pageNum" mw:6 done:&pageNumCbk
31 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
34 Label(name:"numPages" length:9
35 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
37 Box(x:1 y:2 xfill:1) {
39 Scrollbar(name:"hScrollbar" horiz min:0 max:100
42 Box1(xfill:1 yfill:1) { Empty() }
49 Box(x:1 y:12 yfill:1) {
51 IconButton(bitmap:leftArrow_bits w:leftArrow_width
52 h:leftArrow_height press:&prevPageCbk)
55 IconButton(bitmap:rightArrow_bits w:rightArrow_width
56 h:rightArrow_height press:&nextPageCbk)
59 IconButton(bitmap:dblLeftArrow_bits w:dblLeftArrow_width
60 h:dblLeftArrow_height press:&prevTenPageCbk)
63 IconButton(bitmap:dblRightArrow_bits w:dblRightArrow_width
64 h:dblRightArrow_height press:&nextTenPageCbk)
66 Box1(yfill:1) { Empty() }
68 IconButton(bitmap:zoomIn_bits w:zoomIn_width
69 h:zoomIn_height press:&zoomInCbk)
72 IconButton(bitmap:zoomOut_bits w:zoomOut_width
73 h:zoomOut_height press:&zoomOutCbk)
75 Box1(yfill:1) { Empty() }
77 IconButton(bitmap:postscript_bits w:postscript_width
78 h:postscript_height press:&postScriptCbk)
81 IconButton(bitmap:about_bits w:about_width h:about_height
84 Box1(yfill:1) { Empty() }
85 Box1() { Button(label:"Quit" press:&quitCbk) }
90 #------------------------------------------------------------------------
91 # menu for main window
92 #------------------------------------------------------------------------
94 Menu(func:makeMenu title:"xpdf" n:9) {
95 MenuItem(text:"Open..." shortcut:"O" num:menuOpen
97 MenuItem(text:"Save PDF..." num:menuSavePDF
100 MenuItem(text:"Find" shortcut:"F" num:menuFind
103 MenuItem(text:"Rotate left" num:menuRotateLeft
105 MenuItem(text:"Rotate right" num:menuRotateRight
108 MenuItem(text:"Quit" shortcut:"Q" num:menuQuit
112 #------------------------------------------------------------------------
113 # "PostScript output" dialog
114 #------------------------------------------------------------------------
116 Window(func:makePostScriptDialog dialog:gTrue defWidget:"ok"
117 title:"xpdf: PostScript output") {
120 Box1() { Label(text:"Pages:") }
122 TextIn(name:"firstPage" mw:6 tab:"lastPage"
123 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
125 Box1() { Label(text:"to") }
127 TextIn(name:"lastPage" mw:6 tab:"fileName"
128 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
132 Box1() { Label(text:"File:") }
133 Box1(sunken xfill:1) {
134 TextIn(name:"fileName" mw:32
135 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
139 Box1(left:8) { Button(name:"ok" label:"Ok" press:&psButtonCbk num:1) }
140 Box1(xfill:1) { Empty() }
141 Box1(right:8) { Button(label:"Cancel" press:&psButtonCbk num:0) }
146 #------------------------------------------------------------------------
148 #------------------------------------------------------------------------
150 Window(func:makeOpenDialog dialog:gTrue defWidget:"open"
151 title:"xpdf: Open...") {
152 Box(x:1 y:2 xfill:1 yfill:1) {
153 Box1(xfill:1 yfill:1) {
154 FileReq(name:"fileReq" select:openSelectCbk
155 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
157 Box(x:3 y:1 top:8 xfill:1) {
158 Box1(left:8) { Button(name:"open" label:"Open" press:&openButtonCbk
160 Box1(xfill:1) { Empty() }
161 Box1(right:8) { Button(label:"Cancel" press:&openButtonCbk num:0) }
166 #------------------------------------------------------------------------
168 #------------------------------------------------------------------------
170 Window(func:makeSaveDialog dialog:gTrue defWidget:"save"
171 title:"xpdf: Save as...") {
172 Box(x:1 y:2 xfill:1 yfill:1) {
173 Box1(xfill:1 yfill:1) {
174 FileReq(name:"fileReq" select:saveSelectCbk
175 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
177 Box(x:3 y:1 top:8 xfill:1) {
178 Box1(left:8) { Button(name:"save" label:"Save" press:&saveButtonCbk
180 Box1(xfill:1) { Empty() }
181 Box1(right:8) { Button(label:"Cancel" press:&saveButtonCbk num:0) }
186 #------------------------------------------------------------------------
188 #------------------------------------------------------------------------
190 Window(func:makeFindWindow defWidget:"find" title:"xpdf: Find") {
191 Box(x:1 y:3 xfill:1 yfill:1) {
192 Box(x:2 y:1 xfill:1) {
193 Box1() { Label(text:"Text:") }
194 Box1(xfill:1 sunken) {
195 TextIn(name:"text" mw:32
196 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
199 Box1(xfill:1 yfill:1) { Empty() }
200 Box(x:3 y:1 top:8 xfill:1) {
201 Box1(left:8) { Button(name:"find" label:"Find" press:&findButtonCbk
203 Box1(xfill:1) { Empty() }
204 Box1(right:8) { Button(label:"Close" press:&findButtonCbk num:0) }
209 #------------------------------------------------------------------------
211 #------------------------------------------------------------------------
213 Window(func:makeAboutWindow defWidget:"close" title:"About xpdf") {
215 Box(x:1 y:10 left:2 right:2 top:2 bottom:2 sunken) {
218 font:"-*-times-bold-i-*-*-24-*-*-*-*-*-*-*")
221 Label(text:["Version " xpdfVersion])
224 Label(text:xpdfCopyright)
227 Label(text:"derekn@foolabs.com")
230 Label(text:["Supports PDF version " pdfVersion "."])
233 Label(text:"The PDF data structures, operators, and specification")
236 Label(text:"are copyright 1995 Adobe Systems Inc.")
239 Label(text:"Mouse button 1: select text / follow link")
242 Label(text:"Mouse button 3: menu")
245 Label(text:"http://www.foolabs.com/xpdf/")
249 Box1(xfill:1) { Empty() }
250 Box1() { Button(name:"close" label:"Close" press:&closeAboutCbk) }