------------------------------------------------------------------ --# GtkVolumeButton ------------------------------------------------------------------ include GtkEngine.e constant docs = ` GtkVolumeButton Pop-up slider to change sound volume. Shows a speaker icon which varies its appearance corresponding to the volume setting. This demo is not connected to the computer's sound system, so will not actually change the volume. ` constant win = create(GtkWindow, "size=300x100,border_width=10,position=1,keep above=1,$destroy=Quit") constant panel = create(GtkBox,"orientation=VERTICAL") add(win,panel) constant img = create(GtkImage,"thumbnails/emblem-sound.png") add(panel,img) constant lbl = create(GtkLabel,{ {"markup",docs}}) add(panel,lbl) constant btnbox = create(GtkButtonBox) add(panel,btnbox) constant btn = create(GtkVolumeButton,"size=6,value=.5,$value-changed=Update") add(btnbox,btn) show_all(win) main() ------------------------------------------------ global function Update() ------------------------------------------------ printf(1,"%2.2f\n",get(btn,"value")) return 1 end function