]> www.fi.muni.cz Git - evince.git/blob - pdf/xpdf/xpdf.ltk
Initial work I did on GNOME/PDF viewer -miguel
[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:14 y:1 xfill:1) {
32       Box1() {
33         IconButton(bitmap:dblLeftArrow_bits w:dblLeftArrow_width
34                    h:dblLeftArrow_height press:&prevTenPageCbk)
35       }
36       Box1() {
37         IconButton(bitmap:leftArrow_bits w:leftArrow_width
38                    h:leftArrow_height press:&prevPageCbk)
39       }
40       Box1() {
41         IconButton(bitmap:rightArrow_bits w:rightArrow_width
42                    h:rightArrow_height press:&nextPageCbk)
43       }
44       Box1() {
45         IconButton(bitmap:dblRightArrow_bits w:dblRightArrow_width
46                    h:dblRightArrow_height press:&nextTenPageCbk)
47       }
48       Box1() {
49         Label(text:"Page"
50               font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
51       }
52       Box1(sunken left:4 right:4) {
53         TextIn(name:"pageNum" mw:6 done:&pageNumCbk
54                font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
55       }
56       Box1() {
57         Label(name:"numPages" maxLength length:9
58               font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
59       }
60       Box1() {
61         IconButton(bitmap:zoomIn_bits w:zoomIn_width
62                    h:zoomIn_height press:&zoomInCbk)
63       }
64       Box1() {
65         IconButton(bitmap:zoomOut_bits w:zoomOut_width
66                    h:zoomOut_height press:&zoomOutCbk)
67       }
68       Box1() {
69         IconButton(bitmap:find_bits w:find_width
70                    h:find_height press:&findCbk)
71       }
72       Box1() {
73         IconButton(bitmap:postscript_bits w:postscript_width
74                    h:postscript_height press:&postScriptCbk)
75       }
76       Box1() {
77         IconButton(bitmap:about_bits w:about_width h:about_height
78                    press:&aboutCbk)
79       }
80       Box1(xfill:1) {
81         Label(name:"link" fixedWidth
82               font:"-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*")
83       }
84       Box1() { Button(label:"Quit" press:&quitCbk) }
85     }
86   }
87 }
88
89 #------------------------------------------------------------------------
90 # menu for main window
91 #------------------------------------------------------------------------
92
93 Menu(func:makeMenu title:"xpdf" n:7) {
94   MenuItem(text:"Open..."      shortcut:"O"     num:menuOpen
95            select:&menuCbk)
96   MenuItem(text:"Save as..."                    num:menuSavePDF
97            select:&menuCbk)
98   MenuItem(text:NULL)
99   MenuItem(text:"Rotate left"                   num:menuRotateLeft
100            select:&menuCbk)
101   MenuItem(text:"Rotate right"                  num:menuRotateRight
102            select:&menuCbk)
103   MenuItem(text:NULL)
104   MenuItem(text:"Quit"         shortcut:"Q"     num:menuQuit
105            select:&menuCbk)
106 }
107
108 #------------------------------------------------------------------------
109 # "PostScript output" dialog
110 #------------------------------------------------------------------------
111
112 Window(func:makePostScriptDialog dialog:gTrue defWidget:"ok"
113        title:"xpdf: PostScript output") {
114   Box(x:1 y:3) {
115     Box(x:4 y:1) {
116       Box1() { Label(text:"Pages:") }
117       Box1(sunken) {
118         TextIn(name:"firstPage" mw:6 tab:"lastPage"
119                font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
120       }
121       Box1() { Label(text:"to") }
122       Box1(sunken) {
123         TextIn(name:"lastPage" mw:6 tab:"fileName"
124                font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
125       }
126     }
127     Box(x:2 y:1) {
128       Box1() { Label(text:"File:") }
129       Box1(sunken xfill:1) {
130         TextIn(name:"fileName" mw:32
131                font:"-*-courier-medium-r-normal-*-14-*-*-*-*-*-*-*")
132       }
133     }
134     Box(x:3 y:1 top:8) {
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) }
138     }
139   }
140 }
141
142 #------------------------------------------------------------------------
143 # "open" dialog
144 #------------------------------------------------------------------------
145
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-*-*-*-*-*-*-*")
152     }
153     Box(x:3 y:1 top:8 xfill:1) {
154       Box1(left:8) { Button(name:"open" label:"Open" press:&openButtonCbk
155                             num:1) }
156       Box1(xfill:1) { Empty() }
157       Box1(right:8) { Button(label:"Cancel" press:&openButtonCbk num:0) }
158     }
159   }
160 }
161
162 #------------------------------------------------------------------------
163 # "save" dialog
164 #------------------------------------------------------------------------
165
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-*-*-*-*-*-*-*")
172     }
173     Box(x:3 y:1 top:8 xfill:1) {
174       Box1(left:8) { Button(name:"save" label:"Save" press:&saveButtonCbk
175                             num:1) }
176       Box1(xfill:1) { Empty() }
177       Box1(right:8) { Button(label:"Cancel" press:&saveButtonCbk num:0) }
178     }
179   }
180 }
181
182 #------------------------------------------------------------------------
183 # "find" window
184 #------------------------------------------------------------------------
185
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-*-*-*-*-*-*-*")
193       }
194     }
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
198                             num:1) }
199       Box1(xfill:1) { Empty() }
200       Box1(right:8) { Button(label:"Close" press:&findButtonCbk num:0) }
201     }
202   }
203 }
204
205 #------------------------------------------------------------------------
206 # "about" window
207 #------------------------------------------------------------------------
208
209 Window(func:makeAboutWindow defWidget:"close" title:"About xpdf") {
210   Box(x:1 y:2) {
211     Box(x:1 y:11 left:2 right:2 top:2 bottom:2 sunken) {
212       Box1(bottom:0) {
213         Label(text:"xpdf"
214               font:"-*-times-bold-i-normal-*-24-*-*-*-*-*-*-*")
215       }
216       Box1(bottom:12) {
217         Label(text:["Version " xpdfVersion])
218       }
219       Box1(bottom:0) {
220         Label(text:xpdfCopyright)
221       }
222       Box1(bottom:12) {
223         Label(text:"derekn@foolabs.com")
224       }
225       Box1(bottom:2) {
226         Label(text:["Supports PDF version " pdfVersion "."])
227       }
228       Box1(bottom:0) {
229         Label(text:"The PDF data structures, operators, and specification")
230       }
231       Box1(bottom:12) {
232         Label(text:"are copyright 1995 Adobe Systems Inc.")
233       }
234       Box1(bottom:0) {
235         Label(text:"Mouse button 1: select text / follow link")
236       }
237       Box1(bottom:0) {
238         Label(text:"Mouse button 2: pan window")
239       }
240       Box1(bottom:12) {
241         Label(text:"Mouse button 3: menu")
242       }
243       Box1(bottom:12) {
244         Label(text:"http://www.foolabs.com/xpdf/")
245       }
246     }
247     Box(x:2 y:1) {
248       Box1(xfill:1) { Empty() }
249       Box1() { Button(name:"close" label:"Close" press:&closeAboutCbk) }
250     }
251   }
252 }