----------------- namespace pref -- used by main.ex ----------------- include GtkEngine.e ifdef WINDOWS then add(builder,"pref.glade") elsedef add(builder,"~/demos/glade/pref.glade") end ifdef ----------------------------------------------------------------------- export function show(atom ctl, atom data) ----------------------------------------------------------------------- set("pref:window1","visible",TRUE) -- use the namespace:name in string form return 1 end function ------------------------------------------------------------------------ export function set_color(atom ctl, atom data) ------------------------------------------------------------------------ if get(ctl,"active") then -- handle 3 buttons, btn name contains color name to use set("pref:label1","color",get(ctl,"label")) end if return 1 end function ----------------------------------------------------------------------- export function value_changed(atom scale, atom data) ----------------------------------------------------------------------- set("pref:window1","background",get(scale,"value")) -- use the handles, not names return 1 end function ----------------------------------------------------------------------- export function apply(atom ctl, atom data) ----------------------------------------------------------------------- -- apply settings here...then set("pref:window1","visible",FALSE) return 1 end function ----------------------------------------------------------------------- export function cancel(atom ctl, atom data) ----------------------------------------------------------------------- -- abandon changes, just hide me; set("pref:window1","visible",FALSE) return 1 end function