added eugtk examples

This commit is contained in:
2016-11-25 00:33:18 -07:00
parent 87a821e3da
commit c0b98b619e
877 changed files with 96872 additions and 0 deletions

37
eugtk/examples/test128.ex Normal file
View File

@@ -0,0 +1,37 @@
-----------------------------------------------------------------
--# GtkScale
-----------------------------------------------------------------
include GtkEngine.e
constant docs = `<u><b>GtkScale</b></u>
Try clicking with left, middle and right mouse buttons on
the scale slider at various places to see what happens.
Also try mouse scroll wheel.
`
constant win = create(GtkWindow,"size=250x100,border=10,position=1,$destroy=Quit")
constant panel = create(GtkBox,"orientation=VERTICAL")
add(win,panel)
constant scale = create(GtkScale,{
{"orientation",HORIZONTAL},
{"range",0,100},
{"increments",12.5,25}, -- step, page
{"digits",0},
{"draw value",TRUE},
{"value pos",GTK_POS_BOTTOM}})
pack(panel,scale,TRUE,TRUE,10)
constant caps = {"Empty","One Quarter","One Half","Three Quarters","Full"}
for i = 0 to length(caps)-1 do
set(scale,"add mark",i*25,GTK_POS_TOP,caps[i+1])
end for
constant lbl = create(GtkLabel)
set(lbl,"markup",docs)
add(panel,lbl)
show_all(win)
main()