G4C ;ID-String für Gui4Cli-Interpreter (Nicht löschen oder eine Leerzeile davor setzten)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;                                   ;;
;; Anweisungen für GoldED-User:      ;;
;;                                   ;;
;; Benutzte für die Faltungen        ;;
;;  ;+/// als Falt-Start             ;;
;;  ;+\\\ als Falt-Ende              ;;
;; Sonst werden die Faltungen falsch ;;
;; dargestellt (ohne Pluszeichen)    ;;
;;                                   ;;
;; Setzte den globalen Tab auf 3     ;;
;;                                   ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;/// "Version"

;<×><×><×><×><×><×><×><×><×><×><×><×>
; $VER: WhirlPool v1.13 (24.04.2002)
;<×><×><×><×><×><×><×><×><×><×><×><×>

;\\\


;/// "Objekt: WhirlPool"

;/// "Fenster: WhirlPool"

;/// "Fenster-Attribute"
WINBIG -1 -1 186 239 ""
winsmall 0 11 300 232
WinType 11110010
WinFont xhelvetica.font 9 000
VarPath "set_whirlpool"
;\\\

;/// "Ereignisse (Events)"

;/// "Laden"
xOnLoad
	Set margins 5/0/4

	prog = WhirlPool

	vers = 1.12
	date = 24.04.2002

	name = Nightshade
	mail = thenightshade@freenet.de

	logo = no

	palette get "*" tmpimg
	palette save tmpimg t:palette
	freeimage tmpimg
	
	loadimage $$this.path\WPStartup.pic pic noremap

	guiload wp_startup_pic

	HOTKEY   = "lcommand w"
	STARTPIC = YES
	HELP     = OFF

	ttget :$prog

	if $STARTPIC = YES
		gosub #this startuppic
	endif

	loadimage $$this.path\help.pat help remap

	gosub #this mklist

	setwintitle #this "$prog v$vers ($HOTKEY)"

	guiload time_delay
	guiload set_whirlpool
	guiload wp_help

	info gui #this

	gosub #this help $HELP $$win.name

	GuiOpen #This

	gosub set_whirlpool default

	update #this 5 $HOTKEY

	redraw #this
;\\\

;/// "Nochmal laden"
xonreload
	ifexists window ~#this
		guiopen #this
	endif
	guiwindow #this front
	guiwindow #this on
;\\\

;/// "Schliessen"
xonclose
	ifexists window set_whirlpool
		open.setwin = yes
		guiclose set_whirlpool
	else
		open.setwin = no
	endif

	guiclose wp_help

	if $quit = no
		if $icon = yes
			setgad #this 3 on
		elseif $icon = no
			setgad #this 4 on
		else
			setgad #this 3 on
		endif

		setgad #this 5 on
	else
		ifexists variable ~askquit
			gosub #this about
		endif

		guiquit #this
	endif
;\\\

;/// "Öffnen"
xonopen
	ifexists window wp_startup_pic
		guiclose wp_startup_pic
	endif

	if $open.setwin = yes
		guiopen set_whirlpool
	endif

	setgad #this 3 off
	setgad #this 4 off
	setgad #this 5 off
	setgad #this 1000 on

	quit = yes
;\\\

;/// "Beim aktivieren des Fensters"
xonactive
	if $val = ON
		setgad #this 55 on
	else
		setgad #this 55 off
	endif
;///

;/// "Beenden"
xOnQuit
	ifexists window set_whirlpool
		guiclose set_whirlpool
	endif

	setgad #this 1000 off

	freeimage pic
	freeimage help

	guiquit wp_startup_pic
	guiquit time_delay
	guiquit set_whirlpool
	guiquit wp_help
	guiquit wp_help_shadow

	delete t:view
	delete t:viewanim
	delete t:list.db
	delete t:.list.db
	delete t:palette
	delete env:.run-whirl
	delete env:.whirl
;\\\

;/// "Online-Hilfe"
xOnHelp OFF
	gadid 55
	local oldtext

	if $$help.text = close
		guiclose wp_help
		oldtext = ""
	elseif $$help.text != $oldtext
		guiclose wp_help
		guiopen wp_help_shadow $$help.text $$win.name
		oldtext = $$help.text
	endif
;\\\

;/// "Echtzeit Pool-Update"
xpipe PIPE:ListResults off
	lvuse #this 1
	lvadd ''
	if $set_time = 1
		mydelay = $delay
	else
		mydelay = 10
	endif
	%Zeit = $mydelay
	%Bild = $$PIPE.TXT
	if $$lv.rec = ""
		lvclear
		redraw #this
	else
		lvsave t:list.db
		lvchange t:list.db
	endif
	gadid 1000
;\\\

;\\\

;/// "Sub-Routinen"

;/// "Startup Bild öffnen"
xroutine startuppic
		guiopen wp_startup_pic

		if $logo = no
			delay 300
			guiclose wp_startup_pic
		else
			guiwindow #this wait
		endif

		logo = yes
;\\\

;/// "Leere Liste machen"
xroutine mklist
	delete t:list.db
	.mklist = "GCDB\n0\n2\n%Zeit 3 N\n%Bild 100 S"
	rename env:.mklist t:list.db
;\\\

;/// "Anhängen"
xroutine add
	guiwindow #this wait
	rdir  = ""
	rfile = ""
	reqfile -1 -1 300 400 "Wo sind die GIFs?" dir rdir "Ram:"
	gosub #this set_dir
	guiwindow #this resume
;\\\

;/// "GIF-Verzeichnis ausgewählt"
xroutine set_dir
	if $rdir != ""
		cli 'list p="#?.gif" sort name files >PIPE:ListResults $rdir lformat "%s%s"'

		lvuse #this 1
		lvclear

		gosub #this mklist

		lvchange t:list.db
	endif
;\\\

;/// "Eintrag aus Pool löschen"
xroutine del
	guiwindow #this wait
	lvuse #this 1
	if $$lv.total != 0
		extract %Zeit clean sel_time
		extract %Bild clean sel_file
		ezreq "Diesen Eintrag löschen?\n\nVerzögerung: $sel_time\nBild: $sel_file" "Ok|Nö" "del"
		if $del = 1
			if $$lv.total > 1
				lvdel -1
			else
				gosub set_whirlpool default
				lvclear
				redraw #this
			endif
			lvsave t:list.db
		endif
	else
		flash
		ezreq "Keine Einträge vorhanden" "Schade" ""
	endif
	guiwindow #this resume
;\\\

;/// "Eintrag hoch"
xroutine up
	lvuse #this 1
	if $$lv.line > 0
	and $$lv.total > 0
		new = $$lv.rec

		lvgo prev
		old = $$lv.rec

		lvput $new
		lvgo next

		lvput $old
		lvgo prev

		lvmove #$$lv.line
		lvsave t:list.db
	else
		flash
	endif
;\\\

;/// "Eintrag runter"
xroutine down
	lvuse #this 1
	if $$lv.total > 0
	and $$lv.line < $($$lv.total - 1)
		new = $$lv.rec

		lvgo next
		old = $$lv.rec

		lvput $new
		lvgo prev

		lvput $old
		lvgo next

		lvmove #$$lv.line
		lvsave t:list.db
	else
		flash
	endif
;\\\

;/// "Syntax von WhirlGIF erstellen"
xroutine whirl
	guiwindow #this wait

	lvuse #this 1

	if $$lv.total > 0
		if $outfile = ""
			flash
			ezreq "Keine Ausgabe-Datei angegeben" "Upps" ""
			guiwindow #this resume
			stop
		endif

		whirl = "whirlgif "

		if $verbose = 1
			appvar whirl "-v "
		endif

		appvar whirl "-o $outfile "

		if $set_loop = 1
			appvar whirl "-loop $count "
		else
			appvar whirl "-loop "
		endif

		if $set_trans = 1
			appvar whirl "-disp $method "
			appvar whirl "-trans $index "
		endif

		if $colormap = 1
			appvar whirl "-u true "
		endif

		line = $$lv.line

		lvgo first
		getdir = $%Bild
		extract getdir path dir
		while $$lv.line > ""
			extract %Zeit clean time
			extract %Bild clean file
			extract file file file
			appvar whirl "-time $time $file "
			lvgo next
		endwhile

		lvgo #$line

		.whirl = 'echo \"*Ec*N\"'

		append env:.whirl "\ncd $dir"
		append env:.whirl "\n$whirl"
		append env:.whirl '\nRequestchoice >nil: \"WHIRLPOOL\" \"Animation ist fertig\" \"Danke\"'

		.resume = "G4C\n\nxonload\nguiwindow WhirlPool resume\nguiquit #this\n\nxonquit\ndelete env:.resume"

		append env:.whirl "\n$$this.path\gui env:.resume"
		append env:.whirl "\nendcli"

		.run-whirl = 'newshell \"con:20/20/300/100/WhirlPool Output\" from env:.whirl'

		cli "execute env:.run-whirl"
	else
		flash
		ezreq "Der Pool ist leer" "Auweia" ""
		guiwindow #this resume
		stop
	endif
;\\\

;/// "Bilder Duplizieren/Anzeigen"
xroutine pics mode
	guiwindow #this wait

	lvuse #this 1

	if $$lv.total > 0
		if $mode = copy
			lvinsert -1 $$lv.rec
		elseif $mode = view
			cli "sys:utilities/multiview $%Bild"
		endif
	else
		flash
		ezreq "Keine Bilder im Pool!" "Mist" ""
	endif
	guiwindow #this resume
;\\\

;/// "Ausgabe-Datei anzeigen"
xroutine view
	guiwindow #this wait
	ifexists file $outfile
		cli "sys:utilities/multiview $outfile"
	else
		flash
		ezreq "Kann Ausgabe-Datei nicht finden!" "Ehrlich" ""
	endif
	guiwindow #this resume
;\\\

;/// "Ausgabe-Datei anfordern"
xroutine req_output
	guiwindow #this wait

	rout = ""

	if $outfile = ""
		src = Ram:
	else
		src = $outfile
	endif

	reqfile -1 -1 300 400 "Ausgabe-Datei:" file rout #$src

	gosub #this sel_output

	guiwindow #this resume

;\\\

;/// "Ausgabe-Datei auswählen"
xroutine sel_output
	if $rout != ""
		outpath = ""

		extract rout path epath
		extract rout file efile
		extract efile ext ext
		extract ext clean ext

		ifexists directory $epath
			if $efile = ""
			or $efile = .gif
				efile = test
			endif
			joinfile $epath $efile outpath
		else
			outpath = Ram:test
		endif

		if $ext != .gif
			appvar outpath ".gif"
		endif

		outfile = $outpath
	else
		outfile = ""
	endif
	update #this 2 $outfile
;\\\

;/// "Über-Requester"
xroutine about
	guiwindow #this wait
		setvar a "$prog v$vers ($date)\n\n"
		appvar a "Eine Oberfläche für WhirlGIF v2.2\n"
		appvar a "Dies ist eine Gui4Cli-Applikation\n\n"
		appvar a "Copyright ©2002 bei Nightshade\n"
		appvar a "eMail: thenightshade@freenet.de\n\n"
		appvar a "Dieses Programm ist EmailWare!!!\n\n"
		appvar a "Bitte schicke mir eine Email,\n"
		appvar a "wenn Du es öfter benutzt!"
		ezreq $a "Okay" ""
	guiwindow #this resume
;\\\

;/// "Pool Optionen"
xroutine pool opt
	guiwindow #this wait

	lvuse #this 1

	rpool = ""
	
	if $opt = load
		reqfile -1 -1 300 400 "Wähle einen Pool" file rpool #$$this.path\Pools/
		if $rpool != ""
			gosub set_whirlpool default
			lvchange $rpool
			lvsave t:list.db
			lvgo first
		endif
	endif

	if $$lv.total > 0
		if $opt = stats
			extract %Zeit clean time
			extract %Bild clean pic
			loadimage $pic tmpimg noremap
			info image tmpimg
			setvar txt ""
			appvar txt "Verzögerung: $time"
			if $set_time = 1
			appvar txt " (Gobal)"
			endif
			appvar txt "\n"
			appvar txt "Bild: $pic ($($$lv.line + 1)/$$lv.total)\n"
			appvar txt "Auflösung: $$image.w\x$$image.h\x$$image.colors ($$image.depth Bit)"
			ezreq $txt "Gut zu wissen" ""
			freeimage tmpimg
		elseif $opt = save
			reqfile -1 -1 300 400 "Sichere Pool als" save rpool #$$this.path\Pools/.db
			if $rpool != ""
				extract rpool ext ext
				if $ext = .db
					lvsave $rpool
				else
					lvsave $rpool\.db
				endif
			endif
		elseif $opt = clear
			ezreq "Pool klären?" Ja|Nee clear
			if $clear = 1
				gosub set_whirlpool default
				lvclear
				redraw #this
			endif
		endif
	else
		if $opt != load
			flash
			ezreq "Nix im Pool" "Gut" ""
		endif
	endif

	guiwindow #this resume
;\\\

;/// "Öffne Einstellungen"
xroutine open_setwin
	ifexists window ~set_whirlpool
		guiopen set_whirlpool
	else
		guiwindow set_whirlpool front
		guiwindow set_whirlpool on
	endif

;/// "Online-Hilfe (de)aktivieren"
xroutine help val gui
	if $val = ON
		setgad $gui 55 on
	elseif $val = OFF
		guiclose wp_help
		setgad $gui 55 off
	endif
;\\\

;\\\

;\\\

;/// "App-Funktionen"
xappicon 0 0 :WhirlPool "(WhirlPool)" "" off
	guiopen #this
		gadid 3

xappmenu "WhirlPool..." "" off
	guiopen #this
		gadid 4

xhotkey "lcommand w" off
	guiopen #this
		gadid 5
;\\\

;/// "Oberfläche"

;/// "Boxen"
BOX -1 -1 0 0 out button
BOX 6 181 174 52 in ridge
attr resize 0220

XTEXTBOX 6 10 174 168 "" ""
attr tbox 2/1/-1/ridge/in
attr title "2/1/shadow/center/top/Animation"
attr resize 0022
;\\\

;/// "Pool (Listview-Gadget)"
XLISTVIEW 14 20 158 112 "" "lv_gif" "" 0 SHOW
	attr resize 0022
	gadhelp "Links stehen die Verzögerungs-Werte und rechts die Bilder"
	gadid 1
;\\\

;/// "Buttons"
XBUTTON 14 135 50 15 "_Neu"
	attr resize 0200
	gadhelp "Neues Verzeichnis mit GIFs einfügen\n"
	gosub #this add

XBUTTON 14 155 50 15 "_Löschen"
	attr resize 0200
	gadhelp "Gewählten Eintrag löschen"
	gosub #this del

XBUTTON 68 135 50 15 "_Hoch"
	attr resize 0220
	gadhelp "Gewählten Eintrag um eine Zeile nach oben verschieben"
	gosub #this up

XBUTTON 68 155 50 15 "_Runter"
	attr resize 0220
	gadhelp "Gewählten Eintrag um eine Zeile nach unten verschieben"
	gosub #this down

xbutton 122 135 50 15 "_Dupli."
	attr resize 2200
	gadhelp "Gewählten Eintrag duplizieren"
	gosub #this pics copy

xbutton 122 155 50 15 "_Verzö."
	attr resize 2200
	gadhelp "Verzögerung festlegen"
	lvuse #this 1
	if $$lv.total > 0
		guiopen time_delay
	else
		flash
	endif

XBUTTON 14 211 50 15 "_Zeigen"
	attr resize 0200
	gadhelp "Ausgabe-Datei anzeigen"
	gosub #this view

XBUTTON 68 211 50 15 "_Machen"
	attr resize 0220
	gadhelp "Animation erzeugen"
	gosub #this whirl

XBUTTON 122 211 50 15 "_Bild"
	attr resize 2200
	gadhelp "Gewähltes Bild anzeigen"
	gosub #this pics view
;\\\

;/// "Ausgabe-Datei Gadgets"
XTEXTIN 60 189 94 15 "Ausgabe:" "rout" "" 100
	attr resize 0220
	gadhelp "Ausgabe-Datei"
	gosub #this sel_output
		gadid 2

XBUTTON 154 189 18 15 "<"
	attr resize 2200
	gadhelp "Ausgabe-Datei per Requester wählen"
	gosub #this req_output
;\\\

;/// "Area zum schliessen der Help-Bubble"
xarea 0 0 0 0 none
	gadhelp "close"
;\\\

;\\\

;/// "Menüs"

;/// "Projekt"
xmenu Projekt "Hilfe" "AN" "1"
	gosub #this help ON $$win.name

xmenu Projekt "Hilfe" "AUS" "2"
	gosub #this help OFF

xmenu Projekt "BARLABEL" "" ""

xmenu Projekt "Zeige Startbild" "" "Z"
	gosub #this startuppic

xmenu Projekt "Über..." "" ?
	gosub #this about

xmenu Projekt "BARLABEL" "" ""

xmenu Projekt "Schliessen" "" "W"
	icon = no
	quit = no
	guiclose #this
	setgad #this 4 on

xmenu Projekt "Ikonifizieren" "" "I"
	icon = yes
	quit = no
	guiclose #this
	setgad #this 3 on

xmenu Projekt "BARLABEL" "" ""

xmenu Projekt "Verlassen" "" "V"
	quit = yes
	guiclose #this

xmenu Projekt "Ende" "" "E"
	ezreq "Willst Du $prog beenden???" "Ja|Nein" askquit
	if $askquit = 1
		quit = yes
		guiclose #this
	else
		delvar askquit
	endif
;\\\

;/// "Pool"
xmenu Pool "Statistik..." "" "!"
	gosub #this pool stats

xmenu Pool "BARLABEL" "" ""

xmenu Pool "Laden" "" "L"
	gosub #this pool load

xmenu Pool "Sichern" "" "S"
	gosub #this pool save

xmenu Pool "BARLABEL" "" ""

xmenu Pool "Klären" "" "K"
	gosub #this pool clear
;\\\

;/// "Einstellungen"
xmenu "Einstellungen" "Globale Animations Parameter" "" "G"
	gosub #this open_setwin
;\\\

;\\\

;\\\

;/// "Fenster: Einstellungen (set_whirlpool)"

;/// "Fenster-Attribute"
NewFile set_whirlpool

WINBIG -1 -1 204 173 "WhirlPool"
winsmall 0 11 202 171
WinType 11110010
WinFont xhelvetica.font 9 000
SHAREMENU WhirlPool
VarPath "WhirlPool"
;\\\

;/// "Events"

;/// "Beim Öffnen..."
xonopen
	guiclose wp_help

	if $val = ON
		setgad #this 55 on
	else
		setgad #this 55 off
	endif

	info gui #this

	redraw #this
;\\\

;/// "Beim Schliessen..."
xonclose
	guiclose wp_help

	guiwindow whirlpool on

;\\\

;/// "Online-Hilfe"
xOnHelp OFF
	gadid 55
	local oldtext

	if $$help.text = close
		guiclose wp_help
		oldtext = ""
	elseif $$help.text != $oldtext
		guiclose wp_help
		guiopen wp_help_shadow $$help.text $$win.name
		oldtext = $$help.text
	endif
;\\\

;\\\

;/// "Boxen"
BOX -1 -1 0 0 out button
BOX 6 138 192 29 in ridge
attr resize 0220

XTEXTBOX 6 10 192 125 "" ""
attr tbox 2/1/-1/ridge/in
attr title "2/1/shadow/center/top/Globale Animations Parameter"
attr resize 0022
;\\\

;/// "Sub-Routinen"

;/// "Globale Verzögerung setzten"
xroutine set_time
	lvuse WhirlPool 1
	lvgo first
	if $$lv.total > 0
		if $set_time = 1
			oldfile = $%Bild
			lvsave t:list.db
			ifexists file ~t:.list.db
				rename t:list.db t:.list.db
			endif
			while $$lv.line > ""
				%Zeit = $delay
				lvgo next
			endwhile
			lvgo first
		else
			ifexists file t:.list.db
			and $%Bild = $oldfile
				delete t:list.db
				rename t:.list.db t:list.db
				lvchange t:list.db
			else
				delete t:.list.db  
			endif
		endif
		partredraw WhirlPool 0 0 0 0
	endif
;\\\

;/// "Vorgabe zuzrücksetzten"
xroutine default
	setgad #this 1/4 off
	update #this 1 0
	update #this 2 0
	update #this 3 0
	update #this 4 0
	update #this 5 0
	update #this 6 0
	update #this 7 0
	update #this 8 0
	update #this 9 0
	lvuse whirlpool 1
	if $$lv.total > 0
		gosub #this set_time
	endif
;\\\

;\\\

;/// "Oberfläche"

;/// "Wiederholungen"
XTEXTIN 95 20 50 16 "_Wiederholungen:" "count" "0" 100
	if $count < 0
	or $count > 99
		flash
		if $count < 99
			update #this 1 0
		else
			update #this 1 99
		endif
	endif
	attr resize 0120
	attr titype int
	gadhelp "Anzahl der Wiederholungen\n0 = unendlicher Loop"
	gadid 1
;\\\

;/// "Zeit"
XTEXTIN 95 38 50 16 "_Zeit (1/100 sek):" "delay" "0" 100
	if $delay >= 0
	and $delay <= 999
		gosub #this set_time
	else
		flash
		if $delay < 999
			update #this 2 0
		else
			update #this 2 999
		endif
	endif
	attr resize 0120
	attr titype int
	gadhelp "Verzögerung\n0 bis 999"
	gadid 2
;\\\

;/// "Transparent"
XTEXTIN 95 56 50 16 "_Transparent:" "index" "0" 100
	if $index < 0
	or $index > 255
		flash
		if $index < 255
			update #this 3 0
		else
			update #this 3 255
		endif
	endif
	attr resize 0120
	attr titype int
	gadhelp "Tranzparente Farbe\nFarbstift 0 bis 255"
	gadid 3
;\\\

;/// "Ersetzten"
XCYCLER 95 76 87 16 "_Ersetzten:" "method"
	CSTR Keine       none
	CSTR Nichts      not
	CSTR Hintergrund back
	CSTR Vorheriges  prev
		gadhelp "Ersetzungsmethode"
		gadid 4
		attr resize 0120
;\\\

;/// "Checkboxes"
XCHECKBOX 155 100 27 12 "_Benutze alle Farbmappen:" "colormap" "1" "0" OFF
attr resize 2100
gadhelp "Genauere Funktionsweise unbekannt\n(lies WhirlGIF.doc)"
gadid 5

XCHECKBOX 155 115 27 12 "_Info mit allen Details:" "verbose" "1" "0" off
attr resize 2100
gadhelp "Mehr Angaben zur Animation anzeigen bei Erstellung"
gadid 6
				  

XCHECKBOX 155 22 27 12 "" "set_loop" "1" "0" off
attr resize 2100
if $set_loop != 1
	setgad #this 1 off
else
	setgad #this 1 on
endif
gadhelp "Anzahl der Wiederholungen in Animation übernehmen"
gadkey 1
gadid 7

XCHECKBOX 155 40 27 12 "" "set_time" "1" "0" off
attr resize 2100
if $set_time != 1
	setgad #this 2 off
else
	setgad #this 2 on
endif
gosub #this set_time
gadhelp "Verzögerung in Aminations übernehmen"
gadkey 2
gadid 8

XCHECKBOX 155 58 27 12 "" "set_trans" "1" "0" off
attr resize 2100
if $set_trans != 1
	setgad #this 3/4 off
else
	setgad #this 3/4 on
endif
gadhelp "Tranzparent Farbe und Ersetztungsmethode in Animation Übernehmen"
gadkey 3
gadid 9
;\\\

;/// "Buttons"
XBUTTON 13 145 110 15 "Zurück auf _Vorgaben"
	gadhelp "Setzte alle Werte auf 0 und deaktiviert alle Schalter"
	attr resize 0220
	gosub #this default

XBUTTON 130 145 60 15 "_Schliessen"
	gadhelp "Schliesst das Fenster wieder"
	attr resize 2200
	guiclose #this
;\\\

;/// "Area zum schliessen der Help-Bubble"
xarea 0 0 0 0 none
	gadhelp "close"
;\\\

;\\\

;\\\

;/// "Fenster: Einzel-Verzögerung (time_delay)"

;/// "Fenster-Attribute"
NewFile time_delay

WINBIG -1 -1 200 15 "Setzte Verzögerung:"
winsmall -1 -2 10000 15
WinType 11110010
WinFont xhelvetica.font 9 000
VarPath "WhirlPool/set_whirlpool"
winonmouse 100 7
;\\\

;/// "Ereignisse (Events)"

;/// "Öffnen"
xonopen
	if $val = ON
		setgad #this 55 on
	else
		setgad #this 55 off
	endif

	info gui #this

	guiclose wp_help

	guiwindow WhirlPool wait

	lvuse WhirlPool 1

	extract %Zeit clean d

	update #this 1 $d
	update #this 2 $d

	redraw #this
;\\\

;/// "Schliessen"
xonclose
	guiclose wp_help
	guiwindow WhirlPool resume
;\\\

;/// "Online-Hilfe"
xOnHelp OFF
	gadid 55
	local oldtext

	if $$help.text = close
		guiclose wp_help
		oldtext = ""
	elseif $$help.text != $oldtext
		guiclose wp_help
		guiopen wp_help_shadow $$help.text $$win.name
		oldtext = $$help.text
	endif
;\\\

;\\\

;/// "Oberfäche"

;/// "Slider für Verzögerung"
xhslider 40 -1 100 15 "" newdelay 0 999 10 ""
	attr resize 0120
	update #this 2 $newdelay
	gadhelp "Justierung der Verzögerung\n0 bis 999"
	gadid 1
;\\\

;/// "Einzelne Verzögerung festlegen"
XTEXTIN 140 -1 40 15 "" "newdelay" "" 4
	update #this 1 $newdelay
	attr resize 2100
	attr titype int
	gadhelp "Direkte Eingabe des Verzögerunswertes\n0 bis 999"
	gadid 2
;\\\

;/// "Zurücksetzten"
xbutton 0 -1 40 15 "_Alte"
	attr resize 0100
	update #this 1 $d
	update #this 2 $d
	gadhelp "Auf alte Verzögerung zurücksetzten"
;\\\

;/// "Verzögerung ändern"
xbutton 180 -1 20 15 "_Ok"
	if $newdelay >= 0
	and $newdelay <= 999
		lvuse WhirlPool 1
		if $set_time != 1
			%Zeit = $newdelay
		else
			lvgo fist
			while $$lv.line > ""
				%Zeit = $newdelay
				lvgo next
			endwhile
			lvgo first
			update set_whirlpool 2 $newdelay
		endif
		partredraw WhirlPool 0 0 0 0
	endif
	guiclose #this
	attr resize 2100
	gadhelp "Eingestellten Verzögerungswert anwenden"
;\\\

;\\\

;\\\

;/// "Fenster: Startbild (wp_startup_pic)"

newfile wp_startup_pic

winbig -1 -1 250 150 ""
wintype 00001000
varpath "whirlpool"


xonrmb
	if $logo = yes
		guiclose #this
		guiwindow whirlpool resume
	endif


xonopen
	setpointer #this hide
	palette set pic *


xonclose
	setpointer #this default
	palette load t:palette tmpimg
	palette set tmpimg '*'
	freeimage tmpimg


image 0 0 pic
	gadid 1

;\\\

;/// "Fenster: Help-Bubble (wp_help)"

NewFile wp_help

winbig 0 0 140 50 ''
wintype 00001000
winonwin wp_help_shadow -2 -2
WinFont xhelvetica.font 9 000
VarPath "wp_help_shadow/WhirlPool/set_whirlpool/time_delay"


xOnOpen 
	set tbmargins 5/4

	guiwindow $gui on
	update #this 1 $text

	redraw #this


xonclose
	update #this 1 ""
	redraw #this
	guiclose wp_help_shadow


xonrmb
	guiclose #this


image 0 0 help


xtextBox 19 2 119 46 "" ""
	attr tbox 2/1/-1/none
	attr tbstyle 2/1/shadow/center
		gadid 1

;\\\

;/// "Fenster: Schatten der Help-Bubble (wp_help_shadow)"

NewFile wp_help_shadow

winbig 0 0 140 50 ''
wintype 00001000
winbackground pattern 0 1
winonmouse -22 -22

xonopen text gui
	guiopen wp_help

;\\\

;\\\

;\\\

;\\\
