1 #========================================================================
5 # Copyright 1996-2002 Glyph & Cog, LLC
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 # full-screen main window
94 #------------------------------------------------------------------------
96 Window(func:makeFullScreenWindow title:"xpdf" icon:xpdfIcon) {
97 Box(x:1 y:1 xfill:1 yfill:1) {
98 ScrollingCanvas(name:"canvas" w:100 h:100)
102 #------------------------------------------------------------------------
103 # menu for main window
104 #------------------------------------------------------------------------
106 Menu(func:makeMenu title:"xpdf" n:8) {
107 MenuItem(text:"Open..." shortcut:"O" num:menuOpen
109 MenuItem(text:"Reload" shortcut:"R" num:menuReload
111 MenuItem(text:"Save as..." num:menuSavePDF
114 MenuItem(text:"Rotate counterclockwise" num:menuRotateCCW
116 MenuItem(text:"Rotate clockwise" num:menuRotateCW
119 MenuItem(text:"Quit" shortcut:"Q" num:menuQuit
123 #------------------------------------------------------------------------
125 #------------------------------------------------------------------------
127 Menu(func:makeZoomMenu title:"zoom" n:14) {
128 MenuItem(text:"-5" num:-5 select:&zoomMenuCbk)
129 MenuItem(text:"-4" num:-4 select:&zoomMenuCbk)
130 MenuItem(text:"-3" num:-3 select:&zoomMenuCbk)
131 MenuItem(text:"-2" num:-2 select:&zoomMenuCbk)
132 MenuItem(text:"-1" num:-1 select:&zoomMenuCbk)
133 MenuItem(text:"0" num: 0 select:&zoomMenuCbk)
134 MenuItem(text:"+1" num: 1 select:&zoomMenuCbk)
135 MenuItem(text:"+2" num: 2 select:&zoomMenuCbk)
136 MenuItem(text:"+3" num: 3 select:&zoomMenuCbk)
137 MenuItem(text:"+4" num: 4 select:&zoomMenuCbk)
138 MenuItem(text:"+5" num: 5 select:&zoomMenuCbk)
140 MenuItem(text:"fit page" shortcut:"z" num:100 select:&zoomMenuCbk)
141 MenuItem(text:"fit width" shortcut:"w" num:101 select:&zoomMenuCbk)
144 #------------------------------------------------------------------------
145 # "PostScript output" dialog
146 #------------------------------------------------------------------------
148 Window(func:makePostScriptDialog dialog:gTrue defWidget:"ok"
149 title:"xpdf: PostScript output") {
152 Box1() { Label(text:"Pages:") }
154 TextIn(name:"firstPage" mw:6 tab:"lastPage"
155 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
157 Box1() { Label(text:"to") }
159 TextIn(name:"lastPage" mw:6 tab:"fileName"
160 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
164 Box1() { Label(text:"File:") }
165 Box1(sunken xfill:1) {
166 TextIn(name:"fileName" mw:32
167 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
171 Box1(left:8) { Button(name:"ok" label:"Ok" press:&psButtonCbk num:1) }
172 Box1(xfill:1) { Empty() }
173 Box1(right:8) { Button(label:"Cancel" press:&psButtonCbk num:0) }
178 #------------------------------------------------------------------------
180 #------------------------------------------------------------------------
182 Window(func:makeOpenDialog dialog:gTrue defWidget:"open"
183 title:"xpdf: Open...") {
184 Box(x:1 y:2 xfill:1 yfill:1) {
185 Box1(xfill:1 yfill:1) {
186 FileReq(name:"fileReq" select:openSelectCbk
187 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
189 Box(x:3 y:1 top:8 xfill:1) {
190 Box1(left:8) { Button(name:"open" label:"Open" press:&openButtonCbk
192 Box1(xfill:1) { Empty() }
193 Box1(right:8) { Button(label:"Cancel" press:&openButtonCbk num:0) }
198 #------------------------------------------------------------------------
200 #------------------------------------------------------------------------
202 Window(func:makeSaveDialog dialog:gTrue defWidget:"save"
203 title:"xpdf: Save as...") {
204 Box(x:1 y:2 xfill:1 yfill:1) {
205 Box1(xfill:1 yfill:1) {
206 FileReq(name:"fileReq" select:saveSelectCbk
207 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
209 Box(x:3 y:1 top:8 xfill:1) {
210 Box1(left:8) { Button(name:"save" label:"Save" press:&saveButtonCbk
212 Box1(xfill:1) { Empty() }
213 Box1(right:8) { Button(label:"Cancel" press:&saveButtonCbk num:0) }
218 #------------------------------------------------------------------------
220 #------------------------------------------------------------------------
222 Window(func:makeFindWindow defWidget:"find" title:"xpdf: Find") {
223 Box(x:1 y:3 xfill:1 yfill:1) {
224 Box(x:2 y:1 xfill:1) {
225 Box1() { Label(text:"Text:") }
226 Box1(xfill:1 sunken) {
227 TextIn(name:"text" mw:32
228 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
231 Box1(xfill:1 yfill:1) { Empty() }
232 Box(x:3 y:1 top:8 xfill:1) {
233 Box1(left:8) { Button(name:"find" label:"Find" press:&findButtonCbk
235 Box1(xfill:1) { Empty() }
236 Box1(right:8) { Button(label:"Close" press:&findButtonCbk num:0) }
241 #------------------------------------------------------------------------
243 #------------------------------------------------------------------------
245 Window(func:makeAboutWindow defWidget:"close" title:"About xpdf") {
246 Box(x:1 y:2 xfill:1 yfill:1) {
247 Box(x:2 y:2 xfill:1 yfill:1) {
248 Box1(xfill:1 yfill:1 sunken) {
249 List(name:"list" w:400 h:30
250 font:"-*-courier-medium-r-normal-*-12-*-*-*-*-*-*-*")
253 Scrollbar(name:"vScrollbar" vert min:0 max:100
254 move:&aboutScrollVertCbk)
257 Scrollbar(name:"hScrollbar" horiz min:0 max:100
258 move:&aboutScrollHorizCbk)
263 Box1(xfill:1) { Empty() }
264 Box1() { Button(name:"close" label:"Close" press:&closeAboutCbk) }