home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 110 / EnigmaAmiga110CD.iso / indispensabili / utility / apdf / xpdf-0.80 / xpdf / xpdf-flip.ltk < prev    next >
Text File  |  1998-11-27  |  8KB  |  254 lines

  1. #========================================================================
  2. #
  3. # xpdf-flip.ltk
  4. #
  5. # Copyright 1997 Derek B. Noonburg
  6. #
  7. #========================================================================
  8.  
  9. #------------------------------------------------------------------------
  10. # main window
  11. #------------------------------------------------------------------------
  12.  
  13. Window(func:makeWindow title:"xpdf" icon:xpdfIcon) {
  14.   Box(x:2 y:1 xfill:1 yfill:1) {
  15.  
  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)
  20.       }
  21.       Box1(yfill:1) {
  22.         Scrollbar(name:"vScrollbar" vert min:0 max:100 move:&scrollVertCbk)
  23.       }
  24.       Box(x:4 y:1) {
  25.         Box1() {
  26.           Label(text:"Page"
  27.                 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
  28.         }
  29.         Box1(sunken left:4 right:4) {
  30.           TextIn(name:"pageNum" mw:6 done:&pageNumCbk
  31.                  font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
  32.         }
  33.         Box1() {
  34.           Label(name:"numPages" length:9
  35.                 font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
  36.         }
  37.         Box(x:1 y:2 xfill:1) {
  38.           Box1(xfill:1) {
  39.             Scrollbar(name:"hScrollbar" horiz min:0 max:100
  40.                       move:&scrollHorizCbk)
  41.           }
  42.           Box1(xfill:1 yfill:1) { Empty() }
  43.         }
  44.       }
  45.       Box1() { Empty() }
  46.     }
  47.  
  48.     # buttons
  49.     Box(x:1 y:12 yfill:1) {
  50.       Box1() {
  51.         IconButton(bitmap:leftArrow_bits w:leftArrow_width
  52.                    h:leftArrow_height press:&prevPageCbk)
  53.       }
  54.       Box1() {
  55.         IconButton(bitmap:rightArrow_bits w:rightArrow_width
  56.                    h:rightArrow_height press:&nextPageCbk)
  57.       }
  58.       Box1() {
  59.         IconButton(bitmap:dblLeftArrow_bits w:dblLeftArrow_width
  60.                    h:dblLeftArrow_height press:&prevTenPageCbk)
  61.       }
  62.       Box1() {
  63.         IconButton(bitmap:dblRightArrow_bits w:dblRightArrow_width
  64.                    h:dblRightArrow_height press:&nextTenPageCbk)
  65.       }
  66.       Box1(yfill:1) { Empty() }
  67.       Box1() {
  68.         IconButton(bitmap:zoomIn_bits w:zoomIn_width
  69.                    h:zoomIn_height press:&zoomInCbk)
  70.       }
  71.       Box1() {
  72.         IconButton(bitmap:zoomOut_bits w:zoomOut_width
  73.                    h:zoomOut_height press:&zoomOutCbk)
  74.       }
  75.       Box1(yfill:1) { Empty() }
  76.       Box1() {
  77.         IconButton(bitmap:postscript_bits w:postscript_width
  78.                    h:postscript_height press:&postScriptCbk)
  79.       }
  80.       Box1() {
  81.         IconButton(bitmap:about_bits w:about_width h:about_height
  82.                    press:&aboutCbk)
  83.       }
  84.       Box1(yfill:1) { Empty() }
  85.       Box1() { Button(label:"Quit" press:&quitCbk) }
  86.     }
  87.   }
  88. }
  89.  
  90. #------------------------------------------------------------------------
  91. # menu for main window
  92. #------------------------------------------------------------------------
  93.  
  94. Menu(func:makeMenu title:"xpdf" n:9) {
  95.   MenuItem(text:"Open..."      shortcut:"O"     num:menuOpen
  96.            select:&menuCbk)
  97.   MenuItem(text:"Save PDF..."                   num:menuSavePDF
  98.            select:&menuCbk)
  99.   MenuItem(text:NULL)
  100.   MenuItem(text:"Find"         shortcut:"F"     num:menuFind
  101.            select:&menuCbk)
  102.   MenuItem(text:NULL)
  103.   MenuItem(text:"Rotate left"                   num:menuRotateLeft
  104.            select:&menuCbk)
  105.   MenuItem(text:"Rotate right"                  num:menuRotateRight
  106.            select:&menuCbk)
  107.   MenuItem(text:NULL)
  108.   MenuItem(text:"Quit"         shortcut:"Q"     num:menuQuit
  109.            select:&menuCbk)
  110. }
  111.  
  112. #------------------------------------------------------------------------
  113. # "PostScript output" dialog
  114. #------------------------------------------------------------------------
  115.  
  116. Window(func:makePostScriptDialog dialog:gTrue defWidget:"ok"
  117.        title:"xpdf: PostScript output") {
  118.   Box(x:1 y:3) {
  119.     Box(x:4 y:1) {
  120.       Box1() { Label(text:"Pages:") }
  121.       Box1(sunken) {
  122.         TextIn(name:"firstPage" mw:6 tab:"lastPage"
  123.                font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
  124.       }
  125.       Box1() { Label(text:"to") }
  126.       Box1(sunken) {
  127.         TextIn(name:"lastPage" mw:6 tab:"fileName"
  128.                font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
  129.       }
  130.     }
  131.     Box(x:2 y:1) {
  132.       Box1() { Label(text:"File:") }
  133.       Box1(sunken xfill:1) {
  134.         TextIn(name:"fileName" mw:32
  135.                font:"-*-courier-medium-r-*-*-14-*-*-*-*-*-*-*")
  136.       }
  137.     }
  138.     Box(x:3 y:1 top:8) {
  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) }
  142.     }
  143.   }
  144. }
  145.  
  146. #------------------------------------------------------------------------
  147. # "open" dialog
  148. #------------------------------------------------------------------------
  149.  
  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-*-*-*-*-*-*-*")
  156.     }
  157.     Box(x:3 y:1 top:8 xfill:1) {
  158.       Box1(left:8) { Button(name:"open" label:"Open" press:&openButtonCbk
  159.                             num:1) }
  160.       Box1(xfill:1) { Empty() }
  161.       Box1(right:8) { Button(label:"Cancel" press:&openButtonCbk num:0) }
  162.     }
  163.   }
  164. }
  165.  
  166. #------------------------------------------------------------------------
  167. # "save" dialog
  168. #------------------------------------------------------------------------
  169.  
  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-*-*-*-*-*-*-*")
  176.     }
  177.     Box(x:3 y:1 top:8 xfill:1) {
  178.       Box1(left:8) { Button(name:"save" label:"Save" press:&saveButtonCbk
  179.                             num:1) }
  180.       Box1(xfill:1) { Empty() }
  181.       Box1(right:8) { Button(label:"Cancel" press:&saveButtonCbk num:0) }
  182.     }
  183.   }
  184. }
  185.  
  186. #------------------------------------------------------------------------
  187. # "find" window
  188. #------------------------------------------------------------------------
  189.  
  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-*-*-*-*-*-*-*")
  197.       }
  198.     }
  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
  202.                             num:1) }
  203.       Box1(xfill:1) { Empty() }
  204.       Box1(right:8) { Button(label:"Close" press:&findButtonCbk num:0) }
  205.     }
  206.   }
  207. }
  208.  
  209. #------------------------------------------------------------------------
  210. # "about" window
  211. #------------------------------------------------------------------------
  212.  
  213. Window(func:makeAboutWindow defWidget:"close" title:"About xpdf") {
  214.   Box(x:1 y:2) {
  215.     Box(x:1 y:10 left:2 right:2 top:2 bottom:2 sunken) {
  216.       Box1(bottom:0) {
  217.         Label(text:"xpdf"
  218.               font:"-*-times-bold-i-*-*-24-*-*-*-*-*-*-*")
  219.       }
  220.       Box1(bottom:12) {
  221.         Label(text:["Version " xpdfVersion])
  222.       }
  223.       Box1(bottom:0) {
  224.         Label(text:xpdfCopyright)
  225.       }
  226.       Box1(bottom:12) {
  227.         Label(text:"derekn@foolabs.com")
  228.       }
  229.       Box1(bottom:0) {
  230.         Label(text:["Supports PDF version " pdfVersion "."])
  231.       }
  232.       Box1(bottom:0) {
  233.         Label(text:"The PDF data structures, operators, and specification")
  234.       }
  235.       Box1(bottom:12) {
  236.         Label(text:"are copyright 1995 Adobe Systems Inc.")
  237.       }
  238.       Box1(bottom:0) {
  239.         Label(text:"Mouse button 1: select text / follow link")
  240.       }
  241.       Box1(bottom:12) {
  242.         Label(text:"Mouse button 3: menu")
  243.       }
  244.       Box1(bottom:12) {
  245.         Label(text:"http://www.foolabs.com/xpdf/")
  246.       }
  247.     }
  248.     Box(x:2 y:1) {
  249.       Box1(xfill:1) { Empty() }
  250.       Box1() { Button(name:"close" label:"Close" press:&closeAboutCbk) }
  251.     }
  252.   }
  253. }
  254.