1 #========================================================================
5 # Copyright 1996 Derek B. Noonburg
7 #========================================================================
9 #------------------------------------------------------------------------
11 #------------------------------------------------------------------------
13 Window(func:makeWindow title:"xpdf" icon:xpdfIcon) {
14 Box(x:1 y:2 xfill:1 yfill:1) {
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)
22 Scrollbar(name:"vScrollbar" vert min:0 max:100 move:&scrollVertCbk)
25 Scrollbar(name:"hScrollbar" horiz min:0 max:100 move:&scrollHorizCbk)
30 # buttons, page number, etc.
31 Box(x:15 y:1 xfill:1) {
33 IconButton(bitmap:backArrow_bits w:backArrow_width
34 h:backArrow_height press:&backCbk)
37 IconButton(bitmap:dblLeftArrow_bits w:dblLeftArrow_width
38 h:dblLeftArrow_height press:&prevTenPageCbk)
41 IconButton(bitmap:leftArrow_bits w:leftArrow_width
42 h:leftArrow_height press:&prevPageCbk)
45 IconButton(bitmap:rightArrow_bits w:rightArrow_width
46 h:rightArrow_height press:&nextPageCbk)
49 IconButton(bitmap:dblRightArrow_bits w:dblRightArrow_width
50 h:dblRightArrow_height press:&nextTenPageCbk)
53 IconButton(bitmap:forwardArrow_bits w:forwardArrow_width
54 h:forwardArrow_height press:&forwardCbk)
58 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
60 Box1(sunken left:4 right:4) {
61 TextIn(name:"pageNum" mw:6 done:&pageNumCbk
62 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
65 Label(name:"numPages" maxLength length:9
66 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
69 MenuButton(name:"zoom" menu:zoomMenu)
72 IconButton(bitmap:find_bits w:find_width
73 h:find_height press:&findCbk)
76 IconButton(bitmap:postscript_bits w:postscript_width
77 h:postscript_height press:&postScriptCbk)
80 IconButton(bitmap:about_bits w:about_width h:about_height
84 Label(name:"link" fixedWidth
85 font:"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*")
87 Box1() { Button(label:"Quit" press:&quitCbk) }
92 #------------------------------------------------------------------------
93 # menu for main window
94 #------------------------------------------------------------------------
96 Menu(func:makeMenu title:"xpdf" n:7) {
97 MenuItem(text:"Open..." shortcut:"O" num:menuOpen
99 MenuItem(text:"Save as..." num:menuSavePDF
102 MenuItem(text:"Rotate left" num:menuRotateLeft
104 MenuItem(text:"Rotate right" num:menuRotateRight
107 MenuItem(text:"Quit" shortcut:"Q" num:menuQuit
111 #------------------------------------------------------------------------
113 #------------------------------------------------------------------------
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)
128 MenuItem(text:"fit page" num:100 select:&zoomMenuCbk)
129 MenuItem(text:"fit width" num:101 select:&zoomMenuCbk)
132 #------------------------------------------------------------------------
133 # "PostScript output" dialog
134 #------------------------------------------------------------------------
136 Window(func:makePostScriptDialog dialog:gTrue defWidget:"ok"
137 title:"xpdf: PostScript output") {
140 Box1() { Label(text:"Pages:") }
142 TextIn(name:"firstPage" mw:6 tab:"lastPage"
143 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
145 Box1() { Label(text:"to") }
147 TextIn(name:"lastPage" mw:6 tab:"fileName"
148 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
152 Box1() { Label(text:"File:") }
153 Box1(sunken xfill:1) {
154 TextIn(name:"fileName" mw:32
155 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
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) }
166 #------------------------------------------------------------------------
168 #------------------------------------------------------------------------
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-*-*-*-*-*-*-*")
177 Box(x:3 y:1 top:8 xfill:1) {
178 Box1(left:8) { Button(name:"open" label:"Open" press:&openButtonCbk
180 Box1(xfill:1) { Empty() }
181 Box1(right:8) { Button(label:"Cancel" press:&openButtonCbk num:0) }
186 #------------------------------------------------------------------------
188 #------------------------------------------------------------------------
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-*-*-*-*-*-*-*")
197 Box(x:3 y:1 top:8 xfill:1) {
198 Box1(left:8) { Button(name:"save" label:"Save" press:&saveButtonCbk
200 Box1(xfill:1) { Empty() }
201 Box1(right:8) { Button(label:"Cancel" press:&saveButtonCbk num:0) }
206 #------------------------------------------------------------------------
208 #------------------------------------------------------------------------
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-*-*-*-*-*-*-*")
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
223 Box1(xfill:1) { Empty() }
224 Box1(right:8) { Button(label:"Close" press:&findButtonCbk num:0) }
229 #------------------------------------------------------------------------
231 #------------------------------------------------------------------------
233 Window(func:makeAboutWindow defWidget:"close" title:"About xpdf") {
235 Box(x:1 y:11 left:2 right:2 top:2 bottom:2 sunken) {
238 font:"-*-times-bold-i-normal-*-24-*-*-*-*-*-*-*")
241 Label(text:["Version " xpdfVersion])
244 Label(text:xpdfCopyright)
247 Label(text:"derekn@foolabs.com")
250 Label(text:["Supports PDF version " pdfVersion "."])
253 Label(text:"The PDF data structures, operators, and specification")
256 Label(text:"are copyright 1995 Adobe Systems Inc.")
259 Label(text:"Mouse button 1: select text / follow link")
262 Label(text:"Mouse button 2: pan window")
265 Label(text:"Mouse button 3: menu")
268 Label(text:"http://www.foolabs.com/xpdf/")
272 Box1(xfill:1) { Empty() }
273 Box1() { Button(name:"close" label:"Close" press:&closeAboutCbk) }