home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 14 / MA_Cover_14.iso / internet / htmlext / gui / htmllib < prev    next >
Encoding:
Text File  |  2000-02-03  |  7.3 KB  |  286 lines

  1. G4C
  2. ; $VER: HTMLLIB Rev.027 by Juan Manuel Wehrli 1999 - 2000
  3. WinBig -1 -1 700 235 "HTMLEXT: HTML Bibliothek"
  4. WinType 11110000
  5. WinBackground IMAGE BG 0
  6. Winout "NIL:"
  7.  
  8. xOnLoad
  9. SetGad #This 4 HIDE
  10. SetGad #This 6 HIDE
  11. CLI 'LIST HTMLEXT:Settings/htmllib/ LFORMAT="%N" >t:htmlext/lib.list'
  12. LVUSE #This 1
  13. LVChange "t:htmlext/lib.list"
  14. LVSort ASC
  15. LVDel -1
  16. LVUse #This 3
  17. LVClear
  18. GuiOpen #This
  19.  
  20. xOnClose
  21. GuiQuit #This
  22.  
  23. xMenu "Projekt" "Importieren" "" ""
  24. CLI 'lha -T x ram:HTMLEXT_lib.lha HTMLEXT: >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  25.  
  26. xMenu "Projekt" "Exportieren" "" ""
  27. CLI 'lha -A -r u ram:HTMLEXT_lib.lha HTMLEXT:Settings/htmllib >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  28.  
  29. xMenu "Projekt" "Synchronisieren" "" ""
  30. ifexists FILE "ram:HTMLEXT_lib.lha"
  31.     CLI 'lha -T x ram:HTMLEXT_lib.lha HTMLEXT: >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  32.     CLI 'lha -r u ram:HTMLEXT_lib.lha HTMLEXT:Settings/htmllib >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  33.     EZReq "Soll das Update nun verschickt werden?" "Ja|Nein" ezupd
  34.     if $ezupd = 1
  35.         if $*EMAILADR = ""
  36.             SetVar *EMAILADR "jmw@pop.ch"
  37.         endif
  38.         SetVar .HTMLEXT.emad $*EMAILADR
  39.         SetVar .HTMLEXT.subj "HTMLEXT Library Update"
  40.         CLI 'setenv .HTMLEXT.user $*USER'
  41.         CLI 'rx $*EMAILER LIBUPDATE "ram:HTMLEXT_lib.lha"'
  42.     endif
  43. else
  44.     CLI 'lha -r a ram:HTMLEXT_lib.lha HTMLEXT:Settings/htmllib >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  45.     EZReq "Soll das Update nun verschickt werden?" "Ja|Nein" ezupd
  46.     if $ezupd = 1
  47.         if $*EMAILADR = ""
  48.             SetVar *EMAILADR "jmw@pop.ch"
  49.         endif
  50.         SetVar .HTMLEXT.emad $*EMAILADR
  51.         SetVar .HTMLEXT.subj "HTMLEXT Library Update"
  52.         CLI 'setenv .HTMLEXT.user $*USER'
  53.         CLI 'rx $*EMAILER LIBUPDATE "ram:HTMLEXT_lib.lha"'
  54.     endif
  55. endif
  56.  
  57. xMenu "Projekt" "Beenden" "" ""
  58. GuiQuit #This
  59.  
  60. xMenu "Kategorie" "Import" "" ""
  61. Reqfile -1 -1 200 500 "Bitte Import Verzeichnis auswählen" DIR "impdir" "ram:"
  62. Reqfile -1 -1 200 500 "Bitte Destination auswählen" DIR "destdir" "HTMLEXT:Settings/htmllib/"
  63. FailAt 21
  64. CLI 'copy $impdir to $destdir ALL >CON:0/0/550/50/Kopiere/CLOSE/PUBSCREEN$*SCREEN'
  65.  
  66. xMenu "Kategorie" "Import LhA" "" ""
  67. Reqfile -1 -1 200 500 "Bitte Import Datei wählen" FILE "impfile" "ram:"
  68. CLI 'lha x $impfile HTMLEXT: >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  69.  
  70. xMenu "Kategorie" "Export" "" ""
  71. SetVar VORS "HTMLEXT:Settings/htmllib/"
  72. AppVar VORS "$LVP"
  73. Reqfile -1 -1 200 500 "Bitte Destination auswählen" DIR "dest" "ram:"
  74. SetVar destdir $dest
  75. AppVar destdir $LVP
  76. CLI 'makedir $destdir'
  77. FailAt 21
  78. CLI 'copy $VORS TO $destdir >CON:0/0/550/50/Kopiere/CLOSE/PUBSCREEN$*SCREEN'
  79.  
  80. xMenu "Kategorie" "Export LhA" "" ""
  81. SetVar dir "HTMLEXT:Settings/htmllib/"
  82. AppVar dir $LVP
  83. SetVar name "ram:"
  84. AppVar name $LVP
  85. AppVar name "_lib.lha"
  86. CLI 'Lha -r a $name $dir >CON:0/0/550/50/Lha/CLOSE/PUBSCREEN$*SCREEN'
  87.  
  88. ;Projekte Teil
  89. xLISTVIEW 5 5 100 180 "" "LVP" "t:htmlext/lib.list" 0 "SHOW"
  90. GadID 1
  91. GadFont xHelvetica.font 11 000
  92. CLI 'LIST HTMLEXT:Settings/htmllib/$LVP LFORMAT="%N" >t:htmlext/lib.tags'
  93. LVUSE #This 3
  94. LVChange "t:htmlext/lib.tags"
  95. LVSort ASC
  96. LVDel -1
  97.  
  98. xTextIn 255 210 365 18 "" STR "" 200
  99. GadID 4
  100. GadFont xHelvetica.font 11 000
  101. LVUSE #This 1
  102. string = $STR
  103. LVADD "$STR"
  104. LVSort ASC
  105. Update #This 4 ""
  106. SetVar TMP "HTMLEXT:Settings/htmllib/"
  107. AppVar TMP "$string"
  108. CLI 'makedir $TMP'
  109. SetGad  #This 4 HIDE
  110. PARTREDRAW #This 254 209 367 20
  111.  
  112.  
  113. xButton 5 190 35 18 "Neu"
  114. GadFont xHelvetica.font 11 000
  115. SetGad #This 4 SHOW
  116. PARTREDRAW #This 254 209 367 20
  117.  
  118. xButton 40 190 65 18 "Löschen"
  119. GadFont xHelvetica.font 11 000
  120. EZREQ "Achtung: Es werden alle Daten der aktuellen Kategorie gelöscht!" "Weiter|Abbrechen" EZVAR
  121. if $EZVAR = "1"
  122.     SetVar TMP "HTMLEXT:Settings/htmllib/"
  123.     AppVar TMP "$LVP"
  124.     FailAt 21
  125.     CLI 'delete $TMP ALL NOREQ'
  126.     LVUSE #This 1
  127.     LVDEL -1
  128. endif
  129.  
  130.  
  131. ; TAG Teil
  132. xLISTVIEW 105 5 150 180 "" "LVT" "t:htmlext/lib.list" 0 "SHOW"
  133. GadID 3
  134. GadFont xHelvetica.font 11 000
  135. UPDATE #This 4 $LVT
  136. STRT = $LVT
  137. SetVar ALVDATA "HTMLEXT:Settings/htmllib/$LVP"
  138. AppVar ALVDATA "/$LVT"
  139. LVUSE #This 5
  140. LVChange "$ALVDATA"
  141. if $aprev = "1"
  142.     SetVar VORS "HTMLEXT:Settings/htmllib/"
  143.     AppVar VORS "$LVP"
  144.     AppVar VORS "/"
  145.     AppVar VORS "$LVT"
  146.     IfExists FILE $VORS
  147.         FailAt 21
  148.         CLI 'rx $*BROWSER OPEN $VORS'
  149.     endif
  150. endif
  151.  
  152.  
  153. xTextIn 255 210 365 18 "" STR2 "" 200
  154. GadFont xHelvetica.font 11 000
  155. GadID 6
  156. SetVar TMP "HTMLEXT:Settings/htmllib/"
  157. AppVar TMP "$LVP"
  158. AppVar TMP "/"
  159. AppVar TMP "$STR2"
  160. FailAt 21
  161. CLI 'copy HTMLEXT:settings/_defs/Libtag.txt to $TMP'
  162. SetVar Befehl "rx "
  163. AppVar Befehl $*EDITOR
  164. AppVar Befehl " OPEN "
  165. AppVar Befehl $TMP
  166. CLI '$Befehl'
  167. CLI 'LIST HTMLEXT:Settings/htmllib/$LVP LFORMAT="%N" >t:htmlext/lib.tags'
  168. LVUSE #This 3
  169. LVChange "t:htmlext/lib.tags"
  170. LVSort ASC
  171. LVDel -1
  172. SetGad  #This 6 HIDE
  173. PARTREDRAW #This 254 209 367 20
  174.  
  175. xButton 105 190 35 18 "Neu"
  176. GadFont xHelvetica.font 11 000
  177. SetGad #This 6 SHOW
  178. PARTREDRAW #This 254 209 367 20
  179.  
  180. xButton 140 190 60 18 "N. v. Mark"
  181.     GadFont xHelvetica.font 11 000
  182.     GadHelp "Erzeugt neuen Eintrag vom selektiertem Abschnitt im Editor"
  183.     SetVar .htmlext.rqt "Tag Name:"  ;Titel
  184.     SetVar .htmlext.rqb "Bitte geben Sie den gewünschen TAG Namen ein ..."  ;Body
  185.     SetVar .htmlext.rqd "Neu"  ;Default
  186.     SetVar .htmlext.rqu "Weiter|Abbrechen"  ;Buttons
  187.     cli 'rx htmlext:mod/htmlext.smod REQSTRING'
  188.     if $.htmlext.res = 1
  189.         SetVar TMP "HTMLEXT:Settings/htmllib/"
  190.         AppVar TMP "$LVP"
  191.         AppVar TMP "/"
  192.         AppVar TMP "$.htmlext.tmp"
  193.         cli 'rx $*EDITOR BLOCKSAVE $TMP'
  194.         CLI 'LIST HTMLEXT:Settings/htmllib/$LVP LFORMAT="%N" >t:htmlext/lib.tags'
  195.         LVUSE #This 3
  196.         LVChange "t:htmlext/lib.tags"
  197.         LVSort ASC
  198.         LVDel -1
  199.  
  200.     endif
  201.  
  202. xButton 200 190 55 18 "Löschen"
  203. GadFont xHelvetica.font 11 000
  204. LVUSE #This 3
  205. SetVar TMP "HTMLEXT:Settings/htmllib/"
  206. AppVar TMP $LVP
  207. AppVar TMP "/"
  208. AppVar TMP $LVT
  209. FailAt 21
  210. CLI 'delete $TMP FORCE'
  211. LVDEl -1
  212.  
  213. ; DATA Teil
  214. xLISTVIEW 255 5 440 180 "" "LIBD" "HTMLEXT:Settings/htmllib/hilfe/Einleitung" 10 "TXT"
  215. GadID 5
  216. GadFont xCourier.font 11 000
  217.  
  218. xButton 255 190 70 18 "Bearbeiten"
  219. GadFont xHelvetica.font 11 000
  220. SetVar BEARB "HTMLEXT:Settings/htmllib/"
  221. AppVar BEARB "$LVP"
  222. AppVar BEARB "/"
  223. AppVar BEARB "$LVT"
  224. IfExists FILE $BEARB
  225.     CLI '$*EDITOR OPEN "$BEARB"'
  226. else
  227.     FailAt 21
  228.     COPY "HTMLEXT:settings/_defs/Libtag.txt" "$BEARB"
  229.     CLI '$*EDITOR OPEN "$BEARB"'
  230. endif
  231.  
  232.  
  233. xButton 385 190 70 18 "Datei erz."
  234.     GadFont xHelvetica.font 11 000
  235.     GadHelp "Neue Datei erzeugen"
  236.     SetVar BEARB "HTMLEXT:Settings/htmllib/"
  237.     AppVar BEARB "$LVP"
  238.     AppVar BEARB "/"
  239.     AppVar BEARB "$LVT"
  240.     LVUSE HTMLEXT 3
  241.     SetVar nfile "$$LV.DIR"
  242.     AppVar nfile ".htm"
  243.     SetVar .htmlext.rqt "Datei erzeugen"  ;Titel
  244.     SetVar .htmlext.rqb "Bitte Dateinamen eingeben ..."  ;Body
  245.     SetVar .htmlext.rqd "$nfile"  ;Default
  246.     SetVar .htmlext.rqu "Erzeugen|Abbrechen"  ;Buttons
  247.     cli 'rx htmlext:mod/htmlext.smod REQSTRING'
  248.     if $.htmlext.res = 1
  249.         IfExists FILE $BEARB
  250.             FailAt 21
  251.             CLI 'copy "$BEARB" to $.htmlext.tmp'
  252.             CLI 'rx $*BROWSER OPEN $.htmlext.tmp'
  253.         endif
  254.         LVUSE HTMLEXT 3
  255.         LVDIR #$$LV.DIR
  256.  
  257. xButton 455 190 70 18 "Einfügen"
  258. GadFont xHelvetica.font 11 000
  259. SetVar BEARB "HTMLEXT:Settings/htmllib/"
  260. AppVar BEARB "$LVP"
  261. AppVar BEARB "/"
  262. AppVar BEARB "$LVT"
  263. CLI '$*EDITOR INSERT "$BEARB"'
  264.  
  265. xButton 525 190 70 18 "_Vorschau"
  266. GadFont xHelvetica.font 11 000
  267. GadKey "v"
  268. SetVar VORS "HTMLEXT:Settings/htmllib/"
  269. AppVar VORS "$LVP"
  270. AppVar VORS "/"
  271. AppVar VORS "$LVT"
  272. IfExists FILE $VORS
  273.     FailAt 21
  274.     CLI 'rx $*BROWSER OPEN $VORS'
  275. endif
  276.  
  277. xCheckBox 595 190 18 18 "" aprev "1" "2" OFF
  278. GadHelp "Automaitsche Vorschau aktivieren."
  279.  
  280. ; Globaler Teil
  281. xButton 625 190 70 18 "B_eenden"
  282. GadKey "s"
  283. GadFont xHelvetica.font 11 000
  284. GuiQuit #This
  285.  
  286.