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wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AKQ=="
{widgets}
field1:{"type":"field","size":[346,39],"pos":[86,46],"locked":1,"font":"deckbuilder","show":"invert","border":0,"align":"center","value":"5GUIs"}
field2:{"type":"field","size":[360,28],"pos":[74,97],"locked":1,"border":0,"align":"center","value":{"text":["An adaptation of ","7GUIs"," to Decker"],"font":["","",""],"arg":["","https://eugenkiss.github.io/7guis/",""]}}
button1:{"type":"button","size":[125,50],"pos":[41,165],"script":"home.0","font":"deckbuilder","text":"Counter","style":"rect"}
button2:{"type":"button","size":[125,50],"pos":[189,165],"script":"home.0","font":"deckbuilder","text":"Temperature","style":"rect"}
button3:{"type":"button","size":[125,50],"pos":[336,164],"script":"home.0","font":"deckbuilder","text":"Flight Booker","style":"rect"}
button4:{"type":"button","size":[125,50],"pos":[103,235],"script":"home.0","font":"deckbuilder","text":"Timer","style":"rect"}
button5:{"type":"button","size":[125,50],"pos":[263,234],"script":"home.0","font":"deckbuilder","text":"CRUD","style":"rect"}

{script:home.0}
on click do
 go[me.text]
end
{end}

{card:Counter}
image:"%%IMG2AgABVgD/AEoBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBt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A/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbUA/wBMAbUA/wBMAbQA/wBNAbIA/wD/AAc="
{widgets}
field1:{"type":"field","size":[172,40],"pos":[334,21],"locked":1,"font":"deckbuilder","show":"invert","border":0,"align":"center","value":"Counter"}
field2:{"type":"field","size":[171,230],"pos":[335,66],"locked":1,"show":"invert","scrollbar":1,"value":{"text":["","Task:","\n\nBuild a frame containing a label or read-only textfield T and a button B. Initially, the value in T is 0 and each click of B increases the value in T by one.\n\n","Remarks:","\n\nNone."],"font":["","menu","","menu",""],"arg":["","","","",""]}}
button1:{"type":"button","size":[85,33],"pos":[335,302],"script":"Counter.0","show":"invert","text":"Back","style":"rect"}
button2:{"type":"button","size":[81,33],"pos":[426,302],"script":"Counter.1","show":"invert","text":"Reset","style":"rect"}
T:{"type":"field","size":[58,16],"pos":[96,155],"locked":1,"font":"menu","style":"plain","align":"center","value":"0"}
B:{"type":"button","size":[60,20],"pos":[173,153],"script":"Counter.2","text":"Count"}

{script:Counter.0}
on click do
 go["First"]
end
{end}

{script:Counter.1}
on click do
 T.text:"0"
end
{end}

{script:Counter.2}
on click do
 T.text:1+T.text
end
{end}

{card:Temperature}
image:"%%IMG2AgABVgD/AEoBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/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wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbUA/wBMAbUA/wBMAbQA/wBNAbIA/wD/AAc="
{widgets}
field1:{"type":"field","size":[172,40],"pos":[334,21],"font":"deckbuilder","show":"invert","border":0,"align":"center","value":"Temperature"}
field2:{"type":"field","size":[171,230],"pos":[335,66],"show":"invert","scrollbar":1,"value":{"text":["","Task:","\n\nBuild a frame containing two textfields TC and TF representing the temperature in Celsius and Fahrenheit, respectively. Initially, both TC and TF are empty. When the user enters a numerical value into TC the corresponding value in TF is automatically updated and vice versa. When the user enters a non-numerical string into TC the value in TF is not updated and vice versa.\n\n","Remarks:","\n\nTo recognize valid input, the change handlers for TC and TF use the Lil ","parse","  primitive with the pattern"," \"%f%z\"","- match a float, and then capture a boolean indicating whether we're still matching and have fully-consumed the input."],"font":["","menu","","menu","","mono","","mono",""],"arg":["","","","","","","","",""]}}
button1:{"type":"button","size":[85,33],"pos":[335,302],"script":"Counter.0","show":"invert","text":"Back","style":"rect"}
button2:{"type":"button","size":[81,33],"pos":[426,302],"script":"Temperature.0","show":"invert","text":"Reset","style":"rect"}
TC:{"type":"field","size":[72,20],"pos":[42,152],"script":"Temperature.1","font":"menu","style":"plain"}
TF:{"type":"field","size":[68,20],"pos":[168,151],"script":"Temperature.2","font":"menu","style":"plain"}
field3:{"type":"field","size":[45,20],"pos":[118,154],"locked":1,"border":0,"align":"center","value":"Celsius ="}
field4:{"type":"field","size":[52,20],"pos":[239,154],"locked":1,"border":0,"align":"center","value":"Fahrenheit"}

{script:Temperature.0}
on click do
 TC.text:""
 TF.text:""
end
{end}

{script:Temperature.1}
on change val do
 if last val:"%f%z" parse val
  TF.text:32+(9/5)*first val
 end
end
{end}

{script:Temperature.2}
on change val do
 if last val:"%f%z" parse val
  TC.text:(5/9)*(first val)-32 
 end
end
{end}

{card:Flight Booker}
image:"%%IMG2AgABVgD/AEoBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEs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/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbUA/wBMAbUA/wBMAbQA/wBNAbIA/wD/AAc="
script:"Flight Booker.0"
{widgets}
field1:{"type":"field","size":[172,40],"pos":[334,21],"font":"deckbuilder","show":"invert","border":0,"align":"center","value":"Flight Booker"}
field2:{"type":"field","size":[171,230],"pos":[335,66],"show":"invert","scrollbar":1,"value":{"text":["","Task:","\n\nBuild a frame containing a combobox C with the two options \"one-way flight\" and \"return flight\", two textfields T1 and T2 representing the start and return date, respectively, and a button B for submitting the selected flight.\n\nT2 is enabled iff C's value is \"return flight\". When C has the value \"return flight\" and T2's date is strictly before T1's then B is disabled. When a non-disabled textfield T has an ill-formatted date then T is colored red and B is disabled. When clicking B a message is displayed informing the user of his selection.\n\nInitially, C has the value \"one-way flight\" and T1 as well as T2 have the same (arbitrary) date.\n\n","Remarks:","\n\n- Decker does not have a combobox, so we will instead use a checkbox. In a more general case, it would be idiomatic to use a single-column grid as a listbox/combobox alternative.\n\n- Decker does not generally use color, so we will use text to indicate error conditions.\n\n- This example uses a YYY.MM.DD date format to permit lexicographic comparison for ordering. We only validate the textual structure of a date, for the sake of simplicity."],"font":["","menu","","menu",""],"arg":["","","","",""]}}
button1:{"type":"button","size":[85,33],"pos":[335,302],"script":"Counter.0","show":"invert","text":"Back","style":"rect"}
button2:{"type":"button","size":[81,33],"pos":[426,302],"script":"Flight Booker.1","show":"invert","text":"Reset","style":"rect"}
C:{"type":"button","size":[112,22],"pos":[88,109],"script":"Flight Booker.2","font":"body","text":"One Way","style":"check","value":0}
T1:{"type":"field","size":[93,20],"pos":[127,146],"style":"plain","value":"2014.03.27"}
T2:{"type":"field","size":[93,20],"pos":[127,174],"style":"plain","value":"2014.03.27"}
L1:{"type":"field","size":[33,14],"pos":[89,148],"locked":1,"border":0,"style":"plain","value":"Start"}
L2:{"type":"field","size":[35,16],"pos":[88,176],"locked":1,"border":0,"style":"plain","value":"Return"}
B:{"type":"button","size":[168,25],"pos":[88,216],"locked":1,"script":"Flight Booker.3","text":"Book"}
V1:{"type":"field","size":[38,13],"pos":[224,148],"locked":1,"show":"none","border":0,"style":"plain","value":"Invalid!"}
V2:{"type":"field","size":[38,14],"pos":[224,176],"locked":1,"show":"none","border":0,"style":"plain","value":"Invalid!"}

{script:Flight Booker.0}
on validate f l do
 l.show:("solid","none")[r: "%*04i.%*02i.%*02i%z" parse f.text]
 r
end

on view do
 if C.value
  L2.show:T2.show:V2.show:"none"
  B.locked:!validate[T1 V1]
 else
  L2.show:T2.show:"solid"
  B.locked:!validate[T1 V1] & validate[T2 V2] & (T2.text>T1.text)
 end
end

on change do
 view[]
end
{end}

{script:Flight Booker.1}
on click do
 C:1
 T1.text:"2014.03.27"
 T2.text:T1.text
 view[]
end
{end}

{script:Flight Booker.2}
on click do
 view[]
end
{end}

{script:Flight Booker.3}
on click do
 if C.value
  alert["You have booked a one-way flight on %s." format T1.text]
 else
  alert["You have booked a flight leaving on %s and returning on %s." format T1.text,T2.text]
 end
end
{end}

{card:Timer}
image:"%%IMG2AgABVgD/AEoBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/AEsBtgD/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/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbYA/wBLAbUA/wBMAbUA/wBMAbQA/wBNAbIA/wD/AAc="
script:"Timer.0"
{widgets}
field1:{"type":"field","size":[172,40],"pos":[334,21],"font":"deckbuilder","show":"invert","border":0,"align":"center","value":"Timer"}
field2:{"type":"field","size":[171,230],"pos":[335,66],"show":"invert","scrollbar":1,"value":{"text":["","Task:","\n\nBuild a frame containing a gauge G for the elapsed time e, a label which shows the elapsed time as a numerical value, a slider S by which the duration d of the timer can be adjusted while the timer is running and a reset button R. Adjusting S must immediately reflect on d and not only when S is released. It follows that while moving S the filled amount of G will (usually) change immediately. When e >= d is true then the timer stops (and G will be full). If, thereafter, d is increased such that d > e will be true then the timer restarts to tick until e >= d is true again. Clicking R will reset e to zero.\n\n","Remarks:","\n\nThe live animation for this demo uses the view[] event, which can be retriggered on each frame without disrupting interaction with other widgets.\n\nUsing bar slider widgets for both input and output makes it easy to display a legend for each.\n"],"font":["","menu","","menu",""],"arg":["","","","",""]}}
button1:{"type":"button","size":[85,33],"pos":[335,302],"script":"Counter.0","show":"invert","text":"Back","style":"rect"}
button2:{"type":"button","size":[81,33],"pos":[426,302],"script":"Timer.1","show":"invert","text":"Reset","style":"rect"}
G:{"type":"slider","size":[100,19],"pos":[154,106],"locked":1,"interval":[0,0],"step":0.00001,"format":"%.2fs","style":"bar"}
S:{"type":"slider","size":[100,17],"pos":[154,140],"interval":[0,100],"format":"%fs","style":"bar"}
R:{"type":"button","size":[98,25],"pos":[126,177],"script":"Timer.2","text":"Reset"}
field3:{"type":"field","size":[62,14],"pos":[88,108],"locked":1,"border":0,"style":"plain","value":"Elapsed Time"}
field4:{"type":"field","size":[62,15],"pos":[88,140],"locked":1,"border":0,"style":"plain","value":"Duration"}

{script:Timer.0}
on view do
 G.interval:0,S.value
 if G.value<S.value G.value:G.value+(1/60) end
 go[card]
end
{end}

{script:Timer.1}
on click do
 S.value:0
end
{end}

{script:Timer.2}
on click do
 G.value:0
end
{end}

{card:CRUD}
image:"%%[encoded data, 4476 characters]"
script:"CRUD.0"
{widgets}
field1:{"type":"field","size":[172,40],"pos":[334,21],"font":"deckbuilder","show":"invert","border":0,"align":"center","value":"CRUD"}
field2:{"type":"field","size":[171,230],"pos":[335,66],"show":"invert","scrollbar":1,"value":{"text":["","Task:","\n\nBuild a frame containing the following elements: a textfield Tprefix, a pair of textfields Tname and Tsurname, a listbox L, and buttons BC, BU and BD.\n\nL presents a view of the data in the database that consists of a list of names. At most one entry can be selected in L at a time. By entering a string into Tprefix the user can filter the names whose surname start with the entered prefix   this should happen immediately without having to submit the prefix with enter. Clicking BC will append the resulting name from concatenating the strings in Tname and Tsurname to L. BU and BD are enabled iff an entry in L is selected. In contrast to BC, BU will not append the resulting name but instead replace the selected entry with the new name. BD will remove the selected entry.\n\n","Remarks:","\n\nSince we need to support filtering, L cannot be the authoritative storage location for the the \"database\" in this task. Instead we have an auxiliary table stored in a grid called \"data\". In practice, this grid could be made invisible."],"font":["","menu","","menu",""],"arg":["","","","",""]}}
button1:{"type":"button","size":[85,33],"pos":[335,302],"script":"Counter.0","show":"invert","text":"Back","style":"rect"}
button2:{"type":"button","size":[81,33],"pos":[426,302],"script":"CRUD.1","show":"invert","text":"Reset","style":"rect"}
Tprefix:{"type":"field","size":[100,20],"pos":[120,162],"script":"CRUD.2","style":"plain"}
Tname:{"type":"field","size":[73,19],"pos":[213,201],"style":"plain","value":"Hans"}
Tsurname:{"type":"field","size":[73,21],"pos":[213,229],"style":"plain","value":"Emil"}
field3:{"type":"field","size":[48,14],"pos":[163,204],"border":0,"style":"plain","value":"Name:"}
field4:{"type":"field","size":[48,15],"pos":[163,232],"border":0,"style":"plain","value":"Surname:"}
field5:{"type":"field","size":[65,14],"pos":[53,165],"border":0,"style":"plain","value":"Filter prefix:"}
BC:{"type":"button","size":[60,20],"pos":[53,276],"script":"CRUD.3","text":"Create"}
BU:{"type":"button","size":[60,20],"pos":[122,276],"script":"CRUD.4","text":"Update"}
BD:{"type":"button","size":[60,20],"pos":[191,276],"script":"CRUD.5","text":"Delete"}
L:{"type":"grid","size":[100,58],"pos":[54,200],"headers":0,"lines":0,"value":{"name":["Emil, Hans","Mustermann, Max","Tisch, Roman"]},"row":0}
data:{"type":"grid","size":[131,99],"pos":[106,34],"value":{"name":["Emil, Hans","Mustermann, Max","Tisch, Roman"]},"row":3}

{script:CRUD.0}
on fullname do
 "%s, %s" format Tsurname.text,Tname.text
end

on selname do
 "" unless first L.rowvalue
end

on view do
 L.value: select where name like "*%s*" format Tprefix.text from data.value
 val:     "%s, %s" parse selname[]
 Tname.text:    last val
 Tsurname.text: first val
 BU.locked:BD.locked: L.row<0
end

on click do
 view[]
end
{end}

{script:CRUD.1}
on click do
 data.value:insert name with "Emil, Hans" "Mustermann, Max" "Tisch, Roman" end
 Tfilter.text:""
 view[]
end
{end}

{script:CRUD.2}
on change val do
 view[]
end
{end}

{script:CRUD.3}
on click do
 data.value:insert name with fullname[] into data.value
 view[]
end
{end}

{script:CRUD.4}
on click do
 data.value: update name:fullname[] where name=selname[] from data.value
 view[]
end
{end}

{script:CRUD.5}
on click do
 data.value: select where !name=selname[] from data.value
 view[]
end
{end}

