Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/User-input-Graphical/BaCon/user-input-graphical.bacon
Normal file
25
Task/User-input-Graphical/BaCon/user-input-graphical.bacon
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
OPTION GUI TRUE
|
||||
PRAGMA GUI gtk3
|
||||
|
||||
DECLARE text TYPE STRING
|
||||
DECLARE data TYPE FLOATING
|
||||
|
||||
gui = GUIDEFINE(" \
|
||||
{ type=WINDOW name=window callback=delete-event title=\"Rosetta Code\" width-request=300 } \
|
||||
{ type=BOX name=box parent=window orientation=GTK_ORIENTATION_VERTICAL } \
|
||||
{ type=ENTRY name=entry parent=box margin=4 callback=activate } \
|
||||
{ type=SPIN_BUTTON name=spin parent=box margin=4 numeric=TRUE } \
|
||||
{ type=BUTTON_BOX name=bbox parent=box } \
|
||||
{ type=BUTTON name=button parent=bbox margin=4 callback=clicked label=\"Exit\" }")
|
||||
|
||||
CALL GUISET(gui, "spin", "adjustment", gtk_adjustment_new(75000, 0, 100000, 1, 1, 0))
|
||||
|
||||
REPEAT
|
||||
event$ = GUIEVENT$(gui)
|
||||
UNTIL event$ = "button" OR event$ = "window"
|
||||
|
||||
CALL GUIGET(gui, "entry", "text", &text)
|
||||
PRINT text FORMAT "Entered: %s\n"
|
||||
|
||||
CALL GUIGET(gui, "spin", "value", &data)
|
||||
PRINT data FORMAT "Entered: %g\n"
|
||||
Loading…
Add table
Add a link
Reference in a new issue