-------------------------------------- -- FontButton Aug.4, 2008 -------------------------------------- include GtkEngine.e include GtkRoutines.e include dll.e --------------------------------- function Foo(atom ctl, atom lbl) --------------------------------- object fntname = get(ctl,"font name") set(lbl,"modify font",Font(fntname)) set(lbl,"markup","The font you are seeing is\n" & fntname) return 1 end function constant foo = call_back(routine_id("Foo")) constant win = create(GtkWindow) connect(win,"destroy",quit) set(win,"default size",300,200) set(win,"position",1) constant panel = create(GtkVBox) add(win,panel) constant label1 = create(GtkLabel) set(label1,"markup","Click button below to change font") add(panel,label1) constant fontbtn = create(GtkFontButton) connect(fontbtn,"font-set",foo,label1) pack(panel,fontbtn) show_all(win) main() -------------------------------------------------------------- -- copyright 2008 by Irv Mullins, code released under the LGPL --------------------------------------------------------------