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 # buttons, page number, etc.
17 Box(x:14 y:1 xfill:1 top:2) {
19 IconButton(bitmap:dblLeftArrow_bits w:dblLeftArrow_width
20 h:dblLeftArrow_height press:&prevTenPageCbk)
23 IconButton(bitmap:leftArrow_bits w:leftArrow_width
24 h:leftArrow_height press:&prevPageCbk)
27 IconButton(bitmap:rightArrow_bits w:rightArrow_width
28 h:rightArrow_height press:&nextPageCbk)
31 IconButton(bitmap:dblRightArrow_bits w:dblRightArrow_width
32 h:dblRightArrow_height press:&nextTenPageCbk)
36 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
38 Box1(sunken left:4 right:4) {
39 TextIn(name:"pageNum" mw:6 done:&pageNumCbk
40 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
43 Label(name:"numPages" maxLength length:9
44 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
47 IconButton(bitmap:zoomIn_bits w:zoomIn_width
48 h:zoomIn_height press:&zoomInCbk)
51 IconButton(bitmap:zoomOut_bits w:zoomOut_width
52 h:zoomOut_height press:&zoomOutCbk)
55 IconButton(bitmap:find_bits w:find_width
56 h:find_height press:&findCbk)
59 IconButton(bitmap:postscript_bits w:postscript_width
60 h:postscript_height press:&postScriptCbk)
63 IconButton(bitmap:about_bits w:about_width h:about_height
67 Label(name:"link" fixedWidth
68 font:"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*")
70 Box1() { Button(label:"Quit" press:&quitCbk) }
73 # canvas and scrollbars
74 Box(x:2 y:2 xfill:1 yfill:1) {
75 Box1(xfill:1 yfill:1 sunken) {
76 ScrollingCanvas(name:"canvas" w:100 h:100)
79 Scrollbar(name:"vScrollbar" vert min:0 max:100 move:&scrollVertCbk)
82 Scrollbar(name:"hScrollbar" horiz min:0 max:100 move:&scrollHorizCbk)
89 #------------------------------------------------------------------------
90 # menu for main window
91 #------------------------------------------------------------------------
93 Menu(func:makeMenu title:"xpdf" n:7) {
94 MenuItem(text:"Open..." shortcut:"O" num:menuOpen
96 MenuItem(text:"Save as..." num:menuSavePDF
99 MenuItem(text:"Rotate left" num:menuRotateLeft
101 MenuItem(text:"Rotate right" num:menuRotateRight
104 MenuItem(text:"Quit" shortcut:"Q" num:menuQuit
108 #------------------------------------------------------------------------
109 # "PostScript output" dialog
110 #------------------------------------------------------------------------
112 Window(func:makePostScriptDialog dialog:gTrue defWidget:"ok"
113 title:"xpdf: PostScript output") {
116 Box1() { Label(text:"Pages:") }
118 TextIn(name:"firstPage" mw:6 tab:"lastPage"
119 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
121 Box1() { Label(text:"to") }
123 TextIn(name:"lastPage" mw:6 tab:"fileName"
124 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
128 Box1() { Label(text:"File:") }
129 Box1(sunken xfill:1) {
130 TextIn(name:"fileName" mw:32
131 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
135 Box1(left:8) { Button(name:"ok" label:"Ok" press:&psButtonCbk num:1) }
136 Box1(xfill:1) { Empty() }
137 Box1(right:8) { Button(label:"Cancel" press:&psButtonCbk num:0) }
142 #------------------------------------------------------------------------
144 #------------------------------------------------------------------------
146 Window(func:makeOpenDialog dialog:gTrue defWidget:"open"
147 title:"xpdf: Open...") {
148 Box(x:1 y:2 xfill:1 yfill:1) {
149 Box1(xfill:1 yfill:1) {
150 FileReq(name:"fileReq" select:openSelectCbk
151 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
153 Box(x:3 y:1 top:8 xfill:1) {
154 Box1(left:8) { Button(name:"open" label:"Open" press:&openButtonCbk
156 Box1(xfill:1) { Empty() }
157 Box1(right:8) { Button(label:"Cancel" press:&openButtonCbk num:0) }
162 #------------------------------------------------------------------------
164 #------------------------------------------------------------------------
166 Window(func:makeSaveDialog dialog:gTrue defWidget:"save"
167 title:"xpdf: Save as...") {
168 Box(x:1 y:2 xfill:1 yfill:1) {
169 Box1(xfill:1 yfill:1) {
170 FileReq(name:"fileReq" select:saveSelectCbk
171 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
173 Box(x:3 y:1 top:8 xfill:1) {
174 Box1(left:8) { Button(name:"save" label:"Save" press:&saveButtonCbk
176 Box1(xfill:1) { Empty() }
177 Box1(right:8) { Button(label:"Cancel" press:&saveButtonCbk num:0) }
182 #------------------------------------------------------------------------
184 #------------------------------------------------------------------------
186 Window(func:makeFindWindow defWidget:"find" title:"xpdf: Find") {
187 Box(x:1 y:3 xfill:1 yfill:1) {
188 Box(x:2 y:1 xfill:1) {
189 Box1() { Label(text:"Text:") }
190 Box1(xfill:1 sunken) {
191 TextIn(name:"text" mw:32
192 font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
195 Box1(xfill:1 yfill:1) { Empty() }
196 Box(x:3 y:1 top:8 xfill:1) {
197 Box1(left:8) { Button(name:"find" label:"Find" press:&findButtonCbk
199 Box1(xfill:1) { Empty() }
200 Box1(right:8) { Button(label:"Close" press:&findButtonCbk num:0) }
205 #------------------------------------------------------------------------
207 #------------------------------------------------------------------------
209 Window(func:makeAboutWindow defWidget:"close" title:"About xpdf") {
211 Box(x:1 y:11 left:2 right:2 top:2 bottom:2 sunken) {
214 font:"-*-times-bold-i-normal-*-24-*-*-*-*-*-*-*")
217 Label(text:["Version " xpdfVersion])
220 Label(text:xpdfCopyright)
223 Label(text:"derekn@foolabs.com")
226 Label(text:["Supports PDF version " pdfVersion "."])
229 Label(text:"The PDF data structures, operators, and specification")
232 Label(text:"are copyright 1995 Adobe Systems Inc.")
235 Label(text:"Mouse button 1: select text / follow link")
238 Label(text:"Mouse button 2: pan window")
241 Label(text:"Mouse button 3: menu")
244 Label(text:"http://www.foolabs.com/xpdf/")
248 Box1(xfill:1) { Empty() }
249 Box1() { Button(name:"close" label:"Close" press:&closeAboutCbk) }