diff --git a/eugtk/examples/.httpd.css b/eugtk/examples/.httpd.css new file mode 100644 index 0000000..33137b6 --- /dev/null +++ b/eugtk/examples/.httpd.css @@ -0,0 +1,11 @@ +/* +-- ==================================================================== +-- Styling for the remote display is set here; +-- ==================================================================== +*/ + +button {width: 100%;} +button.dir {background-color: skyblue;} +button.html {background-color: orange;} + +body {background-image: linear-gradient(180deg, yellow, blue); background-repeat: no-repeat;) diff --git a/eugtk/examples/BEAR.ex b/eugtk/examples/BEAR.ex new file mode 100644 index 0000000..b1321d2 --- /dev/null +++ b/eugtk/examples/BEAR.ex @@ -0,0 +1,845 @@ + +------------------------------------------------------------------------------- +--# BEAR (Browse, Edit And Run) +------------------------------------------------------------------------------- +-- Requires EuGTK version 4.11.10, GtkSourceView and WebKit2Gtk libraries. +-- You may have to manually change the names of the libraries in GtkSourcView.plugin +-- and/or GtkWebKit.plugin! + +include GtkEngine.e +include GtkFileSelector.e +include GtkFontSelector.e + +include GtkSettings.e + +include GtkWebKit.plugin +include GtkSourceView.plugin +include GtkAboutDialog.e + +include std/net/url.e +include std/net/http.e + +------------------------------ +-- Globals +------------------------------ + +object current_web_page = "documentation/README.html" +object current_net_page = "" +object current_edit_file = "" +object current_font = "Ubuntu mono 12" +object current_web_folder = "~/demos" +object current_edit_folder = "~/demos" +object current_style = "classic" +object uri, link, lang, tags = {} +object svbuffer, request, lm, edit_html = 0 +constant cb = create(GtkClipboard) +constant ini = canonical_path("~/.bear.ini") +atom sv, menu, m1, m2, m3, m4, m5, sep, context +atom wvsettings, svsettings, controller,sig +integer toggle = 1, show_map = 0 -- map not used + +----------------------------- +-- Styling +----------------------------- +constant css = create(GtkCssProvider,` + @define-color yellow #F5EEB5; + @define-color blue #B5F5F4; + GtkFrame,GtkToolbar {border-radius: 10px; + background-image: + -gtk-gradient (linear, + left top, right bottom, + from(@yellow), to(@blue)); + } +`) + +constant mgr = create(GtkSourceStyleSchemeManager) +constant ids = get(mgr,"scheme ids") +sequence sty = repeat(0,length(ids)) + sty[1] = create(GtkRadioMenuItem,0,ids[1],_("SelectStyle"),ids[1]) + for i = 2 to length(ids) do + sty[i] = create(GtkRadioMenuItem,sty[i-1], + ids[i],_("SelectStyle"),ids[i]) + end for + +---------------------------- +-- Interface +---------------------------- + +constant win = create(GtkWindow,"name=MainWindow,title=The Bear,size=1200x800,border=10,$delete-event=Bail") + +add("MainWindow",create(GtkBox,"name=top,orientation=VERTICAL")) + +pack("top",create(GtkButtonBox,"name=bar,layout=2,margin-bottom=5")) + +add("bar",{ -- these display current file names, captions, and language type; + create(GtkFrame,"name=frame1"), + create(GtkFrame,"name=frame2"), + create(GtkFrame,"name=frame3"), + create(GtkFrame,"name=frame4")}) + + add("frame1",create(GtkLabel,"name=label1,text=URL,font=8")) + add("frame2",create(GtkLabel,"name=label2,text=TITLE,font=8")) + add("frame3",create(GtkLabel,"name=label3,text=LANG,font=8")) + add("frame4",create(GtkLabel,"name=label4,text=FILE,font=8")) + + +pack("top",create(GtkPaned,"name=paned,orientation=HORIZONTAL,position=600"),TRUE,TRUE) + set("paned","pack1",create_webview(),1,1) -- left side contains web view; + + set("paned","pack2",create(GtkBox,"name=pane2,orientation=VERTICAL"),TRUE,TRUE) + pack("pane2",create_sourceview(),1,1) -- right side contains source view; + + pack_end("top",create(GtkBox,"name=control_box,orientation=HORIZONTAL,spacing=5")) + pack("control_box",{ -- container for controls at bottom of screen; + create(GtkFrame,"name=frame5,label=Web Page"), + create(GtkFrame,"name=frame6,label=Source")},TRUE,TRUE) + + add("frame5",create(GtkToolbar,"name=bar1,style=2,icon size=1,font=8")) + add("bar1",{ -- buttons for web page navigation; + create(GtkToolButton,"name=netOpen,icon_name=www,label=Network",,_("OpenNetPage")), + create(GtkToolButton,"name=htmlOpen,stock-id=gtk-open,label=Local",,_("OpenWebPage")), + create(GtkToolButton,"name=htmlEdit,stock-id=gtk-edit",,_("EditHtml")), + create(GtkToolButton,"name=htmlBack,stock-id=gtk-go-back",,_("Back")), + create(GtkToolButton,"name=htmlFwd,stock-id=gtk-go-forward",,_("Fwd")), + create(GtkToolButton,"name=htmlFind,stock-id=gtk-find",,_("Find")), + create(GtkToolButton,"name=zoomOut,stock-id=gtk-zoom-out",,_("ZoomOut")), + create(GtkToolButton,"name=zoomIn,stock-id=gtk-zoom-in",,_("ZoomIn")), + create(GtkToolButton,"name=htmlHelp,stock-id=gtk-help",,_("Help"))}) + + add("frame6",create(GtkToolbar,"name=bar2,style=2,icon size=1,font=8")) + add("bar2",{ -- buttons for source view navigation; + create(GtkToolButton,"name=srcNew,stock-id=gtk-new",,_("fileNew")), + create(GtkToolButton,"name=srcOpen,stock-id=gtk-open",,_("fileOpen")), + create(GtkToolButton,"name=srcSave,stock-id=gtk-save",,_("fileSave")), + create(GtkToolButton,"name=srcSaveAs,stock-id=gtk-save-as",,_("fileSaveAs")), + create(GtkToolButton,"name=srcRun,stock-id=gtk-execute",,_("fileRun")), + create(GtkSeparatorToolItem,"draw=TRUE,expand=TRUE"), + create(GtkMenuToolButton,"name=srcMenu,stock-id=gtk-preferences"), + create(GtkToolButton,"name=srcAbout,stock-id=gtk-about",,_("About"))}) + connect("srcMenu","clicked",_("Preferences")) + + set("srcMenu","menu",build_prefs_menu()) + connect("srcMenu","clicked",_("PopupSrcMenu")) + connect("MainWindow","realize",_("on_startup")) + +show_all("MainWindow") +--set("MainWindow","interactive debugging",1) +main() + +------------------ +function fileNew() +------------------ +fileselector:do_overwrite_confirmation = TRUE +fileselector:filters = {"euphoria","html","text"} +object f = fileselector:New() + if not atom(f) then + create_file(f) + end if +return 1 +end function + +-------------------- +function fileOpen() +-------------------- +fileselector:filters = {"euphoria","html","css","text"} +object f = fileselector:Open(current_edit_folder & "/*") +if not atom(f) then + load_file(f) + current_edit_folder = pathname(f) +end if +return 1 +end function + +-------------------- +function fileSave() +-------------------- +object f +atom fn + +fileselector:do_overwrite_confirmation = FALSE + +if match("http://",current_edit_file) = 1 then + f = fileselector:Save(canonical_path(filename(fix(decode(current_edit_file))))) + +else + f = canonical_path(get("label4","text")) + fileselector:filters = {fileext(f)} & {"text"} + chdir(pathname(f)) + f = fileselector:Save(f) +end if + +if string(f) then + + fn = open(f,"w") + write_file(fn,get(svbuffer,"text"),TEXT_MODE) + flush(fn) + close(fn) + + if match("htm",fileext(f)) = 1 then + set("WebView","reload bypass cache") + current_web_folder = pathname(f) + else + current_edit_folder = pathname(f) + end if +end if +return 1 +end function + +----------------------- +function fileSaveAs() +----------------------- +fileselector:do_overwrite_confirmation = TRUE + +object f = filename(current_edit_file) +fileselector:filters = {fileext(f)} & {"text"} + +f = fileselector:SaveAs(f & ".backup") +if string(f) then + write_file(f,get(svbuffer,"text"),TEXT_MODE) + if match("htm",fileext(f)) = 1 then + current_web_folder = pathname(f) + else + current_edit_folder = pathname(f) + end if +end if +return 1 +end function + +------------------ +function fileRun() +------------------ +object f = current_edit_file +object cmd = command_line() +atom fn + cmd = pathname(get("label4","text")) + f = filebase(f) + object tmp = temp_file(canonical_path("~/"),sprintf("tmp/%s_",{f}),"ex",1) + if not file_exists(canonical_path("~/tmp")) then + create_directory(canonical_path("~/tmp"),448,1) + end if + fn = open(tmp,"w") + write_file(fn,get(svbuffer,"text"),TEXT_MODE) + flush(fn) + close(fn) + setenv("EUINC",canonical_path("~/demos")) + system(text:format("eui [] & ",{tmp}),0) +return 1 +end function + +------------------------------- +function create_file(object f) +------------------------------- +object hdr + lang = get(lm,"guess language",f) + set(svbuffer,"language",lang) + name = get(lang,"name") + switch name do + case "Euphoria" then hdr = euhdr + case "Python" then hdr = pyhdr + case ".ini" then hdr = inihdr + case "C","CSS","C++","C/C++/ObjC Header" then hdr = chdr + case else hdr = "-- []\n\n" + end switch + set(svbuffer,"text",format(hdr,{f})) + set("label3","text",get(lang,"name")) + set("label4","text",f) + write_file(f,get(svbuffer,"text")) + current_edit_file = f + current_edit_folder = pathname(f) +return update_buttons() +end function + +------------------------------------------- +function load_file(object f, integer web=0) +------------------------------------------- +object txt + if match("file://",lower(f)) then + f = f[8..$] + end if + + if file_exists(canonical_path(f)) then + txt = read_file(canonical_path(f)) + + else + + if not networked() then return Warn(,,"Network down") end if + + if not match("http://",f) = 1 then f = "http://" & f end if + + txt = http_get(f) + if atom(txt) then + Error(,,"Error %d loading %s ",{txt,f}) + return -1 + else + txt = txt[2] + end if + + end if + + lang = get(lm,"guess language",f) + set(svbuffer,"language",lang) + set(svbuffer,"text",txt) + set("label3","text",get(lang,"name")) + set("label4","text",f) + current_edit_file = f + current_edit_folder = pathname(f) + +return update_buttons() +end function + +---------------------- +function fix(object x) +---------------------- + if match("#",x) then + x = split(x,'#') + x = x[1] + end if + if match("file:",x) = 1 then + return x[8..$] + end if + if match("http:",x) = 1 then + return x[8..$] + end if + if match("https:",x) = 1 then + return x[9..$] + end if +return x +end function + +----------------------- +function Back(atom ctl) +----------------------- + set("WebView","go back") +return update_buttons() +end function + +---------------------- +function Fwd(atom ctl) +---------------------- + set("WebView","go forward") +return update_buttons() +end function + +--------------- +function Undo() +--------------- + set(svbuffer,"undo") +return update_buttons() +end function + +--------------- +function Redo() +--------------- + set(svbuffer,"redo") +return update_buttons() +end function + +------------------ +function ZoomIn() +------------------ + set("WebView","zoom level",get("WebView","zoom level") + .1) +return 1 +end function + +------------------ +function ZoomOut() +------------------ + set("WebView","zoom level",get("WebView","zoom level") - .1) +return 1 +end function + +------------------------- +function update_buttons() +------------------------- +integer x = get(svbuffer,"char count") + set("netOpen","sensitive",networked()) + set("srcSave","sensitive",x) + set("srcSaveAs","sensitive",x) + set("srcRun","sensitive",x) + if string(current_edit_file) + and equal("ex",fileext(current_edit_file)) then + set("srcRun","sensitive",equal("ex",fileext(current_edit_file))) + else + set("srcRun","sensitive",FALSE) + end if +object uri = get("WebView","uri") + if sequence(uri) and match("htm",uri) then + set("htmlEdit","tooltip text",uri) + set("label1","text",uri) + set("label2","text",get("WebView","title")) + end if +return 1 +end function + +----------------------- +function OpenNetPage() +----------------------- +atom dlg = create(GtkDialog) +set(dlg,"add button","gtk-cancel",MB_CANCEL) +set(dlg,"add button","gtk-ok",MB_OK) +atom ca = get(dlg,"content area") +atom lbl = create(GtkLabel," Enter a web address beginning with http:// ") +atom input = create(GtkEntry) +add(ca,{lbl,input}) +show_all(dlg) + +if match("file://",current_net_page) = 1 then + set(input,"text","") +elsif match("http://",current_net_page) = 1 then + set(input,"text",current_net_page) +else + set(input,"text","http://" & current_net_page) +end if + +object uri, request +if run(dlg) = MB_OK then + uri = get(input,"text") + if length(uri) > 0 then + request = create(WebkitUriRequest,decode(uri)) + set("WebView","load request",request) + end if +end if + +destroy(dlg) +return 0 +end function + +----------------------- +function OpenWebPage() +----------------------- +fileselector:filters = {"html","css"} +object f = fileselector:Open(current_web_folder & "/*") + if not atom(f) then + load_html(f) + current_web_folder = pathname(f) + end if +return 1 +end function + +---------------------------- +function load_html(object x) +---------------------------- +x = canonical_path(x) +if file_type(x) = 1 then + set(svsettings,"search text",0) + request = create(WebkitUriRequest,"file://" & x) + set("WebView","load request",request) + set("label1","text",x) +end if +return 1 +end function + +-------------------------------------------------- +function on_load_changed(atom view, integer event) +-------------------------------------------------- +object uri, ext = "?", x = 0 +object editables = {"e","ex","txt","text","ini","css","xml","glade","c","cpp","h"} + + set(svsettings,"search text","") + + switch event do + case WEBKIT_LOAD_STARTED then + uri = decode(get("WebView","uri")) + ext = fileext(filename(uri)) + if find(ext,editables) then + set("WebView","stop loading") + load_file(uri,0) + end if + + case WEBKIT_LOAD_REDIRECTED then + + case WEBKIT_LOAD_COMMITTED then + + case WEBKIT_LOAD_FINISHED then + uri = decode(get("WebView","uri")) + if find(ext,editables) = 0 then + current_web_page = uri + end if + current_net_page = uri + + end switch + edit_html = 0 + +return update_buttons() +end function + +-------------------------- +function EditHtml() +-------------------------- +object f = canonical_path(fix(get("label1","text"))) +edit_html = 1 +if file_exists(f) then + object txt = read_file(f) + if not atom(txt) then + load_file(f,1) + end if +else + f = get("WebView","uri") + if match("#",f) then + f = split(f,'#') + f = f[1] + end if + object content = http_get(f) + if atom(content) then + Error(,,"Cannot load web page",f) + else + lang = get(lm,"guess language",f) + set(svbuffer,"language",lang) + set("label3","text",get(lang,"name")) + set("label4","text",f) + set(svbuffer,"text",content[2]) + current_edit_file = f + update_buttons() + end if +end if +return 1 +end function + +-------------------------- +function create_webview() +-------------------------- +atom webview = create(WebkitWebView,"name=WebView") +atom vset = get(webview,"settings") + set(vset,{ + {"enable tabs to links",TRUE}, + {"zoom text only",FALSE}, + {"enable developer extras",TRUE}, + {"enable smooth scrolling",TRUE}, + {"enable_caret_browsing",TRUE}, + {"draw_compositing_indicators",TRUE}, + $}) + + connect(webview,"load-changed",_("on_load_changed")) + + wvsettings = get(webview,"settings") + set(wvsettings,"enable plugins",1) + set(wvsettings,"zoom text only",1) + set(wvsettings,"enable smooth scrolling",1) + --set(wvsettings,"auto load images",0) + --set(wvsettings,"enable write console messages to stdout",1) + --set(wvsettings,"enable spatial navigation",1) + --set(wvsettings,"enable tabs to links",1) + --set(wvsettings,"enable xss auditor",1) + --set(wvsettings,"minimum font size",12) + --set(wvsettings,"draw compositing indicators",1) + set(wvsettings,"enable html5 database",1) + set(wvsettings,"enable html5 local storage",1) + set(wvsettings,"enable hyperlink auditing",1) + + controller = get(webview,"find controller") + +-- following are not implemented by webview yet; + --context = get(webview,"context") + --set(context,"preferred languages",{"en_US"}) + --set(context,"spell checking languages",{"en_US"}) + --set(context,"spell checking enabled",TRUE) + +return webview +end function + +--------------- +function Find() +--------------- +atom buffer = get(context,"buffer") +object a = allocate(100) +object b = allocate(100) +object c = allocate(100) +object x, count +integer try = 1 +atom fn = define_c_func(LIBSV,"gtk_source_search_context_forward",{P,P,P,P},I) +object txt = get(cb,"wait for text") +label "retry" +c_proc(fnBufStart,{buffer,a}) +c_proc(fnBufEnd,{buffer,b}) + if string(txt) then + txt = transmute(txt, + {{},"<",">","&"}, + {{},"<",">","&"}) + txt = join(split(txt),"\\s+") + set(svsettings,"regex enabled",1) + set(svsettings,"search text",txt) + + count = get(context,"occurrences count") + if count = -1 then + try += 1 + if try > 20 then + return 0 + end if + goto "retry" + else + +-- if count > 1 then +-- if show_map then +-- set("map","deiconify") +-- set("map","present") +-- end if +-- else +-- if show_map then +-- set("map","iconify") +-- end if +-- end if + + x = c_func(fn,{context,a,b,c}) + set(sv,"scroll to iter",b,.25,1,0,0) + + end if +end if +return 1 +end function + +----------------------------- +function create_sourceview() +----------------------------- + atom scroller = create(GtkScrolledWindow) + sv = create(GtkSourceView,{ + {"name","SrcView"}, + {"show line numbers",TRUE}, + {"tab width",4}, + {"indent width",4}, + {"indent on tab",TRUE}, + {"auto indent",TRUE}, + {"font","Ubuntu mono bold 12"}, + {"show right margin",TRUE}, + {"show line marks",TRUE}, + {"draw spaces",FALSE}, + {"insert spaces instead of tabs",FALSE}, + {"right margin position",90}, + {"highlight current line",TRUE}, + {"wrap mode",GTK_WRAP_NONE}}) + add(scroller,sv) + + set(sv,"font",current_font) + +-- map is commented out since only the latest WebView supports maps; + +-- atom win2 = create(GtkWindow,"name=map,border=10,size=80x800") +-- atom smap = create(GtkSourceMap,"font=Ubuntu mono 4") +-- +-- set(smap,"view",sv) +-- add(win2,smap) +-- set(win2,"deletable",0) +-- set(win2,"move",0,0) +-- set(win2,"decorated",0) +-- show_all(win2) +-- set(win2,"visible",show_map) +-- + svbuffer = get(sv,"buffer") + + lm = create(GtkSourceLanguageManager) + svsettings = create(GtkSourceSearchSettings) + context = create(GtkSourceSearchContext,svbuffer,svsettings) + + set(svsettings,"at word boundaries",0) + set(svsettings,"case sensitive",1) + + atom tt = get(svbuffer,"tag table") + set(tt,"foreach",_("get_tags")) + set(tags[1],"background","red") + set(tags[1],"foreground","white") + set(tags[1],"font","bold") +return scroller +end function + +function get_tags(atom tt) + register(tt,GtkTextTag) + tags = append(tags,tt) +return 1 +end function + +------------------------------------ +function ToggleMap() +------------------------------------ +-- show_map = not(show_map) +-- if show_map then set("map","deiconify") +-- else set("map","iconify") +-- end if +return 1 +end function + +------------------------------------ +function ToggleLineNumbers(atom ctl) +------------------------------------ + set("SrcView","show line numbers",get(ctl,"active")) +return 1 +end function + +------------------------------------ +function ToggleSpaces(atom ctl) +------------------------------------ + if get(ctl,"active") then + set("SrcView","draw spaces",GTK_SOURCE_DRAW_SPACES_ALL) + else + set("SrcView","draw spaces",FALSE) + end if +return 1 +end function + +------------------------------------ +function ChooseFont(atom ctl) +------------------------------------ +fontselector:mono_filter = TRUE +object x = fontselector:Select(current_font) + if not atom(x) then + set("SrcView","font",x) + current_font = x + end if +return 1 +end function + +----------------------------- +function build_prefs_menu() +----------------------------- + menu = create(GtkMenu) + m1 = create(GtkMenuItem,"Editor font",_("ChooseFont")) + m2 = create(GtkCheckMenuItem,"Line numbers",_("ToggleLineNumbers")) + m3 = create(GtkCheckMenuItem,"Draw spaces+tabs",_("ToggleSpaces")) + m4 = create(GtkCheckMenuItem,"Show Map",_("ToggleMap")) + + atom sep1 = create(GtkSeparatorMenuItem) + atom sep2 = create(GtkSeparatorMenuItem) + + set(menu,"append",{m1,sep1,m2,m3,sep2,sty}) + set(m2,"name","ShowLineNumbers") + set(m2,"active",get("SrcView","show line numbers")) + set(m3,"name","DrawSpaces") + set(m3,"active",get("SrcView","draw spaces")) + set(m4,"name","ShowMap") + set(m4,"active",show_map) + set(menu,"name","popup_menu") + show_all(menu) +return menu +end function + +-------------------------------------------- +function SelectStyle(atom ctl, object name) +-------------------------------------------- +if atom(name) then name = unpack(name) end if +atom scheme = get(mgr,"scheme",name) +set(svbuffer,"style scheme",scheme) +set(mgr,"force rescan") +current_style = name +return 1 +end function + +----------------------------- +function Help() +----------------------------- +object uri = "file://" & canonical_path("~/demos/documentation/bear.html") + set("WebView","load uri",uri) +return 1 +end function + +----------------------------- +function About() +----------------------------- +atom dlg = about:Dialog + set(dlg,"program name","The Bear") + set(dlg,"version","Version 1.3") + set(dlg,"logo","thumbnails/mongoose.png") + set(dlg,"add credit section","Using:", + {"Euphoria " & version_string_short(),filename(svdll),filename(wkdll)}) + run(dlg) + hide(dlg) +return 1 +end function + +----------------------------- +function PopupSrcMenu() +------------------------------- + set("popup_menu","popup") +return 1 +end function + +------------------------------- +function on_startup() +------------------------------- +settings:Load(ini) + +object x = get("MainWindow","data","edit_file") +if sequence(x) and length(x) > 0 and file_exists(canonical_path(x)) then + load_file(canonical_path(x),1) +end if + +x = get("MainWindow","data","current_web_folder") +if sequence(x) and length(x) > 0 then + current_web_folder = x +end if + +x = get("MainWindow","data","current_net_page") +if sequence(x) and length(x) > 0 then + current_net_page = fix(x) + load_html(current_net_page) +end if + +x = get("MainWindow","data","current_edit-folder") +if sequence(x) and length(x) > 0 then + current_edit_folder = x +end if + +x = get("MainWindow","data","current_style") +if sequence(x) and length(x) > 0 then + current_style = x + x = find(current_style,ids) + if x > 0 and x <= length(sty) then + set(sty[x],"active",1) + end if +end if + + +set("netOpen","tooltip text","Open a web page on the WWW") +set("htmlOpen","tooltip text","Open a local html file") +set("srcOpen","tooltip text","Open a local text file") + +return 1 +end function + +------------------------------- +global function Bail() +------------------------------- + settings:Save(ini,{"MainWindow","paned","ShowLineNumbers","DrawSpaces","FontSelector"}) + settings:Add(ini,"MainWindow","data.edit_file",fix(current_edit_file)) + settings:Add(ini,"MainWindow","data.current_web_folder",current_web_folder) + settings:Add(ini,"MainWindow","data.current_net_page",fix(get("label1","text"))) + settings:Add(ini,"MainWindow","data.current_edit_folder",current_edit_folder) + settings:Add(ini,"MainWindow","data.current_style",current_style) + settings:Add(ini,"SrcView","font",get("FontSelector","font")) + + -- line above sets the sv font on loading, but there's no direct way to + -- save the sv font on exit, so we save the FontSelector current font instead, + -- and use that value to restore the sv font. + +return Quit() +end function + + +-- Boilerplate for new files; + +constant euhdr = ` +---------------------------- +-- [] +---------------------------- + + +` +constant inihdr = ` +;--------------------------- +; [] +;--------------------------- + + +` +constant pyhdr = ` +#----------------------------- +# [] +#----------------------------- + + +` +constant chdr = ` +/* + [] +*/ + +` +--========================================================================-- + diff --git a/eugtk/examples/GtkAboutDialog.e b/eugtk/examples/GtkAboutDialog.e new file mode 100644 index 0000000..3176199 --- /dev/null +++ b/eugtk/examples/GtkAboutDialog.e @@ -0,0 +1,39 @@ + +------------------- +namespace about -- Generic About dialog +------------------- + +export constant version = "4.12.0" + +--# EXPORTS: about:Dialog -- use run(about:Dialog), not show() + +include GtkEngine.e +public include euphoria/info.e + +if not equal(version,gtk:version) then + Error(,,"GtkAboutDialog version mismatch","should be version " & gtk:version) +end if + +export atom Dialog = create(GtkAboutDialog,{ + {"name","about:dialog"}, + {"logo","thumbnails/eugtk.png"}, + {"program name",prg_name}, + {"version","EuGTK version: " & gtk:version}, + {"copyright",copyright}, + {"comments","For information on the Euphoria\nprogramming language, click below"}, + + -- must specify custom as the license type if supplying license text; + {"license type",GTK_LICENSE_CUSTOM}, + {"license",LGPL}, -- LGPL text is built into EuGTK + {"wrap license",0}, + + {"website","http://OpenEuphoria.org"}, + {"website label","OpenEuphoria"}, + {"authors",{"Irv Mullins"}}, + + --{"artists",0}, + --{"documenters",0}, + --{"translator credits",0}, + --{"add credit section","Special Thanks to",{"\nBob's Burgers\nDuff's Beer"}}, + $}) + diff --git a/eugtk/examples/GtkCairo.e b/eugtk/examples/GtkCairo.e new file mode 100644 index 0000000..24126d1 --- /dev/null +++ b/eugtk/examples/GtkCairo.e @@ -0,0 +1,643 @@ + +---------------------------- +namespace cairo +---------------------------- + +export constant version = "4.12.0" + +include GtkEngine.e + +if not equal(version,gtk:version) then + Error(,,"GtkCairo version mismatch","should be version " & gtk:version) +end if + +export constant pango_version = gtk_str_func("pango_version_string") + +widget[GdkCairo_t] = {"gdk_cairo", +{Cairo_t}, + {"new",{P},-routine_id("newGdkCairo")}, + {"draw_from_gl",{P,P,I,I,I,I,I,I,I}}, -- 3.16 + {"get_clip_rectangle",{P},-routine_id("getClipRect")}, + {"set_source_pixbuf",{P,P,D,D}}, + {"set_source_window",{P,P,D,D}}, + {"region",{P,P}}, + {"region_create_from_surface",{P},P}, + {"surface_create_from_pixbuf",{P,I,P},P,0,CairoSurface_t}, + {"set_source_rgba",{P,I,I,I,D},-routine_id("setCairoRGBA")}, + {"set_color",{P,P},-routine_id("setCairoColor")}, +"GdkCairo_t"} + + function getClipRect(atom cr) + atom fn = define_func("gdk_cairo_get_clip_rectangle",{P,P},B) + atom rect = allocate(8,1) + if c_func(fn,{cr,rect}) then + return rect + else return -1 + end if + end function + + function newGdkCairo(atom win) + return gtk_func("gdk_cairo_create",{P},{win}) + end function + + ---------------------------------------------------------------- + -- to use the Cairo color specs, where colors are 0.0 => 1.0 + ---------------------------------------------------------------------- + function setCairoRGBA(atom cr, atom r, atom g, atom b, atom a=1) + gtk_proc("cairo_set_source_rgba",{P,D,D,D,D},{cr,r,g,b,a}) + return 1 + end function + + -------------------------------------------- + -- it's easier to use named colors + -------------------------------------------- + function setCairoColor(atom cr, object color) + if atom(color) then color = sprintf("#%06x",color) end if + color = to_rgba(color) + color = from_rgba(color,7) + setCairoRGBA(cr,color[1],color[2],color[3],color[4]) + return 1 + end function + +widget[Cairo_t] = {"cairo", +{GObject}, + {"create",{P},P}, + {"reference",{P},P}, + {"destroy",{P}}, + {"status",{P},I}, + {"save",{P}}, + {"restore",{P}}, + {"get_target",{P},P,0,CairoSurface_t}, + {"push_group",{P}}, + {"push_group_with_content",{P,P}}, + {"pop_group",{P},P}, + {"pop_group_to_source",{P}}, + {"get_group_target",{P},P}, + {"set_source_rgb",{P,D,D,D}}, + {"set_source",{P,P}}, + {"get_source",{P},P}, + {"set_source_surface",{P,P,D,D}}, + {"set_antialias",{P,I}}, + {"get_antialias",{P},I}, + {"set_dash",{P,P,I,D}}, + {"get_dash_count",{P},I}, + {"get_dash",{P,D,D}}, + {"set_fill_rule",{P,I}}, + {"get_fill_rule",{P},I}, + {"set_line_cap",{P,I}}, + {"get_line_cap",{P},I}, + {"set_line_join",{P,I}}, + {"get_line_join",{P},I}, + {"set_line_width",{P,D}}, + {"get_line_width",{P},D}, + {"set_miter_limit",{P,I}}, + {"get_miter_limit",{P},I}, + {"set_operator",{P,I}}, + {"get_operator",{P},I}, + {"set_tolerance",{P,D}}, + {"get_tolerance",{P},D}, + {"clip",{P}}, + {"clip_preserve",{P}}, + {"clip_extents",{P,D,D,D,D}}, + {"in_clip",{P,D,D},B}, + {"reset_clip",{P}}, + {"rectangle_list_destroy",{P}}, + {"fill",{P}}, + {"fill_preserve",{P}}, + {"fill_extents",{P,D,D,D,D}}, + {"in_fill",{P,D,D},B}, + {"mask",{P,P}}, + {"mask_surface",{P,P,D,D}}, + {"paint",{P}}, + {"paint_with_alpha",{P,D}}, + {"stroke",{P}}, + {"stroke_preserve",{P}}, + {"stroke_extents",{P,D,D,D,D}}, + {"in_stroke",{P,D,D},B}, + {"copy_page",{P}}, + {"show_page",{P}}, + {"copy_path",{P},P}, + {"copy_path_flat",{P},P}, + {"path_destroy",{P}}, + {"append_path",{P,P}}, + {"has_current_point",{P},B}, + {"get_current_point",{P,D,D}}, + {"new_path",{P}}, + {"new_sub_path",{P}}, + {"close_path",{P}}, + {"set_user_data",{P,S,P,P},I}, + {"get_user_data",{P,S}}, + {"arc",{P,D,D,D,D,D}}, + {"arc_negative",{P,D,D,D,D,D}}, + {"move_to",{P,D,D}}, + {"rel_move_to",{P,D,D}}, + {"line_to",{P,D,D}}, + {"rel_line_to",{P,D,D}}, + {"rectangle",{P,D,D,D,D}}, + {"glyph_path",{P,I,I}}, + {"text_path",{P,S}}, + {"curve_to",{P,D,D,D,D,D,D}}, + {"rel_curve_to",{P,D,D,D,D,D,D}}, + {"path_extents",{P,D,D,D,D}}, + {"set_font_face",{P,S}}, + {"device_get_type",{P},I}, + {"device_status",{P},I}, + {"status_to_string",{I},S}, + {"translate",{P,D,D}}, + {"scale",{P,D,D}}, + {"rotate",{P,D}}, + {"transform",{P,P}}, + {"translate",{P,D,D}}, + {"scale",{P,D,D}}, + {"rotate",{P,D}}, + {"transform",{P,P}}, + {"set_matrix",{P,P}}, + {"get_matrix",{P,P}}, + {"identity_matrix",{P}}, + {"user_to_device",{P,D,D}}, + {"user_to_device_distance",{P,D,D}}, + {"device_to_user",{P,D,D}}, + {"device_to_user_distance",{P,D,D}}, + {"version",{},I}, + {"version_string",{},S}, + {"set_font_size",{P,D}}, + {"set_font_matrix",{P,P}}, + {"get_font_matrix",{P,P}}, + {"set_font_options",{P,P}}, + {"get_font_options",{P,P}}, + {"select_font_face",{P,S,I,I}}, + {"get_font_face",{P},P}, + {"set_scaled_font",{P,P}}, + {"get_scaled_font",{P},P}, + {"show_glyphs",{P,P}}, + {"show_text_glyphs",{P,S,I,P,I,P,I,I}}, + {"font_extents",{P,P}}, + {"text_extents",{P,S,P}}, + {"glyph_extents",{P,P,I,P}}, + {"toy_font_face_create",{S,I,I},P}, + {"toy_font_face_get_slant",{P},I}, + {"toy_font_face_get_weight",{P},I}, + {"glyph_allocate",{I},P}, + {"glyph_free",{P}}, + {"text_cluster_allocate",{I},P}, + {"text_cluster_free",{P}}, + {"show_text",{P,S}}, + {"set_source_rgba",{P,D,D,D,D},-routine_id("setCairoRGBA")}, + {"set_color",{P,S},-routine_id("setCairoColor")}, + {"should_draw_window",{P,P},-routine_id("CairoShouldDrawWin")}, + {"transform_to_window",{P,P,P},-routine_id("CairoTransformToWin")}, +"Cairo_t"} + + function CairoShouldDrawWin(atom cr, atom win) + return gtk_func("gtk_cairo_should_draw_window",{P,P},{cr,win}) + end function + + function CairoTransformToWin(atom cr, atom win1, atom win2) + gtk_proc("gtk_cairo_transform_to_window",{P,P,P},{cr,win1,win2}) + return 1 + end function + +widget[CairoPattern_t] = {0, +{Cairo_t}, +"CairoPattern_t"} + +widget[CairoFontOptions] = {"cairo_font_options", +{0}, +"CairoFontOptions"} + +widget[CairoContent_t] = {0, +{Cairo_t}, +"CairoContent_t"} + +widget[CairoStatus_t] = {0, +{0}, +"CairoStatus_t"} + +widget[CairoPattern] = {"cairo_pattern", +{CairoPattern_t}, + {"new",{P},-routine_id("newCairoPattern")}, + {"add_color_stop_rgb",{P,D,D,D,D}}, + {"add_color_stop_rgba",{P,D,D,D,D,D}}, + {"get_color_stop_count",{P,I},P,0,CairoStatus_t}, + {"get_color_stop_rgba",{P,I,D,D,D,D,D},P,0,CairoStatus_t}, + {"create_rgb",{D,D,D},P,0,CairoPattern_t}, + {"create_rgba",{D,D,D,D},P,0,CairoPattern_t}, + {"get_rgba",{P,D,D,D,D},P,0,CairoPattern_t}, + {"create_for_surface",{P},P,0,CairoPattern_t}, + {"reference",{P},P,0,CairoPattern_t}, + {"destroy",{P}}, + {"status",{P},P,0,CairoStatus_t}, + {"set_extend",{P,I}}, + {"get_extend",{P},I}, + {"set_filter",{P,I}}, + {"get_filter",{P},I}, + {"set_matrix",{P,P}}, + {"get_matrix",{P,P}}, + {"get_type",{P},I}, + {"get_reference_count",{P},I}, +"CairoPattern"} + + function newCairoPattern(atom surf) + return gtk_func("cairo_pattern_create_for_surface",{P},{surf}) + end function + +widget[CairoLinearGradient] = {"cairo_pattern", +{CairoPattern}, + {"new",{D,D,D,D},-routine_id("newLinearGradient"),0,CairoPattern_t}, + {"get_linear_points",{P,D,D,D,D},P,0,CairoStatus_t}, +"CairoLinearGradient"} + + function newLinearGradient(atom a, atom b, atom c, atom d) + return gtk_func("cairo_pattern_create_linear",{D,D,D,D},{a,b,c,d}) + end function + +widget[CairoRadialGradient] = {"cairo_pattern", +{CairoPattern}, + {"new",{D,D,D,D,D,D},-routine_id("newRadialGradient"),0,CairoPattern_t}, + {"get_radial_circles",{P,D,D,D,D,D,D},P,0,CairoStatus_t}, +"CairoRadialGradient"} + + function newRadialGradient(atom a, atom b, atom c, atom d, atom e, atom f) + return gtk_func("cairo_pattern_create_radial",{D,D,D,D,D,D},{a,b,c,d,e,f}) + end function + +widget[CairoRegion_t] = {"cairo_region_t", -- FIXME! +{Cairo_t}, +"CairoRegion_t"} + +widget[CairoSurface_t] = {"cairo_surface_t", +{Cairo_t}, + {"get_write_to_png",{P,S},-routine_id("writetoPNG")}, + {"create_similar",{P,P,I,I},P,0,CairoSurface_t}, + {"create_for_rectangle",{P,D,D,D,D},P,0,CairoSurface_t}, + {"reference",{P},P,0,CairoSurface_t}, + {"destroy",{P}}, + {"finish",{P}}, + {"flush",{P}}, + {"get_font_options",{P,P}}, + {"mark_dirty",{P}}, + {"mark_dirty_rectangle",{P,I,I,I,I}}, + {"show_page",{P}}, +"CairoSurface_t"} + + function writetoPNG(atom surf, object name) -- note difference in call name; + return gtk_func("cairo_surface_write_to_png",{P,S},{surf,name}) + end function + +widget[CairoImageSurface] = {"cairo_image_surface", +{CairoSurface_t}, + {"new",{P},-routine_id("newCairoImageSurface")}, + {"get_format",{P},I}, + {"get_width",{P},P}, + {"get_height",{P},P}, + {"get_stride",{P},I}, +"CairoImageSurface"} + + function newCairoImageSurface(object png) + if string(png) then + png = locate_file(png) if file_type(png) = 1 then + png = allocate_string(png) + end if + end if + return gtk_func("cairo_image_surface_create_from_png",{S},{png}) + end function + +widget[PangoCairoLayout] = {"pango_cairo", +{PangoLayout}, + {"new",{P},-routine_id("newPangoCairoLayout")}, + {"update_layout",{P,P},-routine_id("updateLayout")}, + {"show_glyph_string",{P,P,P}}, + {"show_glyph_item",{P,S,P}}, + {"show_layout_line",{P,P}}, + {"layout_line_path",{P,P}}, + {"layout_path",{P,P}}, +"PangoCairoLayout"} + + function newPangoCairoLayout(atom cr) + atom pcl = gtk_func("pango_cairo_create_layout",{P},{cr}) + register(pcl,PangoLayout) + return pcl + end function + + function updateLayout(atom pl, atom cr) -- params swapped; + gtk_proc("pango_cairo_update_layout",{P,P},{cr,pl}) + return 1 + end function + +widget[PangoFont] = {"pango_font", +{0}, + {"describe",{P},P,0,PangoFontDescription}, + {"describe_with_absolute_size",{P},P,0,PangoFontDescription}, + {"get_coverage",{P,P},P}, + {"get_metrics",{P,P},P}, + {"get_font_map",{P},P,0,PangoFontMap}, +"PangoFont"} + +widget[PangoAttrList] = {"pango_attr_list", +{0}, +"PangoAttrList"} + +widget[PangoFontDescription] = {"pango_font_description", +{PangoFont}, + {"new",{P},-routine_id("newPangoFontDescription")}, + {"copy",{P},P,0,PangoFontDescription}, + {"copy_static",{P},P,0,PangoFontDescription}, + {"hash",{P},I}, + {"equal",{P,P},B}, + {"free",{P}}, + {"set_family",{P,S}}, + {"set_family_static",{P,S}}, + {"get_family",{P},S}, + {"set_style",{P,I}}, + {"get_style",{P},I}, + {"set_variant",{P,I}}, + {"get_variant",{P},P}, + {"set_weight",{P,I}}, + {"get_weight",{P},I}, + {"set_stretch",{P,I}}, + {"get_stretch",{P},I}, + {"set_size",{P,I}}, + {"get_size",{P},I}, + {"set_absolute_size",{P,D}}, + {"get_size_is_absolute",{P},B}, + {"set_gravity",{P,I}}, + {"get_gravity",{P},I}, + {"get_set_fields",{P},I}, + {"unset_fields",{P,I}}, + {"merge",{P,P,B}}, + {"merge_static",{P,P,B}}, + {"better_match",{P,P,P},B}, + -- from_string, see new + {"to_string",{P},S}, + {"to_filename",{P},S}, +"PangoFontDescription"} + + function newPangoFontDescription(object name=0) + if atom(name) then + return gtk_func("pango_font_description_new") + else + return gtk_func("pango_font_description_from_string",{P},{allocate_string(name,1)}) + end if + end function + +widget[PangoContext] = {"pango_context", +{GObject}, + {"new",{},P}, + {"load_font",{P,P},P}, + {"load_fontset",{P,P,P},P}, + {"get_metrics",{P,P,P},P}, + {"list_families",{P,A,I}}, + {"set_font_description",{P,P}}, + {"get_font_description",{P},P,0,PangoFontDescription}, + {"set_font_map",{P,P}}, + {"get_font_map",{P},P}, + {"set_base_gravity",{P,I}}, + {"get_language",{P},P}, + {"set_language",{P,P}}, + {"get_layout",{P},P}, + {"get_base_dir",{P},I}, + {"set_base_dir",{P,I}}, + {"get_base_gravity",{P},I}, + {"set_base_gravity",{P,I}}, + {"get_gravity",{P},I}, + {"get_gravity_hint",{P},I}, + {"set_gravity_hint",{P,I}}, + {"get_matrix",{P},P}, + {"set_matrix",{P,P}}, +"PangoContext"} + +widget[PangoFontsetSimple] = {"pango_fontset_simple", +{GObject}, + {"new",{P},P}, + {"append",{P,P}}, + {"size",{P},I}, +"PangoFontsetSimple"} + +widget[PangoFontSet] = {"pango_fontset", +{PangoFontsetSimple}, + {"get_font",{P,I},P,0,PangoFont}, + {"get_metrics",{P},P}, + {"foreach",{P,P,P}}, +"PangoFontSet"} + +widget[PangoFontMap] = {"pango_font_map", +{PangoFontSet}, + {"create_context",{P},P}, + {"load_font",{P,P,S},P}, + {"load_fontset",{P,P,S,P},P}, + {"list_families",{P,A,I}}, + {"get_shape_engine_type",{P},S}, + {"get_serial",{P},I}, + {"changed",{P}}, +"PangoFontMap"} + +widget[PangoFontFace] = {"pango_font_face", +{PangoFontMap}, + {"get_face_name",{P},S}, + {"list_sizes",{P,P,I}}, + {"describe",{P},P,0,PangoFontDescription}, + {"is_synthesized",{P},B}, +"PangoFontFace"} + +widget[PangoFontFamily] = {"pango_font_family", +{PangoFontFace}, + {"get_name",{P},S}, + {"is_monospace",{P},B}, + {"list_faces",{P,P,I}}, +"PangoFontFamily"} + +widget[PangoLayout] = {"pango_layout", +{GObject}, + {"new",{P},-routine_id("newPangoLayout")}, + {"set_text",{P,P},-routine_id("pl_set_text")}, + {"get_text",{P},S}, + {"get_character_count",{P},I}, + {"set_markup",{P,S},-routine_id("pl_set_markup")}, + {"set_markup_with_accel",{P,S,I,I},-routine_id("pl_set_markup_with_accel")}, + {"set_font_description",{P,P}}, + {"get_font_description",{P},P}, + {"set_attributes",{P,P}}, + {"get_attributes",{P},P,0,PangoAttrList}, + {"set_width",{P,I}}, + {"get_width",{P},I}, + {"set_height",{P,I}}, + {"get_height",{P},I}, + {"get_size",{P,I,I}}, + {"get_pixel_size",{P,I,I}}, + {"set_wrap",{P,I}}, + {"get_wrap",{P},I}, + {"is_wrapped",{P},B}, + {"set_ellipsize",{P,I}}, + {"get_ellipsize",{P},I}, + {"is_ellipsized",{P},B}, + {"set_indent",{P,I}}, + {"get_extents",{P,P,P}}, + {"get_indent",{P},I}, + {"get_pixel_size",{P,I,I}}, + {"get_size",{P,I,I}}, + {"set_spacing",{P,I}}, + {"get_spacing",{P},I}, + {"set_justify",{P,B}}, + {"get_justify",{P},B}, + {"set_auto_dir",{P,B}}, + {"get_auto_dir",{P},B}, + {"set_alignment",{P,P}}, + {"get_alignment",{P},P}, + {"set_tabs",{P,A}}, + {"get_tabs",{P},A}, + {"set_single_paragraph_mode",{P,B}}, + {"get_single_paragraph_mode",{P},B}, + {"get_unknown_glyphs_count",{P},I}, + {"get_log_attrs",{P,P,I}}, + {"get_log_attrs_readonly",{P,I},P}, + {"index_to_pos",{P,I,P}}, + {"index_to_line_x",{P,I,B,I,I}}, + {"xy_to_line",{P,I,I,I,I},B}, + {"get_cursor_pos",{P,I,P,P}}, + {"move_cursor_visually",{P,B,I,I,I,I,I}}, + {"get_pixel_extents",{P,P,P}}, + {"get_baseline",{P},I}, + {"get_line_count",{P},I}, + {"get_line",{P,I},P,0,PangoLayoutLine}, + {"get_line_readonly",{P,I},P,0,PangoLayoutLine}, + {"get_lines",{P},A,0,GSList}, + {"get_lines_readonly",{P},A,0,GSList}, + {"get_iter",{P},P,0,PangoLayoutIter}, + {"show_layout",{P,P},-routine_id("pl_show_layout")}, + {"get_context",{P},P,0,PangoContext}, + {"context_changed",{P}}, + {"get_serial",{P},I}, + {"get_extents",{P,P,P}}, +"PangoLayout"} + + function newPangoLayout(atom cr=0) + if cr=0 then + Error(,,"requires cairo_t as param!") + end if + return gtk_func("pango_cairo_create_layout",{P},{cr}) + end function + + function pl_set_text(atom layout, object txt) + if string(txt) then + txt = allocate_string(txt,1) + end if + gtk_proc("pango_layout_set_text",{P,P,I},{layout,txt,-1}) + return 1 + end function + + function pl_set_markup(atom layout, object txt) + if string(txt) then + txt = allocate_string(txt,1) + end if + gtk_proc("pango_layout_set_markup",{P,P,I},{layout,txt,-1}) + return 1 + end function + + function pl_set_markup_with_accel(atom layout, object txt, + integer marker, integer char) + if string(txt) then + txt = allocate_string(txt,1) + end if + gtk_proc("pango_layout_set_markup_with_accel",{P,P,I,I,I}, + {layout,txt,-1,marker,char}) + return 1 + end function + + function pl_show_layout(atom pcl, atom cr) + gtk_proc("pango_cairo_show_layout",{P,P},{cr,pcl}) + return 1 + end function + +widget[PangoLayoutLine] = {"pango_layout_line", +{0}, + {"ref",{P},P}, + {"unref",{P}}, + {"get_extents",{P,P,P}}, + {"get_pixel_extents",{P,P,P}}, + {"index_to_x",{P,I,B,I}}, + {"x_to_index",{P,I,I,I},B}, + {"get_x_ranges",{P,I,I,P,P}}, +"PangoLayoutLine"} + +widget[PangoLayoutIter] = {"pango_layout_iter", +{0}, + {"copy",{P},P,0,PangoLayoutIter}, + {"free",{P}}, + {"next_run",{P},B}, + {"next_char",{P},B}, + {"next_cluster",{P},B}, + {"next_line",{P},B}, + {"at_last_line",{P},B}, + {"get_index",{P},I}, + {"get_baseline",{P},I}, + {"get_run",{P},P,0,PangoLayoutRun}, + {"get_run_readonly",{P},P,0,PangoLayoutRun}, + {"get_line",{P},P,0,PangoLayoutLine}, + {"get_line_readonly",{P},P,0,PangoLayoutLine}, + {"get_layout",{P},P,0,PangoLayout}, + {"get_char_extents",{P,P}}, + {"get_cluster_extents",{P,P,P}}, + {"get_run_extents",{P,P,P}}, + {"get_line_yrange",{P,I,I}}, + {"get_line_extents",{P,P,P}}, + {"get_layout_extents",{P,P,P}}, +"PangoLayoutIter"} + +widget[PangoLayoutRun] = {"pango_layout_run", +{0}, +"PangoLayoutRun"} + +widget[PangoTabArray] = {"pango_tab_array", +{0}, + {"new",{I,B},P}, + {"get_size",{P},I}, + {"resize",{P,I}}, + {"set_tab",{P,I,I,I}}, + {"get_tab",{P,I,P,P}}, + {"get_tabs",{P,P,P}}, + {"get_position_in_pixels",{P},B}, +"PangoTabArray"} + +widget[PangoLanguage] = {"pango_language", +{GObject}, + {"new",{S},-routine_id("newPangoLanguage")}, + {"get_default",{P},-routine_id("getDefaultLanguage")}, + {"get_sample_string",{P},-routine_id("getSampleStr")}, + {"to_string",{P},S}, + {"matches",{P,S},B}, + {"includes_script",{P,P},B}, +"PangoLanguage"} + + function newPangoLanguage(object s) + return gtk_func("pango_language_from_string",{S},{s}) + end function + + function getDefaultLanguage(object junk) + return gtk_str_func("pango_language_get_default") + end function + + function getSampleStr(object x) + return gtk_str_func("pango_language_get_sample_string",{P},{x}) + end function + +export enum by * 2 + PANGO_STRETCH_ULTRA_CONDENSED, + PANGO_STRETCH_EXTRA_CONDENSED, + PANGO_STRETCH_CONDENSED, + PANGO_STRETCH_SEMI_CONDENSED, + PANGO_STRETCH_NORMAL, + PANGO_STRETCH_SEMI_EXPANDED, + PANGO_STRETCH_EXPANDED = 64, + PANGO_STRETCH_EXTRA_EXPANDED, + PANGO_STRETCH_ULTRA_EXPANDED + +export enum by * 2 + PANGO_FONT_MASK_FAMILY, + PANGO_FONT_MASK_STYLE, + PANGO_FONT_MASK_VARIANT, + PANGO_FONT_MASK_WEIGHT, + PANGO_FONT_MASK_STRETCH, + PANGO_FONT_MASK_SIZE, + PANGO_FONT_MASK_GRAVITY + + diff --git a/eugtk/examples/GtkEngine.e b/eugtk/examples/GtkEngine.e new file mode 100644 index 0000000..d3e9129 --- /dev/null +++ b/eugtk/examples/GtkEngine.e @@ -0,0 +1,9648 @@ + +------------- +namespace gtk +------------- + +------------------------------------------------------------------------ +-- This library is free software; you can redistribute it +-- and/or modify it under the terms of the GNU Lesser General +-- Public License as published by the Free Software Foundation; +-- either version 2 of the License, or (at your option) any later +-- version. + +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +-- See the GNU Lesser General Public License for more details. + +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Pl, Suite 330, Boston, MA 02111-1307 USA +------------------------------------------------------------------------ + +export constant + version = "4.12.0", + release = "Sept 1, 2016", + copyright = " © 2016 by Irv Mullins" + +public object ACCEL_FONT = "italic 10" -- affects accels in menus; +public integer BTN_ICON_SIZE = 20 -- pixels; +public integer BTN_TEXT_SIZE = 12 +public integer BTN_SHOW_IMG = 1 + +public include GtkEnums.e + +-- GtkEnums includes most of Eu std libraries as public, +-- making them available to your eu programs without +-- having to specifically include them. + +if not equal(gtk:version,enums:version) then -- these 2 must be in sync! + crash("Version mismatch: GtkEnums should be version %s",{version}) +end if + +-- std/math, std/locale, std/datetime, etc. aren't made +-- public, because that would cause too many conflicts, +-- requiring you to use namespaces everywhere, +-- but we do need them here; + +include std/datetime.e +include std/locale.e +include std/math.e +include std/net/dns.e +include std/utils.e +include std/net/http.e +include std/pipeio.e as pipe + +public constant -- 'shorthand' identifiers to save space in method prototypes; + P = C_POINTER, -- any valid pointer + B = C_BYTE, -- 8 bits (boolean) + I = C_INT, -- 32 (integer) + S = E_ATOM, -- 64 (string) + D = C_DOUBLE, -- 64 (double) + F = C_FLOAT, -- 32 (float) + A = E_INTEGER, -- 32/64 (glist ptr) + X = E_OBJECT, -- 32/64 (array of pointers) + V = E_SEQUENCE -- 32/64 (pointer to array of strings) + +-- hopefully, the above are compatible with both 32 and 64-bit architectures + +export object LIBS -- a single lib in UNIX, a sequence of dll's for Windows; + +ifdef OSX then -- thanks to Pete Eberlein for testing with OSX! + LIBS = {open_dll("/opt/local/lib/libgtk-3.dylib" )} + +elsifdef UNIX then -- Linux, BSD, etc. + LIBS = {open_dll("libgtk-3.so.0" )} + +elsifdef WINDOWS then + +object path = "C:/Program Files/GTK3-Runtime Win64/bin/" -- 3.18.6 is the vers. tested. + + LIBS = dir(path & "*.dll") -- get a list of all .dll's in that folder; + LIBS = vslice(LIBS,1) -- retain only the filenames; + + if atom(LIBS) then -- none found; + crash("\nFATAL ERROR:\n************ Cannot find GTK runtime libraries (.dlls)\n") + end if + + atom x + + for i = 1 to length(LIBS) do -- load each; + x = open_dll(LIBS[i]) + if x = 0 then + display("Error loading []",{LIBS[i]}) + else + LIBS[i] = x -- append this lib to list of libs; + end if + end for + +end ifdef -- PLATFORMS; + +if not object(LIBS) then -- no point in continuing; + crash("Required libraries not found!") +end if + +constant cmd = pad_tail(command_line(),4,"") + +if not gtk_func("gtk_init_check",{P,P},{0,0}) then -- initialize the GTK library; + crash("GTK Library error - cannot init GTK!") + +else -- success! + gtk_proc("g_set_prgname",{S}," " & filename(cmd[2])) -- set default pgm name; + gtk_proc("g_type_init",{}) -- initialize normal GTK types; + +end if + +public constant -- two special types must be initialized at run-time; + gPIX = gtk_func("gdk_pixbuf_get_type"), + gCOMBO = gtk_func("gtk_combo_box_get_type") + +------------------------------------------------------------- +-- Obtain a lot of sometimes useful system info; +------------------------------------------------------------- +include euphoria/info.e + +constant os_info = os:uname() + +export object + + major_version = gtk_func("gtk_get_major_version"), + minor_version = gtk_func("gtk_get_minor_version"), + micro_version = gtk_func("gtk_get_micro_version"), + + user_name = gtk_str_func("g_get_user_name"), + real_name = gtk_str_func("g_get_real_name"), + + curr_dir = current_dir(), + home_dir = gtk_str_func("g_get_home_dir"), + temp_dir = gtk_str_func("g_get_tmp_dir"), + data_dir = gtk_str_func("g_get_user_data_dir"), + conf_dir = gtk_str_func("g_get_user_config_dir"), + runt_dir = gtk_str_func("g_get_user_runtime_dir"), + + app_name = gtk_str_func("g_get_application_name"), + prg_name = gtk_str_func("g_get_prgname"), + lang_ = gtk_func("gtk_get_default_language"), + def_lang = gtk_str_func("pango_language_to_string",{P},{lang_}), + login = pathname(cmd[2]), + + os_pid = os:get_pid(), -- process id: e.g:1234 + os_name = os_info[1], -- e.g: Linux + os_distro = os_info[2], -- e.g: Mint17 + os_version = os_info[3], -- e.g: 3.13.0-24-generic + os_compiled = os_info[4], + os_arch = os_info[5], -- e.g: AMD64 + os_inc = getenv("EUINC"), + os_dir = getenv("EUDIR"), + os_path = getenv("PATH"), + os_shell = getenv("SHELL"), + os_term = getenv("TERM"), + + eu_platform = platform_name(), + host_name = gtk_str_func("g_get_host_name"), + host_addr = "127.0.0.1" + +ifdef BITS64 then + constant eu_arch_bits = "64" +elsedef + constant eu_arch_bits = "32" +end ifdef + +if atom(os_term) then os_term = "none" end if + +ifdef WINDOWS then + user_name = getenv("USERNAME") + real_name = getenv("USERNAME") + home_dir = getenv("HOMEPATH") + temp_dir = getenv("TEMP") + os_name = getenv("OS") + os_term = getenv("SESSIONNAME") + os_compiled = getenv("PROCESSOR_IDENTIFIER") +end ifdef + +-- following added because Windows misbehaves in the ifdef above :( + +if atom(os_term) then os_term = getenv("SESSIONNAME") end if +if atom(os_shell) then os_shell = getenv("ComSpec") end if +if atom(os_arch) then os_arch = getenv("PROCESSOR_ARCHITECTURE") end if + +export object info = { -- above system info in key/value form, sometimes this is useful; + "version=" & version, + "release=" & release, + "copyright=" & copyright, + "major=" & to_string(major_version), + "minor=" & to_string(minor_version), + "micro=" & to_string(micro_version), + "user_name=" & user_name, + "real_name=" & real_name, + "host_name=" & host_name, + "host_addr=" & host_addr, + "home_dir=" & home_dir, + "temp_dir=" & temp_dir, + "curr_dir=" & curr_dir, + "data_dir=" & data_dir, + "conf_dir=" & conf_dir, + "runt_dir=" & runt_dir, + "app_name=" & app_name, + "prg_name=" & prg_name, + "os_pid=" & to_string(os:get_pid()), + "os_name=" & os_info[1], + "os_distro=" & os_info[2], + "os_vers=" & os_info[3], + "os_comp=" & os_compiled, + "os_arch=" & os_arch, + "os_term=" & os_term, + "os_shell=" & os_shell, + "os_inc=" & os_inc, + "os_dir=" & os_dir, + "os_path=" & os_path, + "def_lang=" & def_lang, + "eu_version=" & version_string_short(), + "eu_revision=" & to_string(version_revision()), + "eu_platform=" & eu_platform, + "eu_arch_bits=" & eu_arch_bits, + "eu_date=" & version_date(), + "today=" & datetime:format(datetime:now(),"%A %B %d, %Y"), + "start_time=" & datetime:format(datetime:now(),"%H:%M:%S"), + "CMD1=" & cmd[1], + "CMD2=" & canonical_path(cmd[2]), + "CMD3=" & pathname(canonical_path(cmd[2])), + $} + +--------------------------- +export function networked() +--------------------------- +atom m = gtk_func("g_network_monitor_get_default") +return gtk_func("g_network_monitor_get_network_available",{P},{m}) +end function + +----------------------------------- +export function inet_connected() -- ping msftncsi +----------------------------------- +atom err = allocate(8) err = 0 +atom x = gtk_func("g_network_address_parse_uri",{P,I,P}, + {allocate_string("www.msftncsi.com"),80,err}) +if x > 0 then return gtk_str_func("g_socket_connectable_to_string",{P},{x}) +else return x +end if +end function + +-------------------------------- +export function get_net_address() +-------------------------------- + object results + object addr + + ifdef UNIX then + sequence tmp = temp_file(,"MYIP-") + system_exec(sprintf(`ifconfig | grep "inet addr:" > %s`,{tmp}),2) + results = trim(read_file(tmp)) + results = split(results," ") + delete_file(tmp) + for i = 1 to length(results) do + if match("inet addr:",results[i]) = 1 then + addr = split(results[i],':') + host_addr = addr[2] + info[11] = "host_addr=" & host_addr + return host_addr + end if + end for + end ifdef + + return "127.0.0.1" +end function + +--------------------------------------------------------- +public procedure requires(sequence a, object msg="Error") +--------------------------------------------------------- +-- an easy way to ensure that your program is using the +-- appropriate GTK version; +object s = split(a,'.') + if length(s) < 3 then s = append(s,"0") end if + s[1] = to_number(s[1]) + s[2] = to_number(s[2]) + s[3] = to_number(s[3]) + +object msg2 = gtk_str_func("gtk_check_version",{I,I,I},{s[1],s[2],s[3]}) + if string(msg2) then + Warn(,msg,msg2, + text:format("Requires Gtk version []\nInstalled is Gtk [].[].[]", + {a,major_version,minor_version,micro_version})) + abort(1) + end if +end procedure + +enum NAME,PARAMS,RETVAL,VECTOR,CLASS + +--------------------------------------------------------- +public function create(integer class, + object p1=0, object p2=0, object p3=0, object p4=0, + object p5=0, object p6=0, object p7=0, object p8=0) +--------------------------------------------------------- +-- This function does the following: +-- 1. initializes the class if not already initialized, +-- 2. creates a new instance of the class (returning a handle to that instance) +-- 3. optionally sets one or more properties and/or connects the default signal. +--------------------------------------------------------------------------------------- + if class = GtkStockList then -- GtkStock is not a real widget, but we fake it + return newStockList()-- also, stock items are deprecated as of 3.10+ + end if -- so don't get in the habit of using them too much :) + + if class = GtkColumn then return newColumn(p1) end if + + if not initialized[class] then -- create a routine_id for each 'method' in class + init(class) -- but only do it if this is the first call to that class + end if + + object method = lookup("new",vslice(widget[class],1),widget[class],0) + if method[VECTOR] = -1 then -- a 'new' method name was not found; + Error(,,widget[class][$],"not implemented in this GTK version!") + abort(class) + end if + + object props = 0, dataitem = 0 + if sequence(p1) and sequence(p1[1]) then -- a list of properties was provided. + props = p1 -- save until widget is created, + p1 = 0 -- then set them in one 'swell foop' + elsif string(p1) and match("=",p1) then -- properties were provided in string form, + props = keyvalues(p1,,,,"\t\n\r")-- break them up into key/value pairs, + p1 = 0 -- save for later; + dataitem = vlookup("data",props,1,2) + end if + + atom handle = 0 + object params = method[PARAMS] + object args = {p1,p2,p3,p4,p5,p6,p7,p8} + + args = args[1..length(params)] -- discard un-needed args; + + ifdef PARAMS then display(params) end ifdef -- debug; + + for i = 1 to length(params) do -- ensure values match formal params; + + switch params[i] do + + case S then -- convert string to pointer to cstring; + if string(args[i]) then + args[i] = allocate_string(args[i]) + end if + case B then -- convert "1", "TRUE", or "YES" to 1, + if string(args[i]) then + if args[i] = "1" + or upper(args[i]) = "TRUE" + or upper(args[i]) = "YES" then + args[i] = 1 + else + args[i] = 0 -- anything else is 0; + end if + end if + end switch + end for + + ifdef CREATE then -- debug; + display(decode_method("CREATE",class,method)) + puts(1,"\tArgs: ") display(args,{2,5,10,78,"%d","%.2g",32,127,1,0}) + ifdef METHOD then display(method) end ifdef + end ifdef + + if method[RETVAL] > 0 then -- it's a GTK function (routine_id is positive); + handle = c_func(method[VECTOR],args) + end if + + if method[RETVAL] < -1 then -- it's a Eu func (a negated routine_id) + handle = call_func(-method[VECTOR],args) -- convert to positive rid and call; + end if + + if handle = 0 then -- failure :( + ifdef CREATE then + display("Create failed for class []",{widget[class][$]}) + end ifdef + return handle + end if + + object sig = 0, arg1 = 0 ,arg2 = 0 + + switch class do -- connect a default signal for some common controls; + case GtkButton then sig ="clicked" arg1 = p2 arg2 = p3 + case GtkToolButton then sig ="clicked" arg1 = p3 arg2 = p4 + case GtkRadioButton then sig ="toggled" arg1 = p3 arg2 = p4 + case GtkRadioToolButton then sig = "toggled" arg1 = p3 arg2 = p4 + case GtkRadioMenuItem then sig ="toggled" arg1 = p3 arg2 = p4 + case GtkMenuItem then sig ="activate" arg1 = p2 arg2 = p3 + case GtkCheckMenuItem then sig = "toggled" arg1 = p2 arg2 = p3 + case GtkCellRendererToggle then sig = "toggled" arg1 = p1 arg2 = p2 + case GtkFontButton then sig = "font-set" arg1 = p2 arg2 = p3 + case GtkStatusIcon then sig = "activate" arg1 = p1 arg2 = p2 + case GtkSwitch then sig = "notify::active" arg1 = p1 arg2 = p2 + case GtkColorButton then sig = "color-set" arg1 = p2 arg2 = p3 + case GtkCalendar then sig = "day-selected-double-click" arg1 = p2 arg2 = p3 + case GtkComboBoxText, GtkComboBoxEntry then sig ="changed" arg1 = p1 arg2 = p2 + case GtkCheckButton then sig ="toggled" arg1 = p2 arg2 = p3 + case GtkToggleButton then sig ="toggled" arg1 = p2 arg2 = p3 + case GtkToggleToolButton then sig ="toggled" arg1 = p2 arg2 = p3 + end switch + + if atom(arg2) and arg2 = 0 then arg2 = dataitem end if + connect(handle,sig,arg1,arg2) -- connect per above switch; + + ifdef CREATE then -- debug; + display("\t[] => []\n",{widget[class][$],handle}) + end ifdef + + register(handle,class) + + if class = GtkWindow then -- if not otherwise specified, use OpenEu logo; + atom err= allocate(8,1) + gtk_func("gtk_window_set_default_icon_from_file",{P,P}, + {allocate_string(locate_file("./thumbnails/mongoose.png"),1),err}) + end if + ---------------------------------------------------------------------- + -- set properties using the new key/val style; + ---------------------------------------------------------------------- + object p = 0, signal, name, v1, v2, v3, v4 + + if not atom(props) then + + if handle > 0 then + + for i = 1 to length(props) do + while length(props[i]) < 5 do + props[i] &= 0 + end while + for n = 1 to 5 do + props[i][n] = numeric_test(props[i][n]) + end for + end for + + for i = 1 to length(props) do + name = props[i][1] + v1 = props[i][2] + v2 = props[i][3] + v3 = props[i][4] + v4 = props[i][5] + + ifdef SET then + display("\nset []->[]",{widget[class][$],props[i]}) + end ifdef + + if match("sig.",name) = 1 then + signal = name[5..$] + connect(handle,signal,v1,dataitem) + elsif match("$",name) = 1 then + signal = name[2..$] + connect(handle,signal,v1,dataitem) + elsif match("data.",name) = 1 then + set(handle,"data",name[6..$],v1) + else + set(handle,name,v1,v2,v3,v4) + end if + end for + end if + end if + + return handle -- a pointer to the newly created instance + +end function + +------------------------------------------------------------------------ +public function set(object handle, sequence property, + object p1=0, object p2=0, object p3=0, object p4=0, + object p5=0, object p6=0, object p7=0, object p8=0) +------------------------------------------------------------------------ +-- This routine sets a property or sequence of properties +-- for the given widget. +-- In order to work with Glade, widget names in string form +-- may be used, otherwise set() expects a handle. +-- Property is always a string, p1...p8 are optional parameters. +-- Any parameter expected but not supplied is set to null, excess +-- parameters are discarded. +------------------------------------------------------------------------ +integer class=-1 +object name = "unknown" +object result = 0 +object allocated = {} + + name = handle + + ifdef SETX then display({name,property,p1,p2,p3,p4}) end ifdef + + if string(handle) then handle = pointer(handle) end if + + if handle = 0 then + printf(1,"Critical error\n" & + "Objects must have a unique name!\n%s [%d]",{name,handle}) + return 0 + end if + + object prop = 0 + + if string(property) and match("=",property) > 0 then -- convert string props + property = keyvalues(property,,,,"\t\t\n") -- to key/val form; + end if + + if sequence(property) -- new create format (key=value pairs); + and not string(property) then + for i = 1 to length(property) do + while length(property[i]) < 5 do + property[i] &= 0 + end while + for n = 1 to 5 do + property[i][n] = numeric_test(property[i][n]) + end for + end for + + for i = 1 to length(property) do + prop = property[i] if prop[1][1]='$' then continue end if + while length(prop) < 8 do prop &= 0 end while + set(handle,prop[1],prop[2],prop[3],prop[4],prop[5],prop[6],prop[7],prop[8]) + end for + return 0 + end if + + class = vlookup(handle,registry,1,2,-1) -- get widget's class; + + if class = -1 then -- fail; + display("Set invalid handle [] []",{handle,prop}) + end if + + property = "set_" & lower(join(split(property,' '),'_')) -- conform; + + object method = lookup_method(class,property) + ifdef METHOD then display(method) end ifdef + + if atom(method) then + if not set_property(handle,property[5..$],numeric_test(p1)) then + Error(,,"Cannot set property",class_name(handle) & property) + end if + return 0 + end if + + if method[VECTOR] = -1 then + Warn(,,"Method not found", + sprintf("%s->%s",{class_name(handle),property})) + return 0 + end if + + -- method was found; + + object params = method[PARAMS] + + switch method[1] do -- make life easier for a common operation; + case "set_from_file" then p1 = canonical_path(p1) + end switch + + object args = {handle,p1,p2,p3,p4,p5,p6,p7,p8} + + ifdef PARAMS then + puts(1,"Params: ") display(params) + puts(1,"Args: ") display(args) + end ifdef + + args = args[1..length(params)] -- match args to formal parameters; + for i = 2 to length(args) do + switch params[i] do + + case A then -- array of strings; + if not atom(args[i]) then + args[i] = allocate_string_pointer_array(args[i]) + allocated &= args[i] + end if + + case S then -- string; + if atom(args[i]) then + args[i] = sprintf("%g",args[i]) + end if + if string(args[i]) then + args[i] = allocate_string(args[i]) + allocated &= args[i] + end if + + case B then + if string(args[i]) then + if equal("TRUE",upper(args[i])) + or equal("YES",upper(args[i])) + or equal("1",args[i]) then + args[i] = 1 + end if + if equal("FALSE",upper(args[i])) + or equal("NO",upper(args[i])) + or equal("0",args[i]) then + args[i] = 0 + end if + end if + + case I,D then + if string(args[i]) then + args[i] = to_number(args[i]) + end if + + -- apply patches for zero-based indexes; + switch method[1] do + case "add_attribute", + "set_active", + "set_text_column", + "set_pixbuf_column", + "set_tooltip_column", + "set_search_column", + "attribute_connect", + "reorder_child", + "page", + "remove_page", + "set_current_page", + "set_sort_column_id" then args[i]-=1 + end switch + end switch + end for + + ifdef SET then -- debug; + display(decode_method("SET",class,method)) + puts(1,"\tArgs: ") + display(decode_args(method,args), + {2,2,11,78,"%d","%2.22f",32,127,1,0}) + puts(1,"\n") + end ifdef + + if equal("set_name",property) then + p8 = find(handle,vslice(registry,1)) + registry[p8][4] = p1 + end if + + if method[RETVAL] = 0 then -- it's a GTK proc; + c_proc(method[VECTOR],args) + end if + + if method[RETVAL] > 0 then -- it's a GTK func; + result = c_func(method[VECTOR],args) + end if + + if method[RETVAL] <-1 then -- it's a Eu func; + result = call_func(-method[VECTOR],args) + end if + + if method[VECTOR] = -1 then -- GTK doesn't know about this method! + printf(1, + "Warning: %s->%s call is invalid," & + "******** perhaps you need a later GTK version", + {widget[class][$],property}) + end if + + if not equal("set_data",property) then + for i = 1 to length(allocated) do + free(allocated[i]) + end for + end if + + return result + +end function + +----------------------------------------------------------------------------------- +export function get(object handle, sequence property, + object p1=MINF, object p2=MINF, object p3=MINF, object p4=MINF, object p5=MINF) +----------------------------------------------------------------------------------- +-- This routine gets one or more values for a given property name. +-- Property name is always a string, handle is usually an atom, +-- but may sometimes be a string in order to work with Glade. +----------------------------------------------------------------------------------- +integer class +object name = "unknown" + + if string(handle) then + name = handle + handle = pointer(handle) + end if + + class = vlookup(handle,registry,1,2,-1) -- get widget's class; + + if class = -1 then + return 0 + end if + + property = "get_" & lower(join(split(property,' '),'_')) + + object method = lookup_method(class,property) + + if atom(method) then -- not found, try fallback to Object; + return get_property(handle,property[5..$]) + end if + + -- else, method found; + + object params = method[PARAMS] + + if method[VECTOR] = -1 then + crash("\nERROR:\n****** Invalid call: %s->%s",{widget[class][$],method[1]}) + end if + + object result = {} + + if string(p1) then p1 = allocate_string(p1,1) end if + if string(p2) then p2 = allocate_string(p2,1) end if + if string(p3) then p3 = allocate_string(p3,1) end if + if string(p4) then p4 = allocate_string(p4,1) end if + + object args = {handle,allocate(8,1),allocate(8,1),allocate(8,1),allocate(8,1)} + if p1 > MINF then args[2]=p1 end if + if p2 > MINF then args[3]=p2 end if + if p3 > MINF then args[4]=p3 end if + if p4 > MINF then args[5]=p4 end if + + args = args[1..length(params)] + + ifdef GET then -- debug + display(decode_method("GET",class,method),0) + puts(1,"\tArgs: ") + display(decode_args(method,args), + {2,2,11,78,"%d","%2.22f",32,127,4,-1}) + end ifdef + +----------------------------------------------------------------------------------- + if method[RETVAL] = 0 then -- it's a GTK proc, may have multiple return values; + c_proc(method[VECTOR],args) + result = repeat(0,length(args)) + for i = 1 to length(args) do + switch params[i] do -- convert arg pointer to value; + case D then result[i] = float64_to_atom(peek({args[i],8})) + case F then result[i] = float32_to_atom(peek({args[i],4})) + case I then result[i] = peek4s(args[i]) + case B then result[i] = peek(args[i]) + case A then result[i] = unpack_gs_str_list(args[i]) + case X then result[i] = unpack_gs_atom_list(args[i]) + case V then result[i] = deallocate_string_pointer_array(args[i]) + case S then if args[i] > 0 then result[i] = peek_string(args[i]) end if + case else result[i] = args[i] + end switch + end for + result = result[2..$] -- don't return handle, just results; + goto "fini" + end if + +-------------------------------------------------- + if method[RETVAL] > 0 then -- it's a GTK func; + result = c_func(method[VECTOR],args) + switch method[RETVAL] do -- convert function result to value; + case A then result = unpack_gs_str_list(result) + case X then result = unpack_gs_atom_list(result) + case V then result = deallocate_string_pointer_array(result) + case S then if result > 0 then result = peek_string(result) else result = 0 end if + case I then + switch method[1] do -- patch for zero-based indexing; + case + "get_active", + "get_text_column", + "get_pixbuf_column", + "get_column", + "get_tooltip_column", + "get_search_column", + "get_current_page", + "get_index", + "get_item_index", + "page_num", + "get_sort_column_id" then result += 1 + end switch + end switch + goto "fini" + end if + +---------------------------------------------------------------------- + if method[RETVAL] <-1 then -- it's a Eu func (negated routine_id); + result = call_func(-method[VECTOR],args) + end if + +label "fini" + + if method[CLASS] != GSList then -- for widgets created 'internally' by GTK + if method[CLASS] != 0 then -- as a result of creating a parent widget; + if not initialized[method[CLASS]] then init(method[CLASS]) end if + if atom(result) then register(result,method[CLASS]) + else for z = 1 to length(result) do + register(result[z],method[CLASS]) -- must be registered; + end for + end if + end if + end if + + ifdef GET then display("\tReturns: []\n",{result}) end ifdef + +return result +end function + +--------------------------------------------------- +public function add(object parent, object child) -- add widgets to container; +--------------------------------------------------- + + ifdef ADD then + display("Add [] []",{parent,child}) + end ifdef + + if atom(child) and child = 0 then + display("Null pointer passed to add()\n") + return 0 + end if + + if class_id(child) = GdkPixbuf then -- issue a warning; + return Warn(,,"Cannot add a pixbuf to a container", + "Create an image from it first,\nthen add the image.",,child) + end if + + if class_id(parent) = GtkBuilder then + load_builder(parent,child) + return 1 + end if + + if string(parent) then -- convert to handle; + parent = pointer(parent) + end if + + if string(child) then -- convert to handle; + child = pointer(child) + end if + + -- Switch below implements an easier-to-remember 'add' syntax + -- as an alias for the various 'set' calls shown. + -- The GTK original is still available, if you wish to use it. + + switch class_id(parent) do + + case GtkComboBoxText, GtkComboBoxEntry then + for i = 1 to length(child) do + set(parent,"append text",child[i]) + end for + + case GtkToolbar then + if atom(child) then + set(parent,"insert",child,-1) + else for i = 1 to length(child) do + add(parent,child[i]) + end for + end if + return child + + case GtkFileChooserDialog then + if atom(child) then + if class_id(child) = GtkFileFilter then + set(parent,"add filter",child) + end if + else for i = 1 to length(child) do + add(parent,child[i]) + end for + end if + + case GtkSizeGroup then + set(parent,"add widgets",child) + return child + + case GtkTextTagTable then + set(parent,"add",child) + return child + + case GtkTreeView then + set(parent,"append columns",child) + return child + + case else + if atom(child) then + gtk_proc("gtk_container_add",{P,P},{parent,child}) + else + for i = 1 to length(child) do + gtk_proc("gtk_container_add",{P,P},{parent,child[i]}) + end for + end if + return child + + end switch +return -1 +end function + +------------------------------------------------------------------------ +public function pack(object parent, object child, + integer expand=0, integer fill=0, integer padding=0) +------------------------------------------------------------------------ +-- pack a child widget or {list} of child widgets into parent container; +-- prepending a negative sign to the child pointer means +--'pack end'. this is an alias which is sometimes useful. +------------------------------------------------------------------------ + + if string(parent) then parent = pointer(parent) end if + if string(child) then child = pointer(child) end if + + if atom(child) then + if child > 0 then + pack_start(parent,child,expand,fill,padding) + else + child = -child + pack_end(parent,child,expand,fill,padding) + end if + else + for i = 1 to length(child) do + pack(parent,child[i],expand,fill,padding) + end for + end if + + return abs(child) +end function + +function valid(object x) +object msg = "Invalid object []" +atom p +if string(x) then + p = pointer(x) + if p = 0 then + display(msg,{x}) + return 0 + else return p + end if +end if +if x = 0 then + display(msg) +end if +return x +end function + +-- following 2 functions provided for compatibility with GTK calls; + +public function pack_start(object parent, object child, + boolean expand=0, boolean fill=0, integer padding=0) + parent = valid(parent) + child = valid(child) + set(parent,"pack start",child,expand,fill,padding) +return child + +end function + +public function pack_end(object parent, object child, + boolean expand=0, boolean fill=0, integer padding=0) + parent = valid(parent) + child = valid(child) + set(parent,"pack end",child,expand,fill,padding) +return child +end function + +---------------------------------- +public procedure show(object x) -- show widget x or a {list} of widgets; +---------------------------------- + if string(x) then x = pointer(x) end if + if atom(x) then + set(x,"show") + else + for i = 1 to length(x) do + show(x[i]) + end for + end if +end procedure + +------------------------------------- +public function show_all(object x) -- show container x and all children; +------------------------------------- + if string(x) then x = pointer(x) end if + if atom(x) then + set(x,"show all") + else + for i = 1 to length(x) do + set(x[i],"show all") + end for + end if +return 1 +end function + +--------------------------------- +public function hide(object x) -- hide a widget or a {list} of widgets; +--------------------------------- + if string(x) then x = pointer(x) end if + if atom(x) then + set(x,"hide") + else + for i = 1 to length(x) do + hide(x[i]) + end for + end if +return 1 +end function + +-------------------------------------- +public procedure hide_all(object x) -- hide container x and any children it contains; +-------------------------------------- + set(x,"hide all") +end procedure + +-------------------------------------- +export function destroy(object ctl) -- destroy a widget or {list} of widgets; +-------------------------------------- + if sequence(ctl) then + for i = 1 to length(ctl) do + destroy(ctl[i]) + end for + else + if ctl > 0 then + set(ctl,"destroy") + deregister(ctl) + end if + end if +return 1 +end function + +-------------------------- +export procedure main() -- start the GTK engine; +-------------------------- + gtk_proc("gtk_main") +end procedure + +without warning {not_reached} + + -------------------------------------------------------------------------- + export function Quit(atom ctl=0, object errcode=0) -- kill the GTK engine; + -------------------------------------------------------------------------- + abort(errcode) + return 1 + end function + export constant main_quit = call_back(routine_id("Quit")) + +with warning {not_reached} + +---------------------------------- +function numeric_test(object x) -- convert numbers passed in key=value format; +---------------------------------- + atom z + if atom(x) then + return x + end if + if string(x) then + if equal("TRUE",x) then return 1 end if + if equal("FALSE",x) then return 0 end if + if equal("YES",x) then return 1 end if + if equal("NO",x) then return 0 end if + if equal("VERTICAL",x) then return 1 end if + if equal("CENTER",x) then return 1 end if + if equal("HORIZONTAL",x) then return 0 end if + + z = to_number(x) + if z != 0 then + ifdef NUM then display("string [] converted to number []",{x,z}) end ifdef + return z + else + ifdef NUM then display("returning string '[]'",{x}) end ifdef + return x + end if + end if + ifdef NUM then display("error []",x) end ifdef + return x +end function + +------------------------------------------------------------------------ +-- Following functions register and initialize class methods +------------------------------------------------------------------------ +-- A class is initialized the first time a widget of that class is created. +-- This means the widget's method vectors are filled in with Eu routine_ids, +-- either direct or generated by define_c_func or define_c_proc as appropriate. + +-- When a subsequent call is made to a widget method, that vector is +-- used by calling c_func, c_proc, or call_func. + +-- If the call is to a method not implemented by the widget, but is +-- instead a method inherited from one of the widget's ancestors, +-- then that ancestor is also initialized if necessary. + +-- This scheme means that program startup isn't delayed as it would be +-- if all 300+ widgets and nearly 4000 methods were to be initialized +-- first, most of which would likely never be used in any given program. + +------------------------------------------------------------------------ +global procedure init(integer class) +------------------------------------------------------------------------ +object name, params, retval + + ifdef INITX then + display("\nInit class:[] []",{class,widget[class][$]}) + display(widget[class]) + end ifdef + + if initialized[class] then return end if + + for method = 3 to length(widget[class])-1 do + + name = sprintf("+%s_%s",{widget[class][NAME],widget[class][method][NAME]}) + + widget[class][method] = pad_tail(widget[class][method],5,0) + params = widget[class][method][PARAMS] + retval = widget[class][method][RETVAL] + + if class = GtkSpinButton then + switch widget[class][method][NAME] do + case "get_increments","get_range" then params[2] = P params[3] = P + case else -- do nothing; + end switch + end if + + if widget[class][method][RETVAL] = 0 then -- it's a GTK proc + widget[class][method][VECTOR] = define_proc(name,params) + goto "init" + end if + + if widget[class][method][RETVAL] > 0 then -- it's a GTK func + widget[class][method][VECTOR] = define_func(name,params,retval) + goto "init" + end if + + if widget[class][method][RETVAL] < -1 then -- it's a Eu func + widget[class][method][VECTOR] = widget[class][method][RETVAL] + end if + + label "init" + + initialized[class] = TRUE + + ifdef INIT then + display("INIT: [].[] RID:[]", + {widget[class][$],widget[class][method][NAME],widget[class][method][VECTOR]}) + end ifdef + + ifdef INIT_ERR then + if widget[class][method][VECTOR] = -1 then -- function is invalid! + display("\tINIT ERROR: [].[] ERR:[]", + {widget[class][$],widget[class][method][NAME],widget[class][method][VECTOR]}) + end if + end ifdef + + end for + +end procedure + +------------------------------------------------------------------------ +-- The registry associates a control's handle with its class, +-- so that future calls to set or get that control's properties +-- can go directly to the correct set of functions stored in the +-- large widget{} structure. +------------------------------------------------------------------------ +export object registry = {} + +---------------------------------------------------------------------------------------- +global function register(atom handle, integer class, object name="-nil-", object v=math:MINF) +---------------------------------------------------------------------------------------- +integer x = find(handle,vslice(registry,1)) + + if x > 0 then -- handle already exists in the registry, + ifdef REG_DUP then -- debug + display("Note: [] handle [] already registered to [] []", + {widget[class][$],handle,registry[x][3],name}) + end ifdef + -- update it in case handle has been recycled. + registry[x] = {handle,class,widget[class][$],name,v} + return 1 + end if + + -- else, add the widget to the registry; + registry = append(registry,{handle,class,widget[class][$],name,v}) + + -- initialize class if this is the first use of that class; + if not initialized[class] then init(class) end if + + ifdef REG then -- debug + printf(1,text:format("Registry + [3:20]\thandle: [1:10>]\tname: [4]\tvalue: [5]\n",registry[$])) + end ifdef + +return 1 +end function + +------------------------------------ +procedure deregister(atom handle) -- when object no longer used; +------------------------------------ +integer x = find(handle,vslice(registry,1)) +if x > 0 then + ifdef REG then + printf(1,text:format("Registry - [3:16]\thandle: [1:12>]\t",registry[x])) + if string(registry[x][4]) then printf(1,"name: %s",{registry[x][4]}) end if + puts(1,"\n") + end ifdef + registry = remove(registry,x) +end if +end procedure + + +----------------------------------------- +public function class_id(object handle) -- returns an integer widget class; +----------------------------------------- + if string(handle) then handle = pointer(handle) end if + return vlookup(handle,registry,1,2,-1) +end function + +------------------------------------------- +public function class_name(object handle) -- returns class_name for a given handle; +------------------------------------------- + if string(handle) then handle = pointer(handle) end if + return vlookup(handle,registry,1,3,"!") +end function + +------------------------------------------ +public function object_name(atom handle) -- returns name of object, or -nil-; +------------------------------------------ + return vlookup(handle,registry,1,4,"!") +end function + +--------------------------------------- +public function pointer(object name) -- returns handle to object or null, +--------------------------------------- + return vlookup(name,registry,4,1,0) +end function + +------------------------------------------------------------------------ +function lookup_method(integer class, sequence prop) +------------------------------------------------------------------------ +-- Finds the method to set or get a property for a given class, +-- if not found, ancestors of that class are checked until the method +-- is located. + + if class = -1 then return 0 end if + + ifdef LOOK then display("Look []->[]",{widget[class][$],prop}) end ifdef + + object method = lookup(prop,vslice(widget[class],NAME),widget[class],0) + + ifdef LOOKUP then display(widget[class][$]) end ifdef + + if atom(method) then -- try sans the set_ or get_ prefix; + method = lookup(prop[5..$],vslice(widget[class],NAME),widget[class],0) + end if + + if sequence(method) then -- method was found in this class, we're done! + return method + end if + + object ancestor -- if not found, need to look for method in ancestors; + for i = 1 to length(widget[class][PARAMS]) do + ancestor = widget[class][PARAMS][i] + if ancestor = 0 then return 0 end if + + if not initialized[ancestor] then + init(ancestor) + end if + + ifdef LOOKUP then -- debug; + display("trying ancestor: []",{widget[ancestor][$]}) + end ifdef + + method = lookup(prop,vslice(widget[ancestor],NAME),widget[ancestor],0) + if atom(method) then + method = lookup(prop[5..$],vslice(widget[ancestor],NAME),widget[ancestor],0) + end if + + if sequence(method) then -- found it! + ifdef LOOKUP then display("\t []",{method[1]}) end ifdef + return method + end if + + end for + + return -1 -- method not found (not implemented) + +end function + +----------------------------------------------------------------------------- +public function connect(object ctl, object sig, object fn=0, object data=0, + atom closure=0, integer flags=0) +----------------------------------------------------------------------------- +-- tells control to call your Eu function, sending data along for the ride, +-- whenever that control gets the specified signal. + + integer result = -1 + atom rid = 0 + + if atom(fn) and fn = 0 then -- no point in registering null functions! + return 0 + end if + + if string(ctl) then + ctl = pointer(ctl) -- convert name to pointer; + end if + + if sequence(ctl) then + for i = 1 to length(ctl) do + connect(ctl[i],sig,fn,data,closure,flags) + end for + return 1 + end if + + if string(fn) then -- if interpreted, we can call functions by name if in scope; + ifdef COMPILE then -- do compile test if requested; + display("Connecting [] [] Signal '[]' Function [] Data []", + {class_name(ctl),ctl,sig,fn,data}) + if not equal("Quit",fn) then + printf(1,"\n\tCaution: function %s will not link when compiled!\n\t********\n",{fn}) + end if + end ifdef + + rid = routine_id(fn) + if rid > 0 then -- named function is in scope; + fn = call_back(rid) -- so obtain a callback; + else + printf(1,"\n\tError: function %s is not in scope\n\t****** (make it global or link via routine_id)\n",{fn}) + Warn(,,sprintf("function %s is not in scope",{fn}),"make it global or link via routine_id") + end if + end if + + sig = join(split(sig,' '),'-') -- normalize signal names; + sig = allocate_string(sig) -- convert to string pointer; + + if integer(data) then -- can be attached directly; + result = gtk_func("g_signal_connect_data",{P,S,P,P,I,I},{ctl,sig,fn,data,closure,flags}) + free(sig) + return result + end if + + if atom(data) then + data = prepend({data},"ATOM") -- must be serialized and unpacked later; + data = allocate_wstring(serialize(data)+1) + result = gtk_func("g_signal_connect_data",{P,S,P,P,I,I},{ctl,sig,fn,data,closure,flags}) + free(sig) + return result + end if + + if string(data) then + data = prepend({data},"STR") -- must be serialized and unpacked later; + data = allocate_wstring(serialize(data)+1) + result = gtk_func("g_signal_connect_data",{P,S,P,P,I,I},{ctl,sig,fn,data,closure,flags}) + free(sig) + return result + end if + + if sequence(data) then + data = prepend(data,"SEQ")-- must be serialized and unpacked later; + data = allocate_wstring(serialize(data)+1) + result = gtk_func("g_signal_connect_data",{P,S,P,P,I,I},{ctl,sig,fn,data,closure,flags}) + free(sig) + return result + end if + +end function + +------------------------------------------------------- +export procedure disconnect(atom ctl, integer sigid) -- disconnect a signal from ctl; +------------------------------------------------------- + gtk_proc("g_signal_handler_disconnect",{P,I},{ctl,sigid}) +end procedure + +-------------------------------------- +export function unpack(object data) -- retrieves data passed in a control's data space; +-------------------------------------- +if atom(data) and data = 0 then return 0 end if +object result = deserialize(peek_wstring(data)-1) + switch result[1][1] do + case "ATOM","STR","INT" then return result[1][2] + case "SEQ" then return result[1][2..$] + case else return result + end switch +end function + +------------------------------------------------------- +export function deallocate_string_pointer_array(atom x) +------------------------------------------------------- +integer i = 0 +object result = {} + while peek4u(x+i) > 0 do + result = append(result,peek_string(peek4u(x+i))) + i += 8 + end while + return result +end function + +------------------------------------------------------------------------ +-- following 3 'decode_x' functions are for debugging purposes, +-- they make displays more readable; +------------------------------------------------------------------------ +function decode_args(object method, object args) +------------------------------------------------------------------------ + for i = 1 to length(method[PARAMS]) do + switch method[PARAMS][i] do + case S then + if atom(args[i]) and args[i] > 0 then + args[i] = peek_string(args[i]) + if length(args[i]) > 40 then + args[i] = args[i][1..40] & "..." + end if + args[i] = args[i] + end if + case else -- do not convert + end switch + end for + return args +end function + +constant ptype = {0,P,I,D,F,S,B,A} +constant pname = {{},"None","Ptr ","Int ","Dbl ","Flt ","Str ","Bool ","Array "} + +------------------------------------------------------------------------ +function decode_params(object params) +------------------------------------------------------------------------ + return transmute(params,ptype,pname) +end function + +------------------------------------------------------------------------ +function decode_method(sequence title, integer class, object method) +------------------------------------------------------------------------ +object z = {} +integer n + z = prepend(method,widget[class][$]) + z = prepend(z,title) + z[4] = decode_params(method[PARAMS]) + while length(z) < 5 do + z = append(z,0) + end while + if length(method) >= RETVAL then + n = find(method[RETVAL],ptype) + z[5] = pname[n+1] + end if + return text:format("[]\n\tCall: []->[]\n\tParams: []\n\tReturn type: []\n\tVector: []",z) +end function + +--------------------------------------------------------- +public function to_sequence(atom glist, integer fmt=0) -- mostly internal use; +--------------------------------------------------------- +-- convert glist pointer back to a Euphoria sequence; +-- results are returned in a choice of formats; + integer len = gtk_func("g_list_length",{P},{glist}) + object s = {} + atom data + for i = 0 to len-1 do + data = gtk_func("g_slist_nth_data",{P,I},{glist,i}) + switch fmt do + case 0 then s = append(s,peek_string(data)) + case 1 then s = append(s,data) + case 2 then s = append(s,gtk_str_func("gtk_tree_path_to_string",{P},{data})) + case 3 then s = append(s,to_number(gtk_str_func("gtk_tree_path_to_string",{P},{data}))) + case else Warn(,,"Converting glist to_sequence", + "invalid format supplied,\nvalues are 0 to 3") + end switch + end for + return s +end function + +----------------------------------------------------------------------------------------- +-- METHOD DECLARATIONS: +----------------------------------------------------------------------------------------- + +sequence initialized = repeat(0,500) +-- This is a set of flags which are set to 1 when a given widget has +-- been initialized. This prevents having to initialize a widget's +-- methods repeatedly. Size is larger than GtkFinal to allow 'plugin' +-- widgets to be added at runtime. + +export sequence widget = repeat(0,GtkFinal) +-- This structure holds prototypes for each GTK method call, +-- organized by widget. When each widget is initialized, +-- vectors are added pointing to the routine_ids needed +-- to call the GTK functions that implement each method. + +-- The widgets below need not be in any specific order. +-- Widget names must also be added to the list in GtkEnums + +sequence stock_list = create(GtkStockList) -- a fake object; + +widget[GObject] = {"g_object", +{0}, + {"new",{I,S,S,I},P}, + {"set",{P,S,P,P}}, + {"set_property",{P,S,P},-routine_id("set_property")}, + {"get_property",{P,S},-routine_id("get_property")}, + {"get_data",{P,P},S}, + {"set_data",{P,S,S}}, + {"set_data_full",{P,S,S,P}}, + {"steal_data",{P,S},P}, + {"signal",{P,P,P,P,P,P},-routine_id("connect")}, + {"connect",{P,P,P,P,P,P},-routine_id("connect")}, +"GObject"} + + constant + fn1 = define_proc("g_object_get",{P,P,P,P}), + doubles = {"angle","climb-rate","fraction","max-value","min-value", + "scale","value","pulse-step","scale","size-points","text-xalign", + "text-yalign","xalign","yalign"} + + constant prop = allocate_string("property") + + function set_property(object handle, object a, object b) + -------------------------------------------------------------- + object params = {P,P,P,P} + if find(a,doubles) then params = {P,P,D,P} end if + if string(a) then a = allocate_string(a,1) end if + if string(b) then b = allocate_string(b,1) end if + gtk_proc("g_object_set",params,{handle,a,b,0}) + return 1 + end function + + function get_property(atom handle, object p) + -------------------------------------------------- + atom x = allocate(8,1) + if string(p) then p = allocate_string(p,1) end if + c_proc(fn1,{handle,p,x,0}) + object result = peek4u(x) + return result + end function + +widget[GtkAdjustment] = {"gtk_adjustment", +{GObject}, + {"new",{D,D,D,D,D,D},P}, + {"set_value",{P,D}}, + {"get_value",{P},D}, + {"clamp_page",{P,D,D}}, + {"value_changed",{P}}, + {"configure",{P,D,D,D,D,D,D}}, + {"get_lower",{P},D}, + {"get_page_increment",{P},D}, + {"get_step_increment",{P},D}, + {"get_minimum_increment",{P},D}, + {"set_upper",{P,D}}, + {"get_upper",{P},D}, + {"set_page_increment",{P,D}}, + {"set_page_size",{P,D}}, + {"set_step_increment",{P,D}}, + {"set_upper",{P,D}}, +"GtkAdjustment"} + +widget[GtkWidgetPath] = {"gtk_widget_path", +{GObject}, + {"new",{},P}, + {"append_type",{P,I},I}, + {"append_with_siblings",{P,P,I},I}, + {"append_for_widget",{P,P},I}, + {"copy",{P},P,0,GtkWidgetPath}, + {"get_object_type",{P},I}, + {"has_parent",{P,I},B}, + {"is_type",{P,I},B}, + {"iter_add_class",{P,I,S}}, + {"iter_add_region",{P,I,S,I}}, + {"iter_clear_classes",{P,I}}, + {"iter_clear_regions",{P,I}}, + {"iter_get_name",{P,I},S}, + {"iter_get_object_type",{P,I},I}, + {"iter_get_siblings",{P,I},P,0,GtkWidgetPath}, + {"iter_get_sibling_index",{P,I},I}, + {"iter_has_class",{P,I,S},B}, + {"iter_has_name",{P,I,S},B}, + {"iter_has_qclass",{P,I,P},B}, + {"iter_has_qname",{P,I,P},B}, + {"iter_has_qregion",{P,I,P,I},B}, + {"iter_has_region",{P,I,S,I},B}, + {"iter_list_classes",{P,I},A,0,GSList}, + {"iter_list_regions",{P,I},A,0,GSList}, + {"iter_remove_class",{P,I,S}}, + {"iter_remove_region",{P,I,S}}, + {"iter_set_name",{P,I,S}}, + {"iter_set_object_type",{P,I,I}}, + {"iter_set_object_name",{P,I,S}}, -- 3.20 + {"iter_get_object_name",{P,I},S}, -- 3.20 + {"iter_get_state",{P,I},I}, -- 3.14 + {"iter_set_state",{P,I,I}}, -- 3.14 + {"length",{P},I}, + {"prepend_type",{P,I}}, + {"to_string",{P},S}, + {"get_object_name",{P,I},S}, -- 3.20 + {"set_object_name",{P,I,S}}, -- 3.20 +"GtkWidgetPath"} + +widget[GtkStyle] = {"gtk_style", +{GObject}, +"GtkStyle"} + +widget[GAction] = {"g_action", +{GObject}, + {"name_is_valid",{S},B}, + {"get_name",{P},S}, + {"get_parameter_type",{P},I}, + {"get_state_type",{P},I}, + {"get_state_hint",{P},I}, + {"get_enabled",{P},B}, + {"get_state",{P},I}, + {"change_state",{P,I}}, + {"activate",{P,I}}, + {"parse_detailed_name",{P,S,P,P},B}, + {"print_detailed_name",{P,I},S}, +"GAction"} + +widget[GSimpleAction] = {"g_simple_action", +{GObject}, + {"new",{S,I},P}, + {"new_stateful",{S,I,I}}, + {"set_enabled",{P,B}}, + {"set_state",{P,I}}, + {"set_state_hint",{P,I}}, +"GSimpleAction"} + +widget[GPropertyAction] = {"g_property_action", +{GObject}, + {"new",{S,P,S},P}, +"GPropertyAction"} + +widget[GActionGroup] = {"g_action_group", +{GSimpleAction,GObject}, +"GActionGroup"} + +widget[GSimpleActionGroup] = {"g_simple_action_group", +{GApplication,GActionGroup,GObject}, + {"new",{}}, +"GSimpleActionGroup"} + +widget[GActionMap] = {"g_action_map", +{0}, + {"lookup_action",{P,S},P}, + {"add_action_entries",{P,P,I,P}}, + {"add_action",{P,P}}, + {"remove_action",{P,S}}, +"GActionMap"} + +widget[GtkWidgetClass] = {"gtk_widget_class", +{GtkWidget,GtkBuildable,GObject}, + {"set_template",{P,P}}, -- 3.10 + {"set_template_from_resource",{P,S}}, -- 3.10 + {"get_template_child",{P,I,S},P,0,GObject}, + {"bind_template_child_full",{P,S,B,I}}, + {"bind_template_callback_full",{P,S,P}}, + {"set_connect_func",{P,P,P,P}}, + {"set_css_name",{P,S}}, -- 3.20 + {"get_css_name",{P},S}, -- 3.20 +"GtkWidgetClass"} + +widget[GtkWidget] = {"gtk_widget", +{GtkBuildable,GObject}, + +-- Aliases to fix awkward overrides; ordinarily you will use one of these 4, + {"set_font",{P,S},-routine_id("widget_set_font")}, + {"set_color",{P,P},-routine_id("widget_set_foreground")}, + {"set_foreground",{P,P},-routine_id("widget_set_foreground")}, + {"set_background",{P,P},-routine_id("widget_set_background")}, + +-- Only use following versions when you need to change the color +-- of a control in a state other than normal. Rarely used since themes +-- often disallow the use of stateful colors; + {"override_background_color",{P,I,P},-routine_id("widget_override_background_color")}, + {"override_color",{P,I,P},-routine_id("widget_override_color")}, +---- + {"new",{I},P}, + {"destroy",{P}}, + {"in_destruction",{P},B}, + {"destroyed",{P},B}, + {"unparent",{P}}, + {"show",{P}}, + {"show_now",{P}}, + {"hide",{P}}, + {"show_all",{P}}, + {"map",{P}}, + {"unmap",{P}}, + {"realize",{P}}, + {"unrealize",{P}}, + {"draw",{P}}, + {"queue_draw",{P}}, + {"queue_resize",{P}}, + {"queue_resize_no_redraw",{P}}, + {"get_frame_clock",{P},P,0,GdkFrameClock}, + {"add_tick_callback",{P,P,P,P},I}, + {"remove_tick_callback",{P,I}}, -- GTK 3.8+ + {"set_size_request",{P,P,P},-routine_id("widget_set_size_request")}, + {"size_allocate",{P,P}}, + {"size_allocate_with_baseline",{P,P,I}}, + {"add_accelerator",{P,S,P,I,I}}, + {"remove_accelerator",{P,P,I,I},B}, + {"set_accel_path",{P,S,P}}, + {"can_activate_accel",{P,I},B}, + {"event",{P,P},B}, + {"activate",{P},B}, + {"reparent",{P,P}}, -- deprecated 3.14 + {"intersect",{P,P,P},B}, + {"is_focus",{P},B}, + {"grab_focus",{P},B}, + {"grab_default",{P}}, + {"set_name",{P,S},-routine_id("widget_set_name")}, + {"get_name",{P},S}, + {"set_sensitive",{P,B}}, + {"get_sensitive",{P},B}, + {"set_parent",{P,P}}, + {"get_parent",{P},P}, + {"set_parent_window",{P,P}}, + {"get_parent_window",{P},P}, + {"set_events",{P,I}}, + {"get_events",{P},I}, + {"add_events",{P,I}}, + {"set_device_events",{P,P,I}}, + {"get_device_events",{P,P},I}, + {"add_device_events",{P,P,I}}, + {"set_device_enabled",{P,P,B}}, + {"get_device_enabled",{P,P},B}, + {"get_toplevel",{P},P}, + {"get_ancestor",{P,I},P}, + {"is_ancestor",{P,P},B}, + {"set_visual",{P,P}}, + {"get_visual",{P},P,0,GdkVisual}, + {"get_pointer",{P,I,I}}, -- deprecated 3.4 + {"translate_coordinates",{P,P,I,I,I,I},B}, + {"hide_on_delete",{P},B}, + {"set_direction",{P,I}}, + {"get_direction",{P},I}, + {"set_default_direction",{I}}, + {"get_default_direction",{},I}, + {"shape_combine_region",{P,P}}, + {"create_pango_context",{P},P}, + {"get_pango_context",{P},P,0,PangoContext}, + {"create_pango_layout",{P,S},P}, + {"queue_draw_area",{P,I,I,I,I}}, + {"queue_draw_region",{P,P}}, + {"set_app_paintable",{P,B}}, + {"set_double_buffered",{P,B}}, -- deprecated 3.14 + {"set_redraw_on_allocate",{P,B}}, + {"mnemonic_activate",{P,B},B}, + {"send_expose",{P,P},I}, + {"send_focus_change",{P,P},B}, + {"get_accessible",{P},P}, + {"child_focus",{P,I},B}, + {"child_notify",{P,S}}, + {"freeze_child_notify",{P}}, + {"get_child_visible",{P},B}, + {"get_parent",{P},P}, + {"get_path",{P},P,0,GtkWidgetPath}, + {"get_settings",{P},P,0,GtkSettings}, + {"get_clipboard",{P,I},P,0,GtkClipboard}, + {"get_display",{P},P,0,GdkDisplay}, + {"get_root_window",{P},P,0,GdkWindow}, -- deprecated 3.12 + {"get_screen",{P},P,0,GdkScreen}, + {"has_screen",{P},B}, + {"get_size_request",{P,I,I}}, + {"set_child_visible",{P,B}}, + {"thaw_child_notify",{P}}, + {"set_no_show_all",{P,B}}, + {"get_no_show_all",{P},B}, + {"add_mnemonic_label",{P,P}}, + {"remove_mnemonic_label",{P,P}}, + {"is_composited",{P},B}, + {"set_tooltip_markup",{P,S}}, + {"get_tooltip_markup",{P},S}, + {"set_tooltip_text",{P,S}}, + {"get_tooltip_text",{P},S}, + {"set_tooltip_window",{P,P}}, + {"get_tooltip_window",{P},P,0,GtkWindow}, + {"set_has_tooltip",{P,B}}, + {"get_has_tooltip",{P},B}, + {"trigger_tooltip_query",{P}}, + {"get_window",{P},P,0,GdkWindow}, + {"register_window",{P,P}}, -- GTK 3.8+ + {"unregister_window",{P,P}}, -- GTK 3.8+ + {"get_allocated_width",{P},I}, + {"get_allocated_height",{P},I}, + {"get_allocation",{P},-routine_id("widget_get_allocation")}, + {"set_allocation",{P,P}}, + {"get_allocated_baseline",{P},I}, + {"get_app_paintable",{P},B}, + {"set_can_default",{P,B}}, + {"get_can_default",{P},B}, + {"get_can_focus",{P},B}, + {"get_double_buffered",{P},B}, -- deprecated 3.14 + {"get_has_window",{P},B}, + {"get_sensitive",{P},B}, + {"get_visible",{P},B}, + {"is_visible",{P},B}, -- GTK 3.8+ + {"set_visible",{P,B}}, + {"set_state_flags",{P,I,B}}, + {"unset_state_flags",{P,I}}, + {"get_state_flags",{P},I}, + {"has_default",{P},B}, + {"has_focus",{P},B}, + {"has_visible_focus",{P},B}, + {"has_grab",{P},B}, + {"is_drawable",{P},B}, + {"is_toplevel",{P},B}, + {"set_window",{P,P}}, + {"set_receives_default",{P,B}}, + {"get_receives_default",{P},B}, + {"set_support_multidevice",{P,B}}, + {"get_support_multidevice",{P},B}, + {"set_realized",{P,B}}, + {"get_realized",{P},B}, + {"set_mapped",{P,B}}, + {"get_mapped",{P},B}, + {"device_is_shadowed",{P,P},B}, + {"get_modifier_mask",{P,I},I}, + {"insert_action_group",{P,S,P}}, + {"get_opacity",{P},D}, -- GTK 3.8+ + {"set_opacity",{P,D}}, -- GTK 3.8+ + {"get_path",{P},P,0,GtkWidgetPath}, + {"get_style",{P},P,0,GtkStyle}, + {"get_style_context",{P},P,0,GtkStyleContext}, + {"reset_style",{P}}, + {"get_preferred_height",{P,I,I}}, + {"get_preferred_width",{P,I,I}}, + {"get_preferred_height_for_width",{P,I,I,I}}, + {"get_preferred_width_for_height",{P,I,I,I}}, + {"get_preferred_height_and_baseline_for_width",{P,I,I,I,I,I}}, + {"get_request_mode",{P},I}, + {"get_preferred_size",{P,P,P}}, + {"get_preferred_size_and_baseline",{P,P,I,I}}, + {"get_halign",{P},I}, + {"set_halign",{P,I}}, + {"get_valign",{P},I}, + {"set_valign",{P,I}}, + {"set_margin_left",{P,I}}, -- deprecated 3.12 + {"get_margin_left",{P},I}, -- deprecated 3.12 + {"set_margin_right",{P,I}}, -- deprecated 3.12 + {"get_margin_right",{P},I}, -- deprecated 3.12 + {"get_margin_end",{P},I}, -- new 3.12 + {"set_margin_end",{P,I}}, -- new 3.12 + {"get_margin_start",{P},I}, -- new 3.12 + {"set_margin_start",{P,I}}, -- new 3.12 + {"set_margin_top",{P,I}}, + {"get_margin_top",{P},I}, + {"set_margin_bottom",{P,I}}, + {"get_margin_bottom",{P},I}, + {"get_hexpand",{P},B}, + {"set_hexpand",{P,B}}, + {"get_hexpand_set",{P},B}, + {"set_hexpand_set",{P,B}}, + {"get_vexpand",{P},B}, + {"set_vexpand",{P,B}}, + {"get_vexpand_set",{P},B}, + {"set_vexpand_set",{P,B}}, + {"queue_compute_expand",{P}}, + {"compute_expand",{P,I},B}, + {"init_template",{P}}, + {"get_automated_child",{P,I,S},P,0,GObject}, + {"get_clip",{P,P}}, -- 3.14 + {"set_clip",{P},P}, -- 3.14 + {"get_action_group",{P,S},P,0,GActionGroup}, -- 3.16 + {"list_action_prefixes",{P},A}, -- 3.16 + {"get_font_map",{P},P,0,PangoFontMap}, -- 3.18 + {"set_font_map",{P,P}}, -- 3.18 + {"get_font_options",{P},P}, -- 3.18 + {"set_font_options",{P,P}}, -- 3.18 + {"signal",{P,P,P,P,P,P},-routine_id("connect")}, + {"list_accel_closures",{P},X,0,GList}, + {"get_font",{P},-routine_id("widget_get_font")}, + {"get_allocated_size",{P,P,I}}, -- 3.20 + {"get_focus_on_click",{P},B}, -- 3.20 + {"set_focus_on_click",{P,B}}, -- 3.20 +"GtkWidget"} + + function widget_set_size_request(atom ctl, object x=0, object y=0) + if string(x) then + x = split(x,'x') + y = to_number(x[2]) + x = to_number(x[1]) + end if + gtk_func("gtk_widget_set_size_request",{P,I,I},{ctl,x,y}) + return 1 + end function + + function widget_get_font(atom x) + object layout = get(x,"layout") + object context = gtk_func("pango_layout_get_context",{P},{layout}) + object descr = gtk_func("pango_context_get_font_description",{P},{context}) + return gtk_str_func("pango_font_description_to_string",{P},{descr}) + end function + + function widget_get_allocation(atom obj) + atom al = allocate(32,1) + gtk_func("gtk_widget_get_allocation",{P,P},{obj,al}) + return peek4u({al,4}) + end function + + function widget_set_name(atom ctl, object name) + gtk_proc("gtk_widget_set_name",{P,P},{ctl,name}) + integer x = find(ctl,vslice(registry,1)) + if x > 0 then + registry[x][4] = peek_string(name) + end if + return 1 + end function + + -- This allows specifying a font name, e.g. "Courier bold 12" as a string, + -- instead of a pango font description object; + function widget_set_font(atom x, object fnt) + fnt = gtk_func("pango_font_description_from_string",{P},{fnt}) + gtk_proc("gtk_widget_override_font",{P,P},{x,fnt}) + return 1 + end function + + -- The functions below handle color conversion to/from rgba, + -- as well as supplying easier-to-use method names for setting background + -- and foreground. These methods are only used to set the colors of a widget + -- in the NORMAL state, whereas if you want to set the colors in + -- some other state, such as mouse-over, etc, you use the original + -- set(widget,"override background",STATE,"color") syntax. + + function widget_set_foreground(atom x, object c) -- alias 'color' + return widget_override_color(x,0,c) + end function + + function widget_set_background(atom x, object c) -- alias 'background' + return widget_override_background_color(x,0,c) + end function + + function widget_override_color(atom x, integer state=0, object c) + if atom(c) then + c = text:format("#[:06X]",c) + end if + gtk_proc("gtk_widget_override_color",{P,I,P},{x,state,to_rgba(c)}) + return 1 + end function + + function widget_override_background_color(atom x, integer state=0, object c) + if atom(c) then + c = text:format("#[:06X]",c) + end if + gtk_proc("gtk_widget_override_background_color",{P,I,P},{x,state,to_rgba(c)}) + return 1 + end function + +widget[GtkContainer] = {"gtk_container", +{GtkWidget,GtkBuildable,GObject}, + {"add",{P,P}}, + {"remove",{P,P}}, + {"check_resize",{P}}, + {"foreach",{P,P,P}}, + {"get_children",{P},X}, + {"get_path_for_child",{P,P},S}, + {"set_focus_child",{P,P}}, + {"get_focus_child",{P},P}, + {"set_focus_vadjustment",{P,P}}, + {"get_focus_vadjustment",{P},P,0,GtkAdjustment}, + {"set_focus_hadjustment",{P,P}}, + {"get_focus_hadjustment",{P},P,0,GtkAdjustment}, + {"child_type",{P},I}, + {"forall",{P,P,P}}, + {"set_border",{P,I},-routine_id("set_border")}, + {"set_border_width",{P,I}}, + {"get_border_width",{P},I}, + {"propagate_draw",{P,P,P}}, + {"child_notify",{P,P,S}}, + {"child_notify_by_pspec",{P,P,P}}, -- 3.18 + {"class_install_child_properties",{P,I,P}}, -- 3.18 +"GtkContainer"} + + function set_border(atom cont, integer w) -- alias for 'border_width'; + gtk_proc("gtk_container_set_border_width",{P,I},{cont,w}) + return 1 + end function + +widget[GdkKeymap] = {"gdk_keymap", +{GObject}, + {"new",{},-routine_id("new_keymap")}, + {"get_default",{},-routine_id("new_keymap")}, + {"get_for_display",{P},P,0,GdkKeymap}, + {"get_capslock_state",{P},B}, + {"get_numlock_state",{P},B}, + {"get_modifier_state",{P},I}, + {"get_direction",{P},I}, + {"have_bidi_layouts",{P},B}, + {"lookup_key",{P,P},I}, + {"get_scroll_lock_state",{P,B}}, +"GdkKeymap"} + + function new_keymap(atom disp=0) + if disp=0 then + return gtk_func("gdk_keymap_get_default") + else + return gtk_func("gdk_keymap_get_for_display",{P},P) + end if + end function + +widget[GtkBin] = {"gtk_bin", +{GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"get_child",{P},P}, +"GtkBin"} + +widget[GtkBox] = {"gtk_box", +{GtkContainer,GtkWidget,GtkOrientable,GtkBuildable,GObject}, + {"new",{I,I},P}, + {"pack_start",{P,P,B,B,I}}, + {"pack_end",{P,P,B,B,I}}, + {"set_homogeneous",{P,B}}, + {"get_homogeneous",{P},B}, + {"set_spacing",{P,I}}, + {"get_spacing",{P},I}, + {"reorder_child",{P,P,I}}, + {"query_child_packing",{P,P,B,B,I,I}}, + {"set_child_packing",{P,P,B,B,I,I}}, + {"set_baseline_position",{P,I}}, + {"get_baseline_position",{P},I}, + {"get_center_widget",{P},P,0,GtkWidget}, -- 3.12 + {"set_center_widget",{P,P}}, -- 3.12 +"GtkBox"} + +widget[GtkButtonBox] = {"gtk_button_box", +{GtkBox,GtkContainer,GtkWidget,GtkBuilder,GtkOrientable,GObject}, + {"new",{I},P}, + {"set_layout",{P,I}}, + {"get_layout",{P},I}, + {"set_child_secondary",{P,P,B}}, + {"get_child_secondary",{P,P},B}, + {"set_child_non_homogeneous",{P,P,B}}, + {"get_child_non_homogeneous",{P,P},P}, +"GtkButtonBox"} + +widget[GtkWindowGroup] = {"gtk_window_group", +{GObject}, + {"new",{},P}, + {"add_window",{P,P}}, + {"remove_window",{P,P}}, + {"list_windows",{P},X,0,GList}, + {"get_current_grab",{P},P,0,GtkWidget}, + {"get_current_grab_device",{P,P},P,0,GtkWidget}, +"GtkWindowGroup"} + +-- shortcuts are new in 3.20, inadequate documentation means there's no way to test yet; +widget[GtkShortcutsWindow] = {"gtk_shortcuts_window", +{GtkWindow,GtkBin,GtkContainer,GtkWidget,GObject}, +-- properties: +-- section-name +-- view-name +"GtkShortcutsWindow"} + +widget[GtkShortcutsSection] = {"gtk_shortcuts_section", +{GtkBox,GtkContainer,GtkWidget,GObject}, +-- properties; +-- max-height +-- section-name +-- title +-- view-name +"GtkShortcutsSection"} + +widget[GtkShortcutsGroup] = {"gtk_shortcuts_group", +{GtkBox,GtkContainer,GtkWidget,GObject}, +-- properties; +-- accel-size-group +-- height +-- title +-- title-size-group +-- view +"GtkShortcutsGroup"} + +widget[GtkShortcutsShortcut] = {"gtk_shortcuts_shortcut", +{GtkBox,GtkContainer,GtkWidget,GObject}, +-- properties; +-- accel-size-group +-- accelerator +-- title +-- title-size-group +"GtkShortcutsShortcut"} + +widget[GtkShortcutsGesture] = {"gtk_shortcuts_gesture", +{GtkBox,GtkContainer,GtkWidget,GObject}, +-- properties; +-- icon +-- icon-size-group +-- subtitle +-- title +-- title-size-group +"GtkShortcutsGesture"} + +widget[GtkWindow] = {"gtk_window", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{I},P}, + {"set_title",{P,S}}, + {"get_title",{P},S}, + {"set_resizable",{P,B}}, + {"get_resizable",{P},B}, + {"get_size",{P,I,I}}, + {"set_size",{P,P},-routine_id("win_set_size")}, -- alias; + {"set_position",{P,P},-routine_id("win_set_pos")}, -- alias + --{"set_position",{P,I}}, -- alias above allows 2 forms of 'position'; + {"set_default",{P,P}}, + {"set_default_size",{P,I,I}}, + {"get_default_size",{P,I,I}}, + {"get_position",{P,I,I}}, + {"add_accel_group",{P,P}}, + {"remove_accel_group",{P,P}}, + {"activate_focus",{P},B}, + {"activate_default",{P},B}, + {"set_modal",{P,B}}, + {"get_modal",{P},B}, + {"set_default_geometry",{P,I,I}}, + {"set_geometry_hints",{P,P,P,I}}, + {"set_gravity",{P,I}}, + {"get_gravity",{P},I}, + {"set_transient_for",{P,P}}, + {"get_transient_for",{P},P,0,GtkWindow}, + {"set_attached_to",{P,P}}, + {"get_attached_to",{P},P,0,GtkWidget}, + {"set_destroy_with_parent",{P,B}}, + {"get_destroy_with_parent",{P},B}, + {"set_hide_titlebar_when_maximized",{P,B}}, + {"get_hide_titlebar_when_maximized",{P},B}, + {"set_screen",{P,P}}, + {"get_screen",{P},P,0,GdkScreen}, + {"is_active",{P},B}, + {"list_toplevels",{P},X,0,GSList}, + {"has_toplevel_focus",{P},B}, + {"add_mnemonic",{P,I,P}}, + {"remove_mnemonic",{P,I,P}}, + {"set_mnemonics_visible",{P,B}}, + {"get_mnemonics_visible",{P},B}, + {"mnemonic_activate",{P,I,I},B}, + {"activate_key",{P,P},B}, + {"propagate_key_event",{P,P},B}, + {"get_focus",{P},P,0,GtkWidget}, + {"set_focus",{P,P}}, + {"set_focus_visible",{P,B}}, + {"get_focus_visible",{P},B}, + {"get_default_widget",{P},P,0,GtkWidget}, + {"set_default",{P,P}}, + {"present",{P}}, + {"present_with_time",{P,P}}, + {"iconify",{P}}, + {"deiconify",{P}}, + {"stick",{P}}, + {"unstick",{P}}, + {"maximize",{P}}, + {"unmaximize",{P}}, + {"fullscreen",{P}}, + {"unfullscreen",{P}}, + {"set_keep_above",{P,B}}, + {"set_keep_below",{P,B}}, + {"begin_resize_drag",{P,I,I,I,I,I}}, + {"begin_move_drag",{P,I,I,I,I}}, + {"set_decorated",{P,B}}, + {"get_decorated",{P},B}, + {"set_deletable",{P,B}}, + {"get_deletable",{P},B}, + {"set_mnemonic_modifier",{P,I}}, + {"get_mnemonic_modifier",{P},I}, + {"set_type_hint",{P,I}}, + {"get_type_hint",{P},I}, + {"set_skip_taskbar_hint",{P,B}}, + {"get_skip_taskbar_hint",{P},B}, + {"set_skip_pager_hint",{P,B}}, + {"get_skip_pager_hint",{P},B}, + {"set_urgency_hint",{P,B}}, + {"get_urgency_hint",{P},B}, + {"set_accept_focus",{P,B}}, + {"get_accept_focus",{P},B}, + {"set_focus_on_map",{P,B}}, + {"get_focus_on_map",{P},B}, + {"set_startup_id",{P,S}}, + {"set_role",{P,S}}, + {"get_role",{P},S}, + {"get_icon",{P},P,0,GdkPixbuf}, + {"get_icon_name",{P},S}, + {"get_icon_list",{P},P,0,GList}, + {"get_default_icon_list",{P},X,0,GList}, + {"get_group",{P},P,0,GtkWindowGroup}, + {"has_group",{P},B}, + {"get_window_type",{P},I}, + {"move",{P,I,I}}, + {"parse_geometry",{P,S},B}, + {"resize",{P,I,I}}, + {"resize_to_geometry",{P,I,I}}, + {"set_has_resize_grip",{P,B}}, + {"get_has_resize_grip",{P},B}, + {"resize_grip_is_visible",{P},B}, -- deprecated 3.14 + {"get_resize_grip_area",{P,P},B}, -- deprecated 3.14 + {"set_titlebar",{P,P}}, -- 3.10 + {"get_titlebar",{P},P,0,GtkWidget}, -- 3.16 + {"set_icon",{P,P},-routine_id("win_set_icon")}, + {"restore",{P},-routine_id("win_restore")}, -- see below; + {"close",{P}}, -- 3.10 + {"set_opacity",{P,D}}, + {"is_maximized",{P},B}, -- 3.12 + {"set_interactive_debugging",{B}}, -- 3.14 + {"fullscreen_on_monitor",{P,P,I}}, -- 3.18 + {"set_application",{P,P}}, + {"get_application",{P},P,0,GtkApplication}, + {"set_cursor",{P,P},-routine_id("win_set_cursor")}, +"GtkWindow"} + + function win_set_size(atom win, object size) + -- allow for WxH format to be passed; + if match("x",size) then size = split(size,'x') end if + if match("{",size) = 1 and match("}",size) = length(size) then + size = size[2..$-1] + size = split(size,',') + end if + set(win,"default_size",size[1],size[2]) + return 1 + end function + + function win_set_pos(atom win, object pos) + if integer(pos) then -- only one integer passed; + gtk_proc("gtk_window_set_position",{P,I},{win,pos}) -- use original call; + return 1 + end if + -- else position is WxH format, so call move instead; + if match("x",pos) then pos = split(pos,'x') end if + if match("{",pos) = 1 and match("}",pos) = length(pos) then + pos = pos[2..$-1] + pos = split(pos,',') + end if + set(win,"move",pos[1],pos[2]) + return 1 + end function + + function win_set_cursor(atom win, object cursor) + atom gdkwin = get(win,"window") + cursor = create(GdkCursor,cursor) + set(gdkwin,"cursor",cursor) + return cursor + end function + + -- this replaces a handy but deprecated GTK function which + -- restores a window to its original size after being resized + -- to fit larger contents; + function win_restore(atom win) + set(win,"hide") + set(win,"unrealize") + gtk_proc("gtk_window_set_position",{P,I},{win,1}) + set(win,"show") + return 1 + end function + + -- manages the creation of window icon from a variety of source formats. + -- this makes life much easier for the programmer. + function win_set_icon(object win, object icon) + object path + + if string(icon) then + path = locate_file(icon)--display(path) + if file_type(path) = 1 then + gtk_proc("gtk_window_set_icon_from_file",{P,P}, + {win,allocate_string(path,1)}) + return 1 + else + gtk_proc("gtk_window_set_icon_name",{P,P}, + {win,allocate_string(icon,1)}) + return 1 + end if + end if + + if sequence(icon) then + gtk_proc("gtk_window_set_icon",{P,P},{win,xpm_to_pixbuf(icon)}) + end if + + if atom(icon) then + if class_id(icon) = GtkImage then + icon = get(icon,"pixbuf") + end if + if class_id(icon) = GdkPixbuf then + gtk_proc("gtk_window_set_icon",{P,P},{win,icon}) + end if + return 1 + end if + + return 0 + end function + +widget[GtkMisc] = {"gtk_misc", -- deprecated 3.14 +{GtkWidget,GtkBuildable,GObject}, + {"set_alignment",{P,F,F}}, + {"get_alignment",{P,F,F}}, + {"set_padding",{P,I,I}}, + {"get_padding",{P,I,I}}, +"GtkMisc"} + +widget[GtkLabel] = {"gtk_label", +{GtkMisc,GtkWidget,GtkBuildable,GObject}, + {"new",{S},P}, + {"new_with_mnemonic",{S},P,0,GtkLabel}, + {"set_text",{P,S}}, + {"set_value",{P,D},-routine_id("lbl_set_value")}, -- convenience, converts # to readable form; + {"get_text",{P},S}, + {"set_markup",{P,S}}, + {"set_text_with_mnemonic",{P,S}}, + {"set_markup_with_mnemonic",{P,S}}, + {"set_pattern",{P,S}}, + {"set_justify",{P,I}}, + {"get_justify",{P},I}, + {"get_attributes",{P},P,0,PangoAttrList}, + {"set_ellipsize",{P,I}}, + {"get_ellipsize",{P},I}, + {"set_width_chars",{P,I}}, + {"get_width_chars",{P},I}, + {"set_max_width_chars",{P,I}}, + {"get_max_width_chars",{P},I}, + {"set_line_wrap",{P,B}}, + {"get_line_wrap",{P},B}, + {"set_line_wrap_mode",{P,I}}, + {"get_layout_offsets",{P,I,I}}, + {"get_mnemonic_keyval",{P},I}, + {"set_selectable",{P,B}}, + {"get_selectable",{P},B}, + {"select_region",{P,I,I}}, + {"get_selection_bounds",{P,I,I},B}, + {"set_mnemonic_widget",{P,P}}, + {"get_mnemonic_widget",{P},P,0,GtkWidget}, + {"get_label",{P},S}, + {"get_layout",{P},P,0,PangoLayout}, + {"get_line_wrap_mode",{P},I}, + {"set_use_markup",{P,B}}, + {"get_use_markup",{P},B}, + {"set_use_underline",{P,B}}, + {"get_use_underline",{P},B}, + {"set_single_line_mode",{P,B}}, + {"get_single_line_mode",{P},B}, + {"set_angle",{P,D}}, + {"get_current_uri",{P},S}, + {"set_track_visited_links",{P,B}}, + {"get_track_visited_links",{P},B}, + {"set_lines",{P,I}}, -- 3.10 + {"get_lines",{P},I}, -- 3.10 + {"get_xalign",{P},F}, -- 3.16 + {"get_yalign",{P},F}, -- 3.16 + {"set_xalign",{P,F}}, -- 3.16 + {"set_yalign",{P,F}}, -- 3.16 +"GtkLabel"} + + function lbl_set_value(atom lbl, atom val) -- provided for convenience; + set(lbl,"text",sprintf("%2.2f",val)) -- convert atom to string for label; + return 1 + end function + +widget[GtkImage] = {"gtk_image", +{GtkMisc,GtkWidget,GtkBuildable,GObject}, + {"new",{P,I,I,I},-routine_id("newImage")}, + {"set_image",{P,P,P},-routine_id("setImage")}, -- not a gtk func + {"set_from_file",{P,S}}, + {"set_from_pixbuf",{P,P}}, + {"set_from_icon_name",{P,S,I}}, + {"set_from_animation",{P,P}}, + {"set_from_gicon",{P,P,I}}, + {"set_from_resource",{P,S}}, + {"set_from_surface",{P,P}}, -- 3.10 + {"clear",{P}}, + {"set_pixel_size",{P,I}}, + {"get_pixel_size",{P},I}, + {"get_pixbuf",{P},P,0,GdkPixbuf}, -- doesn't work! + {"get_animation",{P},P,0,GdkPixbufAnimation}, + {"get_storage_type",{P},I}, + {"get_icon_name",{P},-routine_id("img_get_icon_name")}, +"GtkImage"} + +----------------------------------------------------- + -- create an image from a variety of source formats + ---------------------------------------------------- + function newImage(object icon=0, integer size=6, integer w=0, integer h=0) + + if atom(icon) then + if icon = 0 then + return gtk_func("gtk_image_new") -- just a blank image requested; + else + switch class_id(icon) do + case GdkPixbuf then + icon = gtk_func("gtk_image_new_from_pixbuf",{P},{icon}) + case GIcon then + icon = gtk_func("gtk_image_new_from_gicon",{P,I},{icon,size}) + case CairoSurface_t then + icon = gtk_func("gtk_image_new_from_surface",{P},{icon}) + case else -- do nothing + end switch + end if + return icon + end if + + object theme, icon_info + + if string(icon) then + + if begins("gtk-",icon) then -- from stock (deprecated) + if size = 0 then size = 6 end if + return gtk_func("gtk_image_new_from_icon_name",{P,I}, + {allocate_string(icon,1),size}) -- size is a GTK_ICON_SIZE_ enum; + end if + + if file_exists(canonical_path(icon)) then -- from file + icon = canonical_path(icon) + if h = 0 and w = 0 then -- return at natural size; + return gtk_func("gtk_image_new_from_file",{P}, + {allocate_string(icon,1)}) + else + icon = newPixbuf(icon,w,h,size) -- resize it; + return gtk_func("gtk_image_new_from_pixbuf",{P},{icon}) + end if + end if + + if file_exists(locate_file(icon)) then -- from file + icon = locate_file(icon) + if h = 0 and w = 0 then -- return at natural size; + return gtk_func("gtk_image_new_from_file",{P}, + {allocate_string(icon,1)}) + else + icon = newPixbuf(icon,w,h,size) -- resize it; + return gtk_func("gtk_image_new_from_pixbuf",{P},{icon}) + end if + end if + + if size < 7 then + icon = gtk_func("gtk_image_new_from_icon_name",{P,I},{icon,size}) + else + theme = create(GtkIconTheme) -- get current theme; + icon_info = get(theme,"lookup icon",icon,size) -- get icon details; + icon = get(icon_info,"load icon") -- load selected icon; + return create(GtkImage,icon) + end if + + end if + + return icon + end function + + ----------------------------------------------------------------------------------- + function setImage(atom img, object icon, integer size=0) + ----------------------------------------------------------------------------------- + + if size = 0 then + size = get(img,"pixel size") + end if + + if string(icon) then + + if file_exists(canonical_path(icon)) then -- from file + set(img,"from file",icon) + set(img,"pixel size",size) + return img + end if + + if begins("gtk-",icon) then -- from stock (deprecated) + set(img,"from stock",icon) + return img + end if + + set(img,"from icon name",icon) + return img + + end if + return img + end function + + function img_get_icon_name(atom img) + atom name = allocate(8), size = allocate(8) + atom fn = define_proc("gtk_image_get_icon_name",{P,P,P}) + c_proc(fn,{img,name,size}) + if name > 0 then + return {peek_string(peek4u(name)),peek4u(size)} + else return -1 + end if + end function + +widget[GdkCursor] = {"gdk_cursor", +{GObject}, + {"new",{P,P,P},-routine_id("newCursor")}, + {"get_display",{P},P,0,GdkDisplay}, + {"get_image",{P},P,0,GdkPixbuf}, + {"get_surface",{P,D,D},P,0,CairoSurface_t}, + {"get_cursor_type",{P},I}, +"GdkCursor"} + + -- manages cursor creation from a variety of sources + function newCursor(object a, object b=0, integer c=0) + atom disp = gtk_func("gdk_display_get_default") + + if string(a) then + return gtk_func("gdk_cursor_new_from_name",{P,P},{disp,allocate_string(a,1)}) + end if + + if class_id(a) = GdkPixbuf then + return gtk_func("gdk_cursor_new_from_pixbuf",{P,P,I,I},{disp,a,b,c}) + end if + + if class_id(a) = CairoSurface_t then + return gtk_func("gdk_cursor_new_from_surface",{P,P,D,D},{disp,a,b,c}) + end if + + if integer(a) then + return gtk_func("gdk_cursor_new_for_display",{P,I},{disp,a}) + end if + + end function + +widget[GdkWindow] = {"gdk_window", +{GObject}, + {"new",{P,P,I},P}, + {"set_title",{P,S}}, + {"destroy",{P}}, + {"get_width",{P},I}, + {"get_height",{P},I}, + {"get_position",{P,I,I}}, + {"get_device_position",{P,P,P,P,P},P,0,GdkWindow}, + {"get_device_position_double",{P,P,P,P,P},P,0,GdkWindow}, + {"get_origin",{P,I,I}}, + {"get_parent",{P},P,0,GdkWindow}, + {"get_toplevel",{P},P,0,GdkWindow}, + {"get_children",{P},A,0,GList}, + {"get_children_with_user_data",{P,P},A,0,GList}, + {"peek_children",{P},P,0,GList}, + {"get_events",{P},I}, + {"set_events",{P,I}}, + {"set_icon_name",{P,S}}, + {"set_transient_for",{P,P}}, + {"get_root_origin",{P,I,I}}, + {"get_root_coords",{P,I,I,P,P}}, + {"get_frame_extents",{P,P}}, + {"set_modal_hint",{P,B}}, + {"get_modal_hint",{P},B}, + {"set_type_hint",{P,I}}, + {"get_type_hint",{P},I}, + {"get_window_type",{P},I}, + {"get_display",{P},P,0,GdkDisplay}, + {"get_screen",{P},P,0,GdkScreen}, + {"get_visual",{P},P,0,GdkVisual}, + {"show",{P}}, + {"show_unraised",{P}}, + {"hide",{P}}, + {"is_destroyed",{P},B}, + {"is_visible",{P},B}, + {"is_viewable",{P},B}, + {"is_input_only",{P},B}, + {"is_shaped",{P},B}, + {"set_composited",{P,B}}, -- deprecated 3.16 + {"get_composited",{P},B}, -- deprecated 3.16 + {"set_opacity",{P,D}}, + {"set_cursor",{P,P}}, + {"get_cursor",{P},P}, + {"get_state",{P},I}, + {"withdraw",{P}}, + {"iconify",{P}}, + {"deiconify",{P}}, + {"stick",{P}}, + {"unstick",{P}}, + {"maximize",{P}}, + {"unmaximize",{P}}, + {"fullscreen",{P}}, + {"unfullscreen",{P}}, + {"set_fullscreen_mode",{P,I}}, + {"get_fullscreen_mode",{P},I}, + {"set_opacity",{P,D}}, + {"scroll",{P,I,I}}, + {"move_region",{P,P,I,I}}, + {"shape_combine_region",{P,P,I,I}}, + {"set_child_shapes",{P}}, + {"merge_child_shapes",{P}}, + {"input_shape_combine_region",{P,P,I,I}}, + {"set_child_input_shapes",{P}}, + {"merge_child_input_shapes",{P}}, + {"get_geometry",{P,I,I,I,I}}, + {"set_background_rgba",{P,P}}, + {"set_fullscreen_mode",{P,I}}, + {"get_fullscreen_mode",{P},I}, + {"get_scale_factor",{P},I}, + {"set_opaque_region",{P,P}}, + {"get_effective_parent",{P},P,0,GdkWindow}, + {"get_effective_toplevel",{P},P,0,GdkWindow}, + {"beep",{}}, + {"focus",{P,I}}, + {"restack",{P,P,B}}, + {"raise",{P}}, + {"lower",{P}}, + {"set_keep_above",{P,B}}, + {"set_keep_below",{P,B}}, + {"reparent",{P,P,I,I}}, + {"ensure_native",{P},B}, + {"has_native",{P},B}, + {"register_dnd",{P}}, + {"move",{P,I,I}}, + {"scroll",{P,I,I}}, + {"resize",{P,I,I}}, + {"move_resize",{P,I,I,I,I}}, + {"move_region",{P,P,I,I}}, + {"begin_resize_drag",{P,I,I,I,I,I}}, + {"begin_resize_drag_for_device",{P,I,P,I,I,I,I}}, + {"begin_move_drag",{P,I,I,I,I}}, + {"begin_move_drag_for_device",{P,P,I,I,I,I}}, + {"show_window_menu",{P,P},B}, + {"create_gl_context",{P,P},P,0,GdkGLContext}, -- 3.16 + {"mark_paint_from_clip",{P,P}}, -- 3.16 + {"get_clip_region",{P},P,0,CairoRegion_t}, + {"begin_paint_rect",{P,P}}, + {"begin_paint_region",{P,P}}, + {"end_paint",{P}}, + {"set_opaque_region",{P,P}}, + {"get_visible_region",{P},P,0,CairoRegion_t}, + {"set_invalidate_handler",{P,P}}, + {"invalidate_rect",{P,P,B}}, + {"invalidate_region",{P,P,B}}, + {"invalidate_maybe_recurse",{P,P,P,P}}, + {"get_update_area",{P},P,0,CairoRegion_t}, + {"freeze_updates",{P}}, + {"thaw_updates",{P}}, + {"process_all_updates",{P}}, + {"process_updates",{P,B}}, + {"get_frame_clock",{P},P,0,GdkFrameClock}, + {"set_user_data",{P,P}}, + {"get_user_data",{P,P}}, + {"set_override_redirect",{P,B}}, + {"set_accept_focus",{P,B}}, + {"get_accept_focus",{P},B}, + {"set_focus_on_map",{P,B}}, + {"get_focus_on_map",{P},B}, + {"add_filter",{P,P,P}}, + {"remove_filter",{P,P,P}}, + {"set_background_pattern",{P,P}}, + {"get_background_pattern",{P},P,0,CairoPattern_t}, + {"set_geometry_hints",{P,P,I}}, + {"set_functions",{P,I}}, + {"get_pass_through",{P},B}, + {"set_pass_through",{P,B}}, + {"create_gl_context",{P,P},P,0,GdkGLContext}, + {"mark_paint_from_clip",{P,P}}, +"GdkWindow"} + +widget[GdkPixbuf] = {"gdk_pixbuf", +{GObject}, + {"new",{P,I,I,I},-routine_id("newPixbuf")}, + {"get_from_window",{P,I,I,I,I},P,0,GdkPixbuf}, + {"get_from_surface",{P,I,I,I,I},P,0,GdkPixbuf}, + {"flip",{P,I},P,0,GdkPixbuf}, + {"rotate_simple",{P,I},P,0,GdkPixbuf}, + {"scale_simple",{P,I,I,I},P,0,GdkPixbuf}, + {"add_alpha",{P,B,I,I,I},P,0,GdkPixbuf}, + {"copy_area",{P,I,I,I,I,P,I,I}}, + {"apply_embedded_orientation",{P},P,0,GdkPixbuf}, + {"fill",{P,P}}, + {"get_n_channels",{P},I}, + {"get_has_alpha",{P},B}, + {"get_colorspace",{P},I}, + {"get_bits_per_sample",{P},I}, + {"get_pixels_with_length",{P,I},P}, + {"get_width",{P},I}, + {"get_height",{P},I}, + {"get_size",{P},-routine_id("getPixbufSize")}, + {"get_rowstride",{P},I}, + {"get_byte_length",{P},I}, + {"get_option",{P,S},S}, + {"saturate_and_pixelate",{P,P,F,B},0,GdkPixbuf}, + {"composite_color_simple",{}},-- Cannot implement, use gtk_func if required. + {"save",{P,P,P,P},-routine_id("pb_save")}, + {"get_file_info",{P,S},-routine_id("pb_get_file_info")}, + {"get_format",{P,S},-routine_id("pb_get_format")}, +"GdkPixbuf"} + + -- creates a pixbuf from a variety of sources + + function newPixbuf(object name, integer w=0, integer h=0, atom ratio=0) + ----------------------------------------------------------------------- + atom err = allocate(32,1) err = 0 + object path=allocate_string("gtk-missing-image",1) + object pix = 0 + + if string(name) then + + path = canonical_path(locate_file(name)) + + if file_exists(path) then + ifdef PIXBUF then + display("PIXBUF from file: []",{abbreviate_path(path)},0) + end ifdef + path = allocate_string(path,1) + goto "build" + end if + + if has_icon(name) then + path = icon_info(name) + ifdef PIXBUF then + display("PIXBUF from icon: []",{filename(path[3])},0) + end ifdef + if string(path[3]) then + path = allocate_string(path[3],1) + else + path = "!" + end if + goto "build" + else return 0 + end if + + else + ifdef PIXBUF then + display("PIXBUF from atom: [] []",{name,peek_string(name)},0) + end ifdef + end if -- string name; + + label "build" + + if h = 0 and w = 0 then -- return at original size; + ifdef PIXBUF then display("Orig size") end ifdef + pix = gtk_func("gdk_pixbuf_new_from_file",{P,P},{path,err}) + + else -- if one or other dimension given, scale it, otherwise size it; + if w > 0 and h = 0 then h = -1 end if + if w = 0 and h > 0 then w = -1 end if + ifdef PIXBUF then display("\t SCALE []x[] []",{w,h,ratio}) end ifdef + pix = gtk_func("gdk_pixbuf_new_from_file_at_scale",{P,I,I,B,P},{path,w,h,ratio,err}) + end if + + ifdef PIXBUF_ERR then + if pix = 0 then + display("CAUTION: cannot create pixbuf from []",{peek_string(path)}) + end if + end ifdef + + return pix + end function + + -- save a pixbuf in various formats based on file extension(.png, .jpg, etc) + function pb_save(atom handle, object fn, object ft, object params = 0) + if string(fn) then fn = allocate_string(fn,1) end if + if string(ft) then ft = allocate_string(ft,1) end if + if string(params) then + params = split(params,'=') + for i = 1 to length(params) do + params[i] = allocate_string(params[i],1) + end for + end if + + atom err = allocate(8,1) err = 0 + if atom(params) then + return gtk_func("gdk_pixbuf_save",{P,P,P,P,P},{handle,fn,ft,err,0}) + else + return gtk_func("gdk_pixbuf_save",{P,P,P,P,P,P,P},{handle,fn,ft,err,params[1],params[2],0}) + end if + end function + + function getPixbufSize(object pb) + return {get(pb,"width"),get(pb,"height")} + end function + + function pb_get_file_info(atom pb, object name) + atom w = allocate(8,1), h = allocate(8,1) + object fmt = gtk_func("gdk_pixbuf_get_file_info",{P,P,P}, + {name,w,h}) + return {fmt,peek4u(w),peek4u(h)} + end function + + function pb_get_format(atom pb, object name) + object fmt = pb_get_file_info(pb,name) + return fmt + end function + + export function pixbuf_formats() + object fmts = gtk_func("gdk_pixbuf_get_formats") + register(fmts,GSList) + return unpack_gs_str_list(fmts) + end function + +widget[GdkPixbufFormat] = {"gdk_pixbuf_format", +{GObject}, + {"get_name",{P},S}, + {"get_description",{P},S}, + {"get_mime_types",{P},A}, + -- {"extensions",{P},P}, -- error + {"is_writable",{P},B}, + {"is_scalable",{P},B}, + {"is_disabled",{P},B}, + {"set_disabled",{P,B}}, + {"get_license",{P},S}, +"GdkPixbufFormat"} + +widget[GtkDialog] = {"gtk_dialog", +{GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"run",{P},I}, + {"get_action_area",{P},P,0,GtkBox}, -- deprecated 3.12 + {"get_content_area",{P},P,0,GtkBox}, + {"response",{P,I}}, + {"add_button",{P,S,I},P,0,GtkButton}, + {"add_action_widget",{P,P,I}}, + {"set_default_response",{P,I}}, + {"set_response_sensitive",{P,I,B}}, + {"get_response_for_widget",{P,P},I}, + {"get_widget_for_response",{P,I},P,0,GtkWidget}, + {"get_header_bar",{P},P,0,GtkContainer},-- GTK 3.12 +"GtkDialog"} + +widget[GtkMessageDialog] = {"gtk_message_dialog", +{GtkDialog,GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{P,I,I,I,S,S},P}, + {"new_with_markup",{P,I,I,I,S,S},P}, + {"set_markup",{P,S}}, + {"set_image",{P,P}}, -- deprecated 3.12 + {"get_image",{P},P,0,GtkImage}, -- deprecated 3.12 + {"format_secondary_text",{P,S,S}}, + {"format_secondary_markup",{P,S,S}}, + {"get_message_area",{P},P,0,GtkContainer}, +"GtkMessageDialog"} + +widget[GtkSeparator] = {"gtk_separator", +{GtkWidget,GObject,GtkBuildable,GtkOrientable}, + {"new",{I},P}, +"GtkSeparator"} + +widget[GtkEditable] = {"gtk_editable", +{0}, + {"select_region",{P,I,I}}, + {"get_selection_bounds",{P,I,I}}, + {"insert_text",{P,S,I,I}}, + {"delete_text",{P,I,I}}, + {"get_chars",{P,I,I},S}, + {"cut_clipboard",{P}}, + {"copy_clipboard",{P}}, + {"paste_clipboard",{P}}, + {"delete_selection",{P}}, + {"set_position",{P,I}}, + {"get_position",{P},I}, + {"set_editable",{P,B}}, + {"get_editable",{P},B}, +"GtkEditable"} + +widget[GtkTextIter] = {"gtk_text_iter", +{GObject}, + {"get_buffer",{P},P,0,GtkTextBuffer}, + {"copy",{P},P,0,GtkTextIter}, + {"free",{P}}, + {"get_offset",{P},I}, + {"get_line",{P},I}, + {"get_line_offset",{P},I}, + {"get_line_index",{P},I}, + {"get_visible_line_index",{P},I}, + {"get_visible_line_offset",{P},I}, + {"get_char",{P},I}, + {"get_slice",{P,P},S}, + {"get_text",{P,P},S}, + {"get_visible_slice",{P,P},S}, + {"get_visible_text",{P,P},S}, + {"get_pixbuf",{P},P,0,GdkPixbuf}, + {"get_marks",{P},X,0,GSList}, + {"get_toggled_tags",{P,B},X,0,GSList}, + {"get_child_anchor",{P},P,0,GtkTextChildAnchor}, + {"begins_tag",{P,P},B}, + {"ends_tag",{P,P},B}, + {"toggles_tag",{P,P},B}, + {"has_tag",{P,P},B}, + {"get_tags",{P},X,0,GSList}, + {"editable",{P,B},B}, + {"can_insert",{P,B},B}, + {"starts_word",{P},B}, + {"ends_word",{P},B}, + {"inside_word",{P},B}, + {"starts_line",{P},B}, + {"ends_line",{P},B}, + {"starts_sentence",{P},B}, + {"ends_sentence",{P},B}, + {"inside_sentence",{P},B}, + {"is_cursor_position",{P},B}, + {"get_chars_in_line",{P},I}, + {"get_bytes_in_line",{P},I}, + {"get_attributes",{P,P},B}, + {"get_language",{P},P,0,PangoLanguage}, + {"is_end",{P},B}, + {"is_start",{P},B}, + {"forward_char",{P},B}, + {"backward_char",{P},B}, + {"forward_chars",{P,I},B}, + {"backward_chars",{P,I},B}, + {"forward_line",{P},B}, + {"backward_line",{P},B}, + {"forward_lines",{P,I},B}, + {"backward_lines",{P,I},B}, + {"forward_word_ends",{P,I},B}, + {"backward_word_starts",{P,I},B}, + {"forward_word_ends",{P},B}, + {"backward_word_start",{P},B}, + {"forward_cursor_position",{P},B}, + {"backward_cursor_position",{P},B}, + {"forward_cursor_positions",{P,I},B}, + {"backward_cursor_positions",{P,I},B}, + {"backward_sentence_start",{P},B}, + {"backward_sentence_starts",{P,I},B}, + {"forward_sentence_end",{P},B}, + {"forward_sentence_ends",{P,I},B}, + {"forward_visible_word_ends",{P,I},B}, + {"backward_visible_word_starts",{P,I},B}, + {"forward_visible_word_end",{P},B}, + {"backward_visible_word_start",{P},B}, + {"forward_visible_cursor_position",{P},B}, + {"backward_visible_cursor_position",{P},B}, + {"forward_visible_cursor_positions",{P,I},B}, + {"backward_visible_cursor_positions",{P,I},B}, + {"forward_visible_line",{P},B}, + {"backward_visible_line",{P},B}, + {"forward_visible_lines",{P,I},B}, + {"backward_visible_lines",{P,I},B}, + {"set_offset",{P,I}}, + {"set_line",{P,I}}, + {"set_line_offset",{P,I}}, + {"set_line_index",{P,I}}, + {"set_visible_line_index",{P,I}}, + {"set_visible_line_offset",{P,I}}, + {"forward_to_end",{P}}, + {"forward_to_line_end",{P},B}, + {"forward_to_tag_toggle",{P,P},B}, + {"backward_to_tag_toggle",{P,P},B}, + {"forward_find_char",{P,P,P,P},B}, + {"backward_find_char",{P,P,P,P},B}, + {"forward_search",{P,S,I,P,P,P},B}, + {"backward_search",{P,S,I,P,P,P},B}, + {"equal",{P,P},B}, + {"compare",{P,P},I}, + {"in_range",{P,P,P},B}, + {"order",{P,P}}, + {"starts_tag",{P,P},B}, -- 3.20 +"GtkTextIter"} + +widget[GtkEntry] = {"gtk_entry", +{GtkWidget,GtkEditable,GtkCellEditable,GtkBuildable,GObject}, + {"new",{},P}, + {"get_buffer",{P},P,0,GtkEntryBuffer}, + {"set_buffer",{P,P}}, + {"set_text",{P,S}}, + {"set_value",{P,D},-routine_id("entry_set_value")}, -- not GTK, a convenience func; + {"get_text",{P},S}, + {"get_value",{P},-routine_id("entry_get_value")}, -- not GTK, a convenience func; + {"get_text_length",{P},I}, + {"get_text_area",{P,P}}, + {"set_visibility",{P,B}}, + {"get_visibility",{P},B}, + {"set_invisible_char",{P,I}}, + {"get_invisible_char",{P},I}, + {"unset_invisible_char",{P}}, + {"set_max_length",{P,I}}, + {"get_max_length",{P},I}, + {"set_activates_default",{P,B}}, + {"get_activates_default",{P},B}, + {"set_has_frame",{P,B}}, + {"get_has_frame",{P},B}, + {"set_width_chars",{P,I}}, + {"get_width_chars",{P},I}, + {"set_alignment",{P,F}}, + {"get_alignment",{P},F}, + {"set_placeholder_text",{P,S}}, -- GTK 3.2+ + {"get_placeholder_text",{P},S}, -- GTK 3.2+ + {"set_overwrite_mode",{P,B}}, + {"get_overwrite_mode",{P},B}, + {"get_layout",{P},P,0,PangoLayout}, + {"get_layout_offsets",{P,I,I}}, + {"set_completion",{P,P}}, + {"get_completion",{P},P,0,GtkEntryCompletion}, + {"set_progress_fraction",{P,D}}, + {"set_progress_pulse_step",{P,D}}, + {"progress_pulse",{P}}, + {"set_icon_from_stock",{P,I,S}}, -- deprecated 3.10 + {"set_icon_from_pixbuf",{P,I,P}}, + {"set_icon_from_icon_name",{P,I,S}}, + {"set_icon_from_gicon",{P,I,P}}, + {"get_icon_storage_type",{P,I},I}, + {"get_icon_pixbuf",{P,I},P,0,GdkPixbuf}, + {"get_icon_name",{P,I},S}, + {"get_icon_area",{P,I,I}}, + {"get_icon_gicon",{P,I},P,0,GIcon}, + {"set_icon_activatable",{P,I,B}}, + {"set_icon_sensitive",{P,I,B}}, + {"get_icon_at_pos",{P,I,I},I}, + {"set_icon_tooltip_text",{P,I,S}}, + {"get_icon_tooltip_text",{P,I},S}, + {"set_icon_tooltip_markup",{P,I,S}}, + {"get_icon_tooltip_markup",{P,I},S}, + {"set_tabs",{P,P}}, -- 3.10 + {"get_tabs",{P},P,0,PangoTabArray}, -- 3.10 + {"get_max_width_chars",{P},I}, -- 3.12 + {"set_max_width_chars",{P,I}}, -- 3.12 + {"im_context_filter_keypress",{P,I},B}, + {"grab_focus_without_selecting",{P}}, --3.16 +"GtkEntry"} + + function entry_get_value(atom x) -- retrieve input text as a number; + object txt = get(x,"text") + return to_number(txt) + end function + + function entry_set_value(atom x, atom v) -- convert number to text equivalent; + if integer(v) then + set(x,"text",sprintf("%d",v)) + else + set(x,"text",sprintf("%2.2f",v)) + end if + return 1 + end function + +widget[GtkSpinButton] = {"gtk_spin_button", +{GtkEntry,GtkWidget,GtkEditable,GtkCellEditable,GtkOrientable,GtkBuildable,GObject}, + {"set_adjustment",{P,P}}, + {"get_adjustment",{P},P,0,GtkAdjustment}, + {"set_digits",{P,I}}, + {"get_digits",{P},I}, + {"set_range",{P,D,D}}, + {"get_range",{P,D,D}}, + {"set_value",{P,D}}, + {"get_value",{P},-routine_id("getSpinVal")}, + {"get_value_as_int",{P},I}, + {"set_update_policy",{P,I}}, + {"set_numeric",{P,B}}, + {"get_numeric",{P},B}, + {"set_wrap",{P,B}}, + {"get_wrap",{P},B}, + {"spin",{P,I,D}}, + {"update",{P}}, + {"get_increments",{P,D,D}}, + {"set_snap_to_ticks",{P,B}}, + {"get_snap_to_ticks",{P},B}, + {"configure",{P,P,D,I}}, + {"new",{D,D,D},-routine_id("newSpinButton")}, +"GtkSpinButton"} + + -- create a spin button from an ajustment object or from a range of values + + function newSpinButton(atom a=0, atom b=0, atom c=0) + ---------------------------------------------------- + atom sb = 0 + if a+b+c = 0 then a = create(GtkAdjustment,0,0,100,1) end if + if class_id(a) = GtkAdjustment then + sb = gtk_func("gtk_spin_button_new",{P,D,I},{a,b,c}) + else + sb = gtk_func("gtk_spin_button_new_with_range",{D,D,D},{a,b,c}) + end if + return sb + end function + + function getSpinVal(atom spin) + ------------------------------ + object range = get(spin,"range") + atom fn = define_func("gtk_spin_button_get_value",{P},D) + atom val = c_func(fn,{spin}) + val = math:ensure_in_range(val,range) + return val + end function + +widget[GtkOrientable] = {"gtk_orientable", +{GObject}, + {"set_orientation",{P,I}}, + {"get_orientation",{P},I}, +"GtkOrientable"} + +widget[GtkRange] = {"gtk_range", +{GtkWidget,GtkOrientable,GtkBuildable,GObject}, + {"set_fill_level",{P,D}}, + {"get_fill_level",{P},D}, + {"set_restrict_to_fill_level",{P,B}}, + {"get_restrict_to_fill_level",{P},B}, + {"set_show_fill_level",{P,B}}, + {"get_show_fill_level",{P},B}, + {"set_adjustment",{P,P}}, + {"get_adjustment",{P},P}, + {"set_inverted",{P,B}}, + {"get_inverted",{P},B}, + {"set_value",{P,D}}, + {"get_value",{P},D}, + {"set_increments",{P,D,D}}, + {"set_range",{P,D,D}}, + {"set_round_digits",{P,I}}, + {"get_round_digits",{P},I}, + {"set_lower_stepper_sensitivity",{P,I}}, + {"get_lower_stepper_sensitivity",{P},I}, + {"set_upper_stepper_sensitivity",{P,I}}, + {"get_upper_stepper_sensitivity",{P},I}, + {"set_flippable",{P,B}}, + {"get_flippable",{P},B}, + {"set_min_slider_size",{P,I}}, + {"get_min_slider_size",{P},I}, + {"get_slider_range",{P,I,I}}, + {"set_slider_size_fixed",{P,B}}, + {"get_slider_size_fixed",{P},B}, +"GtkRange"} + +widget[GtkScale] = {"gtk_scale", +{GtkRange,GtkWidget,GtkOrientable,GtkBuildable,GObject}, + {"set_digits",{P,I}}, + {"get_digits",{P},I}, + {"set_draw_value",{P,B}}, + {"get_draw_value",{P},B}, + {"set_has_origin",{P,B}}, + {"get_has_origin",{P},B}, + {"set_value_pos",{P,I}}, + {"get_value_pos",{P},I}, + {"get_layout",{P},P,0,PangoLayout}, + {"get_layout_offsets",{P,I,I}}, + {"add_mark",{P,D,I,S}}, + {"clear_marks",{P}}, + {"new",{P,P,P,P},-routine_id("newScale")}, +"GtkScale"} + + -- create scale from range or adjustment; + function newScale(integer orient, atom min=0, atom max=0, atom step=0) + if min+max+step = 0 then + return gtk_func("gtk_scale_new",{I,P},{orient,0}) + end if + if class_id(min) = GtkAdjustment then + return gtk_func("gtk_scale_new",{I,P},{orient,min}) + else + return gtk_func("gtk_scale_new_with_range",{I,D,D,D},{orient,min,max,step}) + end if + end function + +widget[GTimeout] = {"g_timeout", +{0}, + {"new",{I,P,P},-routine_id("newTimeout")}, + {"add",{I,P,P},-routine_id("newTimeout")}, +"GTimeout"} + + function newTimeout(integer ms, atom fn, atom data) + return gtk_func("g_timeout_add",{I,P,P},{ms,fn,data}) + end function + +widget[GIdle] = {"g_idle", +{0}, + {"new",{P,P},-routine_id("newIdle")}, + {"add",{P,P},-routine_id("newIdle")}, +"GIdle"} + + function newIdle(atom fn, atom data) + return gtk_func("g_idle_add",{P,P},{fn,data}) + end function + +widget[GNotification] = {"g_notification", +{0}, + {"new",{S},P}, + {"set_title",{P,S}}, + {"set_body",{P,S}}, + {"set_icon",{P,P}}, + --{"set_priority",{P,I}}, error + {"set_default_action",{P,S}}, + {"add_button",{P,S,S}}, + {"add_button_with_target_value",{P,S,S,I}}, + {"set_default_action_and_target_value",{P,S,I}}, +"GNotification"} + +widget[GApplication] = {"g_application", +{0}, + {"new",{S,I},P}, + {"get_id",{P},S}, + {"set_id",{P,S}}, + {"id_is_valid",{P,S},B}, + {"get_inactivity_timeout",{P},I}, + {"set_inactivity_timeout",{P,I}}, + {"get_flags",{P},I}, + {"set_flags",{P,I}}, + {"get_resource_base_path",{P},S}, + {"set_resource_base_path",{P,S}}, + {"get_dbus_connection",{P},P}, + {"get_dbus_object_path",{P},S}, + {"get_is_registered",{P},B}, + {"get_is_remote",{P},B}, + {"register",{P,P,P},B}, + {"hold",{P}}, + {"release",{P}}, + {"quit",{P}}, + {"activate",{P}}, + {"open",{P,P,I,I}}, + {"send_notification",{P,S,P}}, + {"withdraw_notification",{P,S}}, + {"run",{P,I,P},I}, + {"add_main_option_entries",{P,P}}, + {"add_option_group",{P,P}}, + {"add_main_option",{P,S,S,I,I,S,S}}, + {"set_default",{P}}, + {"mark_busy",{P}}, + {"unmark_busy",{P}}, + {"get_is_busy",{P},B}, + {"bind_busy_property",{P,P,S}}, + {"unbind_busy_property",{P,P,S}}, +"GApplication"} + +widget[GAppInfo] = {"g_app_info", +{0}, + {"get_name",{P},S}, + {"get_display_name",{P},S}, + {"get_description",{P},S}, + {"get_executable",{P},S}, + {"get_commandline",{P},S}, + {"get_icon",{P},P,0,GIcon}, + {"launch",{P,P,P,P},B}, + {"supports_files",{P},B}, + {"supports_uris",{P},B}, + {"launch_uris",{P,P,P,P},B}, + {"should_show",{P},B}, + {"can_delete",{P},B}, + {"delete",{P},B}, + {"set_as_default_for_type",{P,S,P},B}, + {"set_as_default_for_extension",{P,S,P},B}, + {"add_supports_type",{P,S,P},B}, + {"can_remove_supports_type",{P},B}, + {"remove_supports_type",{P,S,P},B}, + {"get_all",{},P,0,GList}, +"GAppInfo"} + +widget[GFile] = {"g_file", +{GObject}, + {"new",{P},-routine_id("newGFile")}, + {"get_parse_name",{P},S}, + {"parse_name",{S},P}, + {"equal",{P,P},B}, + {"get_basename",{P},S}, + {"get_path",{P},S}, + {"get_uri",{P},S}, + {"get_parse_name",{P},S}, + {"get_parent",{P},P,0,GFile}, + {"has_parent",{P,P},B}, + {"get_child",{P,S},P,0,GFile}, + {"get_child_for_display_name",{P,S,P},P,0,GFile}, + {"has_prefix",{P,P},B}, + {"get_relative_path",{P,P},S}, + {"resolve_relative_path",{P,S},P,0,GFile}, + {"is_native",{P},B}, + {"has_uri_scheme",{P,S},B}, + {"get_uri_scheme",{P},S}, + {"read",{P,P,P},P,0,GFileInputStream}, +"GFile"} + + -- create a GFile from a path or uri + function newGFile(object s) + if file_exists(canonical_path(locate_file(s))) then + return gtk_func("g_file_new_for_path",{P}, + {allocate_string(canonical_path(locate_file(s)),1)}) + else + return gtk_func("g_file_new_for_uri",{P}, + {allocate_string(s,1)}) + end if + return 0 + end function + +widget[GIcon] = {"g_icon", +{GObject}, + {"hash",{P},I}, + {"equal",{P,P},B}, + {"to_string",{P},S}, + {"new_for_string",{S,P},P}, + {"new",{S},-routine_id("newGIcon")}, + {"serialize",{P},P}, + {"deserialize",{P},P,0,GIcon}, +"GIcon"} + + function newGIcon(object s) + if string(s) then s = allocate_string(s,1) end if + return gtk_func("g_icon_new_for_string",{P,P},{s,0}) + end function + +widget[GFileIcon] = {"g_file_icon", +{GIcon,GObject}, + {"new",{P},P}, + {"get_file",{P},P}, +"GFileIcon"} + +widget[GFileInfo] = {"g_file_info", +{GObject}, + {"new",{},P}, + {"get_name",{P},S}, + {"get_display_name",{P},S}, + {"get_edit_name",{P},S}, + {"get_icon",{P},P,0,GIcon}, + {"get_symbolic_icon",{P},P,0,GIcon}, + {"get_content_type",{P},S}, + {"get_size",{P},I}, + {"get_modification_time",{P,P}}, + {"get_symlink_target",{P},S}, + {"get_etag",{P},S}, + {"get_sort_order",{P},I}, + {"get_deletion_date",{P},P,0,GDateTime}, + {"set_is_hidden",{P,B}}, + {"set_is_symlink",{P,B}}, + {"set_name",{P,S}}, + {"set_display_name",{P,S}}, + {"set_edit_name",{P,S}}, + {"set_icon",{P,P}}, + {"set_symbolic_icon",{P,P}}, + {"set_content_type",{P,S}}, + {"set_size",{P,I}}, +"GFileInfo"} + +widget[GList] = {"g_list", +{GObject}, + {"new",{},-routine_id("newGList")}, + {"append",{P,P},P}, + {"length",{P},I}, + {"nth_data",{P,I},P}, +"GList"} + + function newGList() + atom x = allocate(64) x = 0 -- keep; + return x + end function + +widget[GSList] = {"g_slist", +{GObject}, + {"length",{P},I}, +"GSList"} + + object temp_list + + export function unpack_gs_str_list(atom gs) + if gs = 0 then return 1 end if + atom fn = call_back(routine_id("gs_str_each")) + temp_list = {} + gtk_proc("g_slist_foreach",{P,P,P},{gs,fn,0}) + return temp_list + end function + + function gs_str_each(object x) + if x > 0 then + temp_list = append(temp_list,peek_string(x)) + end if + return 1 + end function + + export function unpack_gs_atom_list(object gs) + temp_list = {} + atom fn = call_back(routine_id("gs_atom_each")) + gtk_proc("g_slist_foreach",{P,P,P},{gs,fn,0}) + return temp_list + end function + + function gs_atom_each(object x) + temp_list = append(temp_list,x) + return 1 + end function + +widget[GdkDisplay] = {"gdk_display", +{GObject}, + {"new",{},-routine_id("newGdkDisplay")}, -- alias get_default; + {"open",{S},P,0,GdkDisplay}, + {"get_name",{P},S}, + {"get_n_screens",{P},I}, + {"get_screen",{P,I},P,0,GdkScreen}, + {"get_default_screen",{P},P,0,GdkScreen}, + {"get_device_manager",{P},P,0,GdkDeviceManager}, + {"device_is_grabbed",{P,P},B}, + {"beep",{P}}, + {"sync",{P}}, + {"flush",{P}}, + {"close",{P}}, + {"is_closed",{P},B}, + {"get_event",{P},P,0,GdkEvent}, + {"peek_event",{P},P,0,GdkEvent}, + {"put_event",{P,P}}, + {"has_pending",{P},B}, + {"set_double_click_time",{P,I}}, + {"set_double_click_distance",{P,I}}, + {"supports_cursor_color",{P},B}, + {"supports_cursor_alpha",{P},B}, + {"get_default_cursor_size",{P},I}, + {"get_maximal_cursor_size",{P,I,I}}, + {"get_default_group",{P},P,0,GdkWindow}, + {"supports_selection_notification",{P},B}, + {"request_selection_notification",{P,P},B}, + {"supports_clipboard_persistence",{P},B}, + {"store_clipboard",{P,P,I,P,I}}, + {"supports_shapes",{P},B}, + {"supports_input_shapes",{P},B}, + {"supports_composite",{P},B}, -- deprecated 3.16 + {"get_app_launch_context",{P},P,0,GtkAppLaunchContext}, + {"notify_startup_complete",{P,S}}, +"GdkDisplay"} + + function newGdkDisplay() -- alias; + return gtk_func("gdk_display_get_default",{}) + end function + +widget[GdkDevice] = {"gdk_device", +{GObject}, + {"get_name",{P},S}, + {"get_device_type",{P},I}, + {"get_display",{P},P,0,GdkDisplay}, + {"get_has_cursor",{P},B}, + {"get_n_axes",{P},I}, + {"get_n_keys",{P},I}, + {"warp",{P,P,I,I}}, + {"grab",{P,P,I,B,I,P,P},I}, + {"ungrab",{P,P}}, + {"get_state",{P,P,D,P}}, + {"get_position",{P,P,I,I}}, + {"get_position_double",{P,P,D,D}}, + {"get_window_at_position",{P,I,I},P,0,GdkWindow}, + {"get_window_at_position_double",{P,D,D},P,0,GdkWindow}, + {"get_history",{P,P,P,P,P,I},B}, + {"free_history",{P,I}}, + {"get_vendor_id",{P},S}, + {"get_product_id",{P},S}, + {"get_source",{P},P,0,GdkInputSource}, + {"set_mode",{P,I},B}, + {"get_mode",{P},I}, + {"set_key",{P,I,I,I}}, + {"get_key",{P,I,I,I},B}, + {"get_axis",{P,D,I,D},B}, + {"list_axes",{P},A,0,GList}, + {"get_axis_value",{P,D,P,D},B}, + {"get_last_event_window",{P},P,0,GdkWindow}, + {"set_axis_use",{P,I,I}}, + {"get_axis_use",{P,I},I}, + {"get_associated_device",{P},P,0,GdkDevice}, + {"list_slave_devices",{P},A,0,GList}, + {"get_position",{P,P,I,I}}, +"GdkDevice"} + +widget[GdkScreen] = {"gdk_screen", +{GdkDevice,GObject}, + {"new",{},-routine_id("newGdkScreen")}, -- alias get_default; + {"get_system_visual",{P},P,0,GdkVisual}, + {"get_rgba_visual",{P},P,0,GdkVisual}, + {"is_composited",{P},B}, + {"get_root_window",{P},P,0,GdkWindow}, + {"get_display",{P},P,0,GdkDisplay}, + {"get_number",{P},I}, + {"get_width",{P},I}, + {"get_height",{P},I}, + {"get_width_mm",{P},I}, + {"get_height_mm",{P},I}, + {"list_visuals",{P},P,0,GList}, + {"get_toplevel_windows",{P},P,0,GList}, + {"make_display_name",{P},S}, + {"get_n_monitors",{P},I}, + {"get_primary_monitor",{P},I}, + {"get_monitor_geometry",{P,I,P}}, + {"get_monitor_workarea",{P,I,P}}, + {"get_monitor_at_point",{P,I,I},I}, + {"get_monitor_at_window",{P,P},I}, + {"get_monitor_height_mm",{P,I},I}, + {"get_monitor_width_mm",{P,I},I}, + {"get_monitor_plug_name",{P,I},S}, + {"get_setting",{P,S,P},B}, + {"get_font_options",{P},P,0,CairoFontOptions}, + {"get_resolution",{P},D}, + {"set_resolution",{P,D}}, + {"get_active_window",{P},P,0,GdkWindow}, + {"get_window_stack",{P},P,0,GList}, +"GdkScreen"} + + function newGdkScreen() -- alias; + return gtk_func("gdk_screen_get_default",{}) + end function + +widget[GdkVisual] = {"gdk_visual", +{GObject}, +"GdkVisual"} + +widget[GThemedIcon] = {"g_themed_icon", +{GIcon,GObject}, + {"new",{S},P}, + {"new_with_default_fallbacks",{S},P}, + {"get_names",{P},P}, +"GThemedIcon"} + +widget[GtkThemedIcon] = {"gtk_themed_icon", +{GObject}, +"GtkThemedIcon"} + +widget[GEmblem] = {"g_emblem", +{GObject}, + {"new",{P},P}, + {"get_icon",{P},P,0,GIcon}, +"GEmblem"} + +widget[GEmblemedIcon] = {"g_emblemed_icon", +{GIcon,GObject}, + {"new",{P,P},P}, +"GEmblemedIcon"} + +widget[GdkDeviceManager] = {"gdk_device_manager", +{GObject}, + {"new",{P},-routine_id("newDeviceManager")}, + {"get_display",{P},P,0,GdkDisplay}, + {"list_devices",{P,I},X,0,GList}, + {"get_client_pointer",{P},P,0,GdkDevice}, +"GdkDeviceManager"} + + function newDeviceManager(atom disp=0) + if disp = 0 then + disp = gtk_func("gdk_display_get_default") + end if + return gtk_func("gdk_display_get_device_manager",{P},{disp}) + end function + +widget[GtkAppChooser] = {"gtk_app_chooser", +{GtkWidget}, + {"get_app_info",{P},P,0,GAppInfo}, + {"get_content_type",{P},S}, + {"refresh",{P}}, +"GtkAppChooser"} + +widget[GtkAppChooserButton] = {"gtk_app_chooser_button", +{GtkComboBox,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkCellLayout,GtkCellEditable,GObject}, + {"new",{S},P}, + {"append_custom_item",{P,S,S,P}}, + {"append_separator",{P}}, + {"set_active_custom_item",{P,S}}, + {"set_show_default_item",{P,B}}, + {"get_show_default_item",{P},B}, + {"set_show_dialog_item",{P,B}}, + {"get_show_dialog_item",{P},B}, + {"set_heading",{P,S}}, + {"get_heading",{P},S}, +"GtkAppChooserButton"} + +widget[GMenu] = {"g_menu", +{GObject}, + {"new",{},P}, + {"append",{P,S,S}}, +"GMenu"} + +widget[GSettings] = {"g_settings", +{GObject}, + {"new",{S},P}, + {"set_value",{P,S,P},B}, + {"get_value",{P},P}, + {"get_user_value",{P,S},P}, +"GSettings"} + +widget[GtkApplication] = {"gtk_application", +{GApplication,GObject}, + {"new",{S,I},-routine_id("newApplication")}, + {"add_window",{P,P}}, + {"remove_window",{P,P}}, + {"get_windows",{P},A,0,GList}, + {"get_window_by_id",{P,I},P,0,GtkWindow}, + {"get_active_window",{P},P,0,GtkWindow}, + {"inhibit",{P,P,I,S},I}, + {"uninhibit",{P,I}}, + {"is_inhibited",{P,I},B}, + {"get_app_menu",{P},P,0,GMenuModel}, + {"set_app_menu",{P,P}}, + {"get_menubar",{P},P,0,GMenuModel}, + {"set_menubar",{P,P}}, + {"add_accelerator",{P,S,S,P}}, + {"remove_accelerator",{P,S,P}}, + {"run",{P},-routine_id("app_run")}, + {"activate",{P},-routine_id("app_activate")}, + {"get_accels_for_action",{P,S},V}, -- 3.12 + {"set_accels_for_action",{P,S,S}}, -- 3.12 + {"list_action_descriptions",{P},V}, + {"get_actions_for_accel",{P,S},V}, -- 3.14 + {"get_menu_by_id",{P,S},P,0,GMenu}, -- 3.14 + {"prefers_app_menu",{},B}, -- 3.14 +"GtkApplication"} + + function app_activate(object x) + gtk_proc("g_application_activate",{P},{x}) + return 1 + end function + + function app_run(object x) + gtk_proc("g_application_run",{P,I,P},{x,0,0}) + return 1 + end function + + function newApplication(object id, object flags) + if string(id) then id = allocate_string(id,1) end if + if gtk_func("g_application_id_is_valid",{P},{id}) then + return gtk_func("gtk_application_new",{P,I},{id,flags}) + else + crash("Error: invalid application id!") + end if + return 0 + end function + +widget[GtkApplicationWindow] = {"gtk_application_window", +{GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{P},P}, + {"set_show_menubar",{P,B}}, + {"get_show_menubar",{P},B}, + {"set_help_overlay",{P,P}}, -- 3.20 + {"get_help_overlay",{P},P,0,GtkShortcutsWindow}, -- 3.20 + {"get_id",{P},I}, +"GtkApplicationWindow"} + +widget[GtkActionable] = {"gtk_actionable", +{GtkWidget}, + {"get_action_name",{P},S}, + {"set_action_name",{P,S}}, + {"get_action_target_value",{P},P}, + {"set_action_target_value",{P,P}}, + {"set_action_target",{P,S,P}}, + {"set_detailed_action_name",{P,S}}, +"GtkActionable"} + +-- Soon to be deprecated, but still used internally by Glade; +widget[GtkAlignment] = {"gtk_alignment", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{F,F,F,F},P}, + {"set",{P,F,F,F,F}}, + {"get_padding",{P,I,I,I,I}}, + {"set_padding",{P,I,I,I,I}}, +"GtkAlignment"} + +widget[GtkAppLaunchContext] = {"gdk_app_launch_context", +{GdkAppLaunchContext,GObject}, + {"set_screen",{P,P}}, + {"set_desktop",{P,I}}, + {"set_timestamp",{P,I}}, + {"set_icon",{P,P}}, + {"set_icon_name",{P,S}}, +"GtkAppLaunchContext"} + +widget[GtkAspectFrame] = {"gtk_aspect_frame", +{GtkFrame,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{S,F,F,F,B},P}, + {"set",{P,F,F,F,B}}, +"GtkAspectFrame"} + +widget[GtkAssistant] = {"gtk_assistant", +{GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"set_current_page",{P,I}}, + {"get_current_page",{P},I}, + {"get_n_pages",{P},I}, + {"get_nth_page",{P,I},P,0,GtkWidget}, + {"prepend_page",{P,P},I}, + {"append_page",{P,P},I}, + {"insert_page",{P,P,I},I}, + {"remove_page",{P,I}}, + {"set_forward_page_func",{P,P,P,P}}, + {"set_page_type",{P,P,P}}, + {"get_page_type",{P,P},I}, + {"set_page_title",{P,P,S}}, + {"get_page_title",{P,P},S}, + {"set_page_complete",{P,P,B}}, + {"get_page_complete",{P,P},B}, + {"add_action_widget",{P,P}}, + {"remove_action_widget",{P,P}}, + {"update_buttons_state",{P}}, + {"commit",{P}}, + {"next_page",{P}}, + {"previous_page",{P}}, + {"get_page_has_padding",{P,P},B}, -- 3.18 + {"set_page_has_padding",{P,P,B}}, -- 3.18 +"GtkAssistant"} + +widget[GtkDrag] = {"gtk_drag", +{0}, + {"get_data",{P,P,P,P}}, + {"get_source_widget",{P},P,0,GtkWidget}, + {"highlight",{P}}, + {"unhighlight",{P}}, + {"begin_with_coordinates",{P,P,P,I,P,I,I},P}, + {"finish",{P,B,B,P}}, + {"set_icon_widget",{P,P,I,I}}, + {"set_icon_pixbuf",{P,P,I,I}}, + {"set_icon_surface",{P,P}}, + {"set_icon_name",{P,P,I,I}}, + {"set_icon_gicon",{P,P,I,I}}, + {"set_icon_default",{P}}, + {"check_threshold",{P,I,I,I,I},B}, + {"cancel",{P}}, -- 3.16 +"GtkDrag"} + +widget[GtkDragSource] = {"gtk_drag_source", +{GtkDrag}, + {"set",{P,I,P,I,I}}, + {"set_icon_pixbuf",{P,P}}, + {"set_icon_name",{P,S}}, + {"set_icon_gicon",{P,P}}, + {"unset",{P}}, + {"set_target_list",{P,P}}, + {"get_target_list",{P},P,0,GtkTargetList}, + {"add_text_targets",{P}}, + {"add_image_targets",{P}}, + {"add_uri_targets",{P}}, +"GtkDragSource"} + +widget[GtkDragDest] = {"gtk_drag_dest", +{GtkDrag}, + {"set",{P,I,P,I,I}}, + {"set_proxy",{P,P,I,B}}, + {"unset",{P}}, + {"find_target",{P,P,P},P}, + {"get_target_list",{P},P,0,GtkTargetList}, + {"set_target_list",{P,P}}, + {"add_text_targets",{P}}, + {"add_image_targets",{P}}, + {"add_uri_targets",{P}}, + {"set_track_motion",{P,B}}, + {"get_track_motion",{P},B}, +"GtkDragDest"} + +widget[GtkCssProvider] = {"gtk_css_provider", +{GObject}, + {"new",{P},-routine_id("new_css_provider")}, + {"get_default",{},P,0,GtkCssProvider}, + {"get_named",{S,S},P,0,GtkCssProvider}, + {"load_from_data",{P,S,I,P},B}, + {"load_from_file",{P,S,P},B}, + {"load_from_path",{P,S,P},B}, + {"load_from_resource",{P,S}}, -- 3.16 + {"to_string",{P},S}, +"GtkCssProvider"} + + function new_css_provider(object name=0) + atom provider = gtk_func("gtk_css_provider_get_default") + atom style = create(GtkStyleContext) + atom screen = get(style,"screen") + + atom err = allocate(64,1) err = 0 + register(provider,GtkCssProvider) + + if atom(name) then + set(style,"add provider for screen",screen,provider,800) + return provider + end if + + if file_exists(canonical_path(locate_file(name))) then + if gtk_func("gtk_css_provider_load_from_path",{P,P,P}, + {provider,allocate_string(canonical_path(locate_file(name)),1),err}) then + set(style,"add provider for screen",screen,provider,800) + return provider + else + printf(1,"Error finding or parsing css from path: %s \n", + {canonical_path(locate_file(name))}) + end if + end if + + if string(name) then + integer len = length(name) + name = allocate_string(name,1) + if gtk_func("gtk_css_provider_load_from_data",{P,P,I,P},{provider,name,len,err}) then + set(style,"add provider for screen",screen,provider,800) + end if + end if + + return provider + end function + +widget[GtkCssSection] = {"gtk_css_section", +{GObject}, + {"get_end_line",{P},I}, + {"get_end_position",{P},I}, + {"get_file",{P},P,0,GFile}, + {"get_parent",{P},P,0,GtkCssSection}, + {"get_section_type",{P},I}, + {"get_start_line",{P},I}, + {"get_start_position",{P},I}, +"GtkCssSection"} + +widget[GtkStatusIcon] = {"gtk_status_icon", -- deprecated 3.14 +{GObject}, + {"new",{},P,0,GObject}, + {"new_from_pixbuf",{P},P}, + {"new_from_file",{S},P}, + {"new_from_icon_name",{S},P}, + {"new_from_gicon",{P},P}, + {"set_from_pixbuf",{P,P}}, + {"set_from_file",{P,S}}, + {"set_from_icon_name",{P,S}}, + {"set_from_gicon",{P,P}}, + {"get_storage_type",{P},I}, + {"get_pixbuf",{P},P,0,GdkPixbuf}, + {"get_icon_name",{P},S}, + {"get_gicon",{P},P}, + {"get_size",{P},I}, + {"set_screen",{P,P}}, + {"get_screen",{P},P,0,GdkScreen}, + {"set_tooltip_text",{P,S}}, + {"get_tooltip_text",{P},S}, + {"set_tooltip_markup",{P,S}}, + {"get_tooltip_markup",{P},S}, + {"set_has_tooltip",{P,B}}, + {"get_has_tooltip",{P},P}, + {"set_title",{P,S}}, + {"get_title",{P},S}, + {"set_name",{P,S}}, + {"set_visible",{P,B}}, + {"get_visible",{P},B}, + {"is_embedded",{P},B}, + {"get_geometry",{P,P,P,I},B}, + {"get_x11_window_id",{P},I}, + {"position_menu",{P,P,I,I,B},-routine_id("si_position_menu")}, +"GtkStatusIcon"} + + function si_position_menu(atom stat, atom menu, integer x, integer y, integer p) + atom fn = define_proc("gtk_status_icon_position_menu",{P,I,I,I,P}) + c_proc(fn,{menu,x,y,p,stat}) -- menu and status_icon params swapped; + return 1 + end function + +widget[GtkOffscreenWindow] = {"gtk_offscreen_window", +{GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"get_surface",{P},P,0,CairoSurface_t}, + {"get_pixbuf",{P},P,0,GdkPixbuf}, +"GtkOffscreenWindow"} + +widget[GtkComboBox] = {"gtk_combo_box", +{GtkBin,GtkContainer,GtkWidget,GtkCellLayout,GtkCellEditable,GtkBuildable,GObject}, + {"new",{P},-routine_id("newComboBox")}, + {"set_wrap_width",{P,I}}, + {"get_wrap_width",{P},I}, + {"set_row_span_column",{P,I}}, + {"get_row_span_column",{P},I}, + {"set_column_span_column",{P,I}}, + {"get_column_span_column",{P},I}, + {"set_active",{P,I}}, + {"get_active",{P},I}, + {"set_id_column",{P,I}}, + {"get_id_column",{P},I}, + {"set_active_id",{P,S},B}, + {"get_active_id",{P},S}, + {"set_model",{P,P}}, + {"get_model",{P},P,0,GtkTreeModel}, + {"popup_for_device",{P,P}}, + {"popup",{P}}, + {"popdown",{P}}, + {"set_row_separator_func",{P,P,P,P}}, + {"get_row_separator_func",{P},P}, + {"set_add_tearoffs",{P,B}}, -- deprecated 3.10 + {"get_add_tearoffs",{P},B}, -- deprecated 3.10 + {"set_title",{P,S}}, -- deprecated 3.10 + {"get_title",{P},S}, -- deprecated 3.10 + {"set_focus_on_click",{P,B}}, + {"get_focus_on_click",{P},B}, + {"set_button_sensitivity",{P,I}}, + {"get_button_sensitivity",{P},I}, + {"get_has_entry",{P},B}, + {"set_entry_text_column",{P,I}}, + {"get_entry_text_column",{P},I}, + {"set_popup_fixed_width",{P,B}}, + {"get_popup_fixed_width",{P},B}, + {"set_activates_default",{P,B},-routine_id("combo_set_activates_default")}, + {"get_entry",{P},-routine_id("combo_get_entry")}, +"GtkComboBox"} + + -- create a combo box either empty or from a model + function newComboBox(object x=0) + if x = 0 then + return gtk_func("gtk_combo_box_new",{},{}) + end if + if class_id(x) = GtkListStore then + return gtk_func("gtk_combo_box_new_with_model",{P},{x}) + end if + end function + + function combo_get_entry(atom box) + atom x = get(box,"child") + register(x,GtkEntry) + return x + end function + + function combo_set_activates_default(atom box, boolean z) + atom x = get(box,"child") + register(x,GtkEntry) + set(x,"property","activates-default",z) + return 1 + end function + +widget[GtkComboBoxText] = {"gtk_combo_box_text", +{GtkCellLayout,GtkCellEditable,GtkComboBox,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"new_with_entry",{},P}, + {"append",{P,S,S}}, + {"prepend",{P,S,S}}, + {"insert",{P,I,S,S}}, + {"append_text",{P,S}}, + {"prepend_text",{P,S}}, + {"insert_text",{P,I,S}}, + {"remove",{P,I}}, + {"remove_all",{P}}, + {"get_active_text",{P},S}, +"GtkComboBoxText"} + +widget[GtkComboBoxEntry] = {"gtk_combo_box_text", +{GtkComboBoxText,GtkComboBox,GtkBin,GtkContainer,GtkWidget,GObject}, + {"new",{},-routine_id("new_combo_box_entry")}, +"GtkComboBoxEntry"} + + function new_combo_box_entry() -- alias; + return gtk_func("gtk_combo_box_text_new_with_entry",{},{}) + end function + +widget[GtkFrame] = {"gtk_frame", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{S},P}, + {"set_label",{P,S}}, + {"get_label",{P},S}, + {"set_label_align",{P,F,F}}, + {"get_label_align",{P,F,F}}, + {"set_label_widget",{P,P}}, + {"get_label_widget",{P},P,0,GtkWidget}, + {"set_shadow_type",{P,I}}, + {"get_shadow_type",{P},I}, +"GtkFrame"} + +widget[GtkModelButton] = {"gtk_model_button", -- new in 3.16 +{GtkButton,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{},P}, +"GtkModelButton"} + +widget[GtkButton] = {"gtk_button", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P},-routine_id("newButton")}, + {"new_from_icon_name",{S,I},P,0,GtkWidget}, -- 3.10 + {"set_relief",{P,I}}, + {"get_relief",{P},I}, + {"set_label",{P,S}}, + {"get_label",{P},S}, + {"set_use_underline",{P,B}}, + {"get_use_underline",{P},B}, + {"set_focus_on_click",{P,B}}, + {"get_focus_on_click",{P},B}, + {"set_alignment",{P,F,F}}, -- deprecated 3.14 + {"get_alignment",{P,F,F}}, -- deprecated 3.15 + {"set_image",{P,P},-routine_id("setBtnImage")}, + {"get_image",{P},P,0,GtkImage}, + {"set_image_position",{P,I}}, + {"get_image_position",{P},I}, + {"set_always_show_image",{P,B}}, -- GTK 3.6+ + {"get_always_show_image",{P},B}, -- GTK 3.6+ + {"get_event_window",{P},P,0,GdkWindow}, +"GtkButton"} + + function setBtnImage(atom btn, object img) + ------------------------------------------ + if class_id(img) = GdkPixbuf then + img = create(GtkImage,img) + end if + if string(img) then + if file_exists(canonical_path(img)) then + img = canonical_path(img) + elsif file_exists(canonical_path("~" & img)) then + img = canonical_path("~" & img) + end if + img = create(GdkPixbuf,img,20,20,1) + img = create(GtkImage,img) + end if + if atom(img) then + gtk_proc("gtk_button_set_image",{P,P},{btn,img}) + end if + return 1 + end function + + -- handles creation of buttons with icons from various sources; + -- this function modified greatly from earlier versions, in order + -- to circumvent the misguided idea that buttons, menus, etc. should not have + -- icons (even though window managers have settings to show or hide these + -- icons as the USER prefers) + + function newButton(object cap = 0) + ---------------------------------- + atom btn = 0 + object tmp, t1, box, lbl = 0, icon = 0 + + if atom(cap) then + if cap = 0 then -- blank button; + btn = gtk_func("gtk_button_new",{}) + register(btn,GtkButton) + return btn + else + btn = gtk_func("gtk_button_new",{}) + register(btn,GtkButton) + set(btn,"use underline",TRUE) + + if class_id(cap) = GdkPixbuf then -- convert to image; + cap = create(GtkImage,cap) + end if + if class_id(cap) = GtkImage then + set(btn,"image",cap) -- add image to btn + set(btn,"always show image",BTN_SHOW_IMG) + end if + return btn + end if + end if + + if string(cap) then + if match("#",cap) = 0 then + btn = gtk_func("gtk_button_new_from_stock",{P},{allocate_string(cap)}) + register(btn,GtkButton) + set(btn,"always show image",BTN_SHOW_IMG) + set(btn,"use underline",TRUE) + return btn + end if + tmp = split(cap,'#') + btn = gtk_func("gtk_button_new_with_mnemonic",{P},{allocate_string(tmp[2],1)}) + register(btn,GtkButton) + set(btn,"use underline",TRUE) + + t1 = canonical_path(locate_file(tmp[1])) + + if match("gtk-",cap) = 1 then + btn = gtk_func("gtk_button_new") + register(btn,GtkButton) + box = create(GtkBox,0,5) + add(btn,box) + icon = create(GtkImage,tmp[1],ceil(BTN_ICON_SIZE/10)) + if icon > 0 then add(box,icon) end if + if length(tmp[2]) > 0 then + lbl = gtk_func("gtk_label_new_with_mnemonic",{P},{allocate_string(tmp[2])}) + register(lbl,GtkLabel) + set(lbl,"font",sprintf("%d",BTN_TEXT_SIZE)) + add(box,lbl) + end if + set(btn,"always show image",BTN_SHOW_IMG) + set(btn,"use underline",TRUE) + return btn + + elsif file_exists(t1) then + icon = create(GdkPixbuf,t1,BTN_ICON_SIZE,0,1) + + else + icon = create(GtkImage,tmp[1],BTN_ICON_SIZE,0,1) + end if + set(btn,"image",icon) + set(btn,"always show image",BTN_SHOW_IMG) + set(btn,"use underline",TRUE) + return btn + end if + + btn = gtk_func("gtk_button_new",{}) + register(btn,GtkButton) + + return btn + end function + +widget[GtkToggleButton] = {"gtk_toggle_button", +{GtkButton,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P},-routine_id("newToggleButton")}, + {"new_with_label",{S},P}, + {"new_with_mnemonic",{S},P}, + {"set_mode",{P,B}}, + {"get_mode",{P},B}, + {"toggled",{P}}, + {"set_active",{P,B}}, + {"get_active",{P},B}, + {"set_inconsistent",{P,B}}, + {"get_inconsistent",{P},B}, +"GtkToggleButton"} + + function newToggleButton(object cap = 0) + atom btn = 0 + object tmp, t1, icon = 0 + + if atom(cap) then + if cap = 0 then -- blank button; + btn = gtk_func("gtk_toggle_button_new",{}) + register(btn,GtkToggleButton) + return btn + else + btn = gtk_func("gtk_toggle_button_new",{}) + register(btn,GtkToggleButton) + if class_id(cap) = GdkPixbuf then -- convert to image; + cap = create(GtkImage,cap) + end if + if class_id(cap) = GtkImage then + set(btn,"image",cap) -- add image to btn + set(btn,"always show image",BTN_SHOW_IMG) + end if + return btn + end if + end if + + if string(cap) then + if match("#",cap) = 0 then + btn = gtk_func("gtk_toggle_button_new_with_mnemonic",{P},{allocate_string(cap)}) + register(btn,GtkToggleButton) + return btn + end if + tmp = split(cap,'#') + btn = gtk_func("gtk_toggle_button_new_with_mnemonic",{P},{allocate_string(tmp[2],1)}) + register(btn,GtkToggleButton) + + t1 = canonical_path(locate_file(tmp[1])) + + if match("gtk-",cap) = 1 then + icon = create(GtkImage,tmp[1],ceil(BTN_ICON_SIZE/5)) + + elsif file_exists(t1) then + icon = create(GdkPixbuf,t1,BTN_ICON_SIZE,0,1) + + else + icon = create(GtkImage,tmp[1],BTN_ICON_SIZE,0,1) + end if + set(btn,"image",icon) + set(btn,"always show image",BTN_SHOW_IMG) + return btn + end if + + btn = gtk_func("gtk_toggle_button_new",{}) + register(btn,GtkToggleButton) + + return btn + + end function + +widget[GtkCheckButton] = {"gtk_check_button", +{GtkToggleButton,GtkButton,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P},-routine_id("newCheckButton")}, + {"new_with_label",{S},P,0,GtkCheckButton}, + {"new_with_mnemonic",{S},P,0,GtkCheckButton}, +"GtkCheckButton"} + + function newCheckButton(object cap = 0) + atom btn = 0 + object tmp, t1, icon = 0 + + if atom(cap) then + if cap = 0 then -- blank button; + btn = gtk_func("gtk_check_button_new",{}) + register(btn,GtkCheckButton) + return btn + else + btn = gtk_func("gtk_check_button_new",{}) + register(btn,GtkCheckButton) + if class_id(cap) = GdkPixbuf then -- convert to image; + cap = create(GtkImage,cap) + end if + if class_id(cap) = GtkImage then + set(btn,"image",cap) -- add image to btn + set(btn,"always show image",BTN_SHOW_IMG) + end if + return btn + end if + end if + + if string(cap) then + if match("#",cap) = 0 then + btn = gtk_func("gtk_check_button_new_with_mnemonic",{P},{allocate_string(cap)}) + register(btn,GtkCheckButton) + return btn + end if + tmp = split(cap,'#') + btn = gtk_func("gtk_check_button_new_with_mnemonic",{P},{allocate_string(tmp[2],1)}) + register(btn,GtkCheckButton) + + t1 = canonical_path(locate_file(tmp[1])) + + if match("gtk-",cap) = 1 then + icon = create(GtkImage,tmp[1],ceil(BTN_ICON_SIZE/5)) + + elsif file_exists(t1) then + icon = create(GdkPixbuf,t1,BTN_ICON_SIZE,0,1) + + else + icon = create(GtkImage,tmp[1],BTN_ICON_SIZE,0,1) + end if + set(btn,"image",icon) + set(btn,"always show image",BTN_SHOW_IMG) + return btn + end if + + btn = gtk_func("gtk_check_button_new",{}) + register(btn,GtkCheckButton) + + return btn + end function + +widget[GtkRadioButton] = {"gtk_radio_button", +{GtkCheckButton,GtkToggleButton,GtkButton,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P,P},-routine_id("newRadioButton")}, + {"set_group",{P,P}}, + {"get_group",{P},P}, + {"join_group",{P,P}}, +"GtkRadioButton"} + + function newRadioButton(atom group=0, object cap = 0) + atom btn = 0 + object tmp, t1, icon = 0 + + if atom(cap) then + if cap = 0 then -- blank button; + btn = gtk_func("gtk_radio_button_new",{P},{group}) + register(btn,GtkRadioButton) + return btn + else + btn = gtk_func("gtk_radio_button_new",{P},{group}) + register(btn,GtkRadioButton) + if class_id(cap) = GdkPixbuf then -- convert to image; + cap = create(GtkImage,cap) + end if + if class_id(cap) = GtkImage then + set(btn,"image",cap) -- add image to btn + set(btn,"always show image",BTN_SHOW_IMG) + end if + return btn + end if + end if + + if string(cap) then + if match("#",cap) = 0 then + btn = gtk_func("gtk_radio_button_new_with_mnemonic_from_widget",{P,P},{group,cap}) + register(btn,GtkRadioButton) + return btn + end if + tmp = split(cap,'#') + btn = gtk_func("gtk_radio_button_new_with_mnemonic_from_widget",{P,P},{group,allocate_string(tmp[2],1)}) + register(btn,GtkRadioButton) + + t1 = canonical_path(locate_file(tmp[1])) + + if match("gtk-",cap) = 1 then + icon = create(GtkImage,tmp[1],ceil(BTN_ICON_SIZE/5)) + + elsif file_exists(t1) then + icon = create(GdkPixbuf,t1,BTN_ICON_SIZE,0,1) + + else + icon = create(GtkImage,tmp[1],BTN_ICON_SIZE,0,1) + end if + set(btn,"image",icon) + set(btn,"always show image",BTN_SHOW_IMG) + return btn + end if + + + btn = gtk_func("gtk_radio_button_new",{P},{group}) + register(btn,GtkRadioButton) + + return btn + end function + +widget[GtkColorButton] = {"gtk_color_button", +{GtkColorChooser,GtkButton,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P},-routine_id("newColorButton")}, + {"set_title",{P,S}}, + {"get_title",{P},S}, + {"show_editor",{P,B}}, -- 3.20 +"GtkColorButton"} + + function newColorButton(object c=0) + if string(c) then c = to_rgba(c) end if + if c=0 then return gtk_func("gtk_color_button_new") + else return gtk_func("gtk_color_button_new_with_rgba",{P},{c}) + end if + end function + +widget[GtkFontButton] = {"gtk_font_button", +{GtkFontChooser,GtkButton,GtkBin,GtkContainer,GtkWidget,GtkActionable,GtkBuildable,GObject}, + {"new",{P,P,P},-routine_id("newFontButton")}, + {"set_font_name",{P,S}}, + {"get_font_name",{P},S}, + {"set_show_style",{P,B}}, + {"get_show_style",{P},B}, + {"set_show_size",{P,B}}, + {"get_show_size",{P},B}, + {"set_use_font",{P,B}}, + {"get_use_font",{P},B}, + {"set_use_size",{P,B}}, + {"get_use_size",{P},B}, + {"set_title",{P,S}}, + {"get_title",{P},S}, +"GtkFontButton"} + + function newFontButton(object f=0, object fn=0, object data=0) + if string(f) then f = allocate_string(f,1) end if + atom fnt + if f = 0 then + fnt = gtk_func("gtk_font_button_new") + else fnt = gtk_func("gtk_font_button_new_with_font",{P},{f}) + end if + if string(fn) or fn > 0 then + connect(fnt,"font-set",fn,data) + end if + return fnt + end function + +widget[GtkLinkButton] = {"gtk_link_button", +{GtkButton,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{S,S},-routine_id("newLinkButton")}, + {"set_uri",{P,S}}, + {"get_uri",{P},S}, + {"set_visited",{P,B}}, + {"get_visited",{P},B}, +"GtkLinkButton"} + + function newLinkButton(object link, object lbl=0) + if lbl = 0 then return gtk_func("gtk_link_button_new",{S},{link}) + else return gtk_func("gtk_link_button_new_with_label",{S,S},{link,lbl}) + end if + end function + +widget[GtkLockButton] = {"gtk_lock_button", -- unable to make this work! +{GtkButton,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P},P}, + {"set_permission",{P,P}}, + {"get_permission",{P},P,0,GPermission}, +"GtkLockButton"} + +widget[GPermission] = {"g_permission", +{GObject}, + {"get_allowed",{P},B}, + {"get_can_acquire",{P},B}, + {"get_can_release",{P},B}, + {"acquire",{P,P,P},B}, + {"acquire_async",{P,P,P,P}}, + {"acquire_finish",{P,P,P},B}, + {"release",{P,P,P},B}, + {"release_async",{P,P,P,P}}, + {"finish",{P,P,P},B}, + {"impl_update",{P,B,B,B}}, +"GPermission"} + +widget[GSimplePermission] = {"g_simple_permission", +{GPermission}, + {"new",{B},P}, +"GSimplePermission"} + +widget[GtkScaleButton] = {"gtk_scale_button", +{GtkButton,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GtkActionable,GObject}, + {"new",{I,D,D,D,P},P}, + {"set_adjustment",{P,P}}, + {"get_adjustment",{P},P,0,GtkAdjustment}, + {"set_value",{P,D}}, + {"get_value",{P},D}, + {"get_popup",{P},P,0,GtkWidget}, + {"get_plus_button",{P},P,0,GtkButton}, + {"get_minus_button",{P},P,0,GtkButton}, + {"set_icons",{P,A}}, +"GtkScaleButton"} + +widget[GtkMenu] = {"gtk_menu", +{GtkMenuShell,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{P},-routine_id("newMenu")}, + {"attach",{P,P,I,I,I,I}}, + {"attach_to_widget",{P,P,P}}, + {"get_attach_widget",{P},P,0,GtkWidget}, + {"get_for_attach_widget",{P},P,0,GList}, + {"detach",{P}}, + {"popup",{P,P,P,P,P,I,I}}, + {"popdown",{P}}, + {"reposition",{P}}, + {"set_active",{P,I}}, + {"get_active",{P},P,0,GtkMenuItem}, + {"popup_for_device",{P,P,P,P,P,P,P,I,I}}, + {"set_accel_group",{P,P}}, + {"get_accel_group",{P},P,0,GtkAccelGroup}, + {"set_accel_path",{P,S}}, + {"get_accel_path",{P},S}, + {"set_title",{P,S}}, -- deprecated 3.10 + {"get_title",{P},S}, -- deprecated 3.10 + {"set_monitor",{P,I}}, + {"get_monitor",{P},I}, + {"set_tearoff_state",{P,B}}, -- deprecated 3.10 + {"get_tearoff_state",{P},B}, -- deprecated 3.10 + {"set_reserve_toggle_size",{P,B}}, + {"get_reserve_toggle_size",{P},B}, + {"set_screen",{P,P}}, + {"popup_at_pointer",{P,P}}, -- 3.22 + {"popup_at_rect",{P,P,P,I,I,P}}, -- 3.22 + {"popup_at_widget",{P,P,I,I,P}}, -- 3.22 +"GtkMenu"} + + function newMenu(object x=0) + if class_id(x) = GMenuModel then + return gtk_func("gtk_menu_new_from_model",{P},{x}) + else + return gtk_func("gtk_menu_new") + end if + end function + +widget[GtkMenuBar] = {"gtk_menu_bar", +{GtkMenuShell,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{P},-routine_id("newMenuBar")}, + {"set_pack_direction",{P,I}}, + {"get_pack_direction",{P},I}, + {"set_child_pack_direction",{P,I}}, + {"get_child_pack_direction",{P},I}, +"GtkMenuBar"} + + function newMenuBar(atom x=0) + if class_id(x) = GMenuModel then + return gtk_func("gtk_menu_bar_new_from_model",{P},{x}) + else + return gtk_func("gtk_menu_bar_new") + end if + end function + +widget[GMenu] = {"g_menu", +{GMenuModel,GObject}, + {"new",{},P}, + {"freeze",{P}}, + {"insert",{P,I,S,S}}, + {"prepend",{P,S,S}}, + {"append",{P,S,S}}, + {"insert_item",{P,I,P}}, + {"append_item",{P,P}}, + {"prepend_item",{P,P}}, + {"insert_section",{P,I,S,P}}, + {"prepend_section",{P,S,P}}, + {"append_section",{P,S,P}}, + {"append_submenu",{P,S,P}}, + {"insert_submenu",{P,I,S,P}}, + {"prepend_submenu",{P,S,P}}, + {"remove",{P,I}}, +"GMenu"} + +widget[GMenuModel] = {"g_menu_model", +{GObject}, + {"is_mutable",{P},B}, + {"get_n_items",{P},I}, + {"get_item_attribute",{P,I,S,S,P},B}, + {"get_item_link",{P,I,S},P,0,GMenuModel}, + {"items_changed",{P,I,I,I}}, +"GMenuModel"} + +widget[GMenuItem] = {"g_menu_item", +{GObject}, + {"new",{S,S},P}, + {"new_section",{S,P},P,0,GMenuItem}, + {"new_submenu",{S,P},P,0,GMenuItem}, + {"set_label",{P,S}}, + {"set_action_and_target_value",{P,S,P}}, + {"set_detailed_action",{P,S}}, + {"set_section",{P,P}}, + {"set_submenu",{P,P}}, + {"set_attribute_value",{P,P,P}}, + {"set_link",{P,S,P}}, +"GMenuItem"} + +widget[GtkMenuButton] = {"gtk_menu_button", --3.6 +{GtkToggleButton,GtkButton,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{},P}, + {"set_popup",{P,P}}, + {"get_popup",{P},P,0,GtkMenu}, + {"set_menu_model",{P,P}}, + {"get_menu_model",{P},P,0,GMenuModel}, + {"set_direction",{P,I}}, + {"get_direction",{P},I}, + {"set_align_widget",{P,P}}, + {"get_align_widget",{P},P,0,GtkWidget}, + {"set_popover",{P,P}}, -- 3.12 + {"get_popover",{P},P,0,GtkPopover}, -- 3.12 + {"set_use_popover",{P,B}}, -- 3.12 + {"get_use_popover",{P},B}, -- 3.12 +"GtkMenuButton"} + +widget[GtkMenuItem] = {"gtk_menu_item", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P,P,P,P},-routine_id("newMenuItem")}, + {"set_label",{P,S},-routine_id("mi_set_label")}, + {"get_label",{P},-routine_id("mi_get_label")}, + {"set_image",{P,P},-routine_id("mi_set_image")}, + {"get_image",{P},-routine_id("mi_get_image")}, + {"set_use_underline",{P,B}}, + {"get_use_underline",{P},B}, + {"set_submenu",{P,P}}, + {"get_submenu",{P},P,0,GtkWidget}, + {"select",{P}}, + {"deselect",{P}}, + {"activate",{P}}, + {"toggle_size_allocate",{P,I}}, + {"set_reserve_indicator",{P,B}}, + {"get_reserve_indicator",{P},B}, + {"add_accelerator",{P,P,P},-routine_id("mi_add_accelerator")}, +"GtkMenuItem"} + +-- all this just to allow images and accels on menu items! + +constant activate = allocate_string("activate") + + function newMenuItem(object stk=0, object fn=0, object data=0, object accels=0) + object item, img = 0 + + if match("#",stk) then + stk = split(stk,'#') + img = stk[1] + stk = stk[2] + goto "next" + end if + + if not match("#",stk) then + if match("gtk-",stk) then + img = stk + stk = "_" & proper(stk[5..$]) + end if + end if + + label "next" + + item = gtk_func("gtk_menu_item_new_with_mnemonic",{P},{allocate_string(stk,1)}) + register(item,GtkMenuItem) + + label "accels " + + if atom(img) and img = 0 then + item = mi_add_accelerator(item,accels) + else + item = mi_add_accelerator(item,accels,img) + end if + + return item + end function + + function mi_add_accelerator(atom item, object accels, object img = 0) + atom x = allocate(8,1) + integer key, mods + + object child = get(item,"child") + + if atom(img) and img = 0 then -- do nothing + else + img = get_icon_image(img,3) + end if + + if sequence(accels) then + gtk_proc("gtk_accelerator_parse", {P,P,P}, + {allocate_string(accels[2],1),x,x+4}) + + key = peek4u(x) mods = peek4u(x+4) + + gtk_proc("gtk_widget_add_accelerator",{P,P,P,I,I,I}, + {item,activate,accels[1],key,mods,GTK_ACCEL_VISIBLE}) + + if class_id(child) = -1 then + gtk_proc("gtk_accel_label_set_accel_widget",{P,P},{child,item}) + gtk_proc("gtk_accel_label_set_accel",{P,I,I},{child,key,mods}) + end if + end if + + gtk_proc("g_object_ref",{P},{child}) + gtk_proc("gtk_container_remove",{P,P},{item,child}) + + atom box = create(GtkButtonBox) + set(box,"margin left",0) + set(box,"layout",GTK_BUTTONBOX_START) + + if atom(img) and img > 0 then + add(box,img) + register(img,GtkImage) + set(box,"halign",0) + set(img,"margin left",0) + set(img,"margin right",0) + set(box,"child non_homogeneous",img,TRUE) + end if + + register(child,GtkAccelLabel) + pack_start(box,child,1,1) -- put the label back + + set(box,"child non_homogeneous",child,TRUE) + set(child,"halign",0) + set(child,"margin left",0) + + if sequence(accels) then + object txt = gtk_str_func("gtk_accelerator_get_label",{I,I},{key,mods}) + if string(txt) then + atom acc = create(GtkLabel) + set(acc,"padding",0,0) + set(acc,"markup",txt) + if sequence(ACCEL_FONT) then + set(acc,"font",ACCEL_FONT) + end if + add(box,acc) + set(box,"child secondary",acc,TRUE) + set(box,"child non_homogeneous",acc,TRUE) + end if + end if + + add(item,box) + + return item + end function + + function mi_set_label(atom item, object lbl) + if string(lbl) then lbl = allocate_string(lbl,1) end if + atom b = get(item,"child") + object list = get(b,"children") + if atom(list) then + list &= 0 + end if + + for i = 1 to length(list) do + if class_id(list[i]) = GtkAccelLabel then + gtk_proc("gtk_label_set_text",{P,P},{list[i],lbl}) + return 1 + end if + end for + + return 1 + end function + + export function mi_get_label(atom item) + atom b = get(item,"child") + object list = get(b,"children") + for i = 1 to length(list) do + if class_id(list[i]) = GtkAccelLabel then + return gtk_str_func("gtk_label_get_text",{P},{list[i]}) + end if + end for + return 0 + end function + + function mi_set_image(atom item, object img) + if string(img) then img = get_icon_image(img,GTK_ICON_SIZE_MENU) end if + img = get(img,"pixbuf") + atom b = get(item,"child") + object l = get(b,"children") + for i = 1 to length(l) do + if class_id(l[i]) = GtkImage then + gtk_proc("gtk_image_set_from_pixbuf",{P,P},{l[i],img}) + return 1 + end if + end for + return 1 + end function + + function gmi_get_image(atom item) + atom b = get(item,"child") + object l = get(b,"children") + for i = 1 to length(l) do + if class_id(l[i]) = GtkImage then + return l[i] + end if + end for + return 1 + end function + + function mi_set_use_underline(atom item, boolean use) + atom b = get(item,"child") + object l = get(b,"children") + for i = 1 to length(l) do + if class_id(l[i]) = GtkAccelLabel then + gtk_proc("gtk_label_set_use_underline",{P,B},{l[i],use}) + return 1 + end if + end for + return 1 + end function + + function mi_get_use_underline(atom item) + atom b = get(item,"child") + object l = get(b,"children") + l = to_sequence(l,1) + for i = 1 to length(l) do + if class_id(l[i]) = GtkAccelLabel then + return gtk_func("gtk_label_get_use_underline",{P},{l[i]}) + end if + end for + return 1 + end function + +widget[GtkImageMenuItem] = {"gtk_image_menu_item", +{GtkMenuItem,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{P,P,P,P},-routine_id("newMenuItem")}, +"GtkImageMenuItem"} + +widget[GtkRadioMenuItem] = {"gtk_radio_menu_item", +{GtkCheckMenuItem,GtkMenuItem,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P,P,P,P,P},-routine_id("newRadioMenuItem")}, + {"set_group",{P,P}}, + {"get_group",{P},P}, + {"join_group",{P,P}}, -- 3.18 +"GtkRadioMenuItem"} + + function newRadioMenuItem(atom group, object stk, object fn, object data, object accels=0) + object item, img = 0 + + if match("#",stk) then + stk = split(stk,'#') + img = stk[1] + stk = stk[2] + goto "next" + end if + + if not match("#",stk) then + if match("gtk-",stk) then + img = stk + end if + end if + + label "next" + + if group = 0 then + item = gtk_func("gtk_radio_menu_item_new_with_mnemonic",{P,P}, + {group,allocate_string(stk,1)}) + else + item = gtk_func("gtk_radio_menu_item_new_with_mnemonic_from_widget", + {P,P},{group,allocate_string(stk,1)}) + end if + register(item,GtkMenuItem) + + if atom(img) and img = 0 then + item = mi_add_accelerator(item,accels) + else + item = mi_add_accelerator(item,accels,img) + end if + + return item + end function + +widget[GtkCheckMenuItem] = {"gtk_check_menu_item", +{GtkMenuItem,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P,P,P,P},-routine_id("newCheckMenuItem")}, + {"set_active",{P,B}}, + {"get_active",{P},B}, + {"toggled",{P}}, + {"set_inconsistent",{P,B}}, + {"get_inconsistent",{P},B}, + {"set_draw_as_radio",{P,B}}, + {"get_draw_as_radio",{P},B}, +"GtkCheckMenuItem"} + + function newCheckMenuItem(object stk,object fn, object data, object accels=0) + object item, img = 0 + + if match("#",stk) then + stk = split(stk,'#') + img = stk[1] + stk = stk[2] + goto "next" + end if + + if not match("#",stk) then + if match("gtk-",stk) then + img = stk + end if + end if + + label "next" + + item = gtk_func("gtk_check_menu_item_new_with_mnemonic",{P},{allocate_string(stk,1)}) + register(item,GtkCheckMenuItem) + + if atom(img) and img = 0 then + item = mi_add_accelerator(item,accels) + else + item = mi_add_accelerator(item,accels,img) + end if + + return item + end function + +widget[GtkNumerableIcon] = {"gtk_numerable_icon", -- deprecated 3.14 +{GEmblemedIcon,GObject}, + {"new",{P},P,0,GIcon}, + {"new_with_style_context",{P,P},P,0,GIcon}, + {"get_background_gicon",{P},P,0,GIcon}, + {"set_background_gicon",{P,P}}, + {"get_background_icon_name",{P},S}, + {"set_background_icon_name",{P,S}}, + {"get_count",{P},I}, + {"set_count",{P,I}}, + {"get_label",{P},S}, + {"set_label",{P,S}}, + {"get_style_context",{P},P,0,GtkStyleContext}, + {"set_style_context",{P,P}}, +"GtkNumerableIcon"} + +widget[GtkEventBox] = {"gtk_event_box", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"set_above_child",{P,B}}, + {"get_above_child",{P},B}, + {"set_visible_window",{P,B}}, + {"get_visible_window",{P},B}, +"GtkEventBox"} + +widget[GtkExpander] = {"gtk_expander", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{P},-routine_id("newExpander")}, + {"set_spacing",{P,I}}, + {"get_spacing",{P},I}, + {"set_expanded",{P,B}}, + {"get_expanded",{P},B}, + {"set_label",{P,S}}, + {"get_label",{P},S}, + {"set_label_widget",{P,P}}, + {"get_label_widget",{P},P}, + {"set_label_fill",{P,B}}, + {"get_label_fill",{P},B}, + {"set_use_underline",{P,B}}, + {"get_use_underline",{P},B}, + {"set_use_markup",{P,B}}, + {"get_use_markup",{P},B}, + {"set_resize_toplevel",{P,B}}, + {"get_resize_toplevel",{P},B}, +"GtkExpander"} + + function newExpander(object caption="") + if string(caption) and match("_",caption) then + return gtk_func("gtk_expander_new_with_mnemonic",{P},{caption}) + else + return gtk_func("gtk_expander_new",{P},{caption}) + end if + end function + +widget[GtkToolItem] = {"gtk_tool_item", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"set_homogeneous",{P,B}}, + {"get_homogeneous",{P},B}, + {"set_expand",{P,B}}, + {"get_expand",{P},B}, + {"set_tooltip_text",{P,S}}, + {"set_tooltip_markup",{P,S}}, + {"set_use_drag_window",{P,B}}, + {"get_use_drag_window",{P},B}, + {"set_visible_horizontal",{P,B}}, + {"get_visible_horizontal",{P},B}, + {"set_visible_vertical",{P,B}}, + {"get_visible_vertical",{P},B}, + {"set_is_important",{P,B}}, + {"get_is_important",{P},B}, + {"get_ellipsize_mode",{P},I}, + {"get_icon_size",{P},I}, + {"get_orientation",{P},I}, + {"get_toolbar_style",{P},I}, + {"get_relief_style",{P},I}, + {"get_text_alignment",{P},F}, + {"get_text_orientation",{P},I}, + {"retrieve_proxy_menu_item",{P},P,0,GtkMenuItem}, + {"set_proxy_menu_item",{P,S,P}}, + {"get_proxy_menu_item",{P,S},P,0,GtkMenuItem}, + {"rebuild_menu",{P}}, + {"toolbar_reconfigured",{P}}, + {"get_text_size_group",{P},P,0,GtkSizeGroup}, +"GtkToolItem"} + +widget[GtkToolButton] = {"gtk_tool_button", +{GtkToolItem,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P,P},-routine_id("newToolButton")}, + {"set_label",{P,S}}, + {"get_label",{P},S}, + {"set_use_underline",{P,B}}, + {"get_use_underline",{P},B}, + {"set_stock_id",{P,S}}, -- deprecated 3.10 + {"get_stock_id",{P},S}, -- deprecated 3.10 + {"set_icon_name",{P,S}}, + {"get_icon_name",{P},S}, + {"set_icon_widget",{P,P}}, + {"get_icon_widget",{P},P,0,GtkWidget}, + {"set_label_widget",{P,P}}, + {"get_label_widget",{P},P,0,GtkWidget}, +"GtkToolButton"} + + function newToolButton(object icn=0, object lbl=0) + -------------------------------------------------- + atom btn = 0 + if string(icn) then + if match("gtk-",icn) = 1 then + btn = gtk_func("gtk_tool_button_new_from_stock",{P},{allocate_string(icn,1)}) + set(btn,"always show icon",TRUE) + return btn + else + icn = create(GtkImage,icn) + end if + end if + + if string(lbl) then + lbl = allocate_string(lbl,1) + end if + + btn = gtk_func("gtk_tool_button_new",{P,P},{icn,lbl}) + + return btn + end function + +widget[GtkMenuToolButton] = {"gtk_menu_tool_button", +{GtkToolButton,GtkToolItem,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P,P},-routine_id("newMenuToolButton")}, + {"set_menu",{P,P}}, + {"get_menu",{P},P,0,GtkMenu}, + {"set_arrow_tooltip_text",{P,S}}, + {"set_arrow_tooltip_markup",{P,S}}, +"GtkMenuToolButton"} + + function newMenuToolButton(object icn=0, object lbl=0) + if string(icn) then + icn = create(GtkImage,icn,1) + end if + if string(lbl) then + lbl = allocate_string(lbl,1) + end if + atom btn = gtk_func("gtk_menu_tool_button_new",{P,P},{icn,lbl}) + return btn + end function + +widget[GtkToggleToolButton] = {"gtk_toggle_tool_button", +{GtkToolButton,GtkToolItem,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{S},-routine_id("newToggleToolButton")}, + {"set_active",{P,B}}, + {"get_active",{P},B}, +"GtkToggleToolButton"} + + function newToggleToolButton(object x) + atom btn + if string(x) then + btn = gtk_func("gtk_toggle_tool_button_new_from_stock",{S},{x}) + elsif atom(x) then + btn = gtk_func("gtk_toggle_tool_button_new") + if class_id(btn) = GdkPixbuf then + set(btn,"image",create(GtkImage,btn)) + end if + end if + return btn + end function + +widget[GtkRadioToolButton] = {"gtk_radio_tool_button", +{GtkToggleToolButton,GtkToolButton,GtkToolItem,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{P},-routine_id("newRadioToolButton")}, + {"set_group",{P,P}}, + {"get_group",{P},P}, +"GtkRadioToolButton"} + + function newRadioToolButton(atom id) + if class_id(id) = GtkRadioToolButton then + return gtk_func("gtk_radio_tool_button_new_from_widget",{P},{id}) + else + return gtk_func("gtk_radio_tool_button_new",{P},{id}) + end if + end function + +widget[GtkSeparatorToolItem] = {"gtk_separator_tool_item", +{GtkToolItem,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"set_draw",{P,B}}, + {"get_draw",{P},B}, +"GtkSeparatorToolItem"} + +widget[GtkOverlay] = {"gtk_overlay", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"add_overlay",{P,P}}, + {"get_overlay_pass_through",{P,P},B}, -- 3.18 + {"set_overlay_pass_through",{P,P,B}}, -- 3.18 +"GtkOverlay"} + +widget[GtkScrollable] = {"gtk_scrollable", +{GObject}, + {"set_hadjustment",{P,P}}, + {"get_hadjustment",{P},P,0,GtkAdjustment}, + {"set_vadjustment",{P,P}}, + {"get_vadjustment",{P},P,0,GtkAdjustment}, + {"set_hscroll_policy",{P,I}}, + {"get_hscroll_policy",{P},I}, + {"set_vscroll_policy",{P,I}}, + {"get_vscroll_policy",{P},I}, + {"get_border",{P,P},B}, -- 3.16 +"GtkScrollable"} + +widget[GtkScrolledWindow] = {"gtk_scrolled_window", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{P,P},P}, + {"set_hadjustment",{P,P}}, + {"get_hadjustment",{P},P,0,GtkAdjustment}, + {"set_vadjustment",{P,P}}, + {"get_vadjustment",{P},P,0,GtkAdjustment}, + {"get_hscrollbar",{P},P,0,GtkWidget}, + {"get_vscrollbar",{P},P,0,GtkWidget}, + {"set_policy",{P,I,I}}, + {"get_policy",{P,I,I}}, + {"set_placement",{P,I}}, + {"unset_placement",{P}}, + {"set_shadow_type",{P,I}}, + {"get_shadow_type",{P},I}, + {"set_min_content_width",{P,I}}, + {"get_min_content_width",{P},I}, + {"set_min_content_height",{P,I}}, + {"get_min_content_height",{P},I}, + {"set_kinetic_scrolling",{P,B}}, + {"get_kinetic_scrolling",{P},B}, + {"set_capture_button_press",{P,B}}, + {"get_capture_button_press",{P},B}, + {"set_headers",{P,P}}, + {"add_with_viewport",{P,P}}, -- deprecated 3.8 + {"get_overlay_scrolling",{P},B}, -- 3.16 + {"set_overlay_scrolling",{P,B}}, -- 3.16 +"GtkScrolledWindow"} + +widget[GtkSidebar] = {"gtk_sidebar", -- 3.16 +{GtkBin,GtkContainer,GtkWidget,GObject}, + {"new",{},P}, + {"set_stack",{P,P}}, + {"get_stack",{P},P,0,GtkStack}, +"GtkSidebar"} + +widget[GtkTextBuffer] = {"gtk_text_buffer", +{GObject}, + {"new",{P},P}, + {"get_line_count",{P},I}, + {"get_char_count",{P},I}, + {"get_tag_table",{P},P,0,GtkTextTagTable}, + {"insert",{P,P,S,I}}, + {"insert_at_cursor",{P,S,I}}, + {"insert_interactive",{P,P,S,I,B},B}, + {"insert_interactive_at_cursor",{P,S,I,B},B}, + {"insert_range",{P,P,P,P}}, + {"insert_range_interactive",{P,P,P,P,B},B}, + {"insert_with_tags",{P,P,S,I,P,P}}, + {"insert_with_tags_by_name",{P,P,S,I,S}}, + {"insert_markup",{P,P,S,I}}, -- 3.16 + {"delete",{P,P,P}}, + {"delete_interactive",{P,P,P,B},B}, + {"backspace",{P,P,B,B},B}, + {"set_text",{P,P},-routine_id("setBufferText")}, + {"get_text",{P},-routine_id("getBufferText")}, + {"get_slice",{P,P,P,B},S}, + {"insert_pixbuf",{P,P,P}}, + {"insert_child_anchor",{P,P,P}}, + {"create_child_anchor",{P,P},P,0,GtkTextChildAnchor}, + {"create_mark",{P,S,P,B},P,0,GtkTextMark}, + {"move_mark",{P,P,P}}, + {"move_mark_by_name",{P,S,P}}, + {"add_mark",{P,P,P}}, + {"delete_mark",{P,P}}, + {"delete_mark_by_name",{P,S}}, + {"get_mark",{P,S},P,0,GtkTextMark}, + {"get_insert",{P},P,0,GtkTextMark}, + {"get_selection_bound",{P},P,0,GtkTextMark}, + {"get_selection_bounds",{P},-routine_id("getSelectionBounds")}, + {"get_has_selection",{P},B}, + {"place_cursor",{P,P}}, + {"select_range",{P,P,P}}, + {"apply_tag",{P,P,P,P}}, + {"remove_tag",{P,P,P,P}}, + {"apply_tag_by_name",{P,S,P,P}}, + {"remove_tag_by_name",{P,S,P,P}}, + {"remove_all_tags",{P,P,P}}, + {"create_tag",{P,S,S,S},P,0,GtkTextTag}, + {"get_iter_at_line_offset",{P,P,I,I}}, + {"get_iter_at_offset",{P,P,I}}, + {"get_iter_at_line",{P,P,I}}, + {"get_iter_at_line_index",{P,P,I,I}}, + {"get_iter_at_mark",{P,P,P}}, + {"get_iter_at_child_anchor",{P,P,P}}, + {"get_start_iter",{P,P}}, + {"get_end_iter",{P,P}}, + {"get_bounds",{P,P,P}}, + {"set_modified",{P,B}}, + {"get_modified",{P},B}, + {"delete_selection",{P,B,B},B}, + {"paste_clipboard",{P,P,P,B}}, + {"copy_clipboard",{P,P}}, + {"cut_clipboard",{P,P,B}}, + {"get_selection_bounds",{P,P,P},B}, + {"begin_user_action",{P}}, + {"end_user_action",{P}}, + {"add_selection_clipboard",{P,P}}, + {"remove_selection_clipboard",{P,P}}, + {"deserialize",{P,P,I,P,I,I,P},B}, + {"deserialize_set_can_create_tags",{P,I,B}}, + {"deserialize_get_can_create_tags",{P,I},B}, + {"get_copy_target_list",{P},P,0,GtkTargetList}, + {"get_deserialize_formats",{P,I},P}, + {"get_paste_target_list",{P},P,0,GtkTargetList}, + {"get_serialize_formats",{P,I},P}, + {"register_deserialize_format",{P,S,P,P,P},P}, + {"register_deserialize_tagset",{P,S},P}, + {"register_serialize_format",{P,S,P,P,P},P}, + {"register_serialize_tagset",{P,S},P}, + {"serialize",{P,P,P,P,P,I},I}, + {"unregister_deserialize_format",{P,P}}, + {"unregister_serialize_format",{P,P}}, + {"insert_markup",{P,P,S,I}}, -- 3.16 +"GtkTextBuffer"} + + export constant + fnBufStart = define_proc("gtk_text_buffer_get_start_iter",{P,P}), + fnBufEnd = define_proc("gtk_text_buffer_get_end_iter",{P,P}), + fnBufGet = define_func("gtk_text_buffer_get_text",{P,P,P,B},S), + fnBufSet = define_proc("gtk_text_buffer_set_text",{P,S,I}), + fnBufIns = define_func("gtk_text_buffer_get_insert",{P},P), + fnBufIter = define_proc("gtk_text_buffer_get_iter_at_mark",{P,P,P}), + fnBufBounds = define_func("gtk_text_buffer_get_selection_bounds",{P,P,P},B) + + function getBufferText(object buf) + atom start = allocate(64) c_proc(fnBufStart,{buf,start}) + atom fini = allocate(64) c_proc(fnBufEnd,{buf,fini}) + object result = c_func(fnBufGet,{buf,start,fini,1}) + return peek_string(result) + end function + + function getSelectionBounds(object buf) + atom start = allocate(100) + atom fini = allocate(100) + atom iter = allocate(100) + if c_func(fnBufBounds,{buf,start,fini}) then + return {start,fini} + else + start = c_func(fnBufIns,{buf}) + c_proc(fnBufIter,{buf,iter,start}) + return {iter,iter} + end if + end function + + function setBufferText(object buf, object txt) + object len + if atom(txt) then + len = peek_string(txt) + len = length(len) + else + len = length(txt) + txt = allocate_string(txt) + end if + c_proc(fnBufSet,{buf,txt,len}) + return 1 + end function + +widget[GtkClipboard] = {"gtk_clipboard", +{GObject}, + {"new",{I},-routine_id("newClipboard")}, + {"get_default",{P},P,0,GtkClipboard},-- 3.16 + {"get_for_display",{P,I},P,0,GtkClipboard}, + {"get_display",{P},P,0,GdkDisplay}, + {"set_with_data",{P,P,I,P,P,P},B}, + {"set_with_owner",{P,P,I,P,P,P},B}, + {"get_owner",{P},P,0,GObject}, + {"clear",{P}}, + {"set_text",{P,S,I}}, + {"set_image",{P,P}}, + {"request_contents",{P,I,P,P}}, + {"request_text",{P,P,P}}, + {"request_image",{P,P,P}}, + {"request_targets",{P,P,P}}, + {"request_rich_text",{P,P,P,P}}, + {"request_uris",{P,P,P}}, + {"wait_for_contents",{P,I},P,0,GtkSelectionData}, + {"wait_for_text",{P},S}, + {"wait_for_image",{P},P,0,GdkPixbuf}, + {"wait_for_rich_text",{P,P,I,I},I}, + {"wait_for_uris",{P},A}, + {"wait_is_text_available",{P},B}, + {"wait_is_image_available",{P},B}, + {"wait_is_rich_text_available",{P,P},B}, + {"wait_is_uris_available",{P},B}, + {"wait_for_targets",{P,P,I},B}, + {"wait_is_target_available",{P,I},B}, + {"set_can_store",{P,P,I}}, + {"store",{P}}, + {"get_selection",{P},P}, -- 3.22 +"GtkClipboard"} + + function newClipboard(integer i=0) -- just use default clipboard; + return gtk_func("gtk_clipboard_get",{I},{i}) + end function + +widget[GtkSelectionData] = {"gtk_selection_data", +{0}, + {"set",{P,I,I,S,I}}, + {"set_text",{P,S,I},B}, + {"get_text",{P},S}, + {"set_pixbuf",{P,P},B}, + {"get_pixbuf",{P},P,0,GdkPixbuf}, + {"set_uris",{P,S},B}, + {"get_uris",{P},A}, + {"get_targets",{P,P,I},B}, + {"targets_include_image",{P,B},B}, + {"targets_include_text",{P},B}, + {"targets_include_uri",{P},B}, + {"targets_include_rich_text",{P,P},B}, + {"get_selection",{P},P}, + {"get_data",{P},S}, + {"get_length",{P},I}, + {"get_data_with_length",{P,I},S}, + {"get_data_type",{P},I}, + {"get_display",{P},P,0,GdkDisplay}, + {"get_format",{P},I}, + {"get_target",{P},I}, +"GtkSelectionData"} + +widget[GtkCellArea] = {"gtk_cell_area", +{GtkCellLayout,GtkBuildable,GObject}, + {"add",{P,P}}, + {"remove",{P,P}}, + {"set_property",{P,P,S,P}}, + {"get_property",{P,P,S,P}}, + {"has_renderer",{P,P},B}, + {"foreach",{P,P}}, + {"foreach_alloc",{P,P,P,P,P,P,P}}, + {"event",{P,P,P,P,P,I},I}, + {"render",{P,P,P,P,P,P,I,B}}, + {"get_cell_allocation",{P,P,P,P,P,P}}, + {"get_cell_at_position",{P,P,P,P,I,I,P},P,0,GtkCellRenderer}, + {"create_context",{P},P,0,GtkCellAreaContext}, + {"copy_context",{P,P},P,0,GtkCellAreaContext}, + {"get_request_mode",{P},I}, + {"get_preferred_width",{P,P,P,I,I}}, + {"get_preferred_height_for_width",{P,P,P,I,I,I}}, + {"get_preferred_height",{P,P,P,I,I}}, + {"get_preferred_width_for_height",{P,P,P,I,I,I}}, + {"get_current_path",{P},S}, + {"apply_attributes",{P,P,P,B,B}}, + {"attribute_connect",{P,P,S,I}}, + {"attribute_disconnect",{P,P,S}}, + {"attribute_get_column",{P,P,S},I}, -- 3.14 + {"is_activatable",{P},B}, + {"activate",{P,P,P,P,I,B},B}, + {"activate_cell",{P,P,P,P,P,I},B}, + {"focus",{P,I},B}, + {"set_focus_cell",{P,P}}, + {"get_focus_cell",{P},P,0,GtkCellRenderer}, + {"add_focus_sibling",{P,P,P}}, + {"remove_focus_sibling",{P,P,P}}, + {"is_focus_sibling",{P,P,P},B}, + {"get_focus_siblings",{P,P},X,0,GList}, + {"get_focus_from_sibling",{P,P},P,0,GtkCellRenderer}, + {"get_edited_cell",{P},P,0,GtkCellRenderer}, + {"get_edit_widget",{P},P,0,GtkCellEditable}, + {"stop_editing",{P,B}}, + {"inner_cell_area",{P,P,P,P}}, + {"request_renderer",{P,P,P,P,I,I,I}}, + {"class_install_property",{P,I,P}}, + {"class_find_cell_property",{P,S},P}, + {"class_list_cell_properties",{P,I},P}, +"GtkCellArea"} + +widget[GtkCellAreaCell] = {"gtk_cell_area_cell", +{GtkCellArea}, + {"set_property",{P,P,S,P}}, + {"get_property",{P,P,S,P}}, +"GtkCellAreaCell"} + +widget[GtkCellAreaBox] = {"gtk_cell_area_box", +{GtkCellLayout,GtkCellArea,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, + {"pack_start",{P,P,B,B,B}}, + {"pack_end",{P,P,B,B,B}}, + {"set_spacing",{P,I}}, + {"get_spacing",{P},I}, +"GtkCellAreaBox"} + +widget[GtkCellAreaContext] = {"gtk_cell_area_context", +{GObject}, + {"get_area",{P},P,0,GtkCellArea}, + {"allocate",{P,I,I}}, + {"reset",{P}}, + {"get_preferred_width",{P,I,I}}, + {"get_preferred_height",{P,I,I}}, + {"get_preferred_height_for_width",{P,I,I,I}}, + {"get_preferred_width_for_height",{P,I,I,I}}, + {"get_allocation",{P,I,I}}, + {"push_preferred_width",{P,I,I}}, + {"push_preferred_height",{P,I,I}}, +"GtkCellAreaContext"} + +widget[GtkCellEditable] = {"gtk_cell_editable", +{GtkWidget}, + {"start_editing",{P,P}}, + {"editing_done",{P}}, + {"remove_widget",{P}}, +"GtkCellEditable"} + +widget[GtkCellLayout] = {"gtk_cell_layout", +{GObject}, + {"pack_start",{P,P,B}}, + {"pack_end",{P,P,B}}, + {"get_area",{P},P,0,GtkCellArea}, + {"get_cells",{P},X,0,GList}, + {"reorder",{P,P,I}}, + {"clear",{P}}, + {"add_attribute",{P,P,S,I}}, + {"set_cell_data_func",{P,P,P,P,P}}, + {"clear_attributes",{P,P}}, +"GtkCellLayout"} + +widget[GtkCellRenderer] = {"gtk_cell_renderer", +{GObject}, + {"set_fixed_size",{P,I,I}}, + {"get_fixed_size",{P,I,I}}, + {"set_visible",{P,B}}, + {"get_visible",{P},B}, + {"set_sensitive",{P,B}}, + {"get_sensitive",{P},B}, + {"set_alignment",{P,F,F}}, + {"get_alignment",{P,F,F}}, + {"set_padding",{P,I,I}}, + {"get_padding",{P,I,I}}, + {"get_state",{P,P,I},I}, + {"is_activatable",{P},B}, + {"get_aligned_area",{P,P,I,P,P}}, + {"render",{P,P,P,P,P,I}}, + {"activate",{P,P,P,P,P,P,I},B}, + {"start_editing",{P,P,P,P,P,P,I},P,0,GtkCellEditable}, + {"stop_editing",{P,B}}, + {"get_preferred_height",{P,P,I,I}}, + {"get_preferred_width",{P,P,I,I}}, + {"get_preferred_height_for_width",{P,P,I,I,I}}, + {"get_preferred_width_for_height",{P,P,I,I,I}}, + {"get_preferred_size",{P,P,P,P}}, + {"get_request_mode",{P},I}, +"GtkCellRenderer"} + +-- Many properties exist for cell renderers, see GTK docs! + +widget[GtkCellRendererAccel] = {"gtk_cell_renderer_accel", +{GtkCellRendererText,GtkCellRenderer,GObject}, + {"new",{},P}, +"GtkCellRendererAccel"} + +widget[GtkCellRendererCombo] = {"gtk_cell_renderer_combo", +{GtkCellRendererText,GtkCellRenderer,GObject}, + {"new",{},P}, +"GtkCellRendererCombo"} + +widget[GtkCellRendererText] = {"gtk_cell_renderer_text", +{GtkCellRenderer,GObject}, + {"new",{},P}, + {"set_fixed_height_from_font",{P,I}}, +"GtkCellRendererText"} + +widget[GtkCellRendererPixbuf] = {"gtk_cell_renderer_pixbuf", +{GtkCellRenderer,GObject}, + {"new",{},P}, +"GtkCellRendererPixbuf"} + +widget[GtkCellRendererProgress] = {"gtk_cell_renderer_progress", +{GtkOrientable,GtkCellRenderer,GObject}, + {"new",{},P}, +"GtkCellRendererProgress"} + +widget[GtkCellRendererSpin] = {"gtk_cell_renderer_spin", +{GtkCellRendererText,GtkCellRenderer,GObject}, + {"new",{},P}, +"GtkCellRendererSpin"} + +widget[GtkCellRendererSpinner] = {"gtk_cell_renderer_spinner", +{GtkCellRenderer,GObject}, + {"new",{},P}, +"GtkCellRendererSpinner"} + +widget[GtkCellRendererToggle] = {"gtk_cell_renderer_toggle", +{GtkCellRenderer,GObject}, + {"new",{},P}, + {"set_radio",{P,B}}, + {"get_radio",{P},B}, + {"set_active",{P,B}}, + {"get_active",{P},B}, + {"set_activatable",{P,B}}, + {"get_activatable",{P},B}, +"GtkCellRendererToggle"} + +widget[GtkTreeModelFilter] = {"gtk_tree_model_filter", +{GtkTreeModel,GtkTreeDragSource,GObject}, + {"new",{P,P},P}, + {"set_visible_func",{P,P,P,P}}, + {"set_modify_func",{P,I,P,P,P,P}}, + {"set_visible_column",{P,I}}, + {"get_model",{P},P,0,GtkTreeModel}, + {"convert_child_iter_to_iter",{P,P,P},B}, + {"convert_iter_to_child_iter",{P,P,P},B}, + {"convert_child_path_to_path",{P,P},P,0,GtkTreePath}, + {"convert_path_to_child_path",{P,P},P,0,GtkTreePath}, + {"refilter",{P}}, + {"clear_cache",{P}}, +"GtkTreeModelFilter"} + +widget[GtkTreeModelSort] = {"gtk_tree_model_sort", +{GtkTreeSortable,GtkTreeModel,GtkTreeDragSource,GObject}, + {"new_with_model",{P},P}, + {"get_model",{P},P,0,GtkTreeModel}, + {"convert_child_path_to_path",{P,P},P,0,GtkTreePath}, + {"convert_child_iter_to_iter",{P,P,P},B}, + {"convert_path_to_child_path",{P,P},P,0,GtkTreePath}, + {"convert_iter_to_child_iter",{P,P,P}}, + {"reset_default_sort_func",{P}}, + {"clear_cache",{P}}, +"GtkTreeModelSort"} + +widget[GtkListStore] = {"gtk_list_store", +{GtkTreeModel,GtkTreeSortable,GtkTreeDragSource,GtkTreeDragDest,GtkBuildable,GObject}, + {"new",{P},-routine_id("newListStore")}, + {"clear",{P}}, + {"set_data",{P,P},-routine_id("ls_set_data")}, + {"get_data",{P},-routine_id("ls_get_data")}, + {"get_n_rows",{P},-routine_id("ls_get_n_rows")}, + {"get_n_cols",{P},-routine_id("ls_get_n_cols")}, + {"set_row_data",{P,I,P},-routine_id("ls_set_row_data")}, + {"get_row_data",{P,I},-routine_id("ls_get_row_data")}, + {"set_col_data",{P,I,I,P},-routine_id("ls_set_col_data")}, + {"get_col_data",{P,I,I},-routine_id("ls_get_col_data")}, + {"get_col_data_from_iter",{P,I,I},-routine_id("ls_get_col_data_from_iter")}, + {"remove_row",{P,I},-routine_id("ls_remove_row")}, + {"replace_row",{P,I,P},-routine_id("ls_replace_row")}, + {"insert_row",{P,I,P},-routine_id("ls_insert_row")}, + {"prepend_row",{P,P},-routine_id("ls_prepend_row")}, + {"append_row",{P,P},-routine_id("ls_append_row")}, + {"set_swap_rows",{P,I,I},-routine_id("ls_set_swap_rows")}, + {"set_move_before",{P,I,I},-routine_id("ls_set_move_before")}, + {"set_move_after",{P,I,I},-routine_id("ls_set_move_after")}, +"GtkListStore"} + +-- almost all calls to GtkListStore are overridden with Euphoria calls, +-- because the GTK versions are just too complex and tedious to set up, +-- making them impractical to use. + +constant + TM1 = define_func("gtk_tree_model_get_iter_first",{P,P},I), + TM2 = define_func("gtk_tree_model_iter_next",{P,P},I), + TM3 = define_func("gtk_tree_model_get_iter_from_string",{P,P,P},P), + TM4 = define_proc("gtk_tree_model_get",{P,P,I,P,I}), + TM5 = define_func("gtk_tree_model_get_column_type",{P,I},I), + LS0 = define_proc("gtk_list_store_clear",{P}), + LS1 = define_proc("gtk_list_store_insert",{P,P,I}), + LS2 = define_proc("gtk_list_store_append",{P,P}), + LS3 = define_proc("gtk_list_store_swap",{P,P,P}), + LS4 = define_proc("gtk_list_store_move_before",{P,P,P}), + LS5 = define_proc("gtk_list_store_move_after",{P,P,P}), + LS6 = define_func("gtk_list_store_iter_is_valid",{P,P},B) + + function newListStore(object params) + object proto = I & repeat(P,length(params)) + params = length(params) & params -- must build func params 'on the fly' + atom fn = define_func("gtk_list_store_new",proto,P) + return c_func(fn,params) + end function + + function ls_get_n_rows(object store) + return gtk_func("gtk_tree_model_iter_n_children",{P,P},{store,0}) + end function + + function ls_get_n_cols(object store) + return gtk_func("gtk_tree_model_get_n_columns",{P},{store}) + end function + + function ls_set_data(object store, object data) + atom iter = allocate(32,1) + for row = 1 to length(data) do + c_proc(LS1,{store,iter,length(data)}) -- new row + if string(data[row]) then + ls_set_row_data(store,row,{data[row]}) + else + ls_set_row_data(store,row,data[row]) + end if + end for + return 1 + end function + + function ls_set_row_data(atom store, integer row, object data) + integer max_col = ls_get_n_cols(store) + for col = 1 to math:min({length(data),max_col}) do + ls_set_col_data(store,row,col,data[col]) + end for + return 1 + end function + + function ls_set_col_data(object store, object row, integer col, object data) + integer max_col = ls_get_n_cols(store) + + if col < 1 or col > max_col then + crash("Invalid column #%d",col) + end if + + atom s = allocate_string(sprintf("%d",row-1),1) + atom iter = allocate(32,1) + if not c_func(TM3,{store,iter,s}) then + return -1 + end if + + object prototype = {P,P,I,P,I} + + integer col_type = c_func(TM5,{store,col-1}) + + switch col_type do + case gSTR then prototype = {P,P,I,S,I} + if atom(data) then data = sprintf("%2.2f",data) end if + case gDBL,gFLT then prototype = {P,P,I,D,I} + case gPIX then prototype = {P,P,I,P,I} + case gINT,gBOOL then prototype = {P,P,I,I,I} + case else + display("Error in []->ls_set_col_data: col [] type [] expects [], got []", + {get(store,"name"),col,col_type,vlookup(col_type,storage_types,1,2,"!"),data}) + ?1/0 + end switch + + if string(data) then + data = allocate_string(data) -- don't free these strings! + end if + + atom fn = define_proc("gtk_list_store_set",prototype) + object params = {store,iter,col-1,data,-1} + c_proc(fn,params) + + return 1 + end function + + function ls_get_data(object store) + object data = {} + for row = 1 to ls_get_n_rows(store) do + data = append(data,ls_get_row_data(store,row)) + end for + return data + end function + + function ls_get_row_data(object store, integer row) + object data = {} + + integer max_row = ls_get_n_rows(store) + if row > max_row then return -1 end if + + integer max_col = ls_get_n_cols(store) + for i = 1 to max_col do + data = append(data,ls_get_col_data(store,row,i)) + end for + if max_col = 1 then + return data[1] else return data + end if + end function + + function ls_get_col_data(atom store, integer row, integer col) + atom x = allocate(32,1) + object result + + ifdef LISTSTORE then + display("Get Col Data ~ row [] col []",{row,col}) + end ifdef + + integer col_type = c_func(TM5,{store,col-1}) + ifdef BITS64 then + poke8(x,col_type) + elsedef + poke4(x,col_type) + end ifdef + + atom iter = allocate(32,1) + + c_func(TM3,{store,iter,allocate_string(sprintf("%d",row-1),1)}) + if gtk_func("gtk_list_store_iter_is_valid",{P,P},{store,iter}) = 0 then + display("Error in ls_get_col_data 2 ") abort(0) end if + + c_proc(TM4,{store,iter,col-1,x,-1}) + if gtk_func("gtk_list_store_iter_is_valid",{P,P},{store,iter}) = 0 then + display("Error in ls_get_col_data 3") abort(0) end if + + switch col_type do + case gSTR then + ifdef BITS64 then -- thanks pete eberlein + result = peek8u(x) + elsedef + result = peek4u(x) + end ifdef + if result > 0 then + result = peek_string(result) + end if + case gINT then result = peek4u(x) + case gBOOL then result = peek(x) + case gDBL then result = float64_to_atom(peek({x,8})) + case gFLT then result = float32_to_atom(peek({x,4})) + case gPIX then result = peek4u(x) + case else display("Error in ls_get_col_data 4") abort(0) + end switch + ifdef LISTSTORE then + display("Result []",{result}) + end ifdef + return result + end function + + function ls_get_col_data_from_iter(atom store, atom iter, integer col) + atom x = allocate(64,1) + object result + + ifdef LISTSTORE then + display("Get Col Data from Iter ~ store [] iter [] col []\n",{store,iter,col}) + end ifdef + + integer col_type = c_func(TM5,{store,col-1}) + ifdef BITS64 then + poke8(x,col_type) + elsedef + poke4(x,col_type) + end ifdef + + if gtk_func("gtk_list_store_iter_is_valid",{P,P},{store,iter}) = 0 then + display("Error in ls_get_col_datafromiter 1 ") abort(0) end if + + c_proc(TM4,{store,iter,col-1,x,-1}) + + if gtk_func("gtk_list_store_iter_is_valid",{P,P},{store,iter}) = 0 then + display("Error in ls_get_col_datafromiter 2 ") abort(0) end if + + switch col_type do + case gSTR then + ifdef BITS64 then -- thanks pete eberlein + result = peek8u(x) + elsedef + result = peek4u(x) + end ifdef + if result > 0 then + result = peek_string(result) + end if + case gINT then result = peek4u(x) + case gBOOL then result = peek(x) + case gDBL then result = float64_to_atom(peek({x,8})) + case gFLT then result = float32_to_atom(peek({x,4})) + case gPIX then result = peek4u(x) + case else display("Error in ls_get_col_datafromiter 3") abort(0) + end switch + ifdef LISTSTORE then + display("Result []",{result}) + end ifdef + return result + end function + + function ls_insert_row(object store, object data, integer pos) + object tmp = ls_get_data(store) + tmp = insert(tmp,data,pos) + set(store,"clear") + ls_set_data(store,tmp) + return tmp + end function + + function ls_append_row(atom store, object data) + object tmp = ls_get_data(store) + tmp = append(tmp,data) + set(store,"clear") + set(store,"data",tmp) + return tmp + end function + + function ls_prepend_row(atom store, object data) + object tmp = ls_get_data(store) + tmp = prepend(tmp,data) + set(store,"clear") + set(store,"data",tmp) + return tmp + end function + + function ls_remove_row(atom store, integer row) + object tmp = ls_get_data(store) + tmp = remove(tmp,row) + set(store,"clear") + ls_set_data(store,tmp) + return tmp + end function + + function ls_replace_row(atom store, object data, integer row) + object tmp = ls_get_data(store) + set(store,"clear") + tmp = replace(tmp,{data},row) + ls_set_data(store,tmp) + return tmp + end function + + function ls_set_swap_rows(atom store, integer row_a, integer row_b) + if get(store,"is sorted") then + Warn(0,,"Can't move items in a sorted list!") + return -1 + end if + atom iter_a = allocate(32,1), iter_b = allocate(32,1) + c_func(TM3,{store,iter_a,allocate_string(sprintf("%d",row_a-1),1)}) + c_func(TM3,{store,iter_b,allocate_string(sprintf("%d",row_b-1),1)}) + c_proc(LS3,{store,iter_a,iter_b}) + return get(store,"data") + end function + + function ls_set_move_before(atom store, integer row_a, integer row_b) + if get(store,"is sorted") then + Error(0,,"Can't move items in a sorted list!") + return -1 + end if + atom iter_a = allocate(32,1), iter_b = allocate(32,1) + c_func(TM3,{store,iter_a,allocate_string(sprintf("%d",row_a-1),1)}) + c_func(TM3,{store,iter_b,allocate_string(sprintf("%d",row_b-1),1)}) + c_proc(LS4,{store,iter_b,iter_a}) + return get(store,"data") + end function + + function ls_set_move_after(atom store, integer row_a, integer row_b) + if get(store,"is sorted") then + Error(0,,"Can't move items in a sorted list!") + return -1 + end if + atom iter_a = allocate(32,1), iter_b = allocate(32,1) + c_func(TM3,{store,iter_a,allocate_string(sprintf("%d",row_a-1),1)}) + c_func(TM3,{store,iter_b,allocate_string(sprintf("%d",row_b-1),1)}) + c_proc(LS5,{store,iter_b,iter_a}) + return get(store,"data") + end function + +widget[GtkTreeStore] = {"gtk_tree_store", +{GtkTreeModel,GtkTreeDragSource,GtkTreeDragDest,GtkTreeSortable,GtkBuildable,GObject}, + {"new",{P},-routine_id("newTreeStore")}, + {"get_n_rows",{P},-routine_id("ts_get_n_rows")}, + {"get_n_cols",{P},-routine_id("ts_get_n_cols")}, + {"get_data",{P},-routine_id("ts_get_data")}, + {"set_data",{P,P},-routine_id("ts_set_data")}, + {"set_row_data",{P,P,P},-routine_id("ts_set_row_data")}, + {"remove_row",{P,I},-routine_id("ts_remove_row")}, + {"insert_row",{P,P,P,I}}, + {"insert_before",{P,P,P,P}}, + {"insert_after",{P,P,P,P}}, + {"prepend",{P,P,P}}, + {"append",{P,P,P}}, + {"is_ancestor",{P,P,P},B}, + {"iter_depth",{P,P},I}, + {"clear",{P}}, + {"swap",{P,P,P}}, + {"move_before",{P,P,P}}, + {"move_after",{P,P,P}}, +"GtkTreeStore"} + + function newTreeStore(object params) + object proto = I & repeat(P,length(params)) + params = length(params) & params -- must build func params 'on the fly' + atom fn = define_func("gtk_tree_store_new",proto,P) + return c_func(fn,params) + end function + + function ts_get_n_rows(object store) + return gtk_func("gtk_tree_model_iter_n_children",{P,P},{store,0}) + end function + + function ts_get_n_cols(object store) + return gtk_func("gtk_tree_model_get_n_columns",{P},{store}) + end function + + function ts_set_data(object store, object data) + atom iter = allocate(32,1) + for row = 1 to length(data) do + gtk_proc("gtk_tree_store_append",{P,P,P},{store,iter,0}) + ts_set_row_data(store,data[row],iter) + end for + return 1 + end function + + constant TSA = define_proc("gtk_tree_store_append",{P,P,P}) + + -- the following should really be recursive, but that's too complicated + -- for me to figure out! Anyway, four deep should be enough. + + function ts_set_row_data(atom store, object data, object parent = 0) + atom iter1 = allocate(32,1) + atom iter2 = allocate(32,1) + atom iter3 = allocate(32,1) + atom iter4 = allocate(32,1) + for i = 1 to length(data) do + if string(data[i]) then + ts_set_row_col_data(store,parent,i,data[i]) + else + for j = 1 to length(data[i]) do + if string(data[i][j]) then + c_proc(TSA,{store,iter1,parent}) + ts_set_row_col_data(store,iter1,1,data[i][j]) + else + for k = 1 to length(data[i][j]) do + if string(data[i][j][k]) then + c_proc(TSA,{store,iter2,iter1}) + ts_set_row_col_data(store,iter2,1,data[i][j][k]) + else + for l = 1 to length(data[i][j][k]) do + if string(data[i][j][k][l]) then + c_proc(TSA,{store,iter3,iter2}) + ts_set_row_col_data(store,iter3,1,data[i][j][k][l]) + else + for m = 1 to length(data[i][j][k][l]) do + c_proc(TSA,{store,iter4,iter3}) + ts_set_row_col_data(store,iter4,1,data[i][j][k][l][m]) + end for + end if + end for + end if + end for + end if + end for + end if + end for + return 1 + end function + + function ts_set_row_col_data(object store, object iter, integer col, object item) + integer max_col = ts_get_n_cols(store) + if col < 1 or col > max_col then + crash("Invalid column #%d",col) + end if + + object prototype = {P,P,I,P,I} + + integer col_type + + col_type = c_func(TM5,{store,col-1}) + switch col_type do + case gDBL,gFLT then prototype = {P,P,I,D,I} + case gSTR, gPIX then prototype = {P,P,I,P,I} + case gBOOL,gINT then prototype = {P,P,I,I,I} + if atom(item) then item = sprintf("%g",item) end if + case else Warn(,,"Unknown column type", + "Expecting gSTR, gBOOL, gINT, gDBL, gFLT, or gPIX") + end switch + + if string(item[1]) then item = item[1] end if + if string(item) then item = allocate_string(item,1) end if + + atom fn = define_proc("gtk_tree_store_set",prototype) + object params = {store,iter,col-1,item,-1} + c_proc(fn,params) + + return iter + end function + + function ts_get_data(atom store) + object rowdata = {} + object column = {} + for row = 1 to ts_get_n_rows(store) do + for col = 1 to ts_get_n_cols(store) do + column = append(column,get(store,"col data",col)) + end for + rowdata = append(rowdata,column) + column = {} + end for + return rowdata + end function + + function ts_remove_row(atom store, integer row) + object tmp = get(store,"data") + tmp = remove(tmp,row) + set(store,"data",tmp) + return tmp + end function + +widget[GtkTreeDragSource] = {"gtk_tree_drag_source", +{0}, +"GtkTreeDragSource"} + +widget[GtkTreeDragDest] = {"gtk_tree_drag_dest", +{0}, +"GtkTreeDragDest"} + +widget[GtkTreePath] = {"gtk_tree_path", +{GObject}, + {"new",{P},-routine_id("newTreePath")}, + {"to_string",{P},S}, + {"to_integer",{P},-routine_id("tp_to_integer")}, + {"new_first",{},P,0,GtkTreePath}, + {"append_index",{P,I}}, + {"prepend_index",{P,I}}, + {"get_depth",{P},I}, + {"get_indices",{P},A}, + {"get_indices_with_depth",{P,I},A}, + {"free",{P}}, + {"copy",{P},P,0,GtkTreePath}, + {"compare",{P,P},I}, + {"next",{P}}, + {"prev",{P},B}, + {"up",{P},B}, + {"down",{P}}, + {"is_ancestor",{P,P},B}, + {"is_descendant",{P,P},B}, +"GtkTreePath"} + + function newTreePath(object x=0) + if atom(x) and x > 0 then + x = sprintf("%d",x-1) + end if + if string(x) then + x = allocate_string(x,1) + end if + if x > 0 then + return gtk_func("gtk_tree_path_new_from_string",{P},{x}) + else + return gtk_func("gtk_tree_path_new",{},{}) + end if + end function + + function tp_to_integer(object x) + integer n = to_number(gtk_str_func("gtk_tree_path_to_string",{P},{x})) + return n+1 + end function + +widget[GtkTreeRowReference] = {"gtk_tree_row_reference", +{GObject}, + {"new",{P,P},P,0,GtkTreeRowReference}, + {"get_model",{P},P,0,GtkTreeModel}, + {"get_path",{P},P,0,GtkTreePath}, + {"valid",{P},B}, + {"free",{P}}, + {"copy",{P},P,0,GtkTreeRowReference}, + {"inserted",{P,P}}, + {"deleted",{P,P}}, + {"reordered",{P,P,P,A}}, +"GtkTreeRowReference"} + +widget[GtkTreeIter] = {"gtk_tree_iter", +{GObject}, + {"new",{},-routine_id("newTreeIter")}, + {"copy",{P},P,0,GtkTreeIter}, + {"free",{P}}, +"GtkTreeIter"} + + function newTreeIter() + return allocate(64) -- keep; + end function + +widget[GtkTreeModel] = {"gtk_tree_model", +{GObject}, + {"get_flags",{P},I}, + {"get_n_columns",{P},I}, + {"get_column_type",{P,I},I}, + {"get_iter",{P,P,P},B}, + {"get_iter_first",{P,P},B}, + {"get_path",{P,P},P,0,GtkTreePath}, + {"get_value",{P,P,I},-routine_id("tm_get_value")}, + {"set_value",{P,I,I,P},-routine_id("tm_set_value")}, + {"iter_next",{P,P},B}, + {"iter_previous",{P,P},B}, + {"iter_children",{P,P,P},B}, + {"iter_has_child",{P,P},B}, + {"iter_n_children",{P,P},I}, + {"iter_nth_child",{P,P,P,I},B}, + {"iter_parent",{P,P,P},B}, + {"get_string_from_iter",{P,P},-routine_id("tm_get_string_from_iter")}, + {"ref_node",{P,P}}, + {"unref_node",{P,P}}, + {"foreach",{P,P,P}}, + {"n_rows",{P},-routine_id("tm_get_n_rows")}, + {"row_changed",{P,P,P}}, + {"row_inserted",{P,P,P}}, + {"row_has_child_toggled",{P,P,P}}, + {"row_deleted",{P,P}}, + {"rows_reordered",{P,P,P,P}}, + {"get_iter_n",{P,I},-routine_id("tm_get_iter_n")}, + {"get_iter_from_string",{P,P},-routine_id("tm_get_iter_from_string")}, + {"get_iter_from_path",{P,P},-routine_id("tm_get_iter_from_path")}, + {"get_col_value",{P,P,I},-routine_id("tm_get_col_value")}, + {"get_row_values",{P,P},-routine_id("tm_get_row_values")}, + {"get_col_data",{P,P,P},-routine_id("tm_get_col_data")}, + {"get_row_data",{P,I},-routine_id("tm_get_row_values")}, +"GtkTreeModel"} + + constant + fntmget = define_proc("gtk_tree_model_get_value",{P,P,I,P}), + fncoltype = define_func("gtk_tree_model_get_column_type",{P,I},I), + gtvfn = define_proc("gtk_tree_model_get",{P,P,I,P,I}), + tmncol = define_func("gtk_tree_model_get_n_columns",{P},I) + + function tm_get_n_rows(atom model) + atom fn = define_func("gtk_tree_model_iter_n_children",{P,P},I) + return c_func(fn,{model,0}) + end function + + function tm_get_string_from_iter(atom model, atom iter) + atom fn = define_func("gtk_tree_model_get_string_from_iter",{P,P},P) + return peek_string(c_func(fn,{model,iter})) + end function + + function tm_get_iter_from_string(atom model, object str) + atom iter = allocate(64) + atom fn = define_func("gtk_tree_model_get_iter_from_string",{P,P,P},P) + if string(str) then str = allocate_string(str,1) end if + if c_func(fn,{model,iter,str}) then + return iter + end if + return 0 + end function + + function tm_get_iter_n(atom model, integer path) + return tm_get_iter_from_string(model,sprintf("%d",path-1)) + end function + + function tm_get_iter_from_path(atom model, object path) + return tm_get_iter_from_string(model,peek_string(path)) + end function + + function tm_get_value(atom mdl, atom iter, integer col) + atom x = allocate(64,1) + integer ct = c_func(fncoltype,{mdl,col-1}) + object result + + ifdef BITS64 then + poke8(x,ct) + elsedef + poke4(x,ct) + end ifdef + + c_proc(gtvfn,{mdl,iter,col-1,x,-1}) + switch ct do + case gSTR then + ifdef BITS64 then -- thanks pete eberlein + result = peek8u(x) + elsedef + result = peek4u(x) + end ifdef + if result > 0 then + return peek_string(result) + else + return sprintf("%d",result) + end if + case gBOOL,gINT then return peek4u(x) + case gFLT then return float32_to_atom(peek({x,4})) + case gPIX then return peek4u(x) + case else return sprintf("%d",x) + end switch + return sprintf("Oops %d",ct) + end function + + function tm_get_row_values(atom mdl, atom iter) + integer ncols = c_func(tmncol,{mdl}) + object results = repeat(0,ncols) + for n = 1 to ncols do + results[n] = tm_get_value(mdl,iter,n) + end for + return results + end function + + function tm_get_col_value(atom mdl, integer row, integer col) + atom iter = allocate(32,1) + object data = tm_get_row_values(mdl,iter) + return data[col] + end function + + function tm_set_col_value(atom mdl, integer row, integer col, object data) + atom iter = tm_get_iter_n(mdl,row) + atom fn = define_proc("gtk_list_store_set",{P,P,I,P,I}) + if string(data) then data = allocate_string(data,1) end if + c_proc(fn,{mdl,iter,col-1,data,-1}) + return 1 + end function + + function tm_get_col_data(atom mdl, integer row, integer col) + atom iter = tm_get_iter_n(mdl,row) + object data = tm_get_row_values(mdl,iter) + return data[col] + end function + +widget[GtkTreeSortable] = {"gtk_tree_sortable", +{GtkTreeModel,GObject}, + {"sort_column_changed",{P}}, + {"set_sort_column_id",{P,I,I}}, + {"get_sort_column_id",{P},-routine_id("ts_get_sort_col_id")}, + {"get_sort_order",{P},-routine_id("ts_get_sort_order")}, + {"is_sorted",{P},-routine_id("ts_is_sorted")}, + {"set_sort_func",{P,I,P,P,P}}, + {"set_default_sort_func",{P,P,P,P}}, + {"has_default_sort_func",{P},B}, +"GtkTreeSortable"} + + function ts_is_sorted(atom mdl) + return gtk_func("gtk_tree_sortable_get_sort_column_id",{P,P,P},{mdl,0,0}) + end function + + function ts_get_sort_col_id(atom mdl) + integer col = allocate(32,1), order = allocate(32,1) + if gtk_func("gtk_tree_sortable_get_sort_column_id",{P,P,P},{mdl,col,order}) then + return peek4u(col)+1 + else + return -1 + end if + end function + + function ts_get_sort_order(atom mdl) + integer col = allocate(32,1), order = allocate(32,1) + if gtk_func("gtk_tree_sortable_get_sort_column_id",{P,P,P},{mdl,col,order}) then + return peek4u(order) + else + return -1 + end if + end function + +widget[GtkViewport] = {"gtk_viewport", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkScrollable,GObject}, + {"new",{P,P},P}, + {"set_shadow_type",{P,I}}, + {"get_shadow_type",{P},I}, + {"get_bin_window",{P},P,0,GdkWindow}, + {"get_view_window",{P},P,0,GdkWindow}, +"GtkViewport"} + +widget[GtkAppChooserWidget] = {"gtk_app_chooser_widget", +{GtkBox,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GtkAppChooser,GObject}, + {"new",{S},P}, + {"set_show_default",{P,B}}, + {"get_show_default",{P},B}, + {"set_show_recommended",{P,B}}, + {"get_show_recommended",{P},B}, + {"set_show_fallback",{P,B}}, + {"get_show_fallback",{P},B}, + {"set_show_other",{P,B}}, + {"get_show_other",{P},B}, + {"set_show_all",{P,B}}, + {"get_show_all",{P},B}, + {"set_default_text",{P,S}}, + {"get_default_text",{P},S}, +"GtkAppChooserWidget"} + +widget[GtkVolumeButton] = {"gtk_volume_button", +{GtkScaleButton,GtkButton,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GtkActionable,GObject}, + {"new",{},P}, +"GtkVolumeButton"} + +widget[GtkColorChooserWidget] = {"gtk_color_chooser_widget", +{GtkColorChooser,GtkBox,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, +"GtkColorChooserWidget"} + +widget[GtkColorChooser] = {"gtk_color_chooser", +{GObject}, + {"set_rgba",{P,P},-routine_id("cc_set_rgba")}, + {"get_rgba",{P,I},-routine_id("cc_get_rgba")}, + {"set_use_alpha",{P,B},-routine_id("cc_set_alpha")}, + {"get_use_alpha",{P},-routine_id("cc_get_alpha")}, + {"add_palette",{P,I,I,I,A}}, +"GtkColorChooser"} + + function cc_set_rgba(atom x, object c) + if string(c) then + c = to_rgba(c) + else + c = to_rgba(text:format("#[X]",c)) + end if + gtk_proc("gtk_color_chooser_set_rgba",{P,P},{x,c}) + return 1 + end function + + function cc_get_rgba(atom x, integer fmt) + atom fn = define_proc("gtk_color_chooser_get_rgba",{P,P}) + atom rgba = allocate(32,1) + c_proc(fn,{x,rgba}) + object c = gtk_func("gdk_rgba_to_string",{P},{rgba}) + return fmt_color(c,fmt) + end function + + function cc_set_alpha(atom x, integer b) + gtk_proc("gtk_color_chooser_set_use_alpha",{P,B},{x,b}) + return 1 + end function + + function cc_get_alpha(atom x) + atom fn = define_func("gtk_color_chooser_get_use_alpha",{P},B) + return c_func(fn,{x}) + end function + +widget[GtkColorSelection] = {"gtk_color_selection", -- deprecated +{GtkBox,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, + {"set_has_opacity_control",{P,B}}, + {"get_has_opacity_control",{P},B}, + {"set_has_palette",{P,B}}, + {"get_has_palette",{P},B}, + {"set_current_rgba",{P,S},-routine_id("cs_set_current_rgba")}, + {"get_current_rgba",{P,I},-routine_id("cs_get_current_rgba")}, + {"set_current_alpha",{P,I}}, + {"get_current_alpha",{P},I}, + {"set_previous_rgba",{P,S},-routine_id("cs_set_previous_rgba")}, + {"get_previous_rgba",{P,I},-routine_id("cs_get_previous_rgba")}, + {"set_previous_alpha",{P,I}}, + {"get_previous_alpha",{P},I}, + {"is_adjusting",{P},B}, +"GtkColorSelection"} + +------------------------------------------------------------------------ +-- following color functions make using RGB colors much easier, +-- converting automatically between various color notations +------------------------------------------------------------------------ + + function cs_set_current_rgba(atom x, object c) + c =peek_string(c) + gtk_proc("gtk_color_selection_set_current_rgba",{P,P},{x,to_rgba(c)}) + return 1 + end function + + function cs_set_previous_rgba(atom x, object c) + c = peek_string(c) + gtk_proc("gtk_color_selection_set_previous_rgba",{P,P},{x,to_rgba(c)}) + return 1 + end function + + function cs_get_current_rgba(atom x, integer fmt=0) + atom rgba = allocate(32,1) + atom fn = define_proc("gtk_color_selection_get_current_rgba",{P,P}) + c_proc(fn,{x,rgba}) + object c = gtk_func("gdk_rgba_to_string",{P},{rgba}) + return fmt_color(c,fmt) + end function + + function cs_get_previous_rgba(atom x, integer fmt=0) + atom rgba = allocate(32,1) + atom fn = define_proc("gtk_color_selection_get_previous_rgba",{P,P}) + c_proc(fn,{x,rgba}) + object c = gtk_func("gdk_rgba_to_string",{rgba}) + return fmt_color(c,fmt) + end function + +widget[GtkNativeDialog] = {"gtk_native_dialog", +{}, + {"show",{P}}, + {"hide",{P}}, + {"destroy",{P}}, + {"get_visible",{P},B}, + {"set_modal",{P,B}}, + {"get_modal",{P},B}, + {"set_title",{P,S}}, + {"get_title",{P},S}, + {"set_transient_for",{P,P}}, + {"get_transient_for",{P},P}, + {"run",{P}}, +"GtkNativeDialog"} + +widget[GtkFileChooserNative] = {"gtk_file_chooser_native", +{}, + {"new",{S,P,I,S,S},P}, + {"get_accept_label",{P},S}, + {"set_accept_label",{P,S}}, + {"get_cancel_label",{P},S}, + {"set_cancel_label",{P,S}}, +"GtkFileChooserNative"} + +widget[GtkFileChooser] = {"gtk_file_chooser", +{GtkWidget}, + {"set_action",{P,I}}, + {"get_action",{P},I}, + {"set_local_only",{P,B}}, + {"get_local_only",{P},B}, + {"set_select_multiple",{P,B}}, + {"get_select_multiple",{P},B}, + {"set_show_hidden",{P,B}}, + {"get_show_hidden",{P},B}, + {"set_do_overwrite_confirmation",{P,B}}, + {"get_do_overwrite_confirmation",{P},B}, + {"set_create_folders",{P,B}}, + {"get_create_folders",{P},B}, + {"get_current_name",{P},S}, --GTK3.10 + {"set_current_name",{P,S}}, + {"set_filename",{P,S}}, + {"get_filename",{P},S}, + {"get_filenames",{P},A,0,GSList}, + {"select_filename",{P,S}}, + {"unselect_filename",{P},S}, + {"select_all",{P}}, + {"unselect_all",{P}}, + {"set_current_folder",{P,S}}, + {"get_current_folder",{P},S}, + {"set_uri",{P,S}}, + {"get_uri",{P},S}, + {"select_uri",{P,S}}, + {"unselect_uri",{P,S}}, + {"get_uris",{P},A,0,GSList}, + {"set_current_folder_uri",{P,S}}, + {"get_current_folder_uri",{P},S}, + {"set_preview_widget",{P,P}}, + {"get_preview_widget",{P},P,0,GtkWidget}, + {"set_preview_widget_active",{P,B}}, + {"get_preview_widget_active",{P},B}, + {"set_use_preview_label",{P,B}}, + {"get_use_preview_label",{P},B}, + {"get_preview_filename",{P},S}, + {"get_preview_uri",{P},S}, + {"set_extra_widget",{P,P}}, + {"get_extra_widget",{P},P,0,GtkWidget}, + {"add_filter",{P,P}}, + {"remove_filter",{P,P}}, + {"list_filters",{P},X,0,GSList}, + {"set_filter",{P,P}}, + {"get_filter",{P},P,0,GtkFileFilter}, + {"add_shortcut_folder",{P,S,P},B}, + {"remove_shortcut_folder",{P,S,P},B}, + {"list_shortcut_folders",{P},A,0,GSList}, + {"add_shortcut_folder_uri",{P,S,P},B}, + {"remove_shortcut_folder_uri",{P,S,P},B}, + {"list_shortcut_folder_uris",{P},A,0,GSList}, + {"get_current_folder_file",{P},P,0,GFile}, + {"get_file",{P},P,0,GFile}, + {"get_files",{P},X,0,GFile}, + {"get_preview_file",{P},P,0,GFile}, + {"select_file",{P,P,P},B}, + {"set_current_folder_file",{P,P,P},B}, + {"set_file",{P,P,P},B}, + {"unselect_file",{P,P}}, +"GtkFileChooser"} + +widget[GtkFileChooserButton] = {"gtk_file_chooser_button", +{GtkFileChooser,GtkBox,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{S,I},P}, + {"new_with_dialog",{P},P}, + {"set_title",{P,S}}, + {"get_title",{P},S}, + {"set_width_chars",{P,I}}, + {"get_width_chars",{P},I}, + {"set_focus_on_click",{P,B}}, + {"get_focus_on_click",{P},B}, +"GtkFileChooserButton"} + +widget[GtkFileChooserWidget] = {"gtk_file_chooser_widget", +{GtkFileChooser,GtkBox,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{I},P}, +"GtkFileChooserWidget"} + +widget[GtkFileFilter] = {"gtk_file_filter", +{GtkBuildable,GObject}, + {"new",{},P}, + {"set_name",{P,S}}, + {"get_name",{P},S}, + {"add_mime_type",{P,S}}, + {"add_pattern",{P,S}}, + {"add_pixbuf_formats",{P}}, + {"add_custom",{P,I,P,P,P}}, + {"get_needed",{P},I}, + {"filter",{P,P},B}, +"GtkFileFilter"} + +widget[GtkFontChooser] = {"gtk_font_chooser", +{GObject}, + {"get_font_family",{P},P,0,PangoFontFamily}, + {"get_font_face",{P},P,0,PangoFontFace}, + {"get_font_size",{P},I}, + {"set_font",{P,S}}, + {"get_font",{P},S}, + {"set_font_desc",{P,P}}, + {"get_font_desc",{P},P,0,PangoFontDescription}, + {"set_preview_text",{P,S}}, + {"get_preview_text",{P},S}, + {"set_show_preview_entry",{P,B}}, + {"get_show_preview_entry",{P},B}, + {"set_filter_func",{P,P,P,P}}, + {"get_font_map",{P},P,0,PangoFontMap}, -- 3.18 + {"set_font_map",{P,P}}, -- 3.18 +"GtkFontChooser"} + +widget[GtkFontChooserWidget] = {"gtk_font_chooser_widget", +{GtkFontChooser,GtkBox,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, +"GtkFontChooserWidget"} + +widget[GtkInfoBar] = {"gtk_info_bar", +{GtkBox,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, + {"add_action_widget",{P,P,I}}, + {"add_button",{P,S,I},P,0,GtkButton}, + {"set_response_sensitive",{P,I,B}}, + {"set_default_response",{P,I}}, + {"response",{P,I}}, + {"set_message_type",{P,I}}, + {"get_message_type",{P},I}, + {"get_action_area",{P},P,0,GtkWidget}, + {"get_content_area",{P},P,0,GtkWidget}, + {"set_show_close_button",{P,B}}, -- 3.10 + {"get_show_close_button",{P},B}, -- 3.10 +"GtkInfoBar"} + +widget[GtkRecentChooser] = {"gtk_recent_chooser", +{GObject}, + {"set_show_private",{P,B}}, + {"get_show_private",{P},B}, + {"set_show_not_found",{P,B}}, + {"get_show_not_found",{P},B}, + {"set_show_icons",{P,B}}, + {"get_show_icons",{P},B}, + {"set_select_multiple",{P,B}}, + {"get_select_multiple",{P},B}, + {"set_local_only",{P,B}}, + {"get_local_only",{P},B}, + {"set_limit",{P,I}}, + {"get_limit",{P},I}, + {"set_show_tips",{P,B}}, + {"get_show_tips",{P},B}, + {"set_sort_type",{P,I}}, + {"get_sort_type",{P},I}, + {"set_sort_func",{P,P,P,P}}, + {"set_current_uri",{P,S,P},B}, + {"get_current_uri",{P},S}, + {"get_current_item",{P},P,0,GtkRecentInfo}, + {"select_uri",{P,S,P},B}, + {"unselect_uri",{P,S}}, + {"select_all",{P}}, + {"unselect_all",{P}}, + {"get_items",{P},A,0,GSList}, + {"get_uris",{P},A}, + {"add_filter",{P,P}}, + {"remove_filter",{P,P}}, + {"list_filters",{P},X,0,GSList}, + {"set_filter",{P,P}}, + {"get_filter",{P},P,0,GtkRecentFilter}, +"GtkRecentChooser"} + +widget[GtkRecentChooserWidget] = {"gtk_recent_chooser_widget", +{GtkBox,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GtkRecentChooser,GObject}, + {"new",{P},-routine_id("newRecentChooserWidget")}, +"GtkRecentChooserWidget"} + + function newRecentChooserWidget(atom x=0) + if class_id(x) = GtkRecentManager then + return gtk_func("gtk_recent_chooser_widget_new_for_manager",{P},{x}) + else + return gtk_func("gtk_recent_chooser_widget_new") + end if + end function + +widget[GtkStatusbar] = {"gtk_statusbar", +{GtkBox,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, + {"get_context_id",{P,S},I}, + {"push",{P,I,S},I}, + {"pop",{P,I}}, + {"remove",{P,I,I}}, + {"remove_all",{P,I}}, + {"get_message_area",{P},P}, +"GtkStatusBar"} + +widget[GtkFixed] = {"gtk_fixed", +{GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"put",{P,P,I,I}}, + {"move",{P,P,I,I}}, +"GtkFixed"} + +widget[GtkGrid] = {"gtk_grid", +{GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, + {"attach",{P,P,I,I,I,I}}, + {"attach_next_to",{P,P,P,I,I,I}}, + {"get_child_at",{P,I,I},P,0,GtkWidget}, + {"insert_row",{P,I}}, + {"remove_row",{P,I}}, --3.10 + {"insert_column",{P,I}}, + {"remove_column",{P,I}}, --3.10 + {"insert_next_to",{P,P,I}}, + {"set_row_homogeneous",{P,B}}, + {"get_row_homogeneous",{P},B}, + {"set_column_homogeneous",{P,B}}, + {"get_column_homogeneous",{P},B}, + {"set_row_spacing",{P,I}}, + {"get_row_spacing",{P},I}, + {"set_column_spacing",{P,I}}, + {"get_column_spacing",{P},I}, + {"set_baseline_row",{P,I}}, --3.10 + {"get_baseline_row",{P},I}, --3.10 + {"set_row_baseline_position",{P,I,I}}, --3.10 + {"get_row_baseline_position",{P,I},I}, --3.10 +"GtkGrid"} + +widget[GtkPaned] = {"gtk_paned", +{GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{I},P}, + {"add1",{P,P}}, + {"add2",{P,P}}, + {"pack1",{P,P,B,B}}, + {"pack2",{P,P,B,B}}, + {"get_child1",{P},P,0,GtkWidget}, + {"get_child2",{P},P,0,GtkWidget}, + {"set_position",{P,I}}, + {"get_position",{P},I}, + {"get_handle_window",{P},P,0,GdkWindow}, + {"get_wide_handle",{P},B}, -- 3.16 + {"set_wide_handle",{P,B}}, -- 3.16 +"GtkPaned"} + +widget[GtkIconInfo] = {"gtk_icon_info", +{GObject}, + {"new",{P,P},-routine_id("newIconInfo")}, + {"get_base_size",{P},I}, + {"get_base_scale",{P},I}, --3.10 + {"get_filename",{P},S}, + {"get_display_name",{P},S}, -- deprecated 3.14 + {"get_builtin_pixbuf",{P},P,0,GdkPixbuf}, -- deprecated 3.14 + {"load_icon",{P},-routine_id("icon_info_load_icon")}, + {"load_surface",{P,P,P},P,0,CairoSurface_t}, + {"load_icon_async",{P,P,P,P}}, + {"load_icon_finish",{P,P,P},P,0,GdkPixbuf}, + {"load_symbolic",{P,P,P,P,P,B,P},P,0,GdkPixbuf}, + {"load_symbolic_async",{P,P,P,P,P,P,P,P}}, + {"load_symbolic_finish",{P,P,P,P},P,0,GdkPixbuf}, + {"load_symbolic_for_context",{P,P,P,P},P,0,GdkPixbuf}, + {"load_symbolic_for_context_async",{P,P,P,P,P}}, + {"load_symbolic_for_context_finish",{P,P,P,P},P,0,GdkPixbuf}, + {"set_raw_coordinates",{P,B}}, -- deprecated 3.14 + {"get_embedded_rect",{P,P},B}, -- deprecated 3.14 + {"get_attach_points",{P,A,P},B}, -- deprecated 3.14 + {"is_symbolic",{P},B}, -- 3.12 +"GtkIconInfo"} + + function newIconInfo(atom theme, atom pix) -- reorder params; + return gtk_func("gtk_icon_info_new_for_pixbuf",{P,P},{theme,pix}) + end function + + function icon_info_load_icon(atom info) -- allow for err, register object; + atom err = allocate(8,1) err = 0 + atom icn = gtk_func("gtk_icon_info_load_icon",{P,P},{info,err}) + register(icn,GdkPixbuf) + return icn + end function + +widget[GtkIconTheme] = {"gtk_icon_theme", +{GObject}, + {"new",{P},-routine_id("newIconTheme")}, + {"set_screen",{P,P}}, + {"set_search_path",{P,S,I}}, + {"get_search_path",{P,P,I}}, + {"append_search_path",{P,S}}, + {"prepend_search_path",{P,S}}, + {"set_custom_theme",{P,S}}, + {"has_icon",{P,S},B}, + {"lookup_icon",{P,P,I,I},P,0,GtkIconInfo}, + {"lookup_icon_for_scale",{P,P,I,I,I},P,0,GtkIconInfo}, + {"choose_icon",{P,A,I,I},P,0,GtkIconInfo}, + {"choose_icon_for_scale",{P,A,I,I,I},P,0,GtkIconInfo}, + {"lookup_by_gicon",{P,P,I,I},P,0,GtkIconInfo}, + {"load_icon",{P,S,I,I},-routine_id("icon_theme_load_icon")}, + {"load_icon_for_scale",{P,S,I,I,I,P},P,0,GdkPixbuf}, + {"load_surface",{P,S,I,I,P,I,P},P,0,CairoSurface_t}, + {"list_contexts",{P},-routine_id("icon_theme_list_contexts")}, + {"list_icons",{P,S},-routine_id("icon_theme_list_icons")}, + {"get_icon_sizes",{P,S},A}, + {"rescan_if_needed",{P},B}, + {"get_example_icon_name",{P},S}, + {"add_builtin_icon",{S,I,P}}, + {"add_resource_path",{P,S}}, -- 3.14 +"GtkIconTheme"} + + function newIconTheme(atom x=0) + if class_id(x) = GdkScreen then + return gtk_func("gtk_icon_theme_get_for_screen",{P},{x}) + else + return gtk_func("gtk_icon_theme_get_default") + end if + end function + + function icon_theme_load_icon(atom theme, object name, integer size, integer flags) + atom err = allocate(8,1) err = 0 + return gtk_func("gtk_icon_theme_load_icon",{P,P,I,I,P},{theme,name,size,flags,err}) + end function + + function icon_theme_list_contexts(atom theme) + object list = gtk_func("gtk_icon_theme_list_contexts",{P},{theme}) + return to_sequence(list) + end function + + function icon_theme_list_icons(atom theme, object context) + object list = gtk_func("gtk_icon_theme_list_icons",{P,P},{theme,context}) + return to_sequence(list) + end function + +widget[GtkIconView] = {"gtk_icon_view", +{GtkCellLayout,GtkScrollable,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"new_with_area",{P},P}, + {"new_with_model",{P},P}, + {"set_model",{P,P}}, + {"get_model",{P},P,0,GtkTreeModel}, + {"set_text_column",{P,I}}, + {"get_text_column",{P},I}, + {"set_markup_column",{P,I}}, + {"get_markup_column",{P},I}, + {"set_pixbuf_column",{P,I}}, + {"get_pixbuf_column",{P},I}, + {"get_visible_range",{P,I,I},B}, + {"get_path_at_pos",{P,I,I},P,0,GtkTreePath}, + {"get_item_at_pos",{P,I,I,I,I},B}, + {"convert_widget_to_bin_window_coords",{P,I,I,I,I}}, + {"set_cursor",{P,P,P,B}}, + {"get_cursor",{P,I,I},B}, + {"selected_foreach",{P,P,P}}, + {"set_selection_mode",{P,I}}, + {"get_selection_mode",{P},I}, + {"set_columns",{P,I}}, + {"get_columns",{P},I}, + {"set_spacing",{P,I}}, + {"get_spacing",{P},I}, + {"set_row_spacing",{P,I}}, + {"get_row_spacing",{P},I}, + {"set_column_spacing",{P,I}}, + {"get_column_spacing",{P},I}, + {"set_margin",{P,I}}, + {"get_margin",{P},I}, + {"set_item_padding",{P,I}}, + {"get_item_padding",{P},I}, + {"set_activate_on_single_click",{P,B}}, --3.8 + {"get_activate_on_single_click",{P},B}, --3.8 + {"get_cell_rect",{P,P,P,P},B}, --3.6 + {"select_path",{P,P}}, + {"unselect_path",{P,P}}, + {"path_is_selected",{P,P},B}, + {"get_selected_items",{P},X,0,GList}, + {"select_all",{P}}, + {"unselect_all",{P}}, + {"item_activated",{P,P}}, + {"scroll_to_path",{P,P,B,F,F}}, + {"get_visible_range",{P,I,I},B}, + {"set_tooltip_item",{P,P,P}}, + {"set_tooltip_cell",{P,P,P,P}}, + {"get_tooltip_context",{P,I,I,B,P,P,P},B}, + {"set_tooltip_column",{P,I}}, + {"get_tooltip_column",{P},I}, + {"get_item_row",{P,P},I}, + {"get_item_column",{P,P},I}, + {"enable_model_drag_source",{P,I,P,I,I}}, + {"enable_model_drag_dest",{P,P,I,I}}, + {"unset_model_drag_source",{P}}, + {"unset_model_drag_dest",{P}}, + {"set_reorderable",{P,B}}, + {"get_reorderable",{P},B}, + {"set_drag_dest_item",{P,I,I}}, + {"get_drag_dest_item",{P,I,I}}, + {"get_dest_item_at_pos",{P,I,I,I,I},B}, + {"create_drag_icon",{P,P},P,0,CairoSurface_t}, +"GtkIconView"} + +widget[GtkLayout] = {"gtk_layout", +{GtkContainer,GtkWidget,GtkBuildable,GtkScrollable,GObject}, + {"new",{P,P},P}, + {"put",{P,P,I,I}}, + {"move",{P,P,I,I}}, + {"set_size",{P,I,I}}, + {"get_size",{P,I,I}}, + {"get_bin_window",{P},P,0,GdkWindow}, +"GtkLayout"} + +widget[GtkSeparatorMenuItem] = {"gtk_separator_menu_item", +{GtkMenuItem,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{},P}, +"GtkSeparatorMenuItem"} + +widget[GtkRecentChooserMenu] = {"gtk_recent_chooser_menu", +{GtkMenu,GtkMenuShell,GtkContainer,GtkWidget,GtkBuildable,GtkRecentChooser,GObject}, + {"new",{},P}, + {"new_for_manager",{P},P}, + {"set_show_numbers",{P,B}}, + {"get_show_numbers",{P},B}, +"GtkRecentChooserMenu"} + +widget[GtkRecentFilter] = {"gtk_recent_filter", +{GtkBuildable,GObject}, + {"new",{},P}, + {"set_name",{P,S}}, + {"get_name",{P},S}, + {"add_mime_type",{P,S}}, + {"add_pattern",{P,S}}, + {"add_pixbuf_formats",{P}}, + {"add_group",{P,S}}, + {"add_age",{P,I}}, + {"add_application",{P,S}}, + {"add_custom",{P,I,P,P,P}}, + {"get_needed",{P},I}, + {"filter",{P,P},B}, +"GtkRecentFilter"} + +widget[GtkRecentInfo] = {"gtk_recent_info", +{GObject}, + {"get_uri",{P},S}, + {"get_display_name",{P},S}, + {"get_description",{P},S}, + {"get_mime_type",{P},S}, + {"get_added",{P},I}, + {"get_modified",{P},I}, + {"get_visited",{P},I}, + {"get_private_hint",{P},B}, + {"get_application_info",{P,S,S,I,I},B}, + {"get_applications",{P,I},V}, + {"last_application",{P},S}, + {"has_application",{P,S},B}, + {"create_app_info",{P,S,P},P,0,GAppInfo}, + {"get_groups",{P,I},A}, + {"has_group",{P,S},B}, + {"get_icon",{P,I},P,0,GdkPixbuf}, + {"get_gicon",{P},P,0,GIcon}, + {"get_short_name",{P},S}, + {"get_uri_display",{P},S}, + {"get_age",{P},I}, + {"is_local",{P},B}, + {"exists",{P},B}, + {"match",{P,P},B}, +"GtkRecentInfo"} + +widget[GtkSettings] = {"gtk_settings", +{GtkStyleProvider,GObject}, + {"new",{},-routine_id("newSettings")}, + {"reset_property",{P,S}}, -- 3.20 +"GtkSettings"} + + function newSettings(atom x=0) + if class_id(x) = GdkScreen then + return gtk_func("gtk_settings_get_for_screen",{P},{x}) + else + return gtk_func("gtk_settings_get_default") + end if + end function + +widget[GtkSizeGroup] = {"gtk_size_group", +{GtkBuildable,GObject}, + {"new",{I},P}, + {"set_mode",{P,I}}, + {"get_mode",{P},I}, + {"set_ignore_hidden",{P,B}}, + {"get_ignore_hidden",{P},B}, + {"add_widget",{P,P}}, + {"add_widgets",{P,P},-routine_id("sg_add_widgets")}, + {"remove_widget",{P,P}}, + {"get_widgets",{P},X,0,GSList}, +"GtkSizeGroup"} + + function sg_add_widgets(atom group, object widgets) -- allow {list} of widgets; + if atom(widgets) then + set(group,"add widget",widgets) + else + for i = 1 to length(widgets) do + set(group,"add widget",widgets[i]) + end for + end if + return 1 + end function + +widget[GtkTargetEntry] = {"gtk_target_entry", +{GObject}, + {"new",{S,I,I},P}, + {"copy",{P},P,0,GtkTargetEntry}, + {"free",{P}}, +"GtkTargetEntry"} + +widget[GtkTargetList] = {"gtk_target_list", +{GObject}, + {"new",{P,I},P}, + {"add",{P,P,I,I}}, + {"add_table",{P,P,I}}, + {"add_text_targets",{P,I}}, + {"add_image_targets",{P,I,B}}, + {"add_uri_targets",{P,I}}, + {"add_rich_text_targets",{P,I,B,P}}, + {"remove",{P,P}}, + {"find",{P,P,P},B}, +"GtkTargetList"} + +widget[GtkTextChildAnchor] = {"gtk_text_child_anchor", +{GObject}, + {"new",{},P}, + {"get_deleted",{P},B}, + {"get_widgets",{P},X,0,GList}, +"GtkTextChildAnchor"} + +widget[GtkTextMark] = {"gtk_text_mark", +{GObject}, + {"new",{S,B},P}, + {"set_visible",{P,B}}, + {"get_visible",{P},B}, + {"get_deleted",{P},B}, + {"get_name",{P},S}, + {"get_buffer",{P},P,0,GtkTextBuffer}, + {"get_left_gravity",{P},B}, +"GtkTextMark"} + +widget[GtkTextTag] = {"gtk_text_tag", +{GObject}, + {"new",{S},P}, + {"set_priority",{P,I}}, + {"get_priority",{P},I}, + {"event",{P,P,P,P},B}, + {"changed",{P,B}}, -- 3.20 +"GtkTextTag"} + +widget[GtkTextAttributes] = {"gtk_text_attributes", +{GObject}, + {"new",{},P}, + {"copy",{P},P,0,GtkTextAttributes}, + {"copy_values",{P,P}}, +"GtkTextAttributes"} + +widget[GtkTextTagTable] = {"gtk_text_tag_table", +{GtkBuildable,GObject}, + {"new",{},P}, + {"add",{P,P}}, + {"remove",{P,P}}, + {"lookup",{P,S},P,0,GtkTextTag}, + {"foreach",{P,P,P}}, + {"get_size",{P},I}, +"GtkTextTagTable"} + +widget[GtkMenuShell] = {"gtk_menu_shell", +{GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"append",{P,P},-routine_id("ms_append")}, + {"prepend",{P,P}}, + {"insert",{P,P,I}}, + {"deactivate",{P}}, + {"select_item",{P,P}}, + {"select_first",{P,B}}, + {"deselect",{P}}, + {"activate_item",{P,P,B}}, + {"cancel",{P}}, + {"set_take_focus",{P,B}}, + {"get_take_focus",{P},B}, + {"get_selected_item",{P},P,0,GtkWidget}, + {"get_parent_shell",{P},P,0,GtkWidget}, + {"bind_model",{P,P,S,B}}, --3.6 +"GtkMenuShell"} + + function ms_append(atom menu, object items) -- allow {list} of items; + if atom(items) then + gtk_proc("gtk_menu_shell_append",{P,P},{menu,items}) + else + for i = 1 to length(items) do + ms_append(menu,items[i]) + end for + end if + return 1 + end function + +widget[GtkNotebook] = {"gtk_notebook", +{GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"append_page",{P,P,P},I}, + {"append_page_menu",{P,P,P,P},I}, + {"prepend_page",{P,P,P},I}, + {"prepend_page_menu",{P,P,P,P},I}, + {"insert_page",{P,P,P,I},I}, + {"insert_page_menu",{P,P,P,P,I},I}, + {"remove_page",{P,I}}, + {"page_num",{P,I},I}, + {"next_page",{P}}, + {"prev_page",{P}}, + {"reorder_child",{P,P,I}}, + {"set_tab_pos",{P,I}}, + {"get_tab_pos",{P},I}, + {"set_show_tabs",{P,B}}, + {"get_show_tabs",{P},B}, + {"set_show_border",{P,B}}, + {"get_show_border",{P},B}, + {"set_scrollable",{P,B}}, + {"get_scrollable",{P},B}, + {"popup_enable",{P}}, + {"popup_disable",{P}}, + {"get_current_page",{P},I}, + {"set_menu_label",{P,P},0,GtkWidget}, + {"get_menu_label",{P,P},P}, + {"get_menu_label_text",{P,P},S}, + {"get_n_pages",{P},I}, + {"get_nth_page",{P,I},P,0,GtkWidget}, + {"set_tab_label",{P,P}}, + {"get_tab_label",{P,P},P,0,GtkWidget}, + {"set_tab_label_text",{P,P,S}}, + {"get_tab_label_text",{P,P},S}, + {"set_tab_detachable",{P,P,B}}, + {"get_tab_detachable",{P,P},B}, + {"set_current_page",{P,I}}, + {"set_group_name",{P,S}}, + {"get_group_name",{P},S}, + {"set_action_widget",{P,P,I}}, + {"get_action_widget",{P,I},P,0,GtkWidget}, + {"detach_tab",{P,P}}, -- 3.16 +"GtkNotebook"} + +widget[GtkSocket] = {"gtk_socket", +{GtkContainer,GtkWidget,GObject}, + {"new",{},P}, + {"add_id",{P,P}}, + {"get_id",{P},P}, + {"get_plug_window",{P},P,0,GdkWindow}, +"GtkSocket"} + +widget[GtkPlug] = {"gtk_plug", +{GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{I},P}, + {"get_id",{P},I}, + {"get_embedded",{P},B}, + {"get_socket_window",{P},P,0,GdkWindow}, +"GtkPlug"} + +widget[GtkToolPalette] = {"gtk_tool_palette", +{GtkScrollable,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, + {"set_exclusive",{P,P,B}}, + {"get_exclusive",{P,P},B}, + {"set_expand",{P,P,B}}, + {"get_expand",{P,P},B}, + {"set_group_position",{P,P,I}}, + {"get_group_position",{P,P},I}, + {"set_icon_size",{P,I}}, + {"get_icon_size",{P},I}, + {"unset_icon_size",{P}}, + {"set_style",{P,I}}, + {"get_style",{P},I}, + {"unset_style",{P}}, + {"add_drag_dest",{P,P,I,I,I}}, + {"get_drag_item",{P,P},P,0,GtkWidget}, + {"get_drop_group",{P,I,I},P,0,GtkToolItemGroup}, + {"set_drag_source",{P,I}}, +"GtkToolPalette"} + +widget[GtkTextView] = {"gtk_text_view", +{GtkScrollable,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"new_with_buffer",{P},P}, + {"set_buffer",{P,P}}, + {"get_buffer",{P},P,0,GtkTextBuffer}, + {"scroll_to_mark",{P,P,D,B,D,D}}, + {"scroll_to_iter",{P,P,D,B,D,D},B}, + {"scroll_mark_onscreen",{P,P}}, + {"place_cursor_onscreen",{P},B}, + {"get_visible_rect",{P,P}}, + {"get_iter_location",{P,P,P}}, + {"get_cursor_locations",{P,P,P,P}}, + {"get_line_at_y",{P,P,I,I}}, + {"get_line_yrange",{P,P,I,I}}, + {"get_iter_at_location",{P,P,I,I}}, + {"get_iter_at_position",{P,P,I,I,I}}, + {"buffer_to_window_coords",{P,P,I,I,I,I}}, + {"window_to_buffer_coords",{P,P,I,I,I,I}}, + {"get_window",{P,I},P,0,GdkWindow}, + {"set_border_window_size",{P,I,I}}, + {"get_border_window_size",{P,P},I}, + {"forward_display_line",{P,P},B}, + {"backward_display_line",{P,P},B}, + {"forward_display_line_end",{P,P},B}, + {"backward_display_line_start",{P,P},B}, + {"starts_display_line",{P,P},B}, + {"move_visually",{P,P,I},B}, + {"add_child_at_anchor",{P,P,P}}, + {"add_child_in_window",{P,P,P,I,I}}, + {"move_child",{P,P,I,I}}, + {"set_wrap_mode",{P,I}}, + {"get_wrap_mode",{P},I}, + {"set_editable",{P,B}}, + {"get_editable",{P},B}, + {"set_cursor_visible",{P,B}}, + {"get_cursor_visible",{P},B}, + {"set_overwrite",{P,B}}, + {"get_overwrite",{P},B}, + {"set_pixels_above_lines",{P,I}}, + {"get_pixels_above_lines",{P},I}, + {"set_pixels_below_lines",{P,I}}, + {"get_pixels_below_lines",{P},I}, + {"set_pixels_inside_wrap",{P,I}}, + {"get_pixels_inside_wrap",{P},I}, + {"set_justification",{P,I}}, + {"get_justification",{P},I}, + {"set_left_margin",{P,I}}, + {"get_left_margin",{P},I}, + {"set_right_margin",{P,I}}, + {"get_right_margin",{P},I}, + {"set_indent",{P,I}}, + {"get_indent",{P},I}, + {"set_tabs",{P,A}}, + {"get_tabs",{P},A,0,PangoTabArray}, + {"set_accepts_tab",{P,B}}, + {"get_accepts_tab",{P},B}, + {"im_context_filter_keypress",{P,P},B}, + {"get_default_attributes",{P},P,0,GtkTextAttributes}, + {"reset_im_context",{P}}, + {"set_input_purpose",{P,I}}, -- 3.6+ + {"get_input_purpose",{P},I}, -- 3.6+ + {"set_input_hints",{P,I}}, -- 3.6+ + {"get_input_hints",{P},I}, -- 3.6+ + {"get_monospace",{P},B}, -- 3.16 + {"set_monospace",{P,B}}, -- 3.16 + {"get_bottom_margin",{P},I}, -- 3.18 + {"set_bottom_margin",{P,I}}, -- 3.18 + {"get_top_margin",{P},I}, -- 3.18 + {"set_top_margin",{P,I}}, -- 3.18 + {"reset_cursor_blink",{P}}, -- 3.20 +"GtkTextView"} + +widget[GtkToolShell] = {"gtk_tool_shell", -- WARNING! +{GtkWidget}, -- see GTK3 docs re: GtkToolShell functions + {"get_ellipsize_mode",{P},I}, + {"get_icon_size",{P},I}, + {"get_orientation",{P},I}, + {"get_relief_style",{P},I}, + {"get_style",{P},I}, + {"get_text_alignment",{P},F}, + {"get_text_orientation",{P},I}, + {"get_text_size_group",{P},P,0,GtkSizeGroup}, + {"rebuild_menu",{P}}, +"GtkToolShell"} + +widget[GtkToolbar] = {"gtk_toolbar", +{GtkToolShell,GtkContainer,GtkWidget,GtkOrientable,GtkBuildable,GObject}, + {"new",{},P}, + {"insert",{P,P,I}}, + {"get_item_index",{P,P},I}, + {"get_n_items",{P},I}, + {"get_nth_item",{P},P}, + {"get_drop_index",{P,I,I},I}, + {"set_drop_highlight_item",{P,P,I}}, + {"set_show_arrow",{P,B}}, + {"get_show_arrow",{P},B}, + {"set_icon_size",{P,I}}, + {"get_icon_size",{P},I}, + {"unset_icon_size",{P}}, + {"set_style",{P,I}}, + {"get_style",{P},I}, + {"unset_style",{P}}, +"GtkToolbar"} + +widget[GtkToolItemGroup] = {"gtk_tool_item_group", +{GtkToolShell,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{S},P}, + {"set_collapsed",{P,B}}, + {"get_collapsed",{P},B}, + {"set_ellipsize",{P,I}}, + {"get_ellipsize",{P},I}, + {"get_drop_item",{P,I,I},P,0,GtkToolItem}, + {"get_n_items",{P},I}, + {"get_nth_item",{P,I},P,0,GtkToolItem}, + {"set_label",{P,S}}, + {"get_label",{P},S}, + {"set_label_widget",{P,P}}, + {"get_label_widget",{P},P,0,GtkWidget}, + {"set_header_relief",{P,I}}, + {"get_header_relief",{P},I}, + {"insert",{P,P,I}}, + {"set_item_position",{P,P,I}}, +"GtkToolItemGroup"} + +widget[GtkTooltip] = {"gtk_tooltip", +{GObject}, + {"set_text",{P,S}}, + {"set_markup",{P,S}}, + {"set_icon",{P,P}}, + {"set_icon_from_icon_name",{P,S,I}}, + {"set_icon_from_gicon",{P,P,I}}, + {"set_custom",{P,P}}, + {"trigger_tooltip_query",{P}}, + {"set_tip_area",{P,P}}, +"GtkTooltip"} + +function newColumn(object params) + params = keyvalues(params) + atom c = create(GtkTreeViewColumn) + atom r = -1 + object t = vlookup("type",params,1,2) + + switch t do + case "text","markup" then r = create(GtkCellRendererText) + case "pixbuf" then r = create(GtkCellRendererPixbuf) + case "progress" then r = create(GtkCellRendererProgress) + case "spin" then r = create(GtkCellRendererSpin) + case "toggle" then r = create(GtkCellRendererToggle) + case "combo" then r = create(GtkCellRendererCombo) + case else display("Error specifying cell renderer type") + end switch + + if r = -1 then + Warn(,,"Create new column","Must specify a renderer type (i.e. type=text)") + abort(1) + end if + + set(c,{{"pack start",r,TRUE}}) + + for i = 1 to length(params) do + + if equal("TRUE",params[i][2]) then params[i][2] = 1 end if + if equal("FALSE",params[i][2]) then params[i][2] = 0 end if + if equal("1",params[i][2]) then params[i][2] = 1 end if + if equal("0",params[i][2]) then params[i][2] = 0 end if + + if match("column.",params[i][1]) then + set(c,params[i][1][8..$],params[i][2]) + + elsif match("renderer.",params[i][1]) then + set(r,params[i][1][10..$],params[i][2]) + + elsif equal("cell_data_func",params[i][1]) then + params[i][2] = to_number(params[i][2]) + set(c,"cell data func",r,params[i][2]) + + else + switch params[i][1] do + case "type" then break -- do nothing + case "title","sort_column_id" then set(c,params[i][1],params[i][2]) + case "toggled" then connect(r,"toggled",_(params[i][2])) + case "edited" then connect(r,"edited",_(params[i][2])) + --display("Connecting [] []",{params[i][2],_(params[i][2])}) + case else set(c,"add attribute",r,params[i][1],params[i][2]) + end switch + end if + + end for + + set(c,"data","renderer",sprintf("%d",r)) + + return c + end function + +widget[GtkTreeView] = {"gtk_tree_view", +{GtkContainer,GtkWidget,GtkBuildable,GtkScrollable,GObject}, + {"new",{P},-routine_id("newTreeView")}, + {"set_model",{P,P}}, + {"get_model",{P},P,0,GtkTreeModel}, + {"get_selection",{P},P,0,GtkTreeSelection}, + {"set_headers_visible",{P,B}}, + {"get_headers_visible",{P},B}, + {"set_headers_clickable",{P,B}}, + {"get_headers_clickable",{P},B}, + {"set_show_expanders",{P,B}}, + {"get_show_expanders",{P},B}, + {"set_expander_column",{P,P}}, + {"get_expander_column",{P},P,0,GtkTreeViewColumn}, + {"set_level_indentation",{P,I}}, + {"get_level_indentation",{P},I}, + {"columns_autosize",{P}}, + {"set_rules_hint",{P,B}}, -- deprecated 3.14 + {"get_rules_hint",{P},B}, -- deprecated 3.14 + {"set_activate_on_single_click",{P,B}}, -- GTK 3.8+ + {"get_activate_on_single_click",{P},B}, -- GTK 3.8+ + {"append_column",{P,P},I}, + {"append_columns",{P,P},-routine_id("tv_append_columns")}, + {"remove_column",{P,P,I}}, + {"insert_column",{P,P,I}}, + {"insert_column_with_attributes",{P,I,S,S,I,I}}, + {"insert_column_with_data_func",{P,I,S,P,P,P,P}}, + {"get_n_columns",{P},I}, + {"get_column",{P,I},P,0,GtkTreeViewColumn}, + {"get_columns",{P},X,0,GList}, + {"move_column_after",{P,P,P}}, + {"set_column_drag_function",{P,P,P,P}}, + {"scroll_to_point",{P,I,I}}, + {"scroll_to_cell",{P,P,P,P,F,F},-routine_id("tv_scroll_to_cell")}, + {"set_cursor",{P,P,P,B}}, + {"set_cursor_on_cell",{P,P,P,P,B}}, + {"get_cursor",{P,P,P}}, + {"row_activated",{P,P,P}}, + {"expand_row",{P,P,B},B}, + {"expand_all",{P}}, + {"expand_to_path",{P,P}}, + {"collapse_all",{P}}, + {"map_expanded_rows",{P,P,P}}, + {"row_expanded",{P,P},B}, + {"set_reorderable",{P,B}}, + {"get_reorderable",{P,B}}, + {"get_path_at_pos",{P,I,I,P,P,I,I},B}, + {"is_blank_at_pos",{P,I,I,P,P,I,I},B}, + {"get_cell_area",{P,P,P,P}}, + {"get_background_area",{P,P,P,P}}, + {"get_visible_rect",{P,P}}, + {"get_visible_range",{P,P,P},B}, + {"get_bin_window",{P},P,0,GdkWindow}, + {"convert_bin_window_to_tree_coords",{P,I,I,I,I}}, + {"convert_bin_window_to_widget_coords",{P,I,I,I,I}}, + {"convert_tree_to_bin_window_coords",{P,I,I,I,I}}, + {"convert_tree_to_widget_coords",{P,I,I,I,I}}, + {"convert_widget_to_bin_window_coords",{P,I,I,I,I}}, + {"convert_widget_to_tree_coords",{P,I,I,I,I}}, + {"enable_model_drag_dest",{P,P,I,I}}, + {"enable_model_drag_source",{P,I,P,I,I}}, + {"unset_rows_drag_source",{P}}, + {"unset_rows_drag_dest",{P}}, + {"set_drag_dest_row",{P,P,I}}, + {"get_drag_dest_row",{P,P,P}}, + {"get_drag_dest_row_at_pos",{P,I,I,P,P},B}, + {"create_row_drag_icon",{P,P},P,0,CairoSurface_t}, + {"set_enable_search",{P,B}}, + {"get_enable_search",{P},B}, + {"set_search_column",{P,I}}, + {"get_search_column",{P},I}, + {"set_search_equal_func",{P,P,P,P}}, + {"get_search_equal_func",{P},P}, + {"set_search_entry",{P,P}}, + {"get_search_entry",{P},P,0,GtkEntry}, + {"set_search_position_func",{P,P,P,P}}, + {"get_search_position_func",{P},P}, + {"set_fixed_height_mode",{P,B}}, + {"get_fixed_height_mode",{P},B}, + {"set_hover_selection",{P,B}}, + {"get_hover_selection",{P},B}, + {"set_hover_expand",{P,B}}, + {"get_hover_expand",{P},B}, + {"set_destroy_count_func",{P,P,P,P}}, + {"set_row_separator_func",{P,P,P,P}}, + {"get_row_separator_func",{P},P}, + {"set_rubber_banding",{P,B}}, + {"get_rubber_banding",{P},B}, + {"set_enable_tree_lines",{P,B}}, + {"get_enable_tree_lines",{P},B}, + {"set_grid_lines",{P,B}}, + {"get_grid_lines",{P},B}, + {"set_tooltip_row",{P,P,P}}, + {"set_tooltip_cell",{P,P,P,P,P}}, + {"set_tooltip_column",{P,I}}, + {"get_tooltip_column",{P},I}, + {"get_tooltip_context",{P,I,I,B,P,P,P},B}, + {"select_row",{P,P,D,D},-routine_id("tv_select_row")}, + {"get_selected_row_data",{P,P},-routine_id("tv_get_selected_row_data")}, + {"get_selected_col_data",{P,P,I},-routine_id("tv_get_selected_col_data")}, +"GtkTreeView"} + + function newTreeView(atom x=0) + if class_id(x) = GtkTreeModel then + return gtk_func("gtk_tree_view_new_with_model",{P},{x}) + else + return gtk_func("gtk_tree_view_new") + end if + end function + + constant sfn1 = define_func("gtk_tree_view_get_model",{P},P) + constant sfn2 = define_func("gtk_tree_model_get_n_columns",{P},I) + constant sfn3 = define_func("gtk_tree_model_get_iter",{P,P,P},B) + constant sfn4 = define_func("gtk_tree_model_get_column_type",{P,I},I) + constant sp1 = define_proc("gtk_tree_model_get",{P,P,I,P,I}) + + function tv_get_selected_col_data(atom view, atom path, integer col) + object data = tv_get_selected_row_data(view,path) + return data[col] + end function + + function tv_get_selected_row_data(atom view, atom path) + atom mdl = c_func(sfn1,{view}) + integer ncols = c_func(sfn2,{mdl}) + object data = repeat(0,ncols) + object types = repeat(0,ncols) + atom iter = allocate(32,1) + object result + + if c_func(sfn3,{mdl,iter,path}) then + for i = 1 to length(data) do + data[i] = allocate(32,1) + types[i] = c_func(sfn4,{mdl,i-1}) + c_proc(sp1,{mdl,iter,i-1,data[i],-1}) + end for + end if + + for i = 1 to length(data) do + switch types[i] do + case gSTR then + ifdef BITS64 then -- thanks pete eberlein + result = peek8u(data[i]) + elsedef + result = peek4u(data[i]) + end ifdef + if result > 0 then + result = peek_string(result) + end if + data[i] = result + + case else data[i] = peek4u(data[i]) + end switch + end for + + return data + end function + + function tv_scroll_to_cell(atom v, atom p, atom c=0, integer align=0, atom row=0, atom col=0) + gtk_proc("gtk_tree_view_scroll_to_cell",{P,P,P,I,F,F},{v,p,c,align,row,col}) + return 1 + end function + + function tv_append_columns(atom store, object cols) + if atom(cols) then + gtk_func("gtk_tree_view_append_column",{P,P},{store,cols}) + else + for i = 1 to length(cols) do + tv_append_columns(store,cols[i]) + end for + end if + return 1 + end function + + function tv_select_row(atom tv, object path, atom rowalign=0, atom colalign=0) + path = create(GtkTreePath,path) + gtk_func("gtk_tree_view_scroll_to_cell", + {P,P,I,I,F,F},{tv,path,0,1,rowalign,colalign}) + return 1 + end function + +widget[GtkTreeViewColumn] = {"gtk_tree_view_column", +{GtkCellLayout,GtkBuildable,GObject}, + {"new",{},P}, + {"set_title",{P,S}}, + {"get_title",{P},S}, + {"pack_start",{P,P,B}}, + {"pack_end",{P,P,B}}, + {"clear",{P}}, + {"clicked",{P}}, + {"add_attribute",{P,P,S,I}}, + {"set_spacing",{P,I}}, + {"get_spacing",{P},I}, + {"set_visible",{P,B}}, + {"get_visible",{P},B}, + {"set_resizable",{P,B}}, + {"get_resizable",{P},B}, + {"set_sizing",{P,I}}, + {"get_sizing",{P},I}, + {"set_fixed_width",{P,I}}, + {"get_fixed_width",{P},I}, + {"set_min_width",{P,I}}, + {"get_min_width",{P},I}, + {"set_max_width",{P,I}}, + {"get_max_width",{P},I}, + {"set_expand",{P,B}}, + {"get_expand",{P},B}, + {"set_clickable",{P,B}}, + {"get_clickable",{P},B}, + {"set_widget",{P,P}}, + {"get_widget",{P},P}, + {"get_button",{P},P,0,GtkWidget}, + {"set_alignment",{P,F}}, + {"get_alignment",{P},F}, + {"set_reorderable",{P,B}}, + {"get_reorderable",{P},B}, + {"set_sort_column_id",{P,I}}, + {"get_sort_column_id",{P},I}, + {"set_sort_indicator",{P,B}}, + {"get_sort_indicator",{P},B}, + {"set_sort_order",{P,I}}, + {"get_sort_order",{P},I}, + {"cell_set_cell_data",{P,P,P,B,B}}, + {"cell_get_size",{P,P,I,I,I,I}}, + {"cell_get_position",{P,P,I,I},B}, + {"cell_is_visible",{P},B}, + {"focus_cell",{P,P}}, + {"queue_resize",{P}}, + {"get_tree_view",{P},P,0,GtkTreeView}, + {"get_x_offset",{P},I}, +"GtkTreeViewColumn"} + +widget[GtkTreeSelection] = {"gtk_tree_selection", +{GObject}, + {"set_mode",{P,I}}, + {"get_mode",{P},I}, + {"set_select_function",{P,P,P,P}}, + {"get_select_function",{P},P}, + {"get_user_data",{P},P}, + {"get_tree_view",{P},P}, + {"get_selected",{P,P,P},B}, + {"selected_foreach",{P,P,P}}, + {"count_selected_rows",{P},I}, + {"select_path",{P,P}}, + {"unselect_path",{P,P}}, + {"path_is_selected",{P,P},B}, + {"select_iter",{P,P}}, + {"unselect_iter",{P,P}}, + {"iter_is_selected",{P,P},B}, + {"select_all",{P}}, + {"unselect_all",{P}}, + {"select_range",{P,P,P}}, + {"unselect_range",{P,P,P}}, + {"get_selected_row",{P,P},-routine_id("ts_get_selected_row")}, + {"get_selected_rows",{P,P},-routine_id("ts_get_selected_rows")}, + {"get_selected_row_data",{P},-routine_id("ts_get_selected_row_data")}, +"GtkTreeSelection"} + + function ts_get_selected_rows(atom selection, atom model) + object list = gtk_func("gtk_tree_selection_get_selected_rows", + {P,P},{selection,model}) + list = to_sequence(list,3) + return list +1 + end function + + function ts_get_selected_row(atom selection, atom model) + object result = ts_get_selected_rows(selection,model) + if equal({},result) then return 0 + else return result[1] + end if + end function + + function ts_get_selected_row_data(atom selection) + atom mdl = allocate(32), iter = allocate(32) + integer n + object x,t, val, result + if gtk_func("gtk_tree_selection_get_selected",{P,P,P},{selection,mdl,iter}) then + mdl = peek4u(mdl) + n = gtk_func("gtk_tree_model_get_n_columns",{P},{mdl}) + x = repeat(0,n) t = x + + for i = 1 to n do + val = allocate(32,1) + gtk_proc("gtk_tree_model_get",{P,P,I,P,I},{mdl,iter,i-1,val,-1}) + t[i] = gtk_func("gtk_tree_model_get_column_type",{P,I},{mdl,i-1}) + x[i] = val + end for + + for i = 1 to length(x) do + switch t[i] do + case gSTR then + ifdef BITS64 then -- thanks pete eberlein + result = peek8u(x[i]) + elsedef + result = peek4u(x[i]) + end ifdef + if result > 0 then + x[i] = peek_string(result) + end if + case gFLT then x[i] = float32_to_atom(peek({x[i],4})) + case gDBL then x[i] = float64_to_atom(peek({x[i],8})) + case else x[i] = peek4u(x[i]) + end switch + end for + return x + end if + + return -1 + end function + +widget[GtkActionBar] = {"gtk_action_bar", -- GTK 3.12 +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"pack_start",{P,P}}, + {"pack_end",{P,P}}, + {"get_center_widget",{P},P}, + {"set_center_widget",{P,P}}, +"GtkActionBar"} + +widget[GtkAccelLabel] = {"gtk_accel_label", +{GtkLabel,GtkMisc,GtkWidget,GtkBuildable,GObject}, + {"new",{S},P}, + {"get_accel",{P,I,I}}, -- 3.14 + {"set_accel",{P,I,I}}, + {"set_accel_closure",{P,P}}, + {"set_accel_widget",{P,P}}, + {"get_accel_widget",{P},P,0,GtkWidget}, + {"get_accel_width",{P},I}, + {"refetch",{P},B}, +"GtkAccelLabel"} + +widget[GtkAccelGroup] = {"gtk_accel_group", +{GObject}, + {"new",{},P}, + {"connect",{P,I,I,I,P}}, + {"connect_by_path",{P,S,P}}, + {"disconnect",{P,P},B}, + {"disconnect_key",{P,I,I},B}, + {"activate",{P,I,P,I,I},B}, + {"lock",{P}}, + {"unlock",{P}}, + {"get_is_locked",{P},B}, + {"from_accel_closure",{P},P,0,GtkAccelGroup}, + {"get_modifier_mask",{P},I}, + {"find",{P,P,P},P}, +"GtkAccelGroup"} + +widget[GtkArrow] = {"gtk_arrow", -- deprecated 3.14 +{GtkMisc,GtkWidget,GtkBuildable,GObject}, + {"new",{I,I},P}, + {"set",{P,I,I}}, +"GtkArrow"} + +widget[GtkCalendar] = {"gtk_calendar", +{GtkWidget,GtkBuildable,GObject}, + {"clear_marks",{P}}, + {"get_date",{P,I},-routine_id("cal_get_date")}, + {"get_ymd",{P,I},-routine_id("cal_get_ymd")}, + {"get_eu_date",{P},-routine_id("cal_get_eu_date")}, + {"get_day",{P},-routine_id("cal_get_day")}, + {"get_month",{P},-routine_id("cal_get_month")}, + {"get_year",{P},-routine_id("cal_get_year")}, + {"get_datetime",{P,I},-routine_id("cal_get_datetime")}, + {"get_day_is_marked",{P,I},B}, + {"get_display_options",{P},I}, + {"mark_day",{P,I},B}, + {"new",{P},-routine_id("newCalendar")}, + {"select_day",{P,I}}, + {"select_month",{P,I,I},-routine_id("cal_select_month")}, + {"set_display_options",{P,I}}, + {"unmark_day",{P,I},B}, + {"set_detail_func",{P,P,P,P}}, + {"set_detail_width_chars",{P,I}}, + {"get_detail_width_chars",{P},I}, + {"get_detail_height_rows",{P},I}, + {"set_detail_height_rows",{P,I}}, + {"set_date",{P,P},-routine_id("cal_set_date")}, + {"set_eu_date",{P,P},-routine_id("cal_set_date")}, + {"set_day",{P,I},-routine_id("cal_set_day")}, + {"set_month",{P,I},-routine_id("cal_set_month")}, + {"set_year",{P,I},-routine_id("cal_set_year")}, +"GtkCalendar"} + + function newCalendar(object d = 0) -- create calendar, set optional date; + object cal = gtk_func("gtk_calendar_new") + if atom(d) and d = 0 then return cal + else gtk_proc("gtk_calendar_select_month",{P,I,I},{cal,d[2]-1,d[1]}) + gtk_proc("gtk_calendar_select_day",{P,I},{cal,d[3]}) + return cal + end if + end function + +------------------------------------------------------------------------ +-- Calendar convenience functions +------------------------------------------------------------------------ +-- Handle odd month numbering scheme: +-- Q: If the first day of the month is 1, then why is the first month +-- of the year zero +-- A: Blame a C programmer! + +-- Here we fix that, plus change the set_date routine from two steps +-- to one; also, provide for standard formatting to be used when +-- getting the date. See std/datetime.e for the formats available. +------------------------------------------------------------------------ + + constant get_date = define_proc("gtk_calendar_get_date",{P,I,I,I}) + + function cal_select_month(atom handle, integer mo, integer yr=0) + while mo < 1 do yr -= 1 mo += 12 end while + while mo > 12 do yr += 1 mo -= 12 end while + gtk_proc("gtk_calendar_select_month",{P,I,I},{handle,mo-1,yr}) + return 1 + end function + + function cal_set_day(atom handle, integer day) + object curr = get(handle,"date") + curr[3] = day + cal_set_date(handle,curr) + return 1 + end function + + function cal_set_month(atom handle, integer month) + object curr = get(handle,"date") + curr[2] = month + cal_set_date(handle,curr) + return 1 + end function + + function cal_set_year(atom handle, integer year) + object curr = get(handle,"date") + curr[1] = year + cal_set_date(handle,curr) + return 1 + end function + + function cal_set_date(atom handle, object cdate) + object dt = 0 + integer yr, mo, da + + dt = datetime:parse(cdate,"%Y/%m/%d") + if atom(dt) then + dt = datetime:parse(cdate,"%Y,%m,%d") + end if + if atom(dt) then + dt = datetime:parse(cdate,"%m/%d/%y") + end if + if atom(dt) then + dt = datetime:parse(cdate,"%m/%d/%Y") + end if + if atom(dt) then + dt = datetime:parse(cdate,"%y/%m/%d") + end if + + if atom(dt) then + if cdate[1] > 31 then -- Y/M/D + yr = cdate[1] + mo = cdate[2] + da = cdate[3] + end if + if cdate[3] > 31 then -- M/D/Y + mo = cdate[1] + da = cdate[2] + yr = cdate[3] + end if + else + yr = dt[1] + mo = dt[2] + da = dt[3] + end if + + if yr < 1900 then yr += 1900 end if + gtk_proc("gtk_calendar_select_month",{P,I,I},{handle,mo-1,yr}) + gtk_proc("gtk_calendar_select_day",{P,I},{handle,da}) + return 1 + end function + + function setCalendarEuDate(atom handle, object edt) + edt[1] += 1900 + return cal_set_date(handle,edt) + end function + + function cal_get_date(atom handle, object fmt=0) + atom y = allocate(8,1), m = allocate(8,1), d = allocate(8,1) + object clock + if atom(fmt) and fmt = 0 then + fmt = "%A, %b %d, %Y" + else + fmt = peek_string(fmt) + end if + object result + c_proc(get_date,{handle,y,m,d}) + result = datetime:new(peek4u(y),peek4u(m)+1,peek4u(d)) + clock = datetime:now() + result = result[1..3] & clock[4..6] + result = datetime:format(result,fmt) + return result + end function + + function cal_get_datetime(atom handle, object fmt=1) + atom y = allocate(8,1), m = allocate(8,1), d = allocate(8,1) + object result + c_proc(get_date,{handle,y,m,d}) + result = datetime:now() -- for current hr,min,sec + result[1] = peek4u(y) + result[2] = peek4u(m)+1 + result[3] = peek4u(d) + if fmt = 0 then -- set hr,min,sec to zero; + result[4] = 0 + result[5] = 0 + result[6] = 0 + end if + return result + end function + + function cal_get_eu_date(atom handle) --returns {y,m,d} in Eu fmt. + atom y = allocate(8,1), m = allocate(8,1), d = allocate(8,1) + c_proc(get_date,{handle,y,m,d}) + sequence result = {peek4u(y)-1900,peek4u(m)+1,peek4u(d)} + return result + end function + + function cal_get_ymd(atom handle, integer full=0) + object clock + switch full do + case 0 then return cal_get_eu_date(handle) + {1900,0,0} + case 1 then return cal_get_eu_date(handle) + {1900,0,0} & {0,0,0} + case 2 then clock = datetime:now() + return cal_get_eu_date(handle) + {1900,0,0} & clock[4..6] + case else return cal_get_eu_date(handle) + {1900,0,0} + end switch + end function + + function cal_get_day(atom handle) + atom y = allocate(8,1), m = allocate(8,1), d = allocate(8,1) + c_proc(get_date,{handle,y,m,d}) + integer result = peek4u(d) + return result + end function + + function cal_get_month(atom handle) + atom y = allocate(8,1), m = allocate(8,1), d = allocate(8,1) + c_proc(get_date,{handle,y,m,d}) + integer result = peek4u(m) + return result+1 + end function + + function cal_get_year(atom handle) + atom y = allocate(8,1), m = allocate(8,1), d = allocate(8,1) + c_proc(get_date,{handle,y,m,d}) + integer result = peek4u(y) + return result + end function + +widget[GtkCellView] = {"gtk_cell_view", +{GtkCellLayout,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{P,P},-routine_id("newCellView")}, + {"set_model",{P,P}}, + {"get_model",{P},P}, + {"set_displayed_row",{P,P}}, + {"get_displayed_row",{P},P,0,GtkTreePath}, + {"set_draw_sensitive",{P,B}}, + {"get_draw_sensitive",{P},B}, + {"set_fit_model",{P,B}}, + {"get_fit_model",{P},B}, +"GtkCellView"} + + function newCellView(atom x=0, atom y=0) + if class_id(x) = GtkCellArea + and class_id(y) = GtkCellAreaContext then + return gtk_func("gtk_cell_view_new_with_context",{P,P},{x,y}) + elsif atom(x) and x > 0 then + if class_id(x) = GdkPixbuf then + return gtk_func("gtk_cell_view_new_with_pixbuf",{P},{x}) + end if + elsif string(x) then + return gtk_func("gtk_cell_view_new_with_markup",{P},{allocate_string(x)}) + end if + end function + +widget[GtkDrawingArea] = {"gtk_drawing_area", +{GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, +"GtkDrawingArea"} + +widget[GtkSearchEntry] = {"gtk_search_entry", --3.6 +{GtkEntry,GtkWidget,GtkBuildable,GtkEditable,GtkCellEditable,GObject}, + {"new",{},P}, + {"handle_event",{P,P},B}, +"GtkSearchEntry"} + +widget[GtkEntryBuffer] = {"gtk_entry_buffer", +{GObject}, + {"new",{S,I},P}, + {"get_text",{P},S}, + {"set_text",{P,S,I}}, + {"get_bytes",{P},I}, + {"get_length",{P},I}, + {"set_max_length",{P,I}}, + {"get_max_length",{P},I}, + {"insert_text",{P,I,S,I},I}, + {"delete_text",{P,I,I},I}, + {"emit_deleted_text",{P,I,I}}, + {"emit_inserted_text",{P,I,S,I}}, +"GtkEntryBuffer"} + +widget[GtkEntryCompletion] = {"gtk_entry_completion", +{GtkCellLayout,GtkBuildable,GObject}, + {"new",{P},-routine_id("newEntryCompletion")}, + {"get_entry",{P},P,0,GtkEntry}, + {"set_model",{P,P}}, + {"get_model",{P},P,0,GtkTreeModel}, + {"set_match_func",{P,P,P,P}}, + {"set_minimum_key_length",{P,I}}, + {"get_minimum_key_length",{P},I}, + {"compute_prefix",{P,S},S}, + {"get_completion_prefix",{P},S}, + {"insert_prefix",{P}}, + {"insert_action_text",{P,I,S}}, + {"insert_action_markup",{P,I,S}}, + {"delete_action",{P,I}}, + {"set_text_column",{P,I}}, + {"get_text_column",{P},I}, + {"set_inline_completion",{P,B}}, + {"get_inline_completion",{P},B}, + {"set_inline_selection",{P,B}}, + {"get_inline_selection",{P},B}, + {"set_popup_completion",{P,B}}, + {"get_popup_completion",{P},B}, + {"set_popup_set_width",{P,B}}, + {"get_popup_set_width",{P},B}, + {"set_popup_single_match",{P,B}}, + {"get_popup_single_match",{P},B}, + {"complete",{P}}, +"GtkEntryCompletion"} + + function newEntryCompletion(atom x=0) + if class_id(x) = GtkCellArea then + return gtk_func("gtk_entry_completion_new_with_area",{P},{x}) + else + return gtk_func("gtk_entry_completion_new") + end if + end function + +widget[GtkRevealer] = {"gtk_revealer", -- new in GTK 3.10 +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"set_reveal_child",{P,B}}, + {"get_reveal_child",{P},B}, + {"get_child_revealed",{P},B}, + {"set_transition_duration",{P,I}}, + {"get_transition_duration",{P},I}, + {"set_transition_type",{P,I}}, + {"get_transition_type",{P},I}, +"GtkRevealer"} + +widget[GtkSearchBar] = {"gtk_search_bar", -- new in GTK 3.10 +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"connect_entry",{P,P}}, + {"set_search_mode",{P,B}}, + {"get_search_mode",{P},B}, + {"set_show_close_button",{P,B}}, + {"get_show_close_button",{P},B}, + {"handle_event",{P,P},B}, +"GtkSearchBar"} + +widget[GtkStack] = {"gtk_stack", -- new in GTK 3.10 +{GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"add_named",{P,P,S}}, + {"add_titled",{P,P,S,S}}, + {"set_visible_child",{P,P}}, + {"get_visible_child",{P},P,0,GtkWidget}, + {"set_visible_child_name",{P,S}}, + {"get_visible_child_name",{P},S}, + {"set_visible_child_full",{P,S,I}}, + {"set_homogeneous",{P,B}}, + {"get_homogeneous",{P},B}, + {"set_transition_duration",{P,I}}, + {"get_transition_duration",{P},I}, + {"set_transition_type",{P,I}}, + {"get_transition_type",{P},I}, + {"get_child_by_name",{P,S},P,0,GtkWidget}, -- 3.12 + {"get_transition_running",{P},B}, -- 3.12 + {"get_hhomogeneous",{P},B}, -- 3.16 + {"set_hhomogeneous",{P,B}}, -- 3.16 + {"get_vhomogeneous",{P},B}, -- 3.16 + {"set_vhomogeneous",{P,B}}, -- 3.16 + {"get_interpolate_size",{P},B}, -- 3.18 + {"set_interpolate_size",{P,B}}, -- 3.18 +"GtkStack"} + +widget[GtkStackSidebar] = {"gtk_stack_sidebar", -- 3.16 +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"set_stack",{P,P}}, + {"get_stack",{P},P,0,GtkStack}, +"GtkStackSidebar"} + +widget[GtkStackSwitcher] = {"gtk_stack_switcher", +{GtkBox,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, + {"set_stack",{P,P}}, + {"get_stack",{P},P,0,GtkStack}, +"GtkStackSwitcher"} + +widget[GtkScrollbar] = {"gtk_scrollbar", +{GtkRange,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{I,P},P}, +"GtkScrollbar"} + +widget[GtkInvisible] = {"gtk_invisible", +{GtkWidget,GtkBuildable,GObject}, + {"new",{P},-routine_id("newInvisible")}, + {"set_screen",{P,P}}, + {"get_screen",{P},P,0,GdkScreen}, +"GtkInvisible"} + + function newInvisible(atom x=0) + if class_id(x) = GdkScreen then + return gtk_func("gtk_invisible_new_for_screen",{P},{x}) + else + return gtk_func("gtk_invisible_new") + end if + end function + +widget[GtkProgressBar] = {"gtk_progress_bar", +{GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, + {"pulse",{P}}, + {"set_fraction",{P,D}}, + {"get_fraction",{P},D}, + {"set_inverted",{P,B}}, + {"get_inverted",{P},B}, + {"set_show_text",{P,B}}, + {"get_show_text",{P},B}, + {"set_text",{P,S}}, + {"get_text",{P},S}, + {"set_ellipsize",{P,B}}, + {"get_ellipsize",{P},B}, + {"set_pulse_step",{P,D}}, + {"get_pulse_step",{P},D}, +"GtkProgressBar"} + +widget[GtkSpinner] = {"gtk_spinner", +{GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"start",{P}}, + {"stop",{P}}, +"GtkSpinner"} + +widget[GtkSwitch] = {"gtk_switch", +{GtkWidget,GtkBuildable,GtkActionable,GObject}, + {"new",{},P}, + {"set_active",{P,B}}, + {"get_active",{P},B}, + {"get_state",{P},B}, -- GTK3.14 + {"set_state",{P,B}}, -- GTK3.14 +"GtkSwitch"} + +widget[GtkLevelBar] = {"gtk_level_bar",-- GTK3.6+ +{GtkWidget,GtkBuildable,GtkBuildable,GtkOrientable,GObject}, + {"new",{D,D},-routine_id("newLevelBar")}, + {"new_for_interval",{D,D},P}, + {"set_mode",{P,I}}, + {"get_mode",{P},I}, + {"set_value",{P,D}}, + {"get_value",{P},D}, + {"set_min_value",{P,D}}, + {"get_min_value",{P},D}, + {"set_max_value",{P,D}}, + {"get_max_value",{P},D}, + {"add_offset_value",{P,S,D}}, + {"remove_offset_value",{P,S}}, + {"get_offset_value",{P,S},D}, + {"get_inverted",{P},B}, --GTK3.8+ + {"set_inverted",{P,B}}, --GTK3.8+ +"GtkLevelBar"} + + function newLevelBar(atom x=0, atom y=0) + if x+y > 0 then + return gtk_func("gtk_level_bar_new_for_interval",{D,D},{x,y}) + else + return gtk_func("gtk_level_bar_new") + end if + end function + +widget[GtkAboutDialog] = {"gtk_about_dialog", +{GtkDialog,GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"set_program_name",{P,S}}, + {"get_program_name",{P},S}, + {"set_version",{P,S}}, + {"get_version",{P},S}, + {"set_copyright",{P,S}}, + {"get_copyright",{P},S}, + {"set_comments",{P,S}}, + {"get_comments",{P},S}, + {"set_license",{P,S}}, + {"get_license",{P},S}, + {"set_wrap_license",{P,B}}, + {"get_wrap_license",{P},B}, + {"set_license_type",{P,I}}, + {"get_license_type",{P},I}, + {"set_website",{P,S}}, + {"get_website",{P},S}, + {"set_website_label",{P,S}}, + {"get_website_label",{P},S}, + {"set_authors",{P,A}}, + {"get_authors",{P},V}, + {"set_artists",{P,A}}, + {"get_artists",{P},V}, + {"set_documenters",{P,A}}, + {"get_documenters",{P},V}, + {"set_translator_credits",{P,S}}, + {"get_translator_credits",{P},S}, + {"set_logo",{P,P},-routine_id("setAboutLogo")}, + {"get_logo",{P},P,0,GdkPixbuf}, + {"set_logo_icon_name",{P,S}}, + {"get_logo_icon_name",{P},S}, + {"add_credit_section",{P,S,A}}, +"GtkAboutDialog"} + + function setAboutLogo(atom dlg, object logo) + if string(logo) then + logo = locate_file(logo) + if file_type(logo) = 0 then return 0 end if + end if + if atom(logo) and class_id(logo) = GdkPixbuf then + return 0 + else + logo = create(GdkPixbuf,logo) + end if + gtk_proc("gtk_about_dialog_set_logo",{P,P},{dlg,logo}) + return 1 + end function + +widget[GtkAppChooserDialog] = {"gtk_app_chooser_dialog", +{GtkAppChooser,GtkDialog,GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{P,I,P},-routine_id("newAppChooserDialog")}, + {"get_widget",{P},P,0,GtkAppChooserWidget}, + {"set_heading",{P,S}}, + {"get_heading",{P},S}, +"GtkAppChooserDialog"} + + function newAppChooserDialog(atom parent, integer flags, object x) + if string(x) and file_exists(canonical_path(x)) then + x = allocate_string(canonical_path(x),1) + x = gtk_func("g_file_new_for_path",{P},{x}) + return gtk_func("gtk_app_chooser_dialog_new",{P,I,P},{parent,flags,x}) + else + if string(x) then + x = allocate_string(x,1) + end if + return gtk_func("gtk_app_chooser_dialog_new_for_content_type", + {P,I,P},{parent,flags,x}) + end if + end function + +widget[GtkColorChooserDialog] = {"gtk_color_chooser_dialog", +{GtkColorChooser,GtkDialog,GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{S,P},P}, +"GtkColorChooserDialog"} + +widget[GtkColorSelectionDialog] = {"gtk_color_selection_dialog", +{GtkDialog,GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{S},P}, + {"get_color_selection",{P},P,0,GtkColorSelection}, +"GtkColorSelectionDialog"} + +widget[GtkFileChooserDialog] = {"gtk_file_chooser_dialog", +{GtkFileChooser,GtkDialog,GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{S,P,I,S},P}, +"GtkFileChooserDialog"} + +widget[GtkFontChooserDialog] = {"gtk_font_chooser_dialog", +{GtkFontChooser,GtkDialog,GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{S,P},P}, +"GtkFontChooserDialog"} + +widget[GtkStyleProvider] = {"gtk_style_provider", +{0}, + {"get_style_property",{P,P,I,P,P},B}, +"GtkStyleProvider"} + +widget[GtkStyleContext] = {"gtk_style_context", +{GObject}, + {"new",{},P}, + {"add_provider",{P,P,I}}, + {"add_provider_for_screen",{P,P,P,I},-routine_id("sc_add_provider_for_screen")}, + {"get",{P,I,S,P,I}}, + {"get_junction_sides",{P},I}, + {"get_parent",{P},P,0,GtkStyleContext}, + {"get_path",{P},P,0,GtkWidgetPath}, + {"get_property",{P,S,I,P}}, + {"get_screen",{P},P,0,GdkScreen}, + {"get_frame_clock",{P},P,0,GdkFrameClock}, + {"get_state",{P},I}, + {"get_style",{P,S,P,I}}, + {"get_style_property",{P,S,P}}, + {"get_section",{P,S},P,0,GtkCssSection}, + {"get_color",{P,I,P}}, + {"get_background_color",{P,I,P}}, -- deprecated 3.16 + {"get_border_color",{P,I,P}}, -- deprecated 3.16 + {"get_border",{P,I,P}}, + {"get_padding",{P,I,P}}, + {"get_margin",{P,I,P}}, + {"invalidate",{P}}, + {"lookup_color",{P,S,P},B}, + {"remove_provider",{P,P}}, + {"remove_provider_for_screen",{P,P}}, + {"reset_widgets",{P}}, + {"set_background",{P,P}}, + {"restore",{P}}, + {"save",{P}}, + {"set_junction_sides",{P,I}}, + {"set_parent",{P,P}}, + {"set_path",{P,P}}, + {"add_class",{P,S}}, + {"remove_class",{P,S}}, + {"has_class",{P,S},B}, + {"list_classes",{P},P,0,GList}, + {"add_region",{P,S,I}}, -- deprecated 3.14 + {"remove_region",{P,S}}, -- deprecated 3.14 + {"has_region",{P,S,I},B}, -- deprecated 3.14 + {"list_regions",{P},P,0,GList}, -- deprecated 3.14 + {"get_screen",{P,P}}, + {"set_frame_clock",{P,P}}, + {"set_state",{P,I}}, + {"set_scale",{P,I}}, -- 3.10 + {"get_scale",{P},I}, -- 3.10 + {"to_string",{P,I},S}, -- 3.20 +"GtkStyleContext"} + + function sc_add_provider_for_screen(atom context, atom scrn, atom pro, integer pri) + gtk_proc("gtk_style_context_add_provider_for_screen",{P,P,I},{scrn,pro,pri}) + return 1 + end function + +widget[GtkRecentChooserDialog] = {"gtk_recent_chooser_dialog", +{GtkRecentChooser,GtkDialog,GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{S,P,P},P}, + {"new_for_manager",{S,P,P,P},P}, +"GtkRecentChooserDialog"} + +widget[GtkPrintSettings] = {"gtk_print_settings", +{GObject}, + {"new",{P,P},-routine_id("newPrintSettings")}, + {"load_file",{P,S,P},B}, + {"to_file",{P,S,P},B}, + {"load_key_file",{P,P,S,P},B}, + {"to_key_file",{P,P,S}}, + {"copy",{P},P,0,GtkPrintSettings}, + {"has_key",{P,S},B}, + {"get",{P,S},S}, + {"set",{P,S,S}}, + {"unset",{P,S}}, + {"foreach",{P,P,P}}, + {"get_bool",{P,S},B}, + {"set_bool",{P,S,B}}, + {"get_double",{P,S},D}, + {"get_double_with_default",{P,S,D},D}, + {"set_double",{P,S,D}}, + {"get_length",{P,S,I},D}, + {"set_length",{P,S,D,I}}, + {"get_int",{P,S},I}, + {"get_int_with_default",{P,S,I},I}, + {"set_int",{P,S,I}}, + {"get_printer",{P},S}, + {"set_printer",{P,S}}, + {"get_orientation",{P},I}, + {"set_orientation",{P,I}}, + {"get_paper_size",{P},P,0,GtkPaperSize}, + {"set_paper_size",{P,P}}, + {"get_paper_width",{P,I},D}, + {"set_paper_width",{P,D,I}}, + {"get_paper_height",{P,I},D}, + {"set_paper_height",{P,D,I}}, + {"get_use_color",{P},B}, + {"set_use_color",{P,B}}, + {"get_collate",{P},B}, + {"set_collate",{P,B}}, + {"get_reverse",{P},B}, + {"set_reverse",{P,B}}, + {"get_duplex",{P},I}, + {"set_duplex",{P,I}}, + {"get_quality",{P},I}, + {"set_quality",{P,I}}, + {"get_n_copies",{P},I}, + {"set_n_copies",{P,I}}, + {"get_number_up",{P},I}, + {"set_number_up",{P,I}}, + {"get_number_up_layout",{P},I}, + {"set_number_up_layout",{P,I}}, + {"get_resolution",{P},I}, + {"set_resolution",{P,I}}, + {"get_resolution_x",{P},I}, + {"get_resolution_y",{P},I}, + {"get_printer_lpi",{P},D}, + {"set_printer_lpi",{P,D}}, + {"get_scale",{P},D}, + {"set_scale",{P,D}}, + {"get_print_pages",{P},I}, + {"set_print_pages",{P,I}}, + {"get_page_ranges",{P,I},P,0,GtkPageRange}, + {"set_page_ranges",{P,P},-routine_id("ps_set_page_ranges")}, + {"get_page_set",{P},I}, + {"set_page_set",{P,I}}, + {"get_default_source",{P},S}, + {"set_default_source",{P,S}}, + {"get_media_type",{P},S}, + {"set_media_type",{P,S}}, + {"get_dither",{P},S}, + {"set_dither",{P,S}}, + {"get_finishings",{P},S}, + {"set_finishings",{P,S}}, + {"get_output_bin",{P},S}, + {"set_output_bin",{P,S}}, +"GtkPrintSettings"} + + function newPrintSettings(object x=0, object y=0) + atom err=allocate(8,1) + if atom(x) and x = 0 then + return gtk_func("gtk_print_settings_new") + end if + if class_id(x) = GKeyFile then + y = allocate_string(y,1) + return gtk_func("gtk_print_settings_new_from_key_file",{P,P,P},{x,y,err}) + end if + if string(x) and file_exists(canonical_path(x)) then + x = allocate_string(canonical_path(x),1) + return gtk_func("gtk_print_settings_new_from_file",{P,P},{x,err}) + end if + end function + + function ps_set_page_ranges(atom x, object r) + atom m = allocate_data(8) + poke(m,r[1]) + poke(m+4,r[2]) + gtk_proc("gtk_print_settings_set_pages_ranges",{P,P,I},{x,m,2}) + return 1 + end function + +widget[GtkPaperSize] = {"gtk_paper_size", +{0}, + {"new",{P,P,D,D},-routine_id("newPaperSize")}, + {"new_from_ppd",{S,S,D,D},P}, + {"new_from_ipp",{S,D,D},P,0,GtkPaperSize}, -- 3.16 + {"new_custom",{S,S,D,D,I},P}, + {"copy",{P},P,0,GtkPaperSize}, + {"is_equal",{P,P},B}, + {"get_name",{P},S}, + {"get_display_name",{P},S}, + {"get_ppd_name",{P},S}, + {"get_width",{P,I},D}, + {"get_height",{P,I},D}, + {"is_custom",{P},B}, + {"set_size",{P,D,D,I}}, + {"get_default_top_margin",{P,I},D}, + {"get_default_bottom_margin",{P,I},D}, + {"get_default_left_margin",{P,I},D}, + {"get_default_right_margin",{P,I},D}, +"GtkPaperSize"} + + function newPaperSize(object a=0, object b=0, atom c=0, atom d=0) + if string(a) and atom(b) and b = 0 and c = 0 and d = 0 then + a = allocate_string(a,1) + return gtk_func("gtk_paper_size_new",{P},{a}) + end if + if string(a) and atom(b) and b > 0 and c > 0 then + a = allocate_string(a,1) + return gtk_func("gtk_paper_size_new_from_ipp",{P,D,D},{a,b,c}) + end if + if string(a) and string(b) and c > 0 and d > 0 then + a = allocate_string(a,1) + b = allocate_string(b,1) + return gtk_func("gtk_paper_size_new_from_ppd",{P,P,D,D},{a,b,c,d}) + end if + end function + +export function get_paper_sizes(integer cust=0) + object ps = gtk_func("gtk_paper_size_get_paper_sizes",{P},{cust}) + ps = unpack_gs_atom_list(ps) + return ps +end function + +export function get_paper_size_names(integer cust=0) + object ps = get_paper_sizes(cust) + for i = 1 to length(ps) do + ps[i] = gtk_str_func("gtk_paper_size_get_name",{P},{ps[i]}) + end for + return ps +end function + +widget[GtkPageSetup] = {"gtk_page_setup", +{GObject}, + {"new",{},P}, + {"copy",{P},P,0,GtkPageSetup}, + {"get_orientation",{P},I}, + {"set_orientation",{P,I}}, + {"get_paper_size",{P},P,0,GtkPaperSize}, + {"set_paper_size",{P,P}}, + {"get_top_margin",{P,I},D}, + {"set_top_margin",{P,D,I}}, + {"get_bottom_margin",{P,I},D}, + {"set_bottom_margin",{P,D,I}}, + {"get_left_margin",{P,I},D}, + {"set_left_margin",{P,D,I}}, + {"get_right_margin",{P,I},D}, + {"set_right_margin",{P,D,I}}, + {"set_paper_size_and_default_margins",{P,P}}, + {"get_paper_width",{P,I},D}, + {"get_paper_height",{P,I},D}, + {"get_page_width",{P,I},D}, + {"get_page_height",{P,I},D}, + {"new_from_file",{S,P},P,0,GtkPageSetup}, + {"load_file",{P,S,P},B}, + {"to_file",{P,S},-routine_id("ps_to_file")}, +"GtkPageSetup"} + + function ps_to_file(atom setup, object filename) + atom err = allocate(8,1) err = 0 + return gtk_func("gtk_page_setup_to_file",{P,P,P},{setup,filename,err}) + end function + +widget[GtkPageRange] = {"gtk_page_range", +{0}, +"GtkPageRange"} + +widget[GtkPrintOperation] = {"gtk_print_operation", +{GObject}, + {"new",{},P}, + {"set_allow_async",{P,B}}, + {"get_error",{P,P}}, + {"set_default_page_setup",{P,P}}, + {"get_default_page_setup",{P},P,0,GtkPageSetup}, + {"set_print_settings",{P,P}}, + {"get_print_settings",{P},P,0,GtkPrintSettings}, + {"set_job_name",{P,S}}, + {"get_job_name",{P},-routine_id("getPrintOpJobName")}, + {"set_n_pages",{P,I}}, + {"get_n_pages_to_print",{P},I}, + {"set_current_page",{P,I}}, + {"set_use_full_page",{P,B}}, + {"set_unit",{P,I}}, + {"set_export_filename",{P,S}}, + {"set_show_progress",{P,B}}, + {"set_track_print_status",{P,B}}, + {"set_custom_tab_label",{P,S}}, + {"run",{P,P,P,P},I}, + {"cancel",{P}}, + {"draw_page_finish",{P}}, + {"set_defer_drawing",{P}}, + {"get_status",{P},I}, + {"get_status_string",{P},S}, + {"is_finished",{P},B}, + {"set_support_selection",{P,B}}, + {"get_support_selection",{P},B}, + {"set_has_selection",{P,B}}, + {"get_has_selection",{P},B}, + {"set_embed_page_setup",{P,B}}, + {"get_embed_page_setup",{P},B}, +"GtkPrintOperation"} + + function getPrintOpJobName(atom op) + object job = allocate(32,1), err = allocate(32,1) err = 0 + gtk_func("g_object_get",{P,P,P,P},{op,"job name",job,err}) + object result + ifdef BITS64 then -- thanks pete eberlein + result = peek8u(job) + elsedef + result = peek4u(job) + end ifdef + if result > 0 then + result = peek_string(result) + end if + return result + end function + +widget[GtkPrintContext] = {"gtk_print_context", +{GObject}, + {"get_cairo_context",{P},P}, + {"set_cairo_context",{P,P,D,D}}, + {"get_page_setup",{P},P,0,GtkPageSetup}, + {"get_width",{P},D}, + {"get_height",{P},D}, + {"get_dpi_x",{P},D}, + {"get_dpi_y",{P},D}, + {"get_pango_fontmap",{P},P,0,PangoFontMap}, + {"create_pango_context",{P},P,0,PangoContext}, + {"create_pango_layout",{P},P,0,PangoLayout}, + {"get_hard_margins",{P,D,D,D,D},B}, +"GtkPrintContext"} + +widget[GtkPrintUnixDialog] = {"gtk_print_unix_dialog", +{GtkDialog,GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{S,P},P}, + {"set_page_setup",{P,P}}, + {"get_page_setup",{P},P,0,GtkPageSetup}, + {"set_current_page",{P,I}}, + {"get_current_page",{P},I}, + {"set_settings",{P,P}}, + {"get_settings",{P},P,0,GtkPrintSettings}, + {"get_selected_printer",{P},P,0,GtkPrinter}, + {"add_custom_tab",{P,P,P}}, + {"set_support_selection",{P,B}}, + {"get_support_selection",{P},B}, + {"get_has_selection",{P},B}, + {"set_embed_page_setup",{P,B}}, + {"get_embed_page_setup",{P},B}, + {"set_manual_capabilities",{P,I}}, + {"get_manual_capabilities",{P},I}, +"GtkPrintUnixDialog"} + +widget[GtkPageSetupUnixDialog] = {"gtk_page_setup_unix_dialog", +{GtkDialog,GtkWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{S,P},P}, + {"set_page_setup",{P,P}}, + {"get_page_setup",{P},P,0,GtkPageSetup}, + {"set_print_settings",{P,P}}, + {"get_print_settings",{P},P,0,GtkPrintSettings}, +"GtkPageSetupUnixDialog"} + +widget[GtkListBox] = {"gtk_list_box", -- new in GTK 3.10 +{GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"prepend",{P,P}}, + {"insert",{P,P,I}}, + {"select_row",{P,P}}, + {"select_all",{P}}, -- 3.14 + {"unselect_all",{P}}, -- 3.14 + {"unselect_row",{P,P}}, -- 3.14 + {"get_selected_row",{P},P,0,GtkListBoxRow}, + {"get_selected_rows",{P},X,0,GList},-- 3.14 + {"row_is_selected",{P},B}, -- 3.14 + {"selected_foreach",{P,P,P}}, -- 3.14 + {"set_selection_mode",{P,I}}, + {"get_selection_mode",{P},I}, + {"set_activate_on_single_click",{P,B}}, + {"get_activate_on_single_click",{P},B}, + {"set_adjustment",{P,P}}, + {"get_adjustment",{P},P,0,GtkAdjustment}, + {"set_placeholder",{P,P}}, + {"get_row_at_index",{P,I},P,0,GtkListBoxRow}, + {"get_row_at_y",{P,I},P,0,GtkListBoxRow}, + {"invalidate_filter",{P}}, + {"invalidate_headers",{P}}, + {"invalidate_sort",{P}}, + {"set_filter_func",{P,P,P,P}}, + {"set_header_func",{P,P,P,P}}, + {"set_sort_func",{P,P,P,P}}, + {"drag_highlight_row",{P,P}}, + {"drag_unhighlight_row",{P}}, + {"bind_model",{P,P,P,P,P}}, -- 3.16 +"GtkListBox"} + +widget[GtkListBoxRow] = {"gtk_list_box_row", +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"changed",{P}}, + {"get_header",{P},P,0,GtkWidget}, + {"get_type",{},I}, + {"set_header",{P,P}}, + {"get_index",{P},I}, + {"set_activatable",{P,B}}, + {"set_selectable",{P,B}}, + {"get_selectable",{P},B}, +"GtkListBoxRow"} + +widget[GtkPopover] = {"gtk_popover", -- new in GTK 3.12 +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{P,P},-routine_id("newPopover")}, + {"bind_model",{P,P,S}}, + {"set_relative_to",{P,P}}, + {"get_relative_to",{P},P,0,GtkWidget}, + {"set_pointing_to",{P,P}}, + {"get_pointing_to",{P,P},B}, + {"set_position",{P,I}}, + {"get_position",{P},I}, + {"set_modal",{P,B}}, + {"get_modal",{P},B}, + {"get_transitions_enabled",{P},B}, + {"set_transitions_enabled",{P,B}}, + {"get_default_widget",{P},P,0,GtkWidget}, -- 3.18 + {"set_default_widget",{P,P}}, -- 3.18 + {"get_constrain_to",{P},P}, -- 3.20 + {"set_constrain_to",{P,P}}, -- 3.20 + {"popup",{P}}, -- 3.21 + {"popdown",{P}}, -- 3.21 +"GtkPopover"} + + function newPopover(atom a=0, atom b=0) + if class_id(b) = GMenuModel then + return gtk_func("gtk_popover_new_from_model",{P,P},{a,b}) + else + return gtk_func("gtk_popover_new",{P},{a}) + end if + end function + +widget[GtkPopoverMenu] = {"gtk_popover_menu", -- 3.16 +{GtkPopover,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"open_submenu",{P,S}}, +"GtkPopoverMenu"} + +widget[GtkPlacesSidebar] = {"gtk_places_sidebar", -- new 3.10 +{GtkScrolledWindow,GtkBin,GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"set_open_flags",{P,I}}, + {"get_open_flags",{P},I}, + {"set_location",{P,P}}, + {"get_location",{P},P,0,GFile}, + {"set_show_desktop",{P,B}}, + {"get_show_desktop",{P},B}, + {"add_shortcut",{P,P}}, + {"remove_shortcut",{P,P}}, + {"list_shortcuts",{P},A,0,GSList}, + {"get_nth_bookmark",{P,I},P,0,GFile}, + {"get_show_connect_to_server",{P},B}, -- deprecated 3.18 + {"set_show_connect_to_server",{P,B}}, -- deprecated 3.18 + {"set_local_only",{P,B}}, -- 3.12 + {"get_local_only",{P},B}, -- 3.12 + {"get_show_enter_location",{P},B}, --3.14 + {"set_show_enter_location",{P,B}}, --3.14 + {"get_show_other_locations",{P},B}, -- 3.18 + {"set_show_other_locations",{P,B}}, -- 3.18 + {"get_show_recent",{P},B}, -- 3.18 + {"set_show_recent",{P,B}}, -- 3.18 + {"get_show_trash",{P},B}, -- 3.18 + {"set_show_trash",{P,B}}, -- 3.18 + {"set_drop_targets_visible",{P,B,P}}, -- 3.18 +"GtkPlacesSidebar"} + +widget[GtkHeaderBar] = {"gtk_header_bar", -- new in GTK 3.10 +{GtkContainer,GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"set_title",{P,S}}, + {"get_title",{P},S}, + {"set_subtitle",{P,S}}, + {"get_subtitle",{P},S}, + {"set_has_subtitle",{P,B}}, -- 3.12 + {"get_has_subtitle",{P},B}, -- 3.12 + {"set_custom_title",{P,P}}, + {"get_custom_title",{P},P,0,GtkWidget}, + {"pack_start",{P,P}}, + {"pack_end",{P,P}}, + {"set_show_close_button",{P,B}}, + {"get_show_close_button",{P},B}, + {"set_decoration_layout",{P,S}}, -- 3.12 + {"get_decoration_layout",{P},S}, -- 3.12 +"GtkHeaderBar"} + +widget[GtkPrinter] = {"gtk_printer", +{GObject}, + {"new",{S,P,B},P}, + {"get_backend",{P},P}, + {"get_name",{P},S}, + {"get_state_message",{P},S}, + {"get_description",{P},S}, + {"get_location",{P},S}, + {"get_icon_name",{P},S}, + {"get_job_count",{P},I}, + {"is_active",{P},B}, + {"is_paused",{P},B}, + {"is_accepting_jobs",{P},B}, + {"is_virtual",{P},B}, + {"is_default",{P},B}, + {"accepts_ps",{P},B}, + {"accepts_pdf",{P},B}, + --{"list_papers",{P},X,0,GList}, -- buggy! + {"compare",{P,P},I}, + {"has_details",{P},B}, + {"request_details",{P}}, + {"get_capabilities",{P},I}, + {"get_default_page_size",{P},P,0,GtkPageSetup}, + {"get_hard_margins",{P,D,D,D,D},B}, +"GtkPrinter"} + +widget[GtkPrintJob] = {"gtk_print_job", +{GObject}, + {"new",{S,P,P,P},P}, + {"get_settings",{P},P,0,GtkPrintSettings}, + {"get_printer",{P},P,0,GtkPrinter}, + {"get_title",{P},S}, + {"get_status",{P},I}, + {"set_source_file",{P,S,P},B}, + {"get_surface",{P,P},P,0,CairoSurface_t}, + {"send",{P,P,P,P}}, + {"set_track_print_status",{P,B}}, + {"get_track_print_status",{P},B}, + {"get_pages",{P},I}, + {"set_pages",{P,I}}, + {"get_page_ranges",{P,I},P,0,GtkPageRange}, + {"set_page_ranges",{P,P},-routine_id("setPageRanges")}, + {"get_page_set",{P},I}, + {"set_page_set",{P,I}}, + {"get_num_copies",{P},I}, + {"set_num_copies",{P,I}}, + {"get_scale",{P},D}, + {"set_scale",{P,D}}, + {"get_n_up",{P},I}, + {"set_n_up",{P,I}}, + {"get_n_up_layout",{P},I}, + {"set_n_up_layout",{P,I}}, + {"get_rotate",{P},B}, + {"set_rotate",{P,B}}, + {"get_collate",{P},B}, + {"set_collate",{P,B}}, + {"get_reverse",{P},B}, + {"set_reverse",{P,B}}, +"GtkPrintJob"} + +widget[GtkFlowBox] = {"gtk_flow_box", -- GTK 3.12 +{GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, + {"insert",{P,P,I}}, + {"get_child_at_index",{P,I},P,0,GtkFlowBoxChild}, + {"set_hadjustment",{P,P}}, + {"set_vadjustment",{P,P}}, + {"set_homogeneous",{P,B}}, + {"get_homogeneous",{P},B}, + {"set_row_spacing",{P,I}}, + {"get_row_spacing",{P},I}, + {"set_column_spacing",{P,I}}, + {"get_column_spacing",{P},I}, + {"set_min_children_per_line",{P,I}}, + {"get_min_children_per_line",{P},I}, + {"set_max_children_per_line",{P,I}}, + {"get_max_children_per_line",{P},I}, + {"set_activate_on_single_click",{P,B}}, + {"get_activate_on_single_click",{P},B}, + {"selected_foreach",{P,P,P}}, + {"get_selected_children",{P},X,0,GList}, + {"select_child",{P,P}}, + {"unselect_child",{P,P}}, + {"select_all",{P}}, + {"unselect_all",{P}}, + {"set_selection_mode",{P,I}}, + {"get_selection_mode",{P},I}, + {"set_filter_func",{P,P,P,P}}, + {"invalidate_filter",{P}}, + {"set_sort_func",{P,P,P,P}}, + {"invalidate_sort",{P}}, + {"bind_model",{P,P,P,P,P}}, -- 3.18 +"GtkFlowBox"} + +widget[GtkFlowBoxChild] = {"gtk_flow_box_child", -- GTK 3.12 +{GtkBin,GtkContainer,GtkWidget,GtkBuildable,GtkOrientable,GObject}, + {"new",{},P}, + {"get_index",{P},I}, + {"is_selected",{P},B}, + {"changed",{P}}, +"GtkFlowBoxChild"} + +widget[GtkMountOperation] = {"gtk_mount_operation", +{GObject}, + {"new",{P},P}, + {"is_showing",{P},B}, + {"set_parent",{P,P}}, + {"get_parent",{P},P,0,GtkWindow}, + {"set_screen",{P,P}}, + {"get_screen",{P},P,0,GdkScreen}, +"GtkMountOperation"} + +---------------------------------------------------------------------- +-- stocklist is not a real GTK widget, we just fake it for convenience +---------------------------------------------------------------------- +widget[GtkStockList] = {"gtk_stocklist", -- deprecated in GTK 3.12+ +{0}, +"GtkStockList"} + + function newStockList() + object list = gtk_func("gtk_stock_list_ids") + return to_sequence(list) + end function + +---------------------------------------------------------------------- +-- Support for Gestures; +---------------------------------------------------------------------- + +widget[GtkEventController] = {"gtk_event_controller", +{GObject}, + {"get_propagation_phase",{P},I}, + {"set_propagation_phase",{P,I}}, + {"handle_event",{P,P},B}, + {"get_widget",{P},P,0,GtkWidget}, + {"reset",{P}}, +"GtkEventController"} + +widget[GdkFrameClock] = {"gdk_frame_clock", +{GObject}, + {"get_frame_time",{P},I}, + {"request_phase",{P,P}}, + {"begin_updating",{P}}, + {"end_updating",{P}}, + {"get_frame_counter",{P},I}, + {"get_history_start",{P},I}, + {"get_timings",{P,I},P}, + {"get_current_timings",{P},P,0,GdkFrameTimings}, + {"get_refresh_info",{P,I,I,I}}, +"GdkFrameClock"} + +widget[GdkFrameTimings] = {"gdk_frame_timings", +{GObject}, + {"get_frame_counter",{P},I}, + {"get_complete",{P},B}, + {"get_frame_time",{P},I}, + {"get_presentation_time",{P},I}, + {"get_refresh_interval",{P},I}, + {"get_predicted_presentation_time",{P},I}, +"GdkFrameTimings"} + +widget[GdkEvent] = {"gdk_event", +{GObject}, + {"new",{},P}, + {"peek",{},P,0,GdkEvent}, + {"get",{},P,0,GdkEvent}, + {"put",{P}}, + {"copy",{P},P,0,GdkEvent}, + {"get_axis",{P,I,D},B}, + {"get_button",{P,P},B}, + {"get_keycode",{P,P},B}, + {"get_keyval",{P,P},B}, + {"get_root_coords",{P,D,D},B}, + {"get_scroll_direction",{P,P},B}, + {"get_scroll_deltas",{P,D,D},B}, + {"get_state",{P,P},B}, + {"get_time",{P},I}, + {"get_window",{P},P,0,GdkWindow}, + {"get_event_type",{P},I}, + {"get_event_sequence",{P},P,0,GdkEventSequence}, + {"request_motions",{P}}, + {"get_click_count",{P,P},B}, + {"get_coords",{P,D,D},B}, + {"triggers_context_menu",{P},B}, + {"handler_set",{P,P,P}}, + {"set_screen",{P,P}}, + {"get_screen",{P},P,0,GdkScreen}, + {"set_device",{P,P}}, + {"get_device",{P},P,0,GdkDevice}, + {"set_source_device",{P,P}}, + {"get_source_device",{P},P,0,GdkDevice}, +"GdkEvent"} + +widget[GdkEventSequence] = {"gdk_event_sequence", +{GdkEvent}, +"GdkEventSequence"} + +widget[GtkGesture] = {"gtk_gesture", --GTK3.14 +{GtkEventController,GObject}, + {"get_device",{P},P}, + {"get_window",{P},P}, + {"set_window",{P,P}}, + {"is_active",{P},B}, + {"is_recognized",{P},B}, + {"get_sequence_state",{P,P},I}, + {"set_sequence_state",{P,P,I},B}, + {"set_state",{P,I},B}, + {"get_sequences",{P},A}, + {"handles_sequence",{P,P},B}, + {"get_last_updated_sequence",{P},P}, + {"get_last_event",{P,P},P}, + {"get_point",{P,P,D,D},B}, + {"get_bounding_box",{P,P},B}, + {"get_bounding_box_center",{P,D,D},B}, + {"group",{P,P}}, + {"ungroup",{P}}, + {"get_group",{P},A}, + {"is_grouped_with",{P,P},B}, +"GtkGesture"} + +widget[GtkGestureSingle] = {"gtk_gesture_single", +{GtkGesture,GtkEventController,GObject}, + {"get_exclusive",{P},B}, + {"set_exclusive",{P,B}}, + {"get_touch_only",{P},B}, + {"set_touch_only",{P,B}}, + {"get_button",{P},I}, + {"set_button",{P,I}}, + {"get_current_button",{P},I}, + {"get_current_sequence",{P},P}, +"GtkGestureSingle"} + +widget[GtkGestureRotate] = {"gtk_gesture_rotate", +{GtkGesture,GtkEventController,GObject}, + {"new",{P},P}, + {"get_angle_delta",{P},D}, +"GtkGestureRotate"} + +widget[GtkGestureZoom] = {"gtk_gesture_zoom", +{GtkGesture,GtkEventController,GObject}, + {"new",{P},P}, + {"get_scale_delta",{P},D}, +"GtkGestureZoom"} + +widget[GtkGestureDrag] = {"gtk_gesture_drag", -- 3.14 +{GtkGestureSingle,GtkGesture,GtkEventController,GObject}, + {"new",{P},P}, + {"get_start_point",{P,D,D},B}, + {"get_offset",{P,D,D},B}, +"GtkGestureDrag"} + +widget[GtkGesturePan] = {"gtk_gesture_pan", +{GtkGestureDrag,GtkGestureSingle,GtkGesture,GtkEventController,GObject}, + {"new",{P,I},P}, + {"get_orientation",{P},I}, + {"set_orientation",{P,I}}, +"GtkGesturePan"} + +widget[GtkGestureSwipe] = {"gtk_gesture_swipe", +{GtkGestureSingle,GtkGesture,GtkEventController,GObject}, + {"new",{P},P}, + {"get_velocity",{P,D,D},B}, +"GtkGestureSwipe"} + +widget[GtkGestureLongPress] = {"gtk_gesture_long_press", +{GtkGestureSingle,GtkGesture,GtkEventController,GObject}, + {"new",{P},P}, +"GtkGestureLongPress"} + +widget[GtkGestureMultiPress] = {"gtk_gesture_multi_press", +{GtkGestureSingle,GtkGesture,GtkEventController,GObject}, + {"new",{P},P}, + {"get_area",{P,P},B}, + {"set_area",{P,P}}, +"GtkGestureMultiPress"} + +widget[GtkPadController] = {"gtk_pad_controller", +{GtkEventController,GObject}, + {"new",{P,P,P},P}, + {"set_action_entries",{P,P,I}}, + {"set_action",{P,I,I,I,S,S}}, +"GtkPadController"} + +-------------------------------------------------------------------- +-- Support for openGL; +-------------------------------------------------------------------- + +widget[GdkGLProfile] = {"gdk_gl_profile", + {}, +"GdkGLProfile"} + +widget[GdkGLContext] = {"gdk_gl_context", +{GObject}, + {"new",{},-routine_id("newGLContext")}, + {"clear_current",{}}, + {"make_current",{P}}, + {"get_version",{P,I,I}}, + {"get_shared_context",{P},P,0,GdkGLContext}, + {"get_window",{P},P,0,GdkWindow}, + {"get_visual",{P},P,0,GdkVisual}, + {"get_display",{P},P,0,GdkDisplay}, + {"set_forward_compatible",{P,B}}, + {"get_forward_compatible",{P},B}, + {"set_debug_enabled",{P,B}}, + {"get_debug_enabled",{P},B}, + {"set_required_version",{P,I,I}}, + {"get_required_version",{P,I,I}}, +"GdkGLContext"} + + function newGLContext() -- alias for new; + return c_func("gdk_gl_context_get_current") + end function + +widget[GtkGLArea] = {"gtk_gl_area", -- GTK 3.16 +{GtkWidget,GtkBuildable,GObject}, + {"new",{},P}, + {"get_context",{P},P}, + {"set_has_alpha",{P,B}}, + {"get_has_alpha",{P},B}, + {"set_has_depth_buffer",{P,B}}, + {"get_has_depth_buffer",{P},B}, + {"make_current",{P}}, + {"get_auto_render",{P},B}, + {"set_auto_render",{P,B}}, + {"get_error",{P},P}, + {"set_error",{P,P}}, + {"queue_render",{P}}, + {"set_profile",{P,P}}, + {"get_profile",{P},P,0,GdkGLProfile}, + {"get_has_stencil_buffer",{P},B}, + {"set_has_stencil_buffer",{P,B}}, + {"attach_buffers",{P}}, + {"get_required_version",{P,I,I}}, + {"set_required_version",{P,I,I}}, + {"get_use_es",{P},B}, -- 3.22 + {"set_use_es",{P,B}}, -- 3.22 +"GtkGLArea"} + +---------------------------------------------------------------- +-- low-level x11 functions; +---------------------------------------------------------------- + +widget[GdkX11Display] = {"gdk_x11_display", +{GObject}, + {"get_user_time",{P},I}, + {"broadcast_startup_message",{P,S,S,I}}, + {"get_startup_notification_id",{P},S}, + {"set_startup_notification_id",{P,S}}, + {"get_xdisplay",{P},P}, + {"grab",{P}}, + {"ungrab",{P}}, + {"set_cursor_theme",{P,S,I}}, + {"set_window_scale",{P,I}}, + {"get_glx_version",{P,I,I}}, +"GdkX11Display"} + + +widget[GdkX11Screen] = {"gdk_x11_screen", +{GObject}, + {"get_screen_number",{P},I}, + {"get_xscreen",{P},P}, + {"get_window_manager_name",{P},S}, + {"get_monitor_output",{P,I},I}, + {"lookup_visual",{P,I},P,0,GdkVisual}, + {"get_number_of_desktops",{P},I}, + {"get_current_desktop",{P},I}, +"GdkX11Screen"} + +widget[GdkX11Window] = {"gdk_x11_window", +{GObject}, + {"lookup_for_display",{P,P},P,0,GdkWindow}, + {"get_xid",{P},P}, + {"move_to_current_desktop",{P}}, + {"move_to_desktop",{P,I}}, + {"get_desktop",{P},I}, +"GdkX11Window"} + +widget[GtkBindingSet] = {"gtk_binding_set", +{GObject}, + {"new",{S},P}, + {"by_class",{P},P}, + {"find",{S},P}, + {"activate",{P,I,I,P},B}, + {"add_path",{P,P,S,I}}, +"GtkBindingSet"} + +widget[GtkBindingEntry] = {"gtk_binding_entry", +{GtkBindingSet}, + {"add_signal",{P,I,I,S,P}}, + {"add_signal_from_string",{P,S},I}, + {"skip",{P,I,I}}, + {"remove",{P,I,I}}, +"GtkBindingEntry"} + +widget[GdkPixbufAnimation] = {"gdk_pixbuf_animation", +{GdkPixbuf,GObject}, + {"new",{P},-routine_id("newPixbufAnimation")}, + {"get_width",{P},I}, + {"get_height",{P},I}, + {"get_delay_time",{P},I}, + {"is_static_image",{P},B}, + {"get_static_image",{P},P,0,GdkPixbuf}, + {"get_iter",{P,P},P,0,GdkPixbufAnimationIter}, +"GdkPixbufAnimation"} + + function newPixbufAnimation(object name) + atom err = allocate(8,1) err = 0 + if string(name) + and file_exists(canonical_path(name)) then + name = allocate_string(canonical_path(name),1) + end if + return gtk_func("gdk_pixbuf_animation_new_from_file",{P,P},{name,err}) + end function + +widget[GdkPixbufAnimationIter] = {"gdk_pixbuf_animation_iter", +{GObject}, + {"get_pixbuf",{P},P,0,GdkPixbuf}, + {"advance",{P,P},B}, + {"get_delay_time",{P},I}, + {"on_currently_loading_frame",{P},B}, +"GdkPixbufAnimationIter"} + +widget[GtkRecentManager] = {"gtk_recent_manager", +{GObject}, + {"new",{},-routine_id("recent_manager_get_default")}, + {"add_item",{P,S},B}, + {"add_full",{P,S,P},B}, + {"remove_item",{P,S,P},B}, + {"lookup_item",{P,S,P},P,0,GtkRecentInfo}, + {"has_item",{P,S},B}, + {"move_item",{P,S,S,P},B}, + {"get_items",{P},X,0,GtkRecentInfo}, + {"purge_items",{P,P},I}, +"GtkRecentManager"} + + function recent_manager_get_default() + return gtk_func("gtk_recent_manager_get_default") + end function + +widget[GtkBuildable] = {"gtk_buildable", +{GObject}, + {"set_name",{P,S}}, + {"get_name",{P},S}, + {"add_child",{P,P,P,S}}, + {"set_buildable_property",{P,P,S,P}}, + {"construct_child",{P,P,S},P,0,GObject}, + {"custom_tag_start",{P,P,P,S,P,P},B}, + {"custom_tag_end",{P,P,P,S,P}}, + {"custom_finished",{P,P,P,S,P}}, + {"parser_finished",{P,P}}, + {"get_internal_child",{P,P,S},P,0,GObject}, +"GtkBuildable"} + +widget[GtkBuilder] = {"gtk_builder", +{GObject}, + {"new",{},P}, + {"add_callback_symbol",{P,S,P}}, -- 3.10 + {"lookup_callback_symbol",{P,S},P}, -- 3.10 + {"set_application",{P,P}}, -- 3.10 + {"get_application",{P},P,0,GtkApplication}, -- 3.10 + {"add_from_file",{P,S},-routine_id("addBuilderObjects")}, + {"add_from_string",{P,P},-routine_id("addBuilderObjectsStr")}, + {"get_object",{P,P},P}, + {"get_objects",{P},A,0,GSList}, + {"connect",{P},-routine_id("builder_connect")}, + {"set_translation_domain",{P,S}}, + {"get_translation_domain",{P},S}, + {"get_type_from_name",{P,S},I}, +"GtkBuilder"} + +export constant builder = create(GtkBuilder) +object current_builder_file = "" + +export function ID(atom ctl) -- retrieve the Glade ID property; + return vlookup(ctl,registry,1,4,"!") +end function + +export sequence class_name_index = repeat(0,length(widget)) + for i = 1 to length(widget) do + if sequence(widget[i]) then + class_name_index[i] = widget[i][$] + end if + end for + + constant bad_from_file = define_func("gtk_builder_add_from_file",{P,P,P},I) + constant bad_from_string = define_func("gtk_builder_add_from_string",{P,P,I,P},I) + + -- add objects from Glade XML file; + function addBuilderObjects(atom bld, object fname) + atom err = allocate(8,1) err = 0 + integer result = c_func(bad_from_file,{bld,fname,err}) + if result = 0 then + printf(1,"Error code %d loading Builder\n",err) + if err = 0 then + printf(1,"***** GTK version mismatch or other error in Glade.\n") + printf(1,"\t(remove or change the 'requires...' line)") + Error(,,"Error 8623 loading glade file",peek_string(fname)) + end if + abort(0) + end if + return result + end function + + -- add object from inline string or string variable; + function addBuilderObjectsStr(atom bld, object str) + current_builder_file = str + atom err = allocate(8,1) err = 0 + integer len = length(str) + str = allocate_string(str,1) + integer result = c_func(bad_from_string,{bld,str,len,err}) + if result = 0 then + printf(1,"Error 8638: loading Builder %s\n",{current_builder_file}) + if err = 0 then + printf(1,"***** GTK version mismatch or other error in Glade.\n") + printf(1,"\t(remove or change the 'requires...' line)") + end if + abort(0) + end if + return result + end function + + -- link signals defined in Glade, this starts a 'for' loop, + -- running the builder_connect_function for each control; + function builder_connect(atom bld) + gtk_func("gtk_builder_connect_signals_full",{P,P,P},{bld,builder_connect_func,0}) + return 1 + end function + + constant builder_connect_func = call_back(routine_id("builder_connect_function")) + + -- links Glade controls to user-written or Eu functions + + ----------------------------------------------------------------------------- + function builder_connect_function(atom bld, atom obj, object sig, object hdlr, atom cxo) + ----------------------------------------------------------------------------- + hdlr = peek_string(hdlr) + sig = peek_string(sig) + + if atom(current_builder_file) and (current_builder_file > 0) then + current_builder_file = peek_string(current_builder_file) + end if + + atom rid = routine_id(hdlr) + if rid = -1 then + printf(1,"-----------------------------------------------------------------------\n") + printf(1,"-- Undeclared function in %s\n",{current_builder_file}) + printf(1,"-----------------------------------------------------------------------\n") + show_template(hdlr) + abort(1) + else + rid = call_back(rid) + connect(obj,sig,rid,cxo) + end if + + return 1 + end function + + -------------------------------------------------------------------- + procedure load_builder(object parent, object child, object prefix=0) + -------------------------------------------------------------------- + object name, class, path + object x, tree + integer c,n + atom err = allocate(8,1) + + current_builder_file = canonical_path(child) + if file_exists(current_builder_file) then + set(parent,"add from file",current_builder_file,err) + set(parent,"connect") + prefix = filebase(child) + if match(prefix,filebase(prg_name)) then + prefix = 0 -- do not prefix main file objects + end if + x = read_lines(canonical_path(child)) + + elsif string(child) then + set(parent,"add from string",child,err) + set(parent,"connect") + x = split(child,'\n') + end if + + for i = 1 to length(x) do + if string(x[i]) and match("]",{class,name,n}) + end ifdef + + class = find(class,class_name_index) + if class < 1 then + display("Error finding class for []",{name}) + else + if not initialized[class] then + init(class) + end if + tree = widget[class][2] + for z = 1 to length(tree) do + init(tree[z]) + end for + register(n,class,name) + end if + end if +end for + +end procedure + + ------------------------------------------------------------------------------- + procedure show_template(object handlr) -- prompt for missing functions w/Glade; + ------------------------------------------------------------------------------- + printf(1,""" +________ + + ----------------------------------------------------------------------- + global function %s() + ----------------------------------------------------------------------- + + return 1 + end function + +""",{handlr}) + + end procedure + +------------------------------------------------------------------------ +-- Internet conveniences +------------------------------------------------------------------------ + +------------------------------------ +export function show_uri(object uri) +------------------------------------ + +if atom(uri) then + return 0 +end if + +display("URI: []\n",{uri}) + +integer x = find('#',uri) -- in case link to html section; +object tmp + +if x > 0 then + tmp = canonical_path(uri[1..x-1]) + if file_exists(tmp) then + uri = tmp & uri[x..$] + end if +else + tmp = canonical_path(uri) + if file_exists(tmp) then + uri = tmp + end if +end if + +ifdef WINDOWS then + system("explore " & uri,0) + return 1 +end ifdef + +atom err = allocate(8,1) err=0 + +object result = gtk_func("gtk_show_uri",{P,P,P,P}, + {0,allocate_string(uri,1),0,err}) + + return result + +end function + +--------------------------------------------------------------------------- +-- Icon functions +---------------------------- +export function list_icons() +---------------------------- + atom theme = gtk_func("gtk_icon_theme_get_default") + object list = gtk_func("gtk_icon_theme_list_icons",{P,P},{theme,0}) + return to_sequence(list) +end function + +---------------------------------------- +export function has_icon(object name) +---------------------------------------- + atom theme = gtk_func("gtk_icon_theme_get_default") + name = allocate_string(name,1) + return gtk_func("gtk_icon_theme_has_icon",{P,P},{theme,name}) +end function + +---------------------------------------------------------------- +export function valid_icon(object list) +---------------------------------------------------------------- +-- check a list of possible icon names + object result = 0 + if atom(list[1]) then + list = {list} + end if + for i = 1 to length(list) do + result = get_icon_image(list[i]) --display(result) + if string(result) then return 1 end if + end for + return result +end function + +--------------------------------------------------------------- +export function valid_icon_name(object list) +--------------------------------------------------------------- +-- check a list of possible icon names, +-- return string name of first valid + for i = 1 to length(list) do + if valid_icon({list[i]}) > 0 then + return list[i] + end if + if file_exists(locate_file(list[i])) then + return list[i] + end if + end for + return "gtk-missing-image" +end function + +-- get image from a variety of sources; +------------------------------------------------------------------------------------ + function get_icon_image(object icon, object sizex=0, object sizey=0, object sizez=1) +------------------------------------------------------------------------------------- + atom img = 0, ani = 0, default_theme, handle + handle = to_number(icon) + + if class_id(handle) = GdkPixbuf then + img = create(GtkImage,handle) + return img + end if + + if class_id(handle) = GtkImage then + return handle + end if + + if find(icon,stock_list) then + img = gtk_func("gtk_image_new_from_stock",{P,I}, + {allocate_string(icon,1),sizex}) + return img + end if + + default_theme = gtk_func("gtk_icon_theme_get_default",{}) + if gtk_func("gtk_icon_theme_has_icon",{P,P}, + {default_theme,allocate_string(icon,1)}) then + img = create(GdkPixbuf,icon,18,18,sizez) + img = create(GtkImage,img) + register(img,GtkImage) + --display("Has icon []",{icon}) + return img + end if + + icon = locate_file(icon) + + if file_type(icon) = 1 then -- image from file + ani = create(GdkPixbufAnimation,icon,sizex,sizey) + if gtk_func("gdk_pixbuf_animation_is_static_image",{P},{ani}) then + ani = create(GdkPixbuf,icon,sizex*6,sizey*6,sizez) + img = create(GtkImage,ani) + else + img = create(GtkImage) + set(img,"from animation",ani) + end if + return img + end if + + return 0 + end function + +-------------------------------------------------------- +export function icon_info(object name, integer size=6) +-------------------------------------------------------- + atom theme = gtk_func("gtk_icon_theme_get_default") + atom err = allocate(8,1) err = 0 + + atom icon_info = gtk_func("gtk_icon_theme_lookup_icon",{P,P,I,I}, + {theme,name,size,GTK_ICON_LOOKUP_USE_BUILTIN}) + + object results = repeat(0,5) + results = { + gtk_func("gtk_icon_info_load_icon",{P,P},{icon_info,err}), + gtk_func("gtk_icon_info_get_display_name",{P},{icon_info}), + gtk_str_func("gtk_icon_info_get_filename",{P},{icon_info}), + gtk_func("gtk_icon_info_get_base_size",{P},{icon_info}), + gtk_func("gtk_icon_info_get_base_scale",{P},{icon_info}) + } + return results +-- returns {1,2,3,4,5} +-- 1 = pointer to icon_info structure, +-- 2 = display name or null, +-- 3 = full path to icon file, +-- 4 = base size, +-- 5 = base scale +-- some entries missing in some cases +end function + +----------------------------------------------------------------------------------------- +export function xpm_to_pixbuf(object xpm, integer w=0, integer h=0, integer interp=2) +----------------------------------------------------------------------------------------- + atom x = gtk_func("gdk_pixbuf_new_from_xpm_data",{P}, + {allocate_string_pointer_array(xpm)}) + if w + h > 0 then + x = gtk_func("gdk_pixbuf_scale_simple",{P,I,I,I},{x,w,h,interp}) + end if + register(x,GdkPixbuf) + return x +end function + +------------------------------------------------------------------------ +-- Following 3 functions simplify method calls; used mostly internally, +-- but can also be called by the programmer to execute any GTK, GDK or +-- GLib function which has not been implemented in EuGTK. +------------------------------------------------------------------------- +export function gtk_func(object name, object params={}, object values={}) +------------------------------------------------------------------------- +-- syntax: result = gtk_func("gtk_*_*",{formal params},{values}) +-- where formal params might be {P,P,I} (function expects Ptr, Ptr, and Int) +-- and values are the values to be inserted into the formal params before +-- the function is called; + + name = '+' & name + + for i = 1 to length(params) do + if string(values[i]) then + values[i] = allocate_string(values[i],1) + end if + end for + + if atom(values) then + values = {values} + end if + + atom fn = define_func(name,params,P) + + if fn > 0 then + return c_func(fn,values) + else + return -1 + end if + +end function + +----------------------------------------------------------------------------- +export function gtk_str_func(object name, object params={}, object values={}) +----------------------------------------------------------------------------- +-- syntax: same as above, except a string result is returned + + for i = 1 to length(params) do + if string(values[i]) then + values[i] = allocate_string(values[i],1) + end if + end for + + name = '+' & name + + atom fn = define_func(name,params,P) + object result + + if fn > 0 then + if length(params) > 0 then + result = c_func(fn,values) + else + result = c_func(fn,{}) + end if + if result > 0 then + return peek_string(result) + end if + end if + + return 0 +end function + +-------------------------------------------------------------------------- +export function gtk_proc(object name, object params={}, object values={}) +-------------------------------------------------------------------------- +-- syntax: same as above, but no value is returned, used to call GTK procs +atom fn + + if string(values) then values = {values} end if + + name = '+' & name + + for i = 1 to length(params) do + if sequence(values) and string(values[i]) then + values[i] = allocate_string(values[i]) -- keep + end if + end for + + if length(params) = 0 then + fn = define_proc(name) + if fn > 0 then + c_proc(fn,{}) + end if + else + fn = define_proc(name,params) + if fn > 0 then + if atom(values) then values = {values} end if + c_proc(fn,values) + end if + end if +return values +end function + +-- The following 2 functions had to be added for Windows, so that we could search +-- a list of dlls until we find the function name requested. I'm not sure the '+' +-- is necessary for 32-bit Windows, since I don't have a 32-bit computer anymore. +---------------------------------------------------------------------------------------- +export function define_proc(object name, object params={}) +---------------------------------------------------------------------------------------- +atom x + + for i = 1 to length(LIBS) do + if atom(LIBS[i]) and LIBS[i] > 0 then + x = define_c_proc(LIBS[i],name,params) + if x > 0 then + return x + end if + end if + end for + + return -1 +end function + +--------------------------------------------------------------------------- +export function define_func(object name, object params={}, object values=P) +--------------------------------------------------------------------------- +atom x + + ifdef BITS32 and WINDOWS then name = '+' & name end ifdef + for i = 1 to length(LIBS) do + if atom(LIBS[i]) and LIBS[i] > 0 then + x = define_c_func(LIBS[i],name,params,values) + if x > 0 then + return x + end if + end if + end for + + return -1 +end function + +----------------------------------------------------------------------------------- +-- Color handling routines - most are used internally, but exported if you need 'em +----------------------------------------------------------------------------------- + +---------------------------------------- +export function to_rgba(object color) -- converts a color description to rgba ptr; +---------------------------------------- + atom rgba = allocate(32) -- keep; + object c = color + if string(c) then c = allocate_string(c,1) end if + if gtk_func("gdk_rgba_parse",{P,P},{rgba,c}) then + return rgba + else + printf(1,"\nError: invalid color '%s'\n******\n",{color}) + return 0 + end if + return rgba +end function + +------------------------------------------------------- +export function from_rgba(object rgba, object fmt=0) -- converts rgba ptr to description; +------------------------------------------------------- +object result = gtk_str_func("gdk_rgba_to_string",{P},{rgba}) + if fmt=0 then return result + else return fmt_color(result,fmt) + end if +end function + +---------------------------------------------- +function fmt_color(object s, integer fmt=0) -- Convert color to various formats; +---------------------------------------------- + if atom(s) then + if string(peek_string(s)) then + s = peek_string(s) + end if + end if +object w + w = split_any(s,"(,)") + if length(w[1]) = 3 then + w[5] = "1" + end if + for i = 2 to 5 do + w[i] = to_number(w[i]) + end for + if atom(w[5]) then + w[5] = round(w[5],100) + end if + switch fmt do + case 0 then return w[1..length(w[1])+1] + case 1 then return sprintf("#%02x%02x%02x",w[2..4]) + case 2 then return (256*256*w[2])+(256*w[3])+ w[4] + case 3 then return {w[2],w[3],w[4]} + case 4 then return {w[2],w[3],w[4],w[5]} + case 5 then return {w[2],w[3],w[4],256*w[5]} + case 6 then return sprintf("rgba(%d,%d,%d,%2.2f)",w[2..$]) + case 7 then return {w[2]/255,w[3]/255,w[4]/255,w[5]} + case 8 then return sprintf("r=#%x, g=#%x, b=#%x, alpha=#%x",w[2..5]) + case else -- do nothing + end switch +return s +end function + + + +------------------------------------------------------------------------ +-- Following are 5 pre-built, easy to use popup dialogs +-- which save you the trouble of writing tons of code! +-- Refer to documentation/dialogs.html for details. +-- Rewritten for 4.8.8 to preserve images on dialog buttons despite +-- GTK developers' bland, boring preferences :P +-- Beginning with EuGTK 4.9.3, dialogs can be non-modal if desired. +------------------------------------------------------------------------ + +public function Info(object parent=0, object title="Info", + object pri_txt="", object sec_txt="", + object btns=GTK_BUTTONS_OK, + object image="dialog-information", + object icon=0, + integer modal=1, + object addon=0, + integer x=-1, + integer y=-1, + object name="Info") + return Custom(parent,title,pri_txt,sec_txt,btns,image,icon,modal,addon,x,y,name) +end function + +public function Warn(object parent=0, object title="Warning", + object pri_txt="", object sec_txt="", + object btns=GTK_BUTTONS_CLOSE, + object image="dialog-warning", + object icon=0, + integer modal=1, + object addon=0, + integer x=-1, + integer y=-1, + object name="Warn") + return Custom(parent,title,pri_txt,sec_txt,btns,image,icon,modal,addon,x,y,name) +end function + +public function Error(object parent=0, object title="Error", + object pri_txt="", object sec_txt="", + object btns=GTK_BUTTONS_OK_CANCEL, + object image="dialog-error", + object icon=0, + integer modal=1, + object addon=0, + integer x=-1, + integer y=-1, + object name="Error") + return Custom(parent,title,pri_txt,sec_txt,btns,image,icon,modal,addon,x,y,name) +end function + +public function Question(object parent=0, object title="Question", + object pri_txt="", object sec_txt="", + object btns=GTK_BUTTONS_YES_NO, + object image="dialog-question", + object icon=0, + integer modal=1, + object addon=0, + integer x=-1, + integer y=-1, + object name="Question") + return Custom(parent,title,pri_txt,sec_txt,btns,image,icon,modal,addon,x,y,name) +end function + +integer closedlg = call_back(routine_id("close_dialog")) + +-------------------------------------------------------------- +public function Custom( + object parent=0, --1 + object title="Dialog", --2 + object pri_txt="", --3 + object sec_txt="", --4 + object btns=GTK_BUTTONS_OK, --5 + object image=0, --6 + object icon=0, --7 + integer modal=GTK_DIALOG_MODAL, --8 + object addon=0, --9 + integer x=-1, --10 + integer y=-1, --11 + object name="Custom") --12 +-------------------------------------------------------------- + atom dlg = create(GtkDialog) + atom btnbox = create(GtkButtonBox) + atom ca = 0 + atom top = 0, left = 0, right = 0 + atom lbl1 = 0 + atom capanel = create(GtkBox,VERTICAL) + object btn = repeat(0,2) + + if string(parent) then + parent = get(builder,"object",parent) + end if + + if parent = 0 then + for i = 1 to length(registry) do + if registry[i][2] = 293 then + parent = registry[i][1] + exit + end if + end for + end if + + if parent > 0 and atom(icon) and icon = 0 then + icon = get(parent,"icon name") + end if + + if atom(pri_txt) and pri_txt > 0 then pri_txt = unpack(pri_txt) end if + if atom(sec_txt) and sec_txt > 0 then sec_txt = unpack(sec_txt) end if + if class_id(addon) = GdkPixbuf then addon = create(GtkImage,addon) end if + + set(dlg,{ + {"transient for",parent}, + {"title"," " & title}, + {"border width",5}, + {"icon",icon}, + {"position",GTK_WIN_POS_MOUSE}}) + + if string(name) then + set(dlg,"name",name) + end if + + ca = get(dlg,"content area") + capanel = create(GtkBox,VERTICAL) + add(ca,capanel) + + top = create(GtkBox,HORIZONTAL,2) + add(capanel,top) + + left = create(GtkBox,VERTICAL,5) + right = create(GtkBox,VERTICAL,5) + add(top,{left,right}) + + if string(image) then + add(left,create(GtkImage,image,GTK_ICON_SIZE_DIALOG)) + + elsif image > 0 then + if class_id(image) = GdkPixbuf + or class_id(image) = GIcon then + image = create(GtkImage,image) + end if + add(left,image) + end if + + lbl1 = create(GtkLabel) + set(lbl1,"name",name & "_label") + set(lbl1,"markup",text:format("[]\n[]",{pri_txt,sec_txt})) + set(lbl1,"halign",0) + + add(right,lbl1) + + if atom(addon) and addon > 0 then + atom p2 = create(GtkBox,VERTICAL) + add(capanel,p2) + if get(addon,"parent") != 0 then + set(addon,"reparent",p2) + else + add(p2,addon) + end if + end if + + show_all(capanel) + + if integer(btns) then + + switch btns do + + case GTK_BUTTONS_NONE then break + + case GTK_BUTTONS_OK then + btn[1] = create(GtkButton,"gtk-ok") + set(dlg,"add action widget",btn[1],MB_OK) + show(btn[1]) + + case GTK_BUTTONS_OK_CANCEL then + btn[1] = create(GtkButton,"gtk-cancel") + btn[2] = create(GtkButton,"gtk-ok") + set(dlg,"add action widget",btn[1],MB_CANCEL) + set(dlg,"add action widget",btn[2],MB_OK) + show(btn[1]) show(btn[2]) + + case GTK_BUTTONS_CLOSE then + btn[1] = create(GtkButton,"gtk-close") + set(btn[1],"can default",TRUE) + set(dlg,"add action widget",btn[1],MB_CLOSE) + show(btn[1]) + + case GTK_BUTTONS_YES_NO then + btn[1] = create(GtkButton,"gtk-yes") + set(dlg,"add action widget",btn[1],MB_YES) + btn[2] = create(GtkButton,"gtk-no") + set(dlg,"add action widget",btn[2],MB_NO) + show(btn[1]) show(btn[2]) + + case else btn[1] = create(GtkButton,"gtk-ok") + set(btn[1],"can default",TRUE) + set(dlg,"add action widget",btn[1],MB_OK) + show(btn[1]) + + end switch + end if + + if sequence(btns) and not atom(btns[1]) then + set(btnbox,"margin top",5) + pack(capanel,-btnbox) + for i = 1 to length(btns) do + while length(btns[i]) < 3 do btns[i] &= 0 end while + if atom(btns[i][2]) and btns[i][2] = 0 then btns[i][2] = closedlg end if + if atom(btns[i][3]) and btns[i][3] = 0 then btns[i][3] = {dlg,MB_CANCEL} end if + btns[i] = create(GtkButton,btns[i][1],btns[i][2],btns[i][3]) + end for + add(btnbox,btns) + show_all(btnbox) + end if + + if x+y > 0 then + set(dlg,"move",x,y) + end if + + atom result = 0 + set(dlg,"modal",modal) + if modal = GTK_DIALOG_NON_MODAL then + return show_all(dlg) + else + result = get(dlg,"run") + destroy(dlg) + end if + + return result +end function + +------------------------------- +export function run(object dlg) +------------------------------- + if string(dlg) then + dlg = pointer(dlg) + end if + object result = get(dlg,"run") + return result +end function + +global integer dialog_return_value = 0 + +function close_dialog(object ctl, object dlg) + dlg = unpack(dlg) + dialog_return_value = dlg[2] + set(dlg[1],"hide") + return 1 +end function + +-------------------------------------------- +-- Nifty shortcut, thanks to Greg Haberek, +-- allows using local functions without +-- call_back(routine_id()) and scope issues: +-------------------------------------------- +export function _(sequence name, atom rid = routine_id(name)) + if rid > 0 then + return call_back(rid) + end if + return 0 +end function + +--------------------------------- +-- © 2016 by Irv Mullins +--------------------------------- diff --git a/eugtk/examples/GtkEnums.e b/eugtk/examples/GtkEnums.e new file mode 100644 index 0000000..741f014 --- /dev/null +++ b/eugtk/examples/GtkEnums.e @@ -0,0 +1,1514 @@ + +---------------- +namespace enums +---------------- + +export constant version = "4.12.0" + +public include std/io.e +public include std/os.e +public include std/dll.e +public include std/text.e +public include std/math.e +public include std/error.e +public include std/text.e +public include std/types.e +public include std/search.e +public include std/convert.e +public include std/console.e +public include std/filesys.e +public include std/machine.e +public include std/sequence.e +public include std/serialize.e + +public constant LGPL = read_file(locate_file("resources/license.txt")) + +--------------------------------------------------------------------------------- +-- ListView/TreeView storage types. Use these when creating new +-- GtkListStores or GtkTreeStores +--------------------------------------------------------------------------------- +public enum + gCHAR = 12, gUCHAR = 16, gINT = 24, gUINT = 28, + gLONG = 32, gULONG = 36, gINT64 = 40, gUINT64 = 44, + gDBL = 60, gFLT = 56, gSTR = 64, gPTR = 68, gBOOL= 20, gDOL = 99 +-- plus gPIX and gCOMBO, which must be defined at run-time +-- by GtkEngine.e ... don't ask me why! + +public sequence storage_types = { + {12,"gCHAR"}, + {16,"gUCHAR"}, + {20,"gBOOL"}, + {24,"gINT"}, + {28,"gUINT", + {32,"gLONG"}, + {36,"gULONG"}, + {40,"gINT64"}, + {44,"gUINT64"}, + {56,"gFLT"}, + {60,"gDBL"}, + {64,"gSTR"}, + {68,"gPTR"}, + {99,"gDOL"} +}} +-- here's a list of GObject types; +public enum type OBJECT by 4 + void = 4, + GInterface, + gchar, + guchar, + gboolean, + gint, + guint, + glong, + gulong, + gint64, + guint64, + GEnum, + GFlags, + gfloat, + gdouble, + gchararray, + gpointer, + GBoxed, + GParam +end type + +------------------------------------------------------------------------ +-- These are the widget class names used to create GTK widgets; +-- GObject MUST be first on the list, and GtkFinal must be last! +-- Other than that, order is unimportant, but try to keep 'em in +-- alphabetical order just to be neat. +------------------------------------------------------------------------ +public enum type WIDGET + GObject, + GAction, + GActionGroup, + GActionMap, + GAppInfo, + GApplication, + GDateTime, + GEmblem, + GEmblemedIcon, + GFile, + GFileIcon, + GFileInfo, + GFileInputStream, + GIcon, + GIdle, + GInputStream, + GKeyFile, + GList, + GMenu, + GMenuItem, + GMenuModel, + GNotification, + GPermission, + GPropertyAction, + GSettings, + GSimpleAction, + GSimpleActionGroup, + GSimplePermission, + GSList, + GThemedIcon, + GTimeout, + Cairo_t, + CairoFontOptions, + CairoContent_t, + CairoLinearGradient, + CairoPattern, + CairoPattern_t, + CairoRadialGradient, + CairoRegion_t, + CairoImageSurface, + CairoStatus_t, + CairoSurface_t, + GdkAppLaunchContext, + GdkCairo_t, + GdkCursor, + GdkDevice, + GdkDeviceManager, + GdkDisplay, + GdkEvent, + GdkEventSequence, + GdkFrameClock, + GdkFrameTimings, + GdkGLContext, + GdkGLProfile, + GdkInputSource, + GdkKeymap, + GdkPixbuf, + GdkPixbufAnimation, + GdkPixbufAnimationIter, + GdkPixbufFormat, + GdkScreen, + GdkVisual, + GdkWindow, + GdkX11Display, + GdkX11Screen, + GdkX11Window, + GtkAboutDialog, + GtkAccelGroup, + GtkAccelLabel, + GtkActionable, + GtkActionBar, + GtkAdjustment, + GtkAlignment, + GtkAppChooser, + GtkAppChooserButton, + GtkAppChooserDialog, + GtkAppChooserWidget, + GtkAppLaunchContext, + GtkApplication, + GtkApplicationWindow, + GtkArrow, + GtkAspectFrame, + GtkAssistant, + GtkBin, + GtkBindingEntry, + GtkBindingSet, + GtkBox, + GtkBuildable, + GtkBuilder, + GtkButton, + GtkButtonBox, + GtkCalendar, + GtkCellArea, + GtkCellAreaBox, + GtkCellAreaCell, + GtkCellAreaContext, + GtkCellEditable, + GtkCellLayout, + GtkCellRenderer, + GtkCellRendererAccel, + GtkCellRendererCombo, + GtkCellRendererPixbuf, + GtkCellRendererProgress, + GtkCellRendererSpin, + GtkCellRendererSpinner, + GtkCellRendererText, + GtkCellRendererToggle, + GtkCellView, + GtkCheckButton, + GtkCheckMenuItem, + GtkClipboard, + GtkColorButton, + GtkColorChooser, + GtkColorChooserDialog, + GtkColorChooserWidget, + GtkColorSelection, + GtkColorSelectionDialog, + GtkColumn, Column, -- aliases for GtkTreeViewColumn.new function; + GtkComboBox, + GtkComboBoxEntry, + GtkComboBoxText, + GtkContainer, + GtkCssProvider, + GtkCssSection, + GtkDialog, + GtkDrag, + GtkDragDest, + GtkDragSource, + GtkDrawingArea, + GtkEditable, + GtkEntry, + GtkEntryBuffer, + GtkEntryCompletion, + GtkEventBox, + GtkEventController, + GtkExpander, + GtkFileChooser, + GtkFileChooserButton, + GtkFileChooserDialog, + GtkFileChooserNative, + GtkFileChooserWidget, + GtkFileFilter, + GtkFixed, + GtkFlowBox, + GtkFlowBoxChild, + GtkFontButton, + GtkFontChooser, + GtkFontChooserDialog, + GtkFontChooserWidget, + GtkFrame, + GtkGesture, + GtkGestureSingle, + GtkGestureDrag, + GtkGestureLongPress, + GtkGestureMultiPress, + GtkGesturePan, + GtkGestureRotate, + GtkGestureSwipe, + GtkGestureZoom, + GtkGLArea, + GtkGrid, + GtkHeaderBar, + GtkIconInfo, + GtkIconTheme, + GtkIconView, + GtkImage, + GtkImageMenuItem, + GtkInfoBar, + GtkInvisible, + GtkLabel, + GtkLayout, + GtkLevelBar, + GtkLinkButton, + GtkListBox, + GtkListBoxRow, + GtkListStore, + GtkLockButton, + GtkMenu, + GtkMenuBar, + GtkMenuButton, + GtkMenuItem, + GtkMenuShell, + GtkMenuToolButton, + GtkMessageDialog, + GtkMisc, + GtkModelButton, + GtkMountOperation, + GtkNativeDialog, + GtkNotebook, + GtkNumerableIcon, + GtkOffscreenWindow, + GtkOrientable, + GtkOverlay, + GtkPadController, + GtkPaperSize, + GtkPageRange, + GtkPageSetup, + GtkPageSetupUnixDialog, + GtkPaned, + GtkPlacesSidebar, + GtkPlug, + GtkPopover, + GtkPopoverMenu, + GtkPrinter, + GtkPrintContext, + GtkPrintJob, + GtkPrintSettings, + GtkPrintOperation, + GtkPrintUnixDialog, + GtkProgressBar, + GtkRadioButton, + GtkRadioMenuItem, + GtkRadioToolButton, + GtkRange, + GtkRecentChooser, + GtkRecentChooserDialog, + GtkRecentChooserMenu, + GtkRecentChooserWidget, + GtkRecentFilter, + GtkRecentInfo, + GtkRecentManager, + GtkRevealer, + GtkScale, + GtkScaleButton, + GtkScrollable, + GtkScrollbar, + GtkScrolledWindow, + GtkSearchBar, + GtkSearchEntry, + GtkSelectionData, + GtkSeparator, + GtkSeparatorMenuItem, + GtkSeparatorToolItem, + GtkSettings, + GtkShortcutsGesture, + GtkShortcutsGroup, + GtkShortcutsSection, + GtkShortcutsShortcut, + GtkShortcutsWindow, + GtkSocket, + GtkSidebar, + GtkSizeGroup, + GtkSpinButton, + GtkSpinner, + GtkStack, + GtkStackSidebar, + GtkStackSwitcher, + GtkStatusbar, + GtkStatusIcon, + GtkStockList, + GtkStyle, + GtkStyleContext, + GtkStyleProvider, + GtkSwitch, + GtkTargetEntry, + GtkTargetList, + GtkTextAttributes, + GtkTextBuffer, + GtkTextChildAnchor, + GtkTextIter, + GtkTextMark, + GtkTextTag, + GtkTextTagTable, + GtkTextView, + GtkThemedIcon, + GtkToggleButton, + GtkToggleToolButton, + GtkToolbar, + GtkToolButton, + GtkToolItem, + GtkToolItemGroup, + GtkToolPalette, + GtkToolShell, + GtkTooltip, + GtkTreeDragDest, + GtkTreeDragSource, + GtkTreeIter, + GtkTreeModel, + GtkTreeModelFilter, + GtkTreeModelSort, + GtkTreePath, + GtkTreeRowReference, + GtkTreeSelection, + GtkTreeSortable, + GtkTreeStore, + GtkTreeView, + GtkTreeViewColumn, + GtkViewport, + GtkVolumeButton, + GtkWidget, + GtkWidgetClass, + GtkWidgetPath, + GtkWindow, + GtkWindowGroup, + PangoAttrList, + PangoCairoLayout, + PangoContext, + PangoFont, + PangoFontSet, + PangoFontsetSimple, + PangoFontDescription, + PangoFontFace, + PangoFontFamily, + PangoFontMap, + PangoLanguage, + PangoLayout, + PangoLayoutIter, + PangoLayoutLine, + PangoLayoutRun, + PangoTabArray, + GtkFinal +end type + +------------------------------------------------------------------------ + +public enum -- Response codes returned by button presses, etc; + MB_YES = -8, + MB_NO = -9, + MB_OK = -5, + MB_CANCEL = -6, + MB_CLOSE = -7, + MB_ABORT = -4, + MB_NONE = -1, + MB_REJECT = -2, + MB_ACCEPT = -3, + MB_APPLY = -10, + MB_HELP = -11 + +----------------------------------------------------------------------------------------- +-- a zillion or so GTK_CONSTANTS used to make code clearer. See GTK docs. +----------------------------------------------------------------------------------------- + +public enum type Orientation + VERTICAL = 1, HORIZONTAL = 0 end type + +public enum type SortOrder + UNSORTED = -1, ASCENDING = 1, DESCENDING = 2 end type + +public enum by 2 -- Cursors: + GDK_X_CURSOR = 0, + GDK_ARROW, + GDK_BASED_ARROW_DOWN, + GDK_BASED_ARROW_UP, + GDK_BOAT, + GDK_BOGOSITY, + GDK_BOTTOM_LEFT_CORNER, + GDK_BOTTOM_RIGHT_CORNER, + GDK_BOTTOM_SIDE, + GDK_BOTTOM_TEE, + GDK_BOX_SPIRAL, + GDK_CENTER_PTR, + GDK_CIRCLE, + GDK_CLOCK, + GDK_COFFEE_MUG, + GDK_CROSS, + GDK_CROSS_REVERSE, + GDK_CROSSHAIR, + GDK_DIAMOND_CROSS, + GDK_DOT, + GDK_DOTBOX, + GDK_DOUBLE_ARROW, + GDK_DRAFT_LARGE, + GDK_DRAFT_SMALL, + GDK_DRAPED_BOX, + GDK_EXCHANGE, + GDK_FLEUR, + GDK_GOBBLER, + GDK_GUMBY, + GDK_HAND1, + GDK_HAND2, + GDK_HEART, + GDK_ICON, + GDK_IRON_CROSS, + GDK_LEFT_PTR, + GDK_LEFT_SIDE, + GDK_LEFT_TEE, + GDK_LEFTBUTTON, + GDK_LL_ANGLE, + GDK_LR_ANGLE, + GDK_MAN, + GDK_MIDDLEBUTTON, + GDK_MOUSE, + GDK_PENCIL, + GDK_PIRATE, --? + GDK_PLUS, + GDK_QUESTION_ARROW, + GDK_RIGHT_PTR, + GDK_RIGHT_SIDE, + GDK_RIGHT_TEE, + GDK_RIGHTBUTTON, + GDK_RTL_LOGO, + GDK_SAILBOAT, + GDK_SB_DOWN_ARROW, + GDK_SB_H_DOUBLE_ARROW, + GDK_SB_LEFT_ARROW, + GDK_SB_RIGHT_ARROW, + GDK_SB_UP_ARROW, + GDK_SB_V_DOUBLE_ARROW, + GDK_SHUTTLE, + GDK_SIZING, + GDK_SPIDER, + GDK_SPRAYCAN, + GDK_STAR, + GDK_TARGET, + GDK_TCROSS, + GDK_TOP_LEFT_ARROW, + GDK_TOP_LEFT_CORNER, + GDK_TOP_RIGHT_CORNER, + GDK_TOP_SIDE, + GDK_TOP_TEE, + GDK_TREK, + GDK_UL_ANGLE, + GDK_UMBRELLA, + GDK_UR_ANGLE, + GDK_WATCH, + GDK_XTERM, + GDK_LAST_CURSOR = 153, + GDK_BLANK_CURSOR = -2, + GDK_CURSOR_IS_PIXMAP = -1 + +public enum + GTK_LICENSE_UNKNOWN = 0, + GTK_LICENSE_CUSTOM, + GTK_LICENSE_GPL_2_0, + GTK_LICENSE_GPL_3_0, + GTK_LICENSE_LGPL_2_1, + GTK_LICENSE_LGPL_3_0, + GTK_LICENSE_BSD, + GTK_LICENSE_MIT_X11, + GTK_LICENSE_ARTISTIC, + GTK_LICENSE_GPL_2_0_ONLY, + GTK_LICENSE_GPL_3_0_ONLY, + GTK_LICENSE_LGPL_2_1_ONLY, + GTK_LICENSE_LGPL_3_0_ONLY, + + GTK_ACCEL_VISIBLE = 1, + GTK_ACCEL_LOCKED = 2, + GTK_ACCEL_MASK = 7, + + GTK_ALIGN_FILL = 0, + GTK_ALIGN_START, + GTK_ALIGN_END, + GTK_ALIGN_CENTER, + + GTK_ANCHOR_CENTER = 0, + GTK_ANCHOR_NORTH, + GTK_ANCHOR_NORTH_WEST, + GTK_ANCHOR_NORTH_EAST, + GTK_ANCHOR_SOUTH, + GTK_ANCHOR_SOUTH_WEST, + GTK_ANCHOR_SOUTH_EAST, + GTK_ANCHOR_WEST, + GTK_ANCHOR_EAST, + GTK_ANCHOR_N = 1, + GTK_ANCHOR_NW, + GTK_ANCHOR_NE, + GTK_ANCHOR_S, + GTK_ANCHOR_SW, + GTK_ANCHOR_SE, + GTK_ANCHOR_W, + GTK_ANCHOR_E, + + GTK_APPLICATION_INHIBIT_LOGOUT = 1, + GTK_APPLICATION_INHIBIT_SWITCH = 2, + GTK_APPLICATION_INHIBIT_SUSPEND = 4, + GTK_APPLICATION_INHIBIT_IDLE = 8, + + G_APPLICATION_FLAGS_NONE = 0, + G_APPLICATION_IS_SERVICE, + G_APPLICATION_IS_LAUNCHER, + G_APPLICATION_HANDLES_OPEN = 4, + G_APPLICATION_HANDLES_COMMAND_LINE = 8, + G_APPLICATION_SEND_ENVIRONMENT = 16, + G_APPLICATION_NON_UNIQUE = 32, + +-- arrows are deprecated + GTK_ARROWS_BOTH = 0, + GTK_ARROWS_START, + GTK_ARROWS_END, + + GTK_ARROW_UP = 0, + GTK_ARROW_DOWN, + GTK_ARROW_LEFT, + GTK_ARROW_RIGHT, + GTK_ARROW_NONE, + + GTK_ASSISTANT_PAGE_CONTENT = 0, + GTK_ASSISTANT_PAGE_INTRO, + GTK_ASSISTANT_PAGE_CONFIRM, + GTK_ASSISTANT_PAGE_SUMMARY, + GTK_ASSISTANT_PAGE_PROGRESS, + GTK_ASSISTANT_PAGE_CUSTOM, + + GTK_EXPAND = 1, + GTK_SHRINK = 2, + GTK_FILL = 4, + + GTK_BASELINE_POSITION_TOP = 0, + GTK_BASELINE_POSITION_CENTER, + GTK_BASELINE_POSITION_BOTTOM, + + GTK_BORDER_STYLE_NONE = 0, + GTK_BORDER_STYLE_SOLID, + GTK_BORDER_STYLE_INSET, + GTK_BORDER_STYLE_OUTSET, + GTK_BORDER_STYLE_HIDDEN, + GTK_BORDER_STYLE_DOTTED, + GTK_BORDER_STYLE_DASHED, + GTK_BORDER_STYLE_DOUBLE, + GTK_BORDER_STYLE_GROOVE, + GTK_BORDER_STYLE_RIDGE, + + GTK_BUTTON_ROLE_NORMAL = 0, + GTK_BUTTON_ROLE_CHECK, + GTK_BUTTON_ROLE_RADIO, + + GTK_BUTTONS_NONE = 0, + GTK_BUTTONS_OK, + GTK_BUTTONS_CLOSE, + GTK_BUTTONS_CANCEL, + GTK_BUTTONS_YES_NO, + GTK_BUTTONS_OK_CANCEL, + + GTK_BUTTONBOX_DEFAULT_STYLE = 0, + GTK_BUTTONBOX_SPREAD, + GTK_BUTTONBOX_EDGE, + GTK_BUTTONBOX_START, + GTK_BUTTONBOX_END, + GTK_BUTTONBOX_CENTER, + GTK_BUTTONBOX_EXPAND, + + GTK_CALENDAR_SHOW_HEADING = 1, + GTK_CALENDAR_SHOW_DAY_NAMES = 2, + GTK_CALENDAR_NO_MONTH_CHANGE = 4, + GTK_CALENDAR_SHOW_WEEK_NUMBERS = 8, + GTK_CALENDAR_SHOW_DETAILS = 16, + + GTK_CORNER_TOP_LEFT = 0, + GTK_CORNER_BOTTOM_LEFT, + GTK_CORNER_TOP_RIGHT, + GTK_CORNER_BOTTOM_RIGHT, + + GTK_CURVE_TYPE_LINEAR = 0, + GTK_CURVE_TYPE_SPLINE, + GTK_CURVE_TYPE_FREE, + + GTK_DELETE_CHARS = 0, + GTK_DELETE_WORD_ENDS, + GTK_DELETE_WORDS, + GTK_DELETE_DISPLAY_LINES, + GTK_DELETE_DISPLAY_LINE_ENDS, + GTK_DELETE_PARAGRAPH_ENDS, + GTK_DELETE_PARAGRAPHS, + GTK_DELETE_WHITESPACE, + + GTK_DIALOG_NON_MODAL = 0, + GTK_DIALOG_MODAL = 1, + GTK_DIALOG_DESTROY_WITH_PARENT = 2, + GTK_DIALOG_NO_SEPARATOR = 4, + + GTK_DIR_TAB_FORWARD = 0, + GTK_DIR_TAB_BACKWARD, + GTK_DIR_UP, + GTK_DIR_DOWN, + GTK_DIR_LEFT, + GTK_DIR_RIGHT, + + GTK_EVENT_SEQUENCE_NONE = 0, + GTK_EVENT_SEQUENCE_CLAIMED, + GTK_EVENT_SEQUENCE_DENIED, + + GTK_EXPANDER_COLLAPSED = 0, + GTK_EXPANDER_SEMI_COLLAPSED, + GTK_EXPANDER_SEMI_EXPANDED, + GTK_EXPANDER_EXPANDED, + + GTK_FILE_CHOOSER_ACTION_OPEN = 0, + GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, + GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER, + + GTK_ICON_SIZE_INVALID = 0, + GTK_ICON_SIZE_MENU, + GTK_ICON_SIZE_SMALL_TOOLBAR, + GTK_ICON_SIZE_LARGE_TOOLBAR, + GTK_ICON_SIZE_BUTTON, + GTK_ICON_SIZE_DND, + GTK_ICON_SIZE_DIALOG, + + GTK_ICON_LOOKUP_NO_SVG = 1, + GTK_ICON_LOOKUP_FORCE_SVG = 2, + GTK_ICON_LOOKUP_USE_BUILTIN = 4, + GTK_ICON_LOOKUP_GENERIC_FALLBACK = 8, + GTK_ICON_LOOKUP_FORCE_SIZE = 16, + + GTK_IMAGE_EMPTY = 0, + GTK_IMAGE_PIXBUF, + GTK_IMAGE_STOCK, + GTK_IMAGE_ICON_SET, + GTK_IMAGE_ANIMATION, + GTK_IMAGE_ICON_NAME, + GTK_IMAGE_GICON, + + GTK_IM_PREEDIT_NOTHING = 0, + GTK_IM_PREEDIT_CALLBACK, + GTK_IM_PREEDIT_NONE, + + GTK_IM_STATUS_NOTHING = 0, + GTK_IM_STATUS_CALLBACK, + GTK_IM_STATUS_NONE, + + GTK_INPUT_HINT_NONE = 0, + GTK_INPUT_HINT_SPELLCHECK, + GTK_INPUT_HINT_NO_SPELLCHECK, + GTK_INPUT_HINT_WORD_COMPLETION = 4, + GTK_INPUT_HINT_LOWERCASE = 8, + GTK_INPUT_HINT_UPPERCASE_CHARS = 16, + GTK_INPUT_HINT_UPPERCASE_WORDS = 32, + GTK_INPUT_HINT_UPPERCASE_SENTENCES = 64, + + GTK_JUSTIFY_LEFT = 0, + GTK_JUSTIFY_RIGHT, + GTK_JUSTIFY_CENTER, + GTK_JUSTIFY_FILL, + + GTK_LEVEL_BAR_MODE_CONTINUOUS = 0, + GTK_LEVEL_BAR_MODE_DISCRETE, + + GTK_MATCH_ALL = 0, + GTK_MATCH_ALL_TAIL, + GTK_MATCH_HEAD, + GTK_MATCH_TAIL, + GTK_MATCH_EXACT, + GTK_MATCH_LAST, + + GTK_PIXELS = 0, + GTK_INCHES, + GTK_CENTIMETERS, + + GTK_MESSAGE_INFO = 0, + GTK_MESSAGE_WARNING, + GTK_MESSAGE_QUESTION, + GTK_MESSAGE_ERROR, + GTK_MESSAGE_OTHER, + + GTK_ICON_INFO = 0, + GTK_ICON_WARNING, + GTK_ICON_QUESTION, + GTK_ICON_ERROR, + GTK_ICON_OTHER, + + GTK_MOVEMENT_LOGICAL_POSITIONS = 0, + GTK_MOVEMENT_VISUAL_POSITIONS, + GTK_MOVEMENT_WORDS, + GTK_MOVEMENT_DISPLAY_LINES, + GTK_MOVEMENT_DISPLAY_LINE_ENDS, + GTK_MOVEMENT_PARAGRAPHS, + GTK_MOVEMENT_PARAGRAPH_ENDS, + GTK_MOVEMENT_PAGES, + GTK_MOVEMENT_BUFFER_ENDS, + GTK_MOVEMENT_HORIZONTAL_PAGES, + + GTK_ORIENTATION_HORIZONTAL = 0, + GTK_ORIENTATION_VERTICAL, + + GTK_PACK_START = 0, + GTK_PACK_END, + + GTK_PAN_DIRECTION_LEFT = 0, + GTK_PAN_DIRECTION_RIGHT, + GTK_PAN_DIRECTION_UP, + GTK_PAN_DIRECTION_DOWN, + + GTK_PATH_PRIO_LOWEST = 0, + GTK_PATH_PRIO_GTK = 4, + GTK_PATH_PRIO_APPLICATION = 8, + GTK_PATH_PRIO_THEME = 10, + GTK_PATH_PRIO_RC = 12, + GTK_PATH_PRIO_HIGHEST = 15, + + GTK_PATH_WIDGET = 0, + GTK_PATH_WIDGET_CLASS, + GTK_PATH_CLASS, + + GTK_PHASE_NONE = 0, + GTK_PHASE_CAPTURE, + GTK_PHASE_BUBBLE, + GTK_PHASE_TARGET, + + GTK_POLICY_ALWAYS = 0, + GTK_POLICY_AUTOMATIC, + GTK_POLICY_NEVER, + GTK_POLICY_EXTERNAL, + + GTK_POS_LEFT = 0, + GTK_POS_RIGHT, + GTK_POS_TOP, + GTK_POS_BOTTOM, + LEFT = 0, --aliases; + RIGHT, + TOP, + BOTTOM + +public enum by * 2 + GTK_PRINT_CAPABILITY_PAGE_SET = 0, + GTK_PRINT_CAPABILITY_COPIES = 2, + GTK_PRINT_CAPABILITY_COLLATE, + GTK_PRINT_CAPABILITY_REVERSE, + GTK_PRINT_CAPABILITY_SCALE, + GTK_PRINT_CAPABILITY_GENERATE_PDF, + GTK_PRINT_CAPABILITY_GENERATE_PS, + GTK_PRINT_CAPABILITY_PREVIEW, + GTK_PRINT_CAPABILITY_NUMBER_UP, + GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT, + + GTK_REGION_EVEN = 0, + GTK_REGION_ODD = 1, + GTK_REGION_FIRST, + GTK_REGION_LAST, + GTK_REGION_ONLY, + GTK_REGION_SORTED, + + GTK_STATE_FLAG_NORMAL = 0, + GTK_STATE_FLAG_ACTIVE = 1, + GTK_STATE_FLAG_PRELIGHT, + GTK_STATE_FLAG_SELECTED, + GTK_STATE_FLAG_INSENSITIVE, + GTK_STATE_FLAG_INCONSISTENT, + GTK_STATE_FLAG_FOCUSED, + GTK_STATE_FLAG_BACKDROP, + GTK_STATE_FLAG_DIR_LTR , + GTK_STATE_FLAG_DIR_RTL, + GTK_STATE_FLAG_LINK, + GTK_STATE_FLAG_VISITED, + GTK_STATE_FLAG_CHECKED + +public enum + GTK_PROGRESS_LEFT_TO_RIGHT = 0, + GTK_PROGRESS_RIGHT_TO_LEFT, + GTK_PROGRESS_BOTTOM_TO_TOP, + GTK_PROGRESS_TOP_TO_BOTTOM, + + GTK_RELIEF_NORMAL = 0, + GTK_RELIEF_HALF, + GTK_RELIEF_NONE, + + GTK_RESIZE_PARENT = 0, + GTK_RESIZE_QUEUE, + GTK_RESIZE_IMMEDIATE, + + GTK_REVEALER_TRANSITION_TYPE_NONE = 0, + GTK_REVEALER_TRANSITION_TYPE_CROSSFADE, + GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT, + GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT, + GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP, + GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN, + + GTK_SCROLL_STEPS = 0, + GTK_SCROLL_PAGES, + GTK_SCROLL_ENDS, + GTK_SCROLL_HORIZONTAL_STEPS, + GTK_SCROLL_HORIZONTAL_PAGES, + GTK_SCROLL_HORIZONTAL_ENDS, + + GTK_SCROLL_NONE = 0, + GTK_SCROLL_JUMP, + GTK_SCROLL_STEP_BACKWARD, + GTK_SCROLL_STEP_FORWARD, + GTK_SCROLL_PAGE_BACKWARD, + GTK_SCROLL_PAGE_FORWARD, + GTK_SCROLL_STEP_UP, + GTK_SCROLL_STEP_DOWN, + GTK_SCROLL_PAGE_UP, + GTK_SCROLL_PAGE_DOWN, + GTK_SCROLL_STEP_LEFT, + GTK_SCROLL_STEP_RIGHT, + GTK_SCROLL_PAGE_LEFT, + GTK_SCROLL_PAGE_RIGHT, + GTK_SCROLL_START, + GTK_SCROLL_END, + + GTK_SELECTION_NONE = 0, + GTK_SELECTION_SINGLE, + GTK_SELECTION_BROWSE, + GTK_SELECTION_MULTIPLE, + + GTK_SHADOW_NONE = 0, + GTK_SHADOW_IN, + GTK_SHADOW_OUT, + GTK_SHADOW_ETCHED_IN, + GTK_SHADOW_ETCHED_OUT, + + GTK_STATE_NORMAL = 0, + GTK_STATE_ACTIVE, + GTK_STATE_PRELIGHT, + GTK_STATE_SELECTED, + GTK_STATE_INSENSITIVE, + GTK_STATE_INCONSISTENT, + GTK_STATE_FOCUSED, + GTK_STATE_PRESSED = 1, + GTK_STATE_MOUSEOVER, + + GTK_TEXT_DIR_NONE = 0, + GTK_TEXT_DIR_LTR, + GTK_TEXT_DIR_RTL, + + GTK_TEXT_EXTEND_SELECTION_WORD = 0, + GTK_TEXT_EXTEND_SELECTION_LINE, + + GTK_TOOLBAR_ICONS = 0, + GTK_TOOLBAR_TEXT, + GTK_TOOLBAR_BOTH, + GTK_TOOLBAR_BOTH_HORIZ, + + GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID = -1, + GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID = -2, + + GTK_UPDATE_CONTINUOUS = 0, + GTK_UPDATE_DISCONTINUOUS, + GTK_UPDATE_DELAYED, + + GTK_VISIBILITY_NONE = 0, + GTK_VISIBILITY_PARTIAL, + GTK_VISIBILITY_FULL, + + GTK_WIN_POS_NONE = 0, + GTK_WIN_POS_CENTER, + GTK_WIN_POS_MOUSE, + GTK_WIN_POS_CENTER_ALWAYS, + GTK_WIN_POS_CENTER_ON_PARENT, + + GTK_WINDOW_TOPLEVEL = 0, + GTK_WINDOW_POPUP, + + GTK_SORT_ASCENDING = 1, + GTK_SORT_DESCENDING, + + GTK_DRAG_RESULT_SUCCESS = 0, + GTK_DRAG_RESULT_NO_TARGET, + GTK_DRAG_RESULT_USER_CANCELLED, + GTK_DRAG_RESULT_TIMEOUT_EXPIRED, + GTK_DRAG_RESULT_GRAB_BROKEN, + GTK_DRAG_RESULT_ERROR, + + PANGO_ELLIPSIZE_NONE = 0, + PANGO_ELLIPSIZE_START, + PANGO_ELLIPSIZE_MIDDLE, + PANGO_ELLIPSIZE_END, + + GDK_SOLID = 0, + GDK_TILED, + GDK_STIPPLED, + GDK_OPAQUE_STIPPLED, + + GTK_RESPONSE_NONE = -1, + GTK_RESPONSE_REJECT = -2, + GTK_RESPONSE_ACCEPT = -3, + GTK_RESPONSE_DELETE_EVENT = -4, + GTK_RESPONSE_OK = -5, + GTK_RESPONSE_CANCEL = -6, + GTK_RESPONSE_CLOSE = -7, + GTK_RESPONSE_YES = -8, + GTK_RESPONSE_NO = -9, + GTK_RESPONSE_APPLY = -10, + GTK_RESPONSE_HELP = -11, + + GTK_TREE_VIEW_COLUMN_GROW_ONLY = 0, + GTK_TREE_VIEW_COLUMN_AUTOSIZE, + GTK_TREE_VIEW_COLUMN_FIXED, + + GTK_TREE_VIEW_GRID_LINES_NONE = 0, + GTK_TREE_VIEW_GRID_LINES_HORIZONTAL, + GTK_TREE_VIEW_GRID_LINES_VERTICAL, + GTK_TREE_VIEW_GRID_LINES_BOTH, + + GTK_TEXT_WINDOW_PRIVATE = 0, + GTK_TEXT_WINDOW_WIDGET, + GTK_TEXT_WINDOW_TEXT, + GTK_TEXT_WINDOW_LEFT, + GTK_TEXT_WINDOW_RIGHT, + GTK_TEXT_WINDOW_TOP, + GTK_TEXT_WINDOW_BOTTOM, + + G_NOTIFICATION_PRIORITY_NORMAL = 0, + G_NOTIFICATION_PRIORITY_LOW, + G_NOTIFICATION_PRIORITY_HIGH, + G_NOTIFICATION_PRIORITY_URGENT, + + G_USER_DIRECTORY_DESKTOP = 0, + G_USER_DIRECTORY_DOCUMENTS, + G_USER_DIRECTORY_DOWNLOAD, + G_USER_DIRECTORY_MUSIC, + G_USER_DIRECTORY_PICTURES, + G_USER_DIRECTORY_PUBLIC_SHARE, + G_USER_DIRECTORY_TEMPLATES, + G_USER_DIRECTORY_VIDEOS, + G_USER_N_DIRECTORIES, + + GTK_WRAP_NONE = 0, + GTK_WRAP_CHAR, + GTK_WRAP_WORD, + GTK_WRAP_WORD_CHAR, + + GDK_WINDOW_TYPE_HINT_NORMAL = 0, + GDK_WINDOW_TYPE_HINT_DIALOG, + GDK_WINDOW_TYPE_HINT_MENU, + GDK_WINDOW_TYPE_HINT_TOOLBAR, + GDK_WINDOW_TYPE_HINT_SPLASHSCREEN, + GDK_WINDOW_TYPE_HINT_UTILITY, + GDK_WINDOW_TYPE_HINT_DOCK, + GDK_WINDOW_TYPE_HINT_DESKTOP, + GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU, + GDK_WINDOW_TYPE_HINT_POPUP_MENU, + GDK_WINDOW_TYPE_HINT_TOOLTIP, + GDK_WINDOW_TYPE_HINT_NOTIFICATION, + GDK_WINDOW_TYPE_HINT_COMBO, + GDK_WINDOW_TYPE_HINT_DND, + + GDK_ACTION_DEFAULT = 0, + GDK_ACTION_COPY = 1, + GDK_ACTION_MOVE = 2, + GDK_ACTION_LINK = 4, + GDK_ACTION_PRIVATE = 8, + GDK_ACTION_ASK = 16, + + GTK_CELL_RENDERER_MODE_INERT = 0, + GTK_CELL_RENDERER_MODE_ACTIVATABLE, + GTK_CELL_RENDERER_MODE_EDITABLE, + + GTK_CELL_RENDERER_ACCEL_MODE_GTK = 0, + GTK_CELL_RENDERER_ACCEL_MODE_OTHER, + + GTK_DEST_DEFAULT_MOTION = 1, + GTK_DEST_DEFAULT_HIGHLIGHT = 2, + GTK_DEST_DEFAULT_DROP = 4, + GTK_DEST_DEFAULT_ALL = 0x07, + + GTK_TARGET_SAME_APP = 1, + GTK_TARGET_SAME_WIDGET = 2, + GTK_TARGET_OTHER_APP = 4, + GTK_TARGET_OTHER_WIDGET = 8, + + GTK_SIZE_GROUP_NONE = 0, + GTK_SIZE_GROUP_HORIZONTAL, + GTK_SIZE_GROUP_VERTICAL, + GTK_SIZE_GROUP_BOTH + +public enum + MOUSE_BUTTON1 = 1, + MOUSE_BUTTON2, + MOUSE_BUTTON3 + +public enum + PANGO_SCALE = 1000, + PANGO_STYLE_NORMAL= 0, + PANGO_STYLE_OBLIQUE, + PANGO_STYLE_ITALIC, + + PANGO_STRETCH_ULTRA_CONDENSED = 0, + PANGO_STRETCH_EXTRA_CONDENSED, + PANGO_STRETCH_CONDENSED, + PANGO_STRETCH_SEMI_CONDENSED, + PANGO_STRETCH_NORMAL, + PANGO_STRETCH_SEMI_EXPANDED, + PANGO_STRETCH_EXPANDED, + PANGO_STRETCH_EXTRA_EXPANDED, + PANGO_STRETCH_ULTRA_EXPANDED, + + PANGO_VARIANT_NORMAL=1, + PANGO_VARIANT_SMALL_CAPS, + + PANGO_WEIGHT_THIN = 100, + PANGO_WEIGHT_ULTRALIGHT = 200, + PANGO_WEIGHT_LIGHT = 300, + PANGO_WEIGHT_BOOK = 380, + PANGO_WEIGHT_NORMAL = 400, + PANGO_WEIGHT_MEDIUM = 500, + PANGO_WEIGHT_SEMIBOLD = 600, + PANGO_WEIGHT_BOLD = 700, + PANGO_WEIGHT_ULTRABOLD = 800, + PANGO_WEIGHT_HEAVY = 900, + PANGO_WEIGHT_ULTRAHEAVY = 1000, + PANGO_UNIT = 1024 + +public enum + GTK_RECENT_SORT_NONE = 0, + GTK_RECENT_SORT_MRU, + GTK_RECENT_SORT_LRU, + GTK_RECENT_SORT_CUSTOM + + public enum by * 2 -- GdkModifierTypes + GDK_SHIFT_MASK = 1, + GDK_LOCK_MASK, + GDK_CONTROL_MASK, + GDK_MOD1_MASK, -- Alt+ + GDK_MOD2_MASK, + GDK_MOD3_MASK, + GDK_MOD4_MASK, + GDK_MOD5_MASK, + GDK_BUTTON1_MASK, + GDK_BUTTON2_MASK, + GDK_BUTTON3_MASK, + GDK_BUTTON4_MASK, + GDK_BUTTON5_MASK, + SHFT = 1, -- 'shorthand' versions of above + LOCK, + CTL, + ALT + + public enum -- events + GDK_NOTHING = -1, + GDK_DELETE, + GDK_DESTROY, + GDK_EXPOSE, + GDK_MOTION_NOTIFY, + GDK_BUTTON_PRESS, + GDK_2BUTTON_PRESS, + GDK_3BUTTON_PRESS, + GDK_BUTTON_RELEASE, + GDK_KEY_PRESS, + GDK_KEY_RELEASE, + GDK_ENTER_NOTIFY, + GDK_LEAVE_NOTIFY, + GDK_FOCUS_CHANGE, + GDK_CONFIGURE, + GDK_MAP, + GDK_UNMAP + +public enum -- event masks + GDK_EXPOSURE_MASK = 2, + GDK_POINTER_MOTION_MASK = 4, + GDK_POINTER_MOTION_HINT_MASK = 8, + GDK_BUTTON_MOTION_MASK = 16, + GDK_BUTTON1_MOTION_MASK = #20, + GDK_BUTTON2_MOTION_MASK = #40, + GDK_BUTTON3_MOTION_MASK = #80, + GDK_BUTTON_PRESS_MASK = #100, + GDK_BUTTON_RELEASE_MASK = #200, + GDK_KEY_PRESS_MASK = #400, + GDK_KEY_RELEASE_MASK = #800, + GDK_ENTER_NOTIFY_MASK = #1000, + GDK_LEAVE_NOTIFY_MASK = #2000, + GDK_FOCUS_CHANGE_MASK = #4000, + GDK_STRUCTURE_MASK = #8000, + GDK_PROPERTY_CHANGE_MASK = #10000, + GDK_VISIBILITY_NOTIFY_MASK = #20000, + GDK_PROXIMITY_IN_MASK = #40000, + GDK_PROXIMITY_OUT_MASK = #80000, + GDK_SUBSTRUCTURE_MASK = #100000, + GDK_SCROLL_MASK = #200000, + GDK_ALL_EVENTS_MASK = #3FFFFE, + + GDK_PROPERTY_NOTIFY = 16, + GDK_SELECTION_CLEAR, + GDK_SELECTION_REQUEST, + GDK_SELECTION_NOTIFY, + GDK_PROXIMITY_IN, + GDK_PROXIMITY_OUT, + GDK_DRAG_ENTER, + GDK_DRAG_LEAVE, + GDK_DRAG_MOTION, + GDK_DRAG_STATUS, + GDK_DROP_START, + GDK_DROP_FINISHED, + GDK_CLIENT_EVENT, + GDK_VISIBILITY_NOTIFY, + GDK_NO_EXPOSE, + GDK_SCROLL, + GDK_WINDOW_STATE, + GDK_SETTING, + GDK_OWNER_CHANGE, + GDK_GRAB_BROKEN, + GDK_DAMAGE, + + GDK_FULLSCREEN_ON_CURRENT_MONITOR = 0, + GDK_FULLSCREEN_ON_ALL_MONITORS, + + GTK_PAGE_SET_ALL = 0, + GTK_PAGE_SET_EVEN, + GTK_PAGE_SET_ODD, + + GTK_PAGE_ORIENTATION_PORTRAIT = 0, + GTK_PAGE_ORIENTATION_LANDSCAPE, + GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT, + GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE, + + GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG = 0, + GTK_PRINT_OPERATION_ACTION_PRINT, + GTK_PRINT_OPERATION_ACTION_PREVIEW, + GTK_PRINT_OPERATION_ACTION_EXPORT, + + GTK_PRINT_OPERATION_RESULT_ERROR = 0, + GTK_PRINT_OPERATION_RESULT_APPLY, + GTK_PRINT_OPERATION_RESULT_CANCEL, + GTK_PRINT_OPERATION_RESULT_IN_PROGRESS, + + GTK_PRINT_STATUS_INITIAL = 0, + GTK_PRINT_STATUS_PREPARING, + GTK_PRINT_STATUS_GENERATING_DATA, + GTK_PRINT_STATUS_SENDING_DATA, + GTK_PRINT_STATUS_PENDING, + GTK_PRINT_STATUS_PENDING_ISSUE, + GTK_PRINT_STATUS_PRINTING, + GTK_PRINT_STATUS_FINISHED, + GTK_PRINT_STATUS_FINISHED_ABORTED, + + GTK_PRINT_DUPLEX_SIMPLE = 0, + GTK_PRINT_DUPLEX_HORIZONTAL, + GTK_PRINT_DUPLEX_VERTICAL, + + GTK_PRINT_PAGES_ALL = 0, + GTK_PRINT_PAGES_CURRENT, + GTK_PRINT_PAGES_RANGES, + GTK_PRINT_PAGES_SELECTION, + + GTK_PRINT_QUALITY_LOW = 0, + GTK_PRINT_QUALITY_NORMAL, + GTK_PRINT_QUALITY_HIGH, + GTK_PRINT_QUALITY_DRAFT, + + GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM = 0, + GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP, + GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TOP_BOTTOM, + GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP, + GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT, + GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT, + GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT, + GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT, + + GTK_STYLE_PROVIDER_PRIORITY_FALLBACK = 1, + GTK_STYLE_PROVIDER_PRIORITY_THEME = 200, + GTK_STYLE_PROVIDER_PRIORITY_SETTINGS = 400, + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION = 600, + GTK_STYLE_PROVIDER_PRIORITY_USER = 800, + + GTK_UNIT_PIXEL = 0, + GTK_UNIT_POINTS, + GTK_UNIT_INCH, + GTK_UNIT_MM, + + GTK_STACK_TRANSITION_TYPE_NONE = 0, + GTK_STACK_TRANSITION_TYPE_CROSSFADE, + GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT, + GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT, + GTK_STACK_TRANSITION_TYPE_SLIDE_UP, + GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN, + GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT, + GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN, + GTK_STACK_TRANSITION_TYPE_OVER_UP, -- GTK3.12 from here down + GTK_STACK_TRANSITION_TYPE_OVER_DOWN, + GTK_STACK_TRANSITION_TYPE_OVER_LEFT, + GTK_STACK_TRANSITION_TYPE_OVER_RIGHT, + GTK_STACK_TRANSITION_TYPE_UNDER_UP, + GTK_STACK_TRANSITION_TYPE_UNDER_DOWN, + GTK_STACK_TRANSITION_TYPE_UNDER_LEFT, + GTK_STACK_TRANSITION_TYPE_UNDER_RIGHT, + GTK_STACK_TRANSITION_TYPE_OVER_UP_DOWN, + GTK_STACK_TRANSITION_TYPE_OVER_DOWN_UP, + GTK_STACK_TRANSITION_TYPE_OVER_LEFT_RIGHT, + GTK_STACK_TRANSITION_TYPE_OVER_RIGHT_LEFT, + + GTK_PLACES_OPEN_NORMAL = 0, + GTK_PLACES_OPEN_NEW_TAB, + GTK_PLACES_OPEN_NEW_WINDOW, + + GDK_PIXBUF_ROTATE_NONE = 0, + GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE = 90, + GDK_PIXBUF_ROTATE_UPSIDEDOWN = 180, + GDK_PIXBUF_ROTATE_CLOCKWISE = 270, + + GDK_INTERP_NEAREST = 0, + GDK_INTERP_TILES, + GDK_INTERP_BILINEAR, + GDK_INTERP_HYPER, + + CAIRO_EXTEND_REPEAT = 1, + + CAIRO_FILL_RULE_EVEN_ODD = 1, + CAIRO_FILL_RULE_WINDING = 0, + + CAIRO_FONT_SLANT_NORMAL = 0, + CAIRO_FONT_SLANT_ITALIC, + CAIRO_FONT_SLANT_OBLIQUE, + + CAIRO_FONT_WEIGHT_NORMAL = 0, NORMAL = 0, + CAIRO_FONT_WEIGHT_BOLD, BOLD = 1, + + CAIRO_FORMAT_INVALID = -1, + CAIRO_FORMAT_ARGB32 = 0, + CAIRO_FORMAT_RGB24, + CAIRO_FORMAT_A8, + CAIRO_FORMAT_A1, + CAIRO_FORMAT_RGB16_565, + + CAIRO_LINE_CAP_BUTT = 0, + CAIRO_LINE_CAP_ROUND, + CAIRO_LINE_CAP_SQUARE, + + CAIRO_LINE_JOIN_MITER = 0, + CAIRO_LINE_JOIN_ROUND, + CAIRO_LINE_JOIN_BEVEL, + + CAIRO_OPERATOR_CLEAR = 0, + CAIRO_OPERATOR_SOURCE, + CAIRO_OPERATOR_OVER, + CAIRO_OPERATOR_IN, + CAIRO_OPERATOR_OUT, + CAIRO_OPERATOR_ATOP, + CAIRO_OPERATOR_DEST, + CAIRO_OPERATOR_DEST_OVER, + CAIRO_OPERATOR_DEST_IN, + CAIRO_OPERATOR_DEST_OUT, + CAIRO_OPERATOR_DEST_ATOP, + CAIRO_OPERATOR_XOR, + CAIRO_OPERATOR_ADD, + CAIRO_OPERATOR_SATURATE, + CAIRO_OPERATOR_MULTIPLY, + CAIRO_OPERATOR_SCREEN, + CAIRO_OPERATOR_OVERLAY, + CAIRO_OPERATOR_DARKEN, + CAIRO_OPERATOR_LIGHTEN, + CAIRO_OPERATOR_COLOR_DODGE, + CAIRO_OPERATOR_COLOR_BURN, + CAIRO_OPERATOR_HARD_LIGHT, + CAIRO_OPERATOR_SOFT_LIGHT, + CAIRO_OPERATOR_DIFFERENCE, + CAIRO_OPERATOR_EXCLUSION, + CAIRO_OPERATOR_HSL_HUE, + CAIRO_OPERATOR_HSL_SATURATION, + CAIRO_OPERATOR_HSL_COLOR, + CAIRO_OPERATOR_HSL_LUMINOSITY, + + CAIRO_PDF_VERSION_1_4 = 0, + CAIRO_PDF_VERSION_1_5, + + CAIRO_SVG_VERSION_1_1 = 0, + CAIRO_SVG_VERSION_1_2, + + CAIRO_SURFACE_TYPE_IMAGE = 0, + CAIRO_SURFACE_TYPE_PDF, + CAIRO_SURFACE_TYPE_PS, + CAIRO_SURFACE_TYPE_XLIB, + CAIRO_SURFACE_TYPE_XCB, + CAIRO_SURFACE_TYPE_GLITZ, + CAIRO_SURFACE_TYPE_QUARTZ, + CAIRO_SURFACE_TYPE_WIN32, + CAIRO_SURFACE_TYPE_BEOS, + CAIRO_SURFACE_TYPE_DIRECTFB, + CAIRO_SURFACE_TYPE_SVG, + CAIRO_SURFACE_TYPE_OS2, + CAIRO_SURFACE_TYPE_WIN32_PRINTING, + CAIRO_SURFACE_TYPE_QUARTZ_IMAGE, + CAIRO_SURFACE_TYPE_SCRIPT, + CAIRO_SURFACE_TYPE_QT, + CAIRO_SURFACE_TYPE_RECORDING, + CAIRO_SURFACE_TYPE_VG, + CAIRO_SURFACE_TYPE_GL, + CAIRO_SURFACE_TYPE_DRM, + CAIRO_SURFACE_TYPE_TEE, + CAIRO_SURFACE_TYPE_XML, + CAIRO_SURFACE_TYPE_SKIA, + CAIRO_SURFACE_TYPE_SUBSURFACE, + + CAIRO_FONT_TYPE_TOY = 0, + CAIRO_FONT_TYPE_FT, + CAIRO_FONT_TYPE_WIN32, + CAIRO_FONT_TYPE_QUARTZ, + CAIRO_FONT_TYPE_USER + +public enum + ICON_PIXBUF = 1, + ICON_DISPLAY_NAME, + ICON_FILENAME, + ICON_BASE_SIZE, + ICON_BASE_SCALE, + ICON_IS_SYMBOLIC, + + G_KEY_FILE_NONE = 0, + G_KEY_FILE_KEEP_COMMENTS, + G_KEY_FILE_KEEP_TRANSLATIONS + + +-- local function to implement widget types; +function _(atom x, integer t) +if x = 0 then + crash("Invalid type - pointer is null!") +end if +init(t) register(x,t) +return x +end function + +------------------------------------------------------------------------ +-- GTK Widget Types -- used rarely, with caution +------------------------------------------------------------------------ +global type Object(atom x)return _(x,GObject)end type +global type Window(atom x)return _(x,GtkWindow)end type +global type Dialog(atom x)return _(x,GtkDialog)end type +global type AboutDialog(atom x)return _(x,GtkAboutDialog)end type +global type Assistant(atom x)return _(x,GtkAssistant)end type +global type Box(atom x)return _(x,GtkBox)end type +global type Grid(atom x)return _(x,GtkGrid)end type +global type Revealer(atom x)return _(x,GtkRevealer)end type +global type ListBox(atom x)return _(x,GtkListBox)end type +global type FlowBox(atom x)return _(x,GtkFlowBox)end type +global type Stack(atom x)return _(x,GtkStack)end type +global type StackSwitcher(atom x)return _(x,GtkStackSwitcher)end type +global type Sidebar(atom x)return _(x,GtkSidebar)end type +global type ActionBar(atom x)return _(x,GtkActionBar)end type +global type HeaderBar(atom x)return _(x,GtkHeaderBar)end type +global type Overlay(atom x)return _(x,GtkOverlay)end type +global type ButtonBox(atom x)return _(x,GtkButtonBox)end type +global type Paned(atom x)return _(x,GtkPaned)end type +global type Layout(atom x)return _(x,GtkLayout)end type +global type Notebook(atom x)return _(x,GtkNotebook)end type +global type Expander(atom x)return _(x,GtkExpander)end type +global type AspectFrame(atom x)return _(x,GtkAspectFrame)end type +global type Label(atom x)return _(x,GtkLabel)end type +global type Image(atom x)return _(x,GtkImage)end type +global type Spinner(atom x)return _(x,GtkSpinner)end type +global type InfoBar(atom x)return _(x,GtkInfoBar)end type +global type ProgressBar(atom x)return _(x,GtkProgressBar)end type +global type LevelBar(atom x)return _(x,GtkLevelBar)end type +global type Statusbar(atom x)return _(x,GtkStatusbar)end type +global type AccelLabel(atom x)return _(x,GtkAccelLabel)end type +global type Button(atom x)return _(x,GtkButton)end type +global type CheckButton(atom x)return _(x,GtkCheckButton)end type +global type RadioButton(atom x)return _(x,GtkRadioButton)end type +global type ToggleButton(atom x)return _(x,GtkToggleButton)end type +global type LinkButton(atom x)return _(x,GtkLinkButton)end type +global type MenuButton(atom x)return _(x,GtkMenuButton)end type +global type Switch(atom x)return _(x,GtkSwitch)end type +global type ScaleButton(atom x)return _(x,GtkScaleButton)end type +global type VolumeButton(atom x)return _(x,GtkVolumeButton)end type +global type LockButton(atom x)return _(x,GtkLockButton)end type +global type Entry(atom x)return _(x,GtkEntry)end type +global type EntryBuffer(atom x)return _(x,GtkEntryBuffer)end type +global type EntryCompletion(atom x)return _(x,GtkEntryCompletion)end type +global type Scale(atom x)return _(x,GtkScale)end type +global type SpinButton(atom x)return _(x,GtkSpinButton)end type +global type SearchEntry(atom x)return _(x,GtkSearchEntry)end type +global type SearchBar(atom x)return _(x,GtkSearchBar)end type +global type Editable(atom x)return _(x,GtkEditable)end type +global type TextMark(atom x)return _(x,GtkTextMark)end type +global type TextBuffer(atom x)return _(x,GtkTextBuffer)end type +global type TextTag(atom x)return _(x,GtkTextTag)end type +global type TextTagTable(atom x)return _(x,GtkTextTagTable)end type +global type TextView(atom x)return _(x,GtkTextView)end type +global type TreeModel(atom x)return _(x,GtkTreeModel)end type +global type TreeModelSort(atom x)return _(x,GtkTreeModelSort)end type +global type TreeSelection(atom x)return _(x,GtkTreeSelection)end type +global type TreeViewColumn(atom x)return _(x,GtkTreeViewColumn)end type +global type TreeView(atom x)return _(x,GtkTreeView)end type +global type IconView(atom x)return _(x,GtkIconView)end type +global type CellRendererText(atom x)return _(x,GtkCellRendererText)end type +global type CellRendererAccel(atom x)return _(x,GtkCellRendererAccel)end type +global type CellRendererCombo(atom x)return _(x,GtkCellRendererCombo)end type +global type CellRendererPixbuf(atom x)return _(x,GtkCellRendererPixbuf)end type +global type CellRendererProgress(atom x)return _(x,GtkCellRendererProgress)end type +global type CellRendererSpin(atom x)return _(x,GtkCellRendererSpin)end type +global type CellRendererToggle(atom x)return _(x,GtkCellRendererToggle)end type +global type CellRendererSpinner(atom x)return _(x,GtkCellRendererSpinner)end type +global type ListStore(atom x)return _(x,GtkListStore)end type +global type TreeStore(atom x)return _(x,GtkTreeStore)end type +global type ComboBox(atom x)return _(x,GtkComboBox)end type +global type ComboBoxText(atom x)return _(x,GtkComboBoxText)end type +global type Menu(atom x)return _(x,GtkMenu)end type +global type MenuBar(atom x)return _(x,GtkMenuBar)end type +global type MenuItem(atom x)return _(x,GtkMenuItem)end type +global type RadioMenuItem(atom x)return _(x,GtkRadioMenuItem)end type +global type CheckMenuItem(atom x)return _(x,GtkCheckMenuItem)end type +global type SeparatorMenuItem(atom x)return _(x,GtkSeparatorMenuItem)end type +global type Toolbar(atom x)return _(x,GtkToolbar)end type +global type ToolItem(atom x)return _(x,GtkToolItem)end type +global type ToolPalette(atom x)return _(x,GtkToolPalette)end type +global type ToolButton(atom x)return _(x,GtkToolButton)end type +global type MenuToolButton(atom x)return _(x,GtkMenuToolButton)end type +global type ToggleToolButton(atom x)return _(x,GtkToggleToolButton)end type +global type RadioToolButton(atom x)return _(x,GtkRadioToolButton)end type +global type Popover(atom x)return _(x,GtkPopover)end type +global type PopoverMenu(atom x)return _(x,GtkPopoverMenu)end type +global type ColorChooser(atom x)return _(x,GtkColorChooser)end type +global type ColorButton(atom x)return _(x,GtkColorButton)end type +global type ColorChooserWidget(atom x)return _(x,GtkColorChooserWidget)end type +global type ColorChooserDialog(atom x)return _(x,GtkColorChooserDialog)end type +global type FileChooser(atom x)return _(x,GtkFileChooser)end type +global type FileChooserButton(atom x)return _(x,GtkFileChooserButton)end type +global type FileChooserDialog(atom x)return _(x,GtkFileChooserDialog)end type +global type FileChooserWidget(atom x)return _(x,GtkFileChooserWidget)end type +global type FileFilter(atom x)return _(x,GtkFileFilter)end type +global type FontChooser(atom x)return _(x,GtkFontChooser)end type +global type FontButton(atom x)return _(x,GtkFontButton)end type +global type FontChooserWidget(atom x)return _(x,GtkFontChooserWidget)end type +global type FontChooserDialog(atom x)return _(x,GtkFontChooserDialog)end type +global type PlacesSidebar(atom x)return _(x,GtkPlacesSidebar)end type +global type Frame(atom x)return _(x,GtkFrame)end type +global type Scrollbar(atom x)return _(x,GtkScrollbar)end type +global type ScrolledWindow(atom x)return _(x,GtkScrolledWindow)end type +global type Adjustment(atom x)return _(x,GtkAdjustment)end type +global type Calendar(atom x)return _(x,GtkCalendar)end type +global type GLArea(atom x)return _(x,GtkGLArea)end type +global type Tooltip(atom x)return _(x,GtkTooltip)end type +global type Viewport(atom x)return _(x,GtkViewport)end type +global type Widget(atom x)return _(x,GtkWidget)end type +global type Container(atom x)return _(x,GtkContainer)end type +global type Bin(atom x)return _(x,GtkBin)end type +global type Range(atom x)return _(x,GtkRange)end type +global type PrintContext(atom x)return _(x,GtkPrintContext)end type +global type ListBoxRow(atom x)return _(x,GtkListBoxRow)end type +global type FontFamily(atom x)return _(x,PangoFontFamily)end type +global type FontFace(atom x)return _(x,PangoFontFace)end type +global type FontDescription(atom x)return _(x,PangoFontDescription)end type +global type AppChooserDialog(atom x)return _(x,GtkAppChooserDialog)end type +global type PaperSize(atom x)return _(x,GtkPaperSize)end type +global type DrawingArea(atom x)return _(x,GtkDrawingArea)end type +global type RecentChooserDialog(atom x)return _(x,GtkRecentChooserDialog)end type +global type RecentChooserWidget(atom x)return _(x,GtkRecentChooserWidget)end type +global type RecentChooser(atom x)return _(x,GtkRecentChooser)end type +global type RecentFilter(atom x)return _(x,GtkRecentFilter)end type +global type RecentChooserMenu(atom x)return _(x,GtkRecentChooserMenu)end type +global type EventBox(atom x)return _(x,GtkEventBox)end type +global type TreeModelFilter(atom x)return _(x,GtkTreeModelFilter)end type +global type Application(atom x)return _(x,GtkApplication)end type +global type ApplicationWindow(atom x)return _(x,GtkApplicationWindow)end type +global type Pixbuf(atom x)return _(x,GdkPixbuf)end type +global type IconTheme(atom x)return _(x,GtkIconTheme)end type +global type Cairo_T(atom x)return _(x,Cairo_t)end type +global type CellArea(atom x)return _(x,GtkCellArea)end type + +----------------------------- +-- copyright 2016 Irv Mullins +----------------------------- + diff --git a/eugtk/examples/GtkEvents.e b/eugtk/examples/GtkEvents.e new file mode 100644 index 0000000..fde1785 --- /dev/null +++ b/eugtk/examples/GtkEvents.e @@ -0,0 +1,277 @@ + +---------------- +namespace events +---------------- + +export constant version = "4.12.0" + +--Thanks to Pete Eberlein for helping with this! + +include GtkEngine.e +include std/convert.e + +if not equal(version,gtk:version) then + Error(,,"GtkEvents version mismatch","should be version " & gtk:version) +end if + +-- Maps keys from keypad to match same keys on keyboard, +-- maps control/arrow keys to negative numbers, so they +-- can be differentiated from the same ascii character +-- values; + +constant keyvalues = { +{8,-8}, -- bksp +{9,-9}, -- tab +{20,-20}, -- scroll lock +{27,27}, -- escape +{80,-80}, -- home 'P' +{81,-81}, -- left arrow 'Q' +{82,-82}, -- up arrow 'R' +{83,-83}, -- right arrow 'S' +{84,-84}, -- down arrow 'T' +{85,-85}, -- page up 'U' +{86,-86}, -- page dn 'V' +{87,-87}, -- end 'W' +{99,-99}, -- insert 'c' +{103,-103}, +{127,-127}, -- num lock + +{141,13}, -- keypad Enter, with or w/o numlock; + +-- keypad keys w/o numlock; +{149,-149}, -- keypad home +{150,-150}, -- keypad left +{151,-151}, -- keypad up +{152,-152}, -- keypad right +{153,-153}, -- keypad down +{154,-154}, -- keypad pg up +{155,-155}, -- keypad pg dn +{156,-156}, -- keypad end +{157,-157}, -- keypad 5 +{158,-158}, -- keypad ins +{159,-159}, -- keypad del + +-- keypad keys with numlock - return ascii 0..9 +{170,'*'},{171,'+'},{173,'-'},{175,'/'}, +{176,48},{177,49},{178,50},{179,51},{180,52}, -- keypad numbers 0..4 +{181,53},{182,54},{183,55},{184,56},{185,57}, -- keypad numbers 5..9 + +-- F keys; +{190,-190}, -- F1 +{191,-191}, -- F2 +{192,-192}, -- F3 +{193,-193}, -- F4 +{194,-194}, -- F5 +{195,-195}, -- F6 +{196,-196}, -- F7 +{197,-197}, -- F8 +{198,-198}, -- F9 +{199,-199}, -- F10 +{200,-200}, -- F11 +{201,-201}, -- F12 +{227,-227}, -- left ctl +{228,-228}, -- right ctl +{229,-229}, +{225,-225}, -- left shift +{226,-226}, -- right shift +{228,-228}, +{233,-233}, -- left alt +{234,-234}, -- right alt +{236,-236}, +{255,-255}, -- delete +$} + +constant shiftkeys = { +{32,-9}, -- shift tab +$} + +constant event_names = { + {3,"focus-in"}, + {11,"focus-out"} + } + +---------------------------------------------------------------------- +export function key(atom event) -- get key pressed; +---------------------------------------------------------------------- +if event = 0 then return 0 end if +integer k = peek(event+16) +integer z = peek(event+17) +integer s = state(event) +ifdef BITS64 then + k = peek(event+28) + z = peek(event+29) +end ifdef +switch z do + case 0 then return k + case 255 then return vlookup(k,keyvalues,1,2,k) + case 254 then return vlookup(k,shiftkeys,1,2,k) +end switch +return 0 +end function + +--(32/64)struct GdkEventButton +-- 0 0 GdkEventType type a.k.a. id +-- 4 8 GtkWindow *window +-- 8 16 gint8 send_event +-- 12 20 guint32 time +-- 16 24 gdouble x +-- 24 32 gdouble y +-- 32 40 gdouble *axes +-- 36 48 guint state +-- 40 52 guint button +-- 44 56 GdkDevice *device +-- 48 64 gdouble x_root, y_root + +--------------------------------------------------------------------- +export function id(atom event) +--------------------------------------------------------------------- +if event > 0 then return peek4u(event) else return event end if +end function + +--------------------------------------------------------------------- +export function name(atom event) +--------------------------------------------------------------------- +event = id(event) +for i = 1 to length(event_names) do + if event = event_names[i][1] then + return event_names[i][2] + end if +end for +return -1 +end function + +--------------------------------------------------------------------- +export function window(atom event) -- get event window +--------------------------------------------------------------------- +ifdef BITS64 then + return peek8u(event + 8) +end ifdef + return peek4u(event + 4) +end function + +--------------------------------------------------------------------- +export function time(atom event) -- get event time +--------------------------------------------------------------------- +ifdef BITS64 then + return peek4u(event + 20) +end ifdef + return peek4u(event + 12) +end function + +--------------------------------------------------------------------- +export function xy(atom event) -- get mouse button x y; +--------------------------------------------------------------------- +ifdef BITS64 then + return floor({ + float64_to_atom(peek({event + 24, 8})), + float64_to_atom(peek({event + 32, 8}))}) +end ifdef + return floor({ + float64_to_atom(peek({event + 16, 8})), + float64_to_atom(peek({event + 24, 8}))}) +end function + +--------------------------------------------------------------------- +export function axes(atom event) +--------------------------------------------------------------------- +ifdef BITS64 then + return float64_to_atom(peek({event + 40, 8})) +end ifdef + return float64_to_atom(peek({event + 32, 8})) +end function + +--------------------------------------------------------------------- +export function button(atom event) -- get mouse button clicked; +--------------------------------------------------------------------- +ifdef BITS64 then + return peek(event+52) +end ifdef +return peek(event+40) +end function + +---------------------------------------------------------------------- +export function state(atom event) +---------------------------------------------------------------------- +ifdef BITS64 then + return peek(event+48) +end ifdef +return peek(event+36) +end function + +---------------------------------------------------------------------- +export function device(atom event) +---------------------------------------------------------------------- +ifdef BITS64 then + return peek(event+56) +end ifdef +return peek(event+44) +end function + +--------------------------------------------------------------------- +export function clicks(atom event) +--------------------------------------------------------------------- +atom ct = allocate(64) +object result + if gtk_func("gdk_event_get_click_count",{P,I},{event,ct}) then + result = peek4u(ct) + else + result = -1 + end if + free(ct) +return result +end function + +--------------------------------------------------------------------- +export function scroll_dir(atom event) +--------------------------------------------------------------------- +atom dir = allocate(64) +object result + if gtk_func("gdk_event_get_scroll_direction",{P,I},{event,dir}) then + result = peek4u(dir) + else + result = -1 + end if + free(dir) +return result +end function + +--------------------------------------------------------------------------------- +export function pending() -- used sometimes when using timeout or eu tasks +--------------------------------------------------------------------------------- + return gtk_func("gtk_events_pending") +end function + +------------------------------------------------------------------------ +export procedure main_iteration() +------------------------------------------------------------------------ + gtk_proc("gtk_main_iteration") +end procedure + +----------------------------------------------------------------------------------- +export procedure main_iteration_do(integer i) -- used sometimes when multi-tasking; +----------------------------------------------------------------------------------- + gtk_proc("gtk_main_iteration_do",{I},i) +end procedure + +------------------------------------------------------------------------ +-- following routine traps the enter key when Entry is activated, +-- and uses it like the tab key - so it works like people expect. +-- When using Glade, connect each entry's 'activate' signal to +-- trap_enter_key +------------------------------------------------------------------------ +constant gsig = define_proc("g_signal_emit_by_name",{P,P,P}) +constant fsig = allocate_string("move-focus") +------------------------------------------------------------------------ +global function trap_enter_key(atom ctl, atom event) +----------------------------------------------------------------------- + if class_id(ctl) = GtkEntry then + if event = 0 then + c_proc(gsig,{ctl,allocate_string("move-focus"),0}) + return 1 + end if + end if +return 0 +end function + + + diff --git a/eugtk/examples/GtkFileSelector.e b/eugtk/examples/GtkFileSelector.e new file mode 100644 index 0000000..91959ac --- /dev/null +++ b/eugtk/examples/GtkFileSelector.e @@ -0,0 +1,454 @@ + +------------------------- +namespace fileselector -- Generic file selection dialog; +------------------------- + +--# EXPORTS: +/* + -- functions: + fileselector:New() + fileselector:Open() + fileselector:Save() + fileselector:SaveAs() + fileselector:CreateFolder() + fileselector:SelectFolder() + + -- returns: + full file path if successful, e.g. "/home/irv/demos/test99.ex" + or an atom: + MB_ABORT when dialog is closed + MB_CANCEL when cancel button is clicked. +*/ + +include GtkEngine.e + +export constant version = "4.12.0" + +if not equal(version,gtk:version) then + Error(,,"GtkFileSelector version mismatch","should be version " & gtk:version) +end if + + +-- default settings, change before calling the dialog if required; +export boolean + create_folders = TRUE, + local_only = TRUE, + select_multiple = FALSE, + show_hidden = FALSE, + do_overwrite_confirmation = TRUE, + show_preview = FALSE, + preview_widget_active = TRUE + +export sequence preview_size = {200,200} + +export atom preview_max = 150 -- default size + +export object selected_filter=0, filters = {"euphoria","text"} + +-- may change filters before calling the dialog +-- (or every 5,000 miles, whichever comes first) + +-- IOW, to show only .css files, add the line: +-- fileselector:filters = {"css"} +-- before calling: +-- fileselector:Open("~/demos/*") + +-- note that the syntax of the parameter to Open() is important: +-- ~/demos or ~/demos/ will only cause the dialog to highlight the ~/demos folder, +-- ~/demos/* will open the demos folder and display the [filtered] file types +-- ~/demos/*.css will show folders and all *.css files + +-- combining filters with wildcards: +-- fileselector:filters = {"images"} +-- fileselector:Open("~/demos/glade/*") +-- the above will show all images in the specified directory, + +-- whereas: +-- fileselector:Open("~/demos/glade/*.png") +-- will show only .png images in the specified directory, +-- regardless of how the filters are set. + +-- below, only .png images will be shown, but drop-down options to show .html and .c files +-- will be available also: +-- fileselector:filters = {"html","c"} +-- fileselector:Open("~/demos/glade/*.png") + +-------------------------------------- +function generate_filter(object name) +-------------------------------------- +object filter = 0 + + switch name do + + case "images",".jpg",".gif",".png",".xpm" then filter = create(GtkFileFilter,{ + {"name","Images"},{"add mime type","image/*"}}) + + case "euphoria",".eu",".e",".exw" then filter = create(GtkFileFilter,{ + {"name","Euphoria files"},{"add pattern","*.e"}, + {"add pattern","*.ex"},{"add pattern","*.cfg"}}) + + case "text",".text",".txt" then filter = create(GtkFileFilter,{ + {"name","All text"},{"add mime type","text/plain"}}) + + case "c",".c",".h" then filter = create(GtkFileFilter,{ + {"name","C source code"},{"add mime type","text/x-c"}, + {"add pattern","*.c"},{"add pattern","*.h"}}) + + case "c++" then filter = create(GtkFileFilter,{ + {"name","C++ source code"},{"add pattern","*.c++"}}) + + case "css",".css" then filter = create(GtkFileFilter,{ + {"name","css markup"},{"add mime type","text/css"}, + {"add pattern","*.css"}}) + + case "python",".python",".py" then filter = create(GtkFileFilter,{ + {"name","Python"},{"add mime type","text/x-python"}}) + + case "html",".htm",".html" then filter = create(GtkFileFilter,{ + {"name","html source"},{"add mime type","text/html"}, + {"add pattern","*.html"}}) + + case "ini",".ini" then filter = create(GtkFileFilter,{ + {"name","ini"},{"add pattern","*.ini"}}) + + case "all" then filter = create(GtkFileFilter,{ + {"name","All files"},{"add pattern","*"}}) + + case "dir" then filter = create(GtkFileFilter,{ + {"name","Directories"},{"add mime type","inode/directory"}}) + + end switch + +return filter + +end function + +constant update_preview = call_back(routine_id("UpdatePreview")) + +---------------------------------------------------------- +export function New(object current=0) +---------------------------------------------------------- +object result=0 +atom dlg = create(GtkFileChooserDialog) + +set(dlg,{ + {"name","FileNew"}, + {"title","Create a new file"}, + {"action",GTK_FILE_CHOOSER_ACTION_SAVE}, + {"preview widget active",preview_widget_active}, + + {"add button","gtk-cancel",MB_CANCEL}, + {"add button","gtk-ok",MB_OK}, + {"create folders",create_folders}, + {"local only",local_only}, + {"select multiple",select_multiple}, + {"show hidden",show_hidden}, + {"do overwrite confirmation",do_overwrite_confirmation}}) + + for i = 1 to length(filters) do + set(dlg,"add filter",generate_filter(filters[i])) + end for + + if show_preview = TRUE then + atom preview = create(GtkImage) + set(dlg,"preview widget",preview) + connect(dlg,"update-preview",update_preview,preview) + end if + + if atom(current) and current > 0 then + set(dlg,"current name",unpack(current)) + end if + + result = get(dlg,"run") + if result = MB_OK then + result = get(dlg,"filename") + end if + +destroy(dlg) + +return result +end function +export constant new = call_back(routine_id("New")) + +---------------------------------------------------- +export function Open(object data=0, atom x=0) +---------------------------------------------------- +object result=0 +object filter=0 + +if atom(data) and data > 0 then data = unpack(data) end if +if string(data) and equal("*",filename(data)) then filters &= {"all"} end if + +atom dlg = create(GtkFileChooserDialog) + +set(dlg,{ + {"name","FileOpen"}, + {"title","Open a file"}, + {"action",GTK_FILE_CHOOSER_ACTION_OPEN}, + {"preview widget active",preview_widget_active}, + + {"add button","gtk-cancel",MB_CANCEL}, + {"add button","gtk-ok",MB_OK}, + {"create folders",create_folders}, + {"local only",local_only}, + {"select multiple",select_multiple}, + {"show hidden",show_hidden}, + {"do overwrite confirmation",do_overwrite_confirmation}}) + + for i = 1 to length(filters) do + set(dlg,"add filter",generate_filter(filters[i])) + end for + + if show_preview = TRUE then + atom preview = create(GtkImage) + set(dlg,"preview widget",preview) + connect(dlg,"update-preview",update_preview,preview) + end if + + if atom(data) and data > 0 then + data = unpack(data) + end if + + if string(data) then + if file_exists(canonical_path(data)) then + set(dlg,"filename",canonical_path(data)) + else + if not equal("*",filename(data)) then + filter = create(GtkFileFilter,{ -- build a custom filter; + {"name",filename(data) & " files"}, + {"add pattern",filename(data)}}) + set(dlg,"add filter",filter) + set(dlg,"filter",filter) + end if + set(dlg,"filename",canonical_path(data)) -- change to desired folder; + end if + end if + + result = get(dlg,"run") + + if result = MB_OK then + result = get(dlg,"filename") + end if + + destroy(dlg) + +return result +end function +export constant open = call_back(routine_id("Open")) + +---------------------------------------------------- +export function Save(object data, object x=0) +---------------------------------------------------- +object result=0 +atom dlg = create(GtkFileChooserDialog) +atom f + +set(dlg,{ + {"name","FileSave"}, + {"title","Save this file"}, + {"action",GTK_FILE_CHOOSER_ACTION_SAVE}, + + {"add button","gtk-cancel",MB_CANCEL}, + {"add button","gtk-ok",MB_OK}, + {"create folders",create_folders}, + {"local only",local_only}, + {"select multiple",select_multiple}, + {"show hidden",show_hidden}, + {"do overwrite confirmation",do_overwrite_confirmation}}) + + for i = 1 to length(filters) do + set(dlg,"add filter",generate_filter(filters[i])) + end for + + if show_preview = TRUE then + atom preview = create(GtkImage) + set(dlg,"preview widget",preview) + connect(dlg,"update-preview",update_preview,preview) + end if + + if atom(data) and data > 0 then + set(dlg,"current name",unpack(data)) + end if + + if string(data) then + set(dlg,"current name",data) + end if + + result = get(dlg,"run") + + if result = MB_OK then + result = get(dlg,"filename") + end if + +destroy(dlg) + +return result +end function +export constant save = call_back(routine_id("Save")) + +----------------------------------------------------------- +export function SaveAs(object data=0, object x=0) +----------------------------------------------------------- +object result=0 +atom dlg = create(GtkFileChooserDialog) + +set(dlg,{ + {"name=FileSaveAs"}, + {"title","Save this file with a new name"}, + {"action",GTK_FILE_CHOOSER_ACTION_SAVE}, + + {"add button","gtk-cancel",MB_CANCEL}, + {"add button","gtk-ok",MB_OK}, + {"create folders",create_folders}, + {"local only",local_only}, + {"select multiple",select_multiple}, + {"show hidden",show_hidden}, + {"do overwrite confirmation",do_overwrite_confirmation}}) + + for i = 1 to length(filters) do + set(dlg,"add filter",generate_filter(filters[i])) + end for + + if show_preview = TRUE then + atom preview = create(GtkImage) + set(dlg,"preview widget",preview) + connect(dlg,"update-preview",update_preview,preview) + end if + + if atom(data) and data > 0 then + set(dlg,"current name",unpack(data)) + elsif string(data) then + set(dlg,"current name",data) + end if + + result = get(dlg,"run") + + if result = MB_OK then + result = get(dlg,"filename") + end if + + destroy(dlg) + +return result +end function +export constant save_as = call_back(routine_id("SaveAs")) + +--------------------------------------------------------------- +export function CreateFolder(object data=0, object x=0) +--------------------------------------------------------------- +object result=0 +atom dlg = create(GtkFileChooserDialog) + +set(dlg,{ + {"name=NewFolder"}, + {"title","Create a new folder"}, + {"action",GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER}, + + {"add button","gtk-cancel",MB_CANCEL}, + {"add button","gtk-ok",MB_OK}, + {"create folders",create_folders}, + {"local only",local_only}, + {"select multiple",select_multiple}, + {"show hidden",show_hidden}, + {"do overwrite confirmation",do_overwrite_confirmation}}) + + for i = 1 to length(filters) do + set(dlg,"add filter",generate_filter(filters[i])) + end for + + if show_preview = TRUE then + atom preview = create(GtkImage) + set(dlg,"preview widget",preview) + connect(dlg,"update-preview",update_preview,preview) + end if + + if atom(data) and data > 0 then + set(dlg,"current name",unpack(data)) + end if + + result = get(dlg,"run") + + if result = MB_OK then + result = get(dlg,"filename") + end if + +destroy(dlg) + +return result +end function +export constant create_folder = call_back(routine_id("CreateFolder")) + +--------------------------------------------------------------- +export function SelectFolder(object data=0, object x=0) +--------------------------------------------------------------- +object result=0 +atom dlg = create(GtkFileChooserDialog) + +set(dlg,{ + {"name","SelectFolder"}, + {"title","Select a folder"}, + {"action",GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER}, + + {"add button","gtk-cancel",MB_CANCEL}, + {"add button","gtk-ok",MB_OK}, + {"create folders",create_folders}, + {"local only",local_only}, + {"select multiple",select_multiple}, + {"show hidden",show_hidden}, + {"do overwrite confirmation",do_overwrite_confirmation}}) + + for i = 1 to length(filters) do + set(dlg,"add filter",generate_filter(filters[i])) + end for + + if show_preview = TRUE then + atom preview = create(GtkImage) + set(dlg,"preview widget",preview) + connect(dlg,"update-preview",update_preview,preview) + end if + + if atom(data) and data > 0 then + data = unpack(data) + if string(data) then + if file_exists(canonical_path(data)) then + set(dlg,"filename",canonical_path(data)) + else + set(dlg,"filename",data) + end if + end if + end if + +result = get(dlg,"run") + +if result = MB_OK then + result = get(dlg,"filename") +end if + +destroy(dlg) + +return result +end function +export constant select_folder = call_back(routine_id("SelectFolder")) + +------------------------------------------------------------------------------ +function UpdatePreview(atom dlg, atom preview) -- local: follow focus changes; +------------------------------------------------------------------------------ +object pix +atom ratio +object dimensions +object fn = get(dlg,"filename") + +if string(fn) then -- avoid trying to preview a directory! + pix = create(GdkPixbuf,fn) + if pix > 0 then + dimensions = get(pix,"size") + ratio = preview_max / dimensions[1] + dimensions *= {ratio,ratio} + pix = get(pix,"scale simple",dimensions[1],dimensions[2],1) + set(preview,"from pixbuf",pix) + end if +end if + +return 0 +end function + diff --git a/eugtk/examples/GtkFontSelector.e b/eugtk/examples/GtkFontSelector.e new file mode 100644 index 0000000..dc5165f --- /dev/null +++ b/eugtk/examples/GtkFontSelector.e @@ -0,0 +1,154 @@ + +---------------------- +namespace fontselector -- Generic font selector dialog +---------------------- + +--# EXPORTS +/* + -- functions -- callbacks + fontselector:Select() fontselector:select + fontselector:FilterFonts() fontselector:filter + +-- fontlist +*/ + +include GtkEngine.e +include GtkCairo.e +include std/wildcard.e +include std/hash.e + +export constant version = "4.12.0" + +if not equal(version,gtk:version) then + Error(,,"GtkFontSelector version mismatch","should be version " & gtk:version) +end if + +-- Optional parameter is preferred (default) font, the one to be +-- returned if the font dialog ok button is clicked without choosing +-- a different font. You can just specify a size here: "8" and that +-- will set only the dialog's size selector. +-- +-- You can specify a full font name and size: e.g. Purisa bold 16, +-- and that font will be the one highlighted for selection. +-- If you specify a font that doesn't exist: e.g. Bogus italic 18, +-- and then use the returned font, GTK will do the best it can, +-- which will be to set the existing font to italic in 18pt. +-- Fairly fail-safe, in other words. +-- +-- Setting this does not filter the list of fonts shown by the dialog. +-- to do this, you need to set the pattern. See below. +-- +-- To exclude unwanted (and unreadable) fonts, such as symbols and +-- dingbats, add them to the exclude sequence. See below. +-- +-- pattern can be set prior to the select() call +-- pattern can be an array of font names, wildcards are ok +-- e.g. {"Courier*","purisa"} +-- if you use, for example, just {"Courier"}, without the wildcard, +-- no fonts will be found. +-- +-- {"sans"}, {"*sans"}, or {"*sans*"} will each return a different +-- set of matching font names! trial and error may be required. +-- +-- if pattern is left unset, ALL fonts will be shown! + +export atom dlg = create(GtkFontChooserDialog,"name=FontSelector") + +export object + name = 0, -- font name + title = "Choose a font", -- dialog title + preview_text = "This is an EuGTK font selector", + description = 0, -- a PangoFontDescription + family = 0, -- font family + style = 0, -- normal, oblique, italic + variant = 0, + weight = PANGO_WEIGHT_NORMAL, + mono_filter = 0, + font_list = {} + +export atom size = 12*1024 +export integer points = 12 +export sequence pattern = {"*"} + +export sequence exclude = {"*symbol*","*dingbat*","*webdings","*wingdings*"} +-- above list filters out unusable fonts; + +------------------------------------------------------------------------ +export function Select(object curr_fnt=0) +------------------------------------------------------------------------ + set(dlg,"title","Select a font") + set(dlg,"preview text",preview_text) + if string(curr_fnt) then + set(dlg,"font",curr_fnt) + end if + pattern = lower(pattern) + exclude = lower(exclude) + + set(dlg,"filter func",filter) + + if get(dlg,"run") then + name = get(dlg,"font") + description = create(PangoFontDescription,name) + family = get(description,"family") + size = get(description,"size") + points = math:round(size/PANGO_UNIT) + variant = get(description,"variant") + style = get(description,"style") + weight = get(description,"weight") + end if + + hide(dlg) -- we keep it around, since it's likely to be used again :p + +return name +end function +export constant select = call_back(routine_id("Select")) + +------------------------------------------------------------------------ +export function FilterFonts(object family, object face, object data) +------------------------------------------------------------------------ +integer result = 0 + +if mono_filter then + if gtk_func("pango_font_family_is_monospace",{P},{family}) = FALSE then + return 0 + end if +end if + +object name = lower(gtk_str_func("pango_font_family_get_name",{P},{family})) + for i = 1 to length(pattern) do + result = is_match(pattern[i],name) > 0 + if result = 1 then + for x = 1 to length(exclude) do + if is_match(exclude[x],name) then + return 0 + end if + end for + end if + return result + end for +return result +end function +export constant filter = call_back(routine_id("FilterFonts")) + +sequence weight_names = +{"thin","ultralight","light","book","normal","medium", +"semibold","bold","ultrabold","heavy","ultraheavy"} + +/* -- reference; + PANGO_WEIGHT_THIN = 100, + PANGO_WEIGHT_ULTRALIGHT = 200, + PANGO_WEIGHT_LIGHT = 300, + PANGO_WEIGHT_BOOK = 380, + PANGO_WEIGHT_NORMAL = 400, + PANGO_WEIGHT_MEDIUM = 500, + PANGO_WEIGHT_SEMIBOLD = 600, + PANGO_WEIGHT_BOLD = 700, + PANGO_WEIGHT_ULTRABOLD = 800, + PANGO_WEIGHT_HEAVY = 900, + PANGO_WEIGHT_ULTRAHEAVY = 1000, + PANGO_UNIT = 1024 + + PANGO_STYLE_NORMAL = 0, + PANGO_STYLE_OBLIQUE = 1, + PANGO_STYLE_ITALIC = 2 +*/ diff --git a/eugtk/examples/GtkPrinter.e b/eugtk/examples/GtkPrinter.e new file mode 100644 index 0000000..972a083 --- /dev/null +++ b/eugtk/examples/GtkPrinter.e @@ -0,0 +1,567 @@ + +-------------------- +namespace printer -- Utility to make printing easier +-------------------- + +export constant version = "4.12.0" + + -- EXPORTS: + -- functions callbacks + -- printer:PrintFile() printer:print_file + -- printer:PrintText() printer:print_text + +-- This version handles most common printing needs, but it will not yet respect +-- 'marked up' a.k.a. 'rich' text, i.e. text with colors and styles as produced +-- by GTK3's TextView widget. It just prints them as plain text. +-- +-- However, it DOES print text marked up with GTK's HTML subset, so you can use +-- , , , , ... etc. in your printouts! This includes various +-- imbedded font styles and colors. +-- +-- More documentation is found in ~/documentation/printing.html + +include GtkEngine.e +include GtkCairo.e +include std/datetime.e + +if not equal(version,gtk:version) then + Error(,,"GtkPrinter version mismatch","should be version " & gtk:version) +end if + +-- The following exported variables can be modified before calling the +-- print routine: + +public object header = "[1]\n" -- default is just the page title + +public object subheader = "[1] page [5]\n\n" -- format for headers on pg.2 ... n +-- default subheader (above) prints page title and pg #; + +public object footer = "\nPrinted by EuGTK [8] on [9]'s computer" +-- default footer (above) prints date and user name; + +-- Info ID's for use in header and footer; +-- 1 = page title (for first page) +-- 2 = sub title (for subsequent pages - leave null to use page title (1) on all pgs) +-- 3 = file name +-- 4 = short name (file name w/o path) +-- 5 = current page number +-- 6 = n_pages printed e.g. pg 1 of n +-- 7 = n_copies requested +-- 8 = today's date in date_format +-- 9 = user name +--10 = user's real name +--11 = font name used for this print job +--12 = file length in bytes +--13 = file timestamp +--14 = exported filename, if any + +export integer + n_pages = 0, -- number of pages to print (0=all) + n_copies = 1, + collate = FALSE, + duplex = 0, + number_up = 1, + number_up_layout = 1, + units = GTK_UNIT_INCH, + use_line_numbers = TRUE, + use_color = TRUE, -- print eu comments in red if true + lines_per_page = 60, + wrap_at = 0, + track_status = TRUE, + show_progress = TRUE, -- enable the built-in progressbar + embed_page_setup = TRUE, + orientation = 0, + order = 0, + confirm = FALSE, + sourcecode = TRUE, + plaintext = FALSE, + use_full_page = FALSE, -- ignore margins + has_selection = FALSE, + support_selection = FALSE, + quality = GTK_PRINT_QUALITY_DRAFT, + action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, + auto_lpp = TRUE + +export atom + scale = 100, + top_margin = 0.25, -- in inch units + left_margin = 0.25, + right_margin = 0.25, + bottom_margin = 0.25, + parent = 0, + + signal_status_changed = call_back(routine_id("show_status")), + signal_begin_print = call_back(routine_id("begin_print")), + signal_draw_page = call_back(routine_id("draw_page")), + signal_end_print = call_back(routine_id("end_print")), + signal_request_page_setup = 0, + signal_done = 0, + signal_ready = 0, + signal_got_page_size = 0 + +export object + name = 0, + font = "Ubuntu Mono 8", + jobname = 0, + settings_file = 0, + setup_file = 0, + export_file = 0, + page_ranges = 0, + page_set = GTK_PAGE_SET_ALL, + custom_tab_hook = 0, + custom_tab_label = 0, + custom_tab_func = 0 + +ifdef WINDOWS then font = "Courier New 16" end ifdef + +export object + line_number_format = "[:4] []\n", -- controls line # format AND code line! + paper_name = "na_letter", -- 8.5x11.0" + tabs = " ", -- replace tab chars with 8 spaces + file_name = 0, + short_name = 0, + page_title = 0, + sub_title = 0 + +export atom + progress = create(GtkProgressBar), + settings = create(GtkPrintSettings) + +-- use date and time formats in std/datetime.e; +export sequence date_format = "%A, %B %d %Y %l:%M %p" + +sequence user +ifdef WINDOWS then + user = "User" +elsedef + user = proper(getenv("USER")) +end ifdef + +-- for local use; +atom fontdesc +integer filesize = 0 +object timestamp = 0 +sequence text +sequence today = datetime:format(datetime:now(),date_format) + +export procedure reset() + n_pages = 0 + n_copies = 1 + collate = FALSE + duplex = 0 + number_up = 1 + number_up_layout = 1 + units = GTK_UNIT_INCH + use_line_numbers = TRUE + use_color = TRUE + lines_per_page = 60 + wrap_at = 0 + track_status = TRUE + show_progress = TRUE + embed_page_setup = TRUE + orientation = 0 + order = 0 + confirm = FALSE + sourcecode = TRUE + plaintext = FALSE + use_full_page = FALSE + has_selection = FALSE + support_selection = FALSE + quality = GTK_PRINT_QUALITY_DRAFT + action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG + auto_lpp = TRUE + + scale = 100 + top_margin = 0.25 + left_margin = 0.25 + right_margin = 0.25 + bottom_margin = 0.25 + parent = 0 + + name = 0 + paper_name = "na_letter" + font = "Ubuntu Mono 8" + jobname = 0 + settings_file = 0 + setup_file = 0 + export_file = 0 + page_ranges = 0 + page_set = GTK_PAGE_SET_ALL + custom_tab_hook = 0 + custom_tab_label = 0 + custom_tab_func = 0 + +end procedure + +------------------------------------------------------------------------ +export function PrintFile(object f=0, object x=0) +------------------------------------------------------------------------ + +if string(f) and string(x) then + page_title = f + file_name = canonical_path(x) + timestamp = file_timestamp(file_name) + filesize = file_length(file_name) + short_name = filebase(file_name) + text = read_file(file_name) + setup_printer() + return 1 +end if + +if string(f) and atom(x) and x = 0 then + f = canonical_path(f) + file_name = f + timestamp = file_timestamp(f) + filesize = file_length(f) + short_name = filebase(f) + page_title = filename(f) + text = read_file(f) + setup_printer() + return 1 +end if + +if string(f) and atom(x) and x < 100 then + page_title = f + short_name = f + file_name = f + text = read_file(x) + setup_printer() + return 1 +end if + +if atom(f) and atom(x) and x < 101 then + if atom(file_name) then + file_name = "" + end if + if atom(short_name) then + short_name = "" + end if + if atom(page_title) then + page_title = "" + end if + text = read_file(x) + setup_printer() + return 1 +end if + +if atom(f) and atom(x) then + x = unpack(x) + x = canonical_path(x) + file_name = x + short_name = filebase(x) + page_title = filename(x) + text = read_file(x) + setup_printer() + return 1 +end if + +return 1 +end function +export constant print_file = call_back(routine_id("PrintFile")) + +------------------------------------------------------------------------ +export function PrintText(object f=0, object x=0) +------------------------------------------------------------------------ + +if string(f) and string(x) then + page_title = f + text = x + setup_printer() + return 1 +end if + +if atom(f) and string(x) then + setup_printer() + text = x + return 1 +end if + +if atom(f) and atom(x) then + if atom(page_title) and page_title = 0 then + page_title = "" + end if + text = unpack(x) + setup_printer() + return 1 +end if + +return 0 +end function +export constant print_text = call_back(routine_id("PrintText")) + +integer status_code +sequence status_string + +----------------------------------------------- +export function show_status(atom op) +----------------------------------------------- +atom + fn1 = define_func("gtk_print_operation_get_status",{P},I), + fn2 = define_func("gtk_print_operation_get_status_string",{P},S) + +status_code = c_func(fn1,{op}) +status_string = peek_string(c_func(fn2,{op})) + +ifdef PRINT then display("Status [] []",{status_code,status_string}) end ifdef + +if show_progress then + set(progress,"text",status_string) +end if + +ifdef DELAY then sleep(0.15) end ifdef + +return 1 +end function + +------------------------------------------------------ +export function begin_print(atom op, atom context) +------------------------------------------------------ +ifdef PRINT then display("Begin printing [] pages ",length(text)) end ifdef + +fontdesc = create(PangoFontDescription,font) + +if auto_lpp then +atom setup = get(op,"default page setup") + atom pght = get(setup,"page height",GTK_UNIT_POINTS) + --display("Page height [] pt.",pght) + pght -= length(header) + pght -= length(footer) + atom fs = get(fontdesc,"size") / 1024 + --display("Font size []",fs) + fs = fs * (96/72) + integer lpp = 1 + while ((fs*lpp)) < pght do + lpp += 1 + --display("Text height [] lpp []",{(fs*lpp),lpp}) + end while + --display("New LPP []",lpp-1) + lines_per_page = lpp +end if + +text = process_text(text) + +set(op,"n pages",n_pages) + +-- important, as a new value for n_pages is computed +-- based on the length of the file being read, unless a set number +-- has been provided from the calling program. + +if show_progress then -- turn on the progress dialog in the calling program + show_all(progress) +end if + +return 1 +end function + +---------------------------------------------------------------------------- +export function draw_page(atom op, atom context, integer pg, atom data) +---------------------------------------------------------------------------- +atom fn6 = define_func("gtk_print_context_get_cairo_context",{P},P) + +atom cr = c_func(fn6,{context}) +atom pl = create(PangoCairoLayout,cr) + set(pl,"font description",fontdesc) + +pg += 1 +if pg > length(text) then + set(progress,"text","Printing complete") + return 0 +end if + +if show_progress then + set(progress,"text",sprintf("Printing page %d",pg)) + set(progress,"fraction",pg/n_pages) +end if + +ifdef DELAY then sleep(0.25) end ifdef + +object details = { + page_title,sub_title,file_name,short_name, + pg,n_pages,n_copies, + today,user,real_name,font,filesize,timestamp,export_file + } + +object page + +if atom(header) then header = "[1] page [5] of [6]\n\n" end if + +if pg = 1 or atom(subheader) then + page = text:format(header,details) + & flatten(text[pg]) + & text:format(footer,details) +else + page = text:format(subheader,details) + & flatten(text[pg]) + & text:format(footer,details) +end if + +if plaintext then + set(pl,"text",page,length(page)) +else + set(pl,"markup",page,length(page)) +end if + + set(pl,"update layout",cr) + set(pl,"show layout",cr) + +ifdef PRINT then printf(1,"Page %d\n",pg) end ifdef + +return 1 +end function + +------------------------------------------------------------------------ +function process_text(object txt) +------------------------------------------------------------------------ +txt = split(txt,'\n') +integer comment, n +object a,b +object test + + +for i = 1 to length(txt) do -- replace chars which will confuse markup + + txt[i] = join(split(txt[i],'&'),"&") + txt[i] = join(split(txt[i],"&amp;"),"&") + + if sourcecode then + txt[i] = join(split(txt[i],'<'),"<") + txt[i] = join(split(txt[i],'>'),">") + end if + + if use_color then + if match("--",txt[i]) then -- a comment; + txt[i] = split(txt[i],"--") + txt[i] = txt[i][1] & "-- " & txt[i][2] & "" + end if + end if + + if use_line_numbers then + txt[i] = text:format(line_number_format,{i,txt[i]}) + else + txt[i] &= '\n' + end if + +end for + +txt = breakup(txt,lines_per_page) + +if n_pages = 0 then -- no selection + n_pages = length(txt) +end if + +return txt +end function + +------------------------------------------------------------------------ +export function end_print() +------------------------------------------------------------------------ +status_string = "Printing complete" +ifdef PRINT then display(status_string) end ifdef +return 1 +end function + +--------------------------------------------------------------- +export function setup_printer() +--------------------------------------------------------------- +atom _size = create(GtkPaperSize,paper_name) +atom err = allocate(16) err = 0 +object results = 0 + +atom fn7 = define_func("gtk_print_operation_run",{P,I,P,P},I) +atom fn8 = define_func("gtk_print_run_page_setup_dialog",{P,P,P},P) + + set(settings,"paper size",_size,units) + set(settings,"n copies",n_copies) + set(settings,"collate",collate) + set(settings,"duplex",duplex) + set(settings,"reverse",order) + set(settings,"scale",scale) + set(settings,"quality",quality) + set(settings,"number up",number_up) + set(settings,"number up layout",number_up_layout) + + if string(name) then + set(settings,"printer",name) + end if + +atom setup = create(GtkPageSetup) + set(setup,"paper size",_size) + set(setup,"orientation",orientation) + set(setup,"left margin",left_margin,units) + set(setup,"right margin",right_margin,units) + set(setup,"top margin",top_margin,units) + set(setup,"bottom margin",bottom_margin,units) + +atom printop = create(GtkPrintOperation) + set(printop,"print settings",settings) + set(printop,"default page setup",setup) + set(printop,"show progress",show_progress) + set(printop,"track print status",track_status) + set(printop,"embed page setup",embed_page_setup) + set(printop,"support selection",support_selection) + set(printop,"has selection",has_selection) + set(printop,"use full page",use_full_page) + + if action = GTK_PRINT_OPERATION_ACTION_EXPORT then + export_file = canonical_path(export_file) + set(printop,"export filename",export_file) + end if + + if string(jobname) then + set(printop,"job name",jobname) + end if + + if custom_tab_hook != 0 then + set(printop,"custom tab label",custom_tab_label) + connect(printop,"create-custom-widget",custom_tab_func,printop) + connect(printop,"custom-widget-apply",custom_tab_hook) + end if + + connect(printop,"status-changed",signal_status_changed) + connect(printop,"begin-print",signal_begin_print) + connect(printop,"draw-page",signal_draw_page) + connect(printop,"end-print",signal_end_print) + connect(printop,"request-page-setup",signal_request_page_setup) + connect(printop,"done",signal_done) + connect(printop,"ready",signal_ready) + connect(printop,"got-page-size",signal_got_page_size) + + display(get(settings,"printer lpi")) + + c_func(fn7,{printop,action,parent,err}) -- start the print process; + + if string(setup_file) and file_exists(canonical_path(setup_file)) then + get(setup,"to file",canonical_path(setup_file)) + end if + +object jobname = get(printop,"job name") + if confirm then + if action = GTK_PRINT_OPERATION_ACTION_EXPORT then + if Question(0,"PDF Written", + sprintf("%s\nFolder: %s", + {filename(export_file),pathname(export_file)}), + sprintf("%s\nStatus: %d\n%s\nClick Yes to view",{jobname,status_code,status_string}) + ,,,"printer") then + show_uri(export_file) + end if + else + Info(0,"Print Job",jobname, + sprintf("Status: %d %s",{status_code,status_string}) + ,,"printer") + end if + end if + + page_title = 0 + n_pages = 0 + n_copies = 1 + action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG + +return 1 +end function + +header = "[1]\n\n" + +----------------------------- +-- copyright 2015 Irv Mullins +----------------------------- + diff --git a/eugtk/examples/GtkSettings.e b/eugtk/examples/GtkSettings.e new file mode 100644 index 0000000..033a31e --- /dev/null +++ b/eugtk/examples/GtkSettings.e @@ -0,0 +1,305 @@ + +--------------------- +namespace settings -- functions to read and write config files (*.ini); +--------------------- + +export constant version = "4.12.0" + +--# EXPORTS +/* + --functions: + settings:Save() + settings:Load() + settings:Add() + + -- debug: + -d SETTINGS +*/ + +include GtkEngine.e + +if not equal(version,gtk:version) then + Error(,,"GtkSettings version mismatch","should be version " & gtk:version) +end if + +constant fmt = """[].[]=[]""" + +------------------------------------------------------------------------ +export function Save(sequence inifile, object ctl_list, integer debug=0) +------------------------------------------------------------------------ +-- writes an 'ini' type file (file name and extension are up to you) +-- with an entry for each control on ctl_list. The controls MUST have +-- been named, otherwise there's no way to save and retrieve the +-- value/setting for that control. +------------------------------------------------------------------------ +object comments = {} +object txt,line + +if file_exists(inifile) then + + txt = read_lines(inifile) + for i = 1 to length(txt) do -- extract the comments; + line = txt[i] + if match("--",line) = 1 + or match("!",line) = 1 + or match("+",line) = 1 + or equal("\n",line) + or equal({},line) then + comments = append(comments,line) + end if + end for + write_lines(inifile,comments) -- removing everything but the comments; +end if -- file exists + +object setting, tmp = 0, pos = {0,0} +object t1, name, prop +atom handle +integer class + +atom fn = open(inifile,"a") + +for x = 1 to length(ctl_list) do + + if string(ctl_list[x]) then + handle = pointer(ctl_list[x]) + else + handle = ctl_list[x] + end if + + name = get(handle,"name") + class = class_id(handle) + + if class=GtkWindow then -- special handling for multiple properties; + printf(fn,"%s\n",{get_setting(handle,"size")}) + pos = get(handle,"position") + printf(fn,"%s.position={%d,%d}\n",{name,pos[1],pos[2]}) + + else + setting = get_setting(handle) -- others have 1 obvious 'saveable' property + if length(setting) < 1 then + continue + end if + + if sequence(setting) then + printf(fn,"%s\n",{setting}) + end if + end if +end for + +flush(fn) +close(fn) + +-- if ! exists for this control:property, then ignore the updated setting; +tmp = read_lines(inifile) +for i = 1 to length(tmp) do + if match("--!",tmp[i]) = 1 then + t1 = split(tmp[i],"=") + t1 = t1[1][2..$] + end if +end for + +write_lines(inifile,tmp) + +return 1 +end function + +------------------------------------------------------------------------ +export function Load(sequence inifile, integer debug=0) +------------------------------------------------------------------------ +-- used to restore settings from the specified ini file. +-- this should be called after the controls are 'realized' + +object txt, line, obj, prop, val1=0, val2=0, val3=0, val4=0 + +if not(file_exists(inifile)) then + write_file(inifile,sprintf("--%s\n\n",{inifile}),TEXT_MODE) + display("Creating ini file: []",{inifile}) +else + if debug then display("Reading []",{inifile}) end if +end if + +txt = read_lines(inifile) + +integer err=0 +object a,b + +for i = 1 to length(txt) do + + line = txt[i] + + if match("--",line) > 2 then -- strip trailing comments; + line = line[1..match("--",line)-2] + end if + + if match("--!",line) = 1 then + line = line[4..$] -- keep it + end if + + if match("+",line) = 1 or match("!",line) then + line = line[2..$] -- dito + end if + + if match("--",line) or match(";",line) + or match("/*",line) then + continue -- a comment, do nothing with it + end if + + if length(line) > 0 then + line = split(line,'=') + a = line[1] b = line[2] + a = split(a,'.') + line = a & {b} + + if debug > 1 then display(line) end if + + if vlookup(line[1],registry,4,1,-1) = -1 then + err = i + Error(,"Ini Load Error", + sprintf("Invalid object name: %s",{line[1]}), + sprintf("Line #%d of %s",{i,filename(inifile)})) + else + if equal("data",line[2]) then + set(line[1],"data",line[3],line[4]) + else + set(line[1],line[2],line[3]) + end if + end if + end if +end for + +if debug = 1 then + for i = 1 to length(txt) do + if i = err then + display("ERROR:[:3]:[]",{i,txt[i]}) + else + display("[:3]:[]",{i,txt[i]}) + end if + end for +end if + +write_lines(inifile,txt) + +return 1 +end function + +------------------------------------------------------------------------------------------- +export function Add(object ini,object ctl, sequence prop, object v1=0, object v2=0) +------------------------------------------------------------------------------------------- +if atom(ctl) then ctl = get(ctl,"name") end if + +Delete(ini,ctl,prop) + +if equal("position",prop) or equal("size",prop) then +if string(v1) then v2 = v1[2] v1 = v1[1] end if +end if + +if atom(v2) and v2=0 then + writefln("+[].[]=[]",{ctl,prop,v1},{ini,"a"}) +else + writefln("+[].[]={[],[]}",{ctl,prop,v1,v2},{ini,"a"}) +end if + +return 1 +end function + +-------------------------------------------------------------------- +export function Delete(object ini,object ctl, sequence prop) +-------------------------------------------------------------------- +if atom(ctl) then ctl = get(ctl,"name") end if +object tmp = read_lines(ini) +object out = {} +object s1 = text:format("[].[]",{ctl,prop}) +for i = 1 to length(tmp) do + if match(s1,tmp[i]) then -- skip + else out &= {tmp[i]} + end if +end for +write_lines(ini,out) +return 1 +end function + +--------------------------------------------------------------------------------- +function get_setting(object self, object property = 0) +-- returns the 'important' value from a control +--------------------------------------------------------------------------------- +-- returns settings string +-- object must be a named object, e.g. MyButton + +-- MyButton.active=1 +-- My Calendar.date={YYYY,MM,DD} + +object name = 0 +object dt + +if string(self) then + name = self + self = vlookup(self,registry,4,1) +end if + +object val = 0 +object txt = {} + +integer x = find(self,vslice(registry,1)) + + ifdef SETTINGS then + display("SELF [] []",{x,self}) + display(registry[x]) + end ifdef + + switch class_id(self) do + -- this decides which value is the important one to save; + -- and stores the control's current value into the registry; + + case GtkEntry,GtkEntryBuffer then property = "text" + + case GtkCheckButton,GtkRadioButton, GtkToggleButton, + GtkSwitch,GtkComboBox,GtkComboBoxText, + GtkCheckMenuItem,GtkToggleToolButton, GtkSearchEntry + then property = "active" + + case GtkPopover then property = "position" + + case GtkFontButton then property = "font name" + + case GtkAdjustment,GtkSpinButton,GtkScaleButton,GtkVolumeButton, + GtkModelButton,GtkScale + then property = "value" + + case GtkEntryCompletion then property = "model" + + case GtkLinkButton then property = "uri" + + case GtkMenuItem then property = "sensitive" + + case GtkPaned then property = "position" + + case GtkFileChooser, GtkFileChooserButton, GtkFileChooserWidget, GtkFileChooserDialog + then property = "filename" + + case GtkFontChooser, GtkFontChooserWidget, GtkFontChooserDialog then + property = "font" + + case GtkCalendar then + dt = get(self,"datetime",0) + registry[x][5] = {"date",dt[1..3]} + txt &= text:format(fmt,{registry[x][4],"date",dt[1..3]}) + return txt + + case GtkColorButton,GtkColorChooser,GtkColorChooserWidget, + GtkColorChooserDialog then + registry[x][5] = {"rgba",get(self,"rgba",1)} + txt &= text:format(fmt,{registry[x][4],"rgba",get(self,"rgba",1)}) + return txt + + end switch + + if atom(property) then + return txt + end if + + val = get(self,property) + registry[x][5] = {property,val} + txt &= text:format(fmt,{registry[x][4],property,val}) + +return txt +end function diff --git a/eugtk/examples/GtkSourceView.plugin b/eugtk/examples/GtkSourceView.plugin new file mode 100644 index 0000000..9e7bb40 --- /dev/null +++ b/eugtk/examples/GtkSourceView.plugin @@ -0,0 +1,741 @@ + +--------------- +namespace sv -- "Plug-in" for GtkSourceView +--------------- + +------------------------------------------------------------------------- +-- A plug-in appends new widgets to the widget array, adding functions +-- and an additional library file without changing GtkEngine.e source. +-- This needed to be implemented as a plug-in because the SourceView +-- library is shipped separately from libgtk3. + +-- Many more functions remain to be added, including style selections, +-- printing options, etc. -- +------------------------------------------------------------------------- +include GtkEngine.e + +export constant version = "4.12.0" + +if not equal(version,gtk:version) then + Error(,,"GtkSourceView.plugin version mismatch","should be version " & gtk:version) +end if + +ifdef WINDOWS then +export constant svdll = "libgtksourceview-3.0-1.dll" +elsedef +export constant svdll = "libgtksourceview-3.0.so.1" +end ifdef + +export atom LIBSV = open_dll(svdll) +if LIBSV = 0 then + Error(,,"No libgtksourceview found!", + "If you're sure you have one, set the library\nname at the top of GtkSourceView.plugin", + GTK_BUTTONS_OK) + crash("No libgtksourceview found!") +end if + +ifdef SV then display("SOURCEVIEW:[]",{svdll}) end ifdef + +LIBS = append(LIBS,LIBSV) + +widget = append(widget, {"gtk_source_mark", +{GtkTextMark,GObject}, + {"new",{S,S},P}, + {"get_category",{P},S}, + {"next",{P,S},P,0,length(widget)}, + {"prev",{P,S},P,0,length(widget)}, +"GtkSourceMark"}) +export constant GtkSourceMark = length(widget) + +widget = append(widget, {"gtk_source_undo_manager", +{}, + {"can_undo",{P},B}, + {"can_redo",{P},B}, + {"undo",{P}}, + {"redo",{P}}, + {"begin_not_undoable_action",{P}}, + {"end_not_undoable_action",{P}}, + {"can_undo_changed",{P}}, + {"can_redo_changed",{P}}, +"GtkSourceUndoManager"}) +export constant GtkSourceUndoManager = length(widget) + +widget = append(widget, {"gtk_source_tag_style", +{GObject}, + {"new",{},P}, + {"copy",{P},P}, + {"free",{P}}, +"GtkSourceTagStyle"}) +export constant GtkSourceTagStyle = length(widget) + +widget = append(widget, {"gtk_source_style_scheme", +{GObject}, + {"get_id",{P},S}, + {"get_name",{P},S}, + {"get_description",{P},S}, + {"get_authors",{P},A}, + {"get_filename",{P},S}, + {"get_style",{P,S},P}, +"GtkSourceStyleScheme"}) +export constant GtkSourceStyleScheme = length(widget) + +widget = append(widget, {"gtk_source_language", +{GObject}, + {"get_id",{P},S}, + {"get_name",{P},S}, + {"get_section",{P},S}, + {"get_hidden",{P},B}, + {"get_tags",{P},P}, + {"get_tag_style",{P,S},P,0,GtkSourceTagStyle}, + {"set_tag_style",{P,S,P}}, + {"get_tag_default_style",{P,S},P,0,GtkSourceTagStyle}, + {"get_escape_char",{P},S}, + {"get_metadata",{P,S},S}, + {"get_mime_types",{P},-routine_id("get_mime_types")}, + {"set_mime_types",{P,A}}, + {"get_globs",{P},P}, + {"get_style_name",{P,S},S}, + {"get_style_scheme",{P},P,0,GtkSourceStyleScheme}, + {"set_style_scheme",{P,P}}, + {"get_style_ids",{P},A}, + {"get_style_name",{P,S},S}, + {"get_style_fallback",{P,S},S}, +"GtkSourceLanguage"}) +export constant GtkSourceLanguage = length(widget) + + function get_mime_types(atom sl) + object mimetypes = {} + atom x = gtk_func("gtk_source_language_get_mime_types",{P},{sl}) + while peek4u(x) > 0 do + mimetypes &= peek_string(peek4u(x)) & " " + x += 4 + end while + return mimetypes + end function + +export constant GtkSourceMarker = length(widget)+1 +widget = append(widget, {"gtk_source_marker", +{GObject}, + {"set_marker_type",{P,S}}, + {"get_marker_type",{P},S}, + {"get_line",{P},I}, + {"get_name",{P},S}, + {"get_buffer",{P},P}, + {"next",{P},P,0,GtkSourceMarker}, + {"prev",{P},P,0,GtkSourceMarker}, +"GtkSourceMarker"}) + +widget = append(widget, {"gtk_source_buffer", +{GObject,GtkTextBuffer,GObject}, + {"new",{P},P}, + {"new_with_language",{P},P}, + {"get_check_brackets",{P},B}, + {"set_check_brackets",{P,B}}, + {"set_bracket_match_style",{P,P}}, + {"get_highlight",{P},B}, + {"set_highlight",{P,B}}, + {"set_highlight_syntax",{P,B}}, + {"get_highlight_syntax",{P},B}, + {"set_language",{P,P}}, + {"get_language",{P},P,0,GtkSourceLanguage}, + {"get_escape_char",{P},S}, + {"set_escape_char",{P,S}}, + {"set_highlight_matching_brackets",{P,B}}, + {"get_highlight_matching_brackets",{P},B}, + {"set_style_scheme",{P,P}}, + {"get_style_scheme",{P},P,0,GtkSourceStyleScheme}, + {"ensure_highlight",{P,P,P}}, + {"undo",{P}}, + {"redo",{P}}, + {"can_undo",{P},B}, + {"can_redo",{P},B}, + {"begin_not_undoable_action",{P}}, + {"end_not_undoable_action",{P}}, + {"get_max_undo_levels",{P},I}, + {"set_max_undo_levels",{P,I}}, + {"get_undo_manager",{P},P,0,GtkSourceUndoManager}, + {"set_undo_manager",{P,P}}, + {"iter_has_context_class",{P,P,S},B}, + {"get_context_classes_at_iter",{P,P,P},P}, + {"iter_forward_to_context_class_toggle",{P,P,S},B}, + {"iter_backward_to_context_class_toggle",{P,P,S},B}, + {"create_marker",{P,S,S,P},P,0,GtkSourceMarker}, + {"create_source_mark",{P,S,S,P},P,0,GtkSourceMark}, + {"move_marker",{P,P,P}}, + {"delete_marker",{P,P}}, + {"get_marker",{P,S},P,0,GtkSourceMarker}, + {"get_markers_in_region",{P,P,P},A}, + {"get_first_marker",{P},P,0,GtkSourceMarker}, + {"get_last_marker",{P},P,0,GtkSourceMarker}, + {"get_iter_at_marker",{P,P,P}}, + {"get_next_marker",{P,P},P,0,GtkSourceMarker}, + {"get_prev_marker",{P,P},P,0,GtkSourceMarker}, + {"forward_iter_to_source_mark",{P,P,S},B}, + {"backward_iter_to_source_mark",{P,P,S},B}, + {"get_source_marks_at_line",{P,I,S},P,0,GSList}, + {"get_source_marks_at_iter",{P,P,S},P,0,GSList}, + {"remove_source_marks",{P,P,P,S}}, + {"change_case",{P,I,P,P}}, + {"join_lines",{P,P,P}}, + {"sort_lines",{P,P,P,I,I}}, + {"set_implicit_trailing_newline",{P,B}}, + {"get_implicit_trailing_newline",{P},B}, +"GtkSourceBuffer"}) +export constant GtkSourceBuffer = length(widget) + +widget = append(widget, {"gtk_source_gutter_renderer", +{GObject}, + {"begin",{P,P,P,P,P,P}}, + {"draw",{P,P,P,P,P,P,I}}, + {"end",{P}}, + {"get_size",{P},I}, + {"set_size",{P,I}}, + {"set_visible",{P,B}}, + {"get_visible",{P},B}, + {"get_padding",{P,I,I}}, + {"set_padding",{P,I,I}}, + {"get_alignment",{P,F,F}}, + {"set_alignment",{P,F,F}}, + {"set_alignment_mode",{P,I}}, + {"get_window_type",{P},I}, + {"get_view",{P},P,0,GtkTextView}, + {"get_alignment_mode",{P},I}, + {"get_background",{P,P},B}, + {"set_background",{P,P}}, + {"activate",{P,P,P,P}}, + {"query_activatable",{P,P,P,P},B}, + {"queue_draw",{P}}, + {"query_tooltip",{P,P,P,I,I,P},B}, + {"query_data",{P,I,I,I}}, +"GtkSourceGutterRenderer"}) +export constant GtkSourceGutterRenderer = length(widget) + +widget = append(widget, {"gtk_source_gutter", +{GObject}, + {"get_window",{},P,0,GtkWindow}, + {"insert",{P,P,I},B}, -- 3.0 + {"reorder",{P,P,I}}, + {"remove",{P,P}}, + {"queue_redraw",{P}}, + {"get_padding",{P,I,I}}, + {"set_padding",{P,I,I}}, + {"get_renderer_at_pos",{P,I,I},P,0,GtkSourceGutterRenderer}, +"GtkSourceGutter"}) +export constant GtkSourceGutter = length(widget) + +widget = append(widget, {"gtk_source_view", +{GtkTextView,GtkContainer,GtkWidget,GtkBuildable,GtkScrollable,GObject}, + {"new",{},P}, + {"get_buffer",{P},-routine_id("getSVBuffer"),0,GtkSourceBuffer}, + {"set_show_line_numbers",{P,B}}, + {"get_show_line_numbers",{P},B}, + {"set_show_right_margin",{P,B}}, + {"get_show_right_margin",{P},B}, + {"set_right_margin_position",{P,I}}, + {"get_right_margin_position",{P},I}, + {"set_highlight_current_line",{P,B}}, + {"get_highlight_current_line",{P},B}, + {"set_auto_indent",{P,B}}, + {"get_auto_indent",{P},B}, + {"set_indent_on_tab",{P,B}}, + {"get_indent_on_tab",{P},B}, + {"set_tab_width",{P,I}}, + {"get_tab_width",{P},I}, + {"set_indent_width",{P,I}}, + {"get_indent_width",{P},I}, + {"set_insert_spaces_instead_of_tabs",{P,B}}, + {"get_insert_spaces_instead_of_tabs",{P},B}, + {"indent_lines",{P,P,P}}, + {"unindent_lines",{P,P,P}}, + {"get_visual_column",{P,P},I}, + {"set_smart_home_end",{P,I}}, + {"get_smart_home_end",{P},I}, + {"set_mark_attributes",{P,S,P,I}}, + {"get_mark_attributes",{P,S,I},P}, + {"set_show_line_marks",{P,B}}, + {"get_show_line_marks",{P},B}, + {"set_draw_spaces",{P,I}}, + {"get_draw_spaces",{P},I}, + {"get_completion",{P},P}, + {"get_gutter",{P,I},P,0,GtkSourceGutter}, + {"set_background_pattern",{P,I}}, -- 3.16 + {"get_background_pattern",{P},I}, -- 3.16 + {"set_smart_backspace",{P,B}}, -- 3.18 + {"get_smart_backspace",{P},B}, -- 3.18 +"GtkSourceView"}) +export constant GtkSourceView = length(widget) + + function getSVBuffer(atom sv) + return gtk_func("gtk_text_view_get_buffer",{P},{sv}) + end function + +widget = append(widget, {"gtk_source_map", -- 3.18 +{GtkSourceView,GtkTextView,GtkContainer,GtkWidget,GObject}, + {"new",{},P}, + {"set_view",{P,P}}, + {"get_view",{P},P,0,GtkSourceView}, +"GtkSourceMap"}) +export constant GtkSourceMap = length(widget) + +widget = append(widget, {"gtk_source_language_manager", +{GObject}, + {"new",{},P}, + {"get_default",{},P}, + {"set_search_path",{P,P}}, + {"get_search_path",{P},P}, + {"get_language_ids",{P},V}, + {"get_language",{P,P},P,0,GtkSourceLanguage}, + {"guess_language",{P,P,P},P,0,GtkSourceLanguage}, +"GtkSourceLanguageManager"}) +export constant GtkSourceLanguageManager = length(widget) + +widget = append(widget, {"gtk_source_languages_manager", +{GObject}, + {"new",{},P}, + {"get_available_languages",{P},A}, + {"get_language_from_mime_type",{P,S},P,0,GtkSourceLanguage}, + {"get_lang_files_dirs",{P},A}, +"GtkSourceLanguagesManager"}) +export constant GtkSourceLanguagesManager = length(widget) + +widget = append(widget, {"gtk_source_print_job", -- doesn't currently work! +{GObject}, + {"new",{P},P}, + {"set_buffer",{P,P}}, + {"get_buffer",{P},P,0,GtkSourceBuffer}, + {"set_config",{P,P}}, + {"get_config",{P},P}, + {"setup_from_view",{P,P}}, + {"set_tabs_width",{P,I}}, + {"get_tabs_width",{P},I}, + {"set_wrap_mode",{P,I}}, + {"get_wrap_mode",{P},I}, + {"set_highlight",{P,B}}, + {"get_highlight",{P},B}, + {"set_font_desc",{P,P}}, + {"set_font",{P,S}}, + {"get_font_desc",{P},P,0,PangoFontDescription}, + {"get_font",{P},S}, + {"set_numbers_font_desc",{P,P}}, + {"set_numbers_font",{P,S}}, + {"get_numbers_font_desc",{P},P,0,PangoFontDescription}, + {"get_numbers_font",{P},S}, + {"set_print_numbers",{P,I}}, + {"get_print_numbers",{P},I}, + {"set_text_margins",{P,D,D,D,D}}, + {"get_text_margins",{P,D,D,D,D}}, + {"print",{P},P}, + {"print_range",{P,P,P},P}, + {"print_range_async",{P,P,P},B}, + {"cancel",{P}}, + {"get_print_job",{P},P}, + {"get_page",{P},I}, + {"get_page_count",{P},I}, + {"get_print_context",{P},P}, + {"set_print_header",{P,B}}, + {"get_print_header",{P},B}, + {"set_print_footer",{P,B}}, + {"get_print_footer",{P},B}, + {"set_header_footer_font_desc",{P,P}}, + {"set_header_footer_font",{P,S}}, + {"get_header_footer_font_desc",{P},P,0,PangoFontDescription}, + {"get_header_footer_font",{P},S}, + {"set_header_format",{P,S,S,S,B}}, + {"set_footer_format",{P,S,S,S,B}}, +"GtkSourcePrintJob"}) +export constant GtkSourcePrintJob = length(widget) + +widget = append(widget, {"gtk_source_style", +{GObject}, + {"new",{},P}, + {"copy",{P},P}, +"GtkSourceStyle"}) +export constant GtkSourceStyle = length(widget) + +widget = append(widget, {"gtk_source_tag_table", +{GObject}, + {"new",{},P}, + {"add_tags",{P,P}}, + {"remove_source_tags",{P}}, +"GtkSourceTagTable"}) +export constant GtkSourceTagTable = length(widget) + +widget = append(widget,{"gtk_source_completion_item", +{GObject}, + {"new",{S,S,P,S},P}, + {"new_with_markup",{S,S,P,S},P}, +"GtkSourceCompletionItem"}) +export constant GtkSourceCompletionItem = length(widget) + +widget = append(widget, {"gtk_source_completion_context", +{GObject}, + {"add_proposals",{P,P,P,B}}, + {"get_iter",{P,P},B}, + {"get_activation",{P},I}, +"GtkSourceCompletionContext"}) +export constant GtkSourceCompletionContext = length(widget) + +widget = append(widget, {"gtk_source_completion_info", +{GtkWindow,GtkBin,GtkContainer,GtkWidget,GObject}, + {"new",{},P}, + {"move_to_iter",{P,P,P}}, + {"set_widget",{P,P}}, + {"get_widget",{P},P,0,GtkWidget}, +"GtkSourceCompletionInfo"}) +export constant GtkSourceCompletionInfo = length(widget) + +widget = append(widget, {"gtk_source_completion_proposal", +{}, + {"get_label",{P},S}, + {"get_markup",{P},S}, + {"get_text",{P},S}, + {"get_icon",{P},P,0,GdkPixbuf}, + {"get_icon_name",{P},S}, + {"get_gicon",{P},P,0,GIcon}, + {"get_info",{P},S}, + {"changed",{P}}, + {"hash",{P},I}, + {"equal",{P,P},B}, +"GtkSourceCompletionProposal"}) +export constant GtkSourceCompletionProposal = length(widget) + +widget = append(widget, {"gtk_source_completion_provider", +{}, + {"get_name",{P},S}, + {"get_icon",{P},P,0,GdkPixbuf}, + {"get_icon_name",{P},S}, + {"get_gicon",{P},P,0,GIcon}, + {"populate",{P,P}}, + {"get_activation",{P},I}, + {"match",{P,P},B}, + {"get_info_widget",{P,P},P,0,GtkWidget}, + {"update_info",{P,P,P}}, + {"get_start_iter",{P,P,P,P},B}, + {"activate_proposal",{P,P,P},B}, + {"get_interactive_delay",{P},I}, + {"get_priority",{P},I}, +"GtkSourceCompletionProvider"}) +export constant GtkSourceCompletionProvider = length(widget) + +widget = append(widget, {"gtk_source_completion_words", +{GObject}, + {"new",{S,P},P}, + {"register",{P,P}}, + {"unregister",{P,P}}, +"GtkSourceCompletionWords"}) +export constant GtkSourceCompletionWords = length(widget) + +widget = append(widget, {"gtk_source_completion", +{GObject}, + {"add_provider",{P,P,X},B}, + {"remove_provider",{P,P,X},B}, + {"get_providers",{P},P,0,GList}, + {"show",{P,P,P},B}, + {"hide",{P}}, + {"get_info_window",{P},P,0,GtkSourceCompletionInfo}, + {"get_view",{P},P,0,GtkSourceView}, + {"create_context",{P,P},P,0,GtkSourceCompletionContext}, + {"move_window",{P,P}}, + {"block_interactive",{P}}, + {"unblock_interactive",{P}}, +"GtkSourceCompletion"}) +export constant GtkSourceCompletion = length(widget) + +export constant GtkSourceEncoding = length(widget)+1 +widget = append(widget, {"gtk_source_encoding", +{}, + {"get_utf8",{},P}, + {"get_current",{},P,0,GtkSourceEncoding}, + {"get_from_charset",{S},P,0,GtkSourceEncoding}, + {"to_string",{P},S}, + {"get_name",{P},S}, + {"get_charset",{P,S}}, + {"get_all",{},P,0,GSList}, + {"get_default_candidates",{},P,0,GSList}, + {"copy",{P},P,0,GtkSourceEncoding}, + {"free",{P}}, +"GtkSourceEncoding"}) + +widget = append(widget, {"gtk_source_file", +{GObject}, + {"new",{},P}, + {"get_location",{P},P,0,GFile}, + {"set_location",{P,P}}, + {"get_encoding",{P},P,0,GtkSourceEncoding}, + {"get_newline_type",{P},I}, + {"get_compression_type",{P},I}, + {"check_file_on_disk",{P}}, + {"is_local",{P},B}, + {"is_externally_modified",{P},B}, + {"is_deleted",{P},B}, + {"is_readonly",{P},B}, + {"set_mount_operation_factory",{P,P,P,P}}, +"GtkSourceFile"}) +export constant GtkSourceFile = length(widget) + +widget = append(widget, {"gtk_source_file_loader", +{GObject}, + {"new",{P,P},P}, + {"set_candidate_encodings",{P,P}}, + {"get_buffer",{P},P,0,GtkSourceBuffer}, + {"get_file",{P},P,0,GtkSourceFile}, + {"get_location",{P},P,0,GFile}, + {"get_input_stream",{P},P,0,GInputStream}, + {"load_async",{P,I,P,P,P,P,P,P}}, + {"load_finish",{P,P,X},B}, + {"get_encoding",{P},P,0,GtkSourceEncoding}, + {"get_newline_type",{P},I}, + {"get_compression_type",{P},I}, +"GtkSourceFileLoader"}) +export constant GtkSourceFileLoader = length(widget) + +widget = append(widget, {"gtk_source_file_saver", +{GObject}, + {"new",{P,P},P}, + {"get_buffer",{P},P,0,GtkSourceBuffer}, + {"get_file",{P},P,0,GtkSourceFile}, + {"get_location",{P},P,0,GFile}, + {"set_encoding",{P,P}}, + {"get_encoding",{P},P,0,GtkSourceEncoding}, + {"set_newline_type",{P,I}}, + {"get_newline_type",{P},I}, + {"set_compression_type",{P,I}}, + {"get_compression_type",{P},I}, + {"set_flags",{P,I}}, + {"get_flags",{P},I}, + {"save_async",{P,I,P,P,P,P,P,P}}, + {"save_finish",{P,P,X},B}, +"GtkSourceFileSaver"}) +export constant GtkSourceFileSaver = length(widget) + +widget = append(widget, {"gtk_source_gutter_renderer_pixbuf", +{GtkSourceGutterRenderer,GObject}, + {"new",{},P}, + {"set_pixbuf",{P,P}}, + {"get_pixbuf",{P},P,0,GdkPixbuf}, + {"set_stock_id",{P,S}}, + {"get_stock_id",{P},S}, + {"set_gicon",{P,P}}, + {"get_gicon",{P},P,0,GIcon}, + {"set_icon_name",{P,S}}, + {"get_icon_name",{P},S}, +"GtkSourceGutterRendererPixbuf"}) +export constant GtkSourceGutterRendererPixbuf = length(widget) + +widget = append(widget, {"gtk_source_gutter_renderer_text", +{GtkSourceGutterRenderer,GObject}, + {"new",{},P}, + {"set_markup",{P,S,I}}, + {"set_text",{P,S,I}}, + {"measure",{P,S,I,I}}, + {"measure_markup",{P,S,I,I}}, +"GtkSourceGutterRendererText"}) +export constant GtkSourceGutterRendererText = length(widget) + +widget = append(widget, {"gtk_source_mark_attributes", +{GObject}, + {"new",{},P}, + {"set_background",{P,P}}, + {"get_background",{P,P},B}, + {"set_stock_id",{P,S}}, + {"get_stock_id",{P},S}, + {"set_icon_name",{P,S}}, + {"get_icon_name",{P},S}, + {"set_gicon",{P,P}}, + {"get_gicon",{P},0,P,GIcon}, + {"set_pixbuf",{P,P}}, + {"get_pixbuf",{P},P,0,GdkPixbuf}, + {"render_icon",{P,P,I},P,0,GdkPixbuf}, + {"get_tooltip_text",{P,P},S}, + {"get_tooltip_markup",{P,P},S}, +"GtkSourceMarkAttriebutes"}) +export constant GtkSourceMarkAttributes = length(widget) + +widget = append(widget, {"gtk_source_print_compositor", +{GObject}, + {"new",{},P}, + {"new_from_view",{P},P}, + {"get_buffer",{P},P,0,GtkSourceBuffer}, + {"set_tab_width",{P,I}}, + {"get_tab_width",{P},I}, + {"set_wrap_mode",{P,I}}, + {"get_wrap_mode",{P},I}, + {"set_highlight_syntax",{P,B}}, + {"get_highlight_syntax",{P},B}, + {"set_print_line_numbers",{P,B}}, + {"get_print_line_numbers",{P},B}, + {"set_body_font_name",{P,S}}, + {"get_body_font_name",{P},S}, + {"set_line_numbers_font_name",{P,S}}, + {"get_line_numbers_font_name",{P},S}, + {"set_header_font_name",{P,S}}, + {"get_header_font_name",{P},S}, + {"set_footer_font_name",{P,S}}, + {"get_footer_font_name",{P},S}, + {"get_top_margin",{P,I},D}, + {"set_top_margin",{P,D,I}}, + {"get_bottom_margin",{P,I},D}, + {"set_bottom_margin",{P,D,I}}, + {"get_left_margin",{P,I},D}, + {"set_left_margin",{P,D,I}}, + {"get_right_margin",{P,I},D}, + {"set_right_margin",{P,D,I}}, + {"set_print_header",{P,B}}, + {"get_print_header",{P},B}, + {"set_print_footer",{P,B}}, + {"get_print_footer",{P},B}, + {"set_header_format",{P,B,S,S,S}}, + {"set_footer_format",{P,B,S,S,S}}, + {"get_n_pages",{P},I}, + {"paginate",{P,P},B}, + {"get_pagination_progress",{P},D}, + {"draw_page",{P,P,I}}, +"GtkSourcePrintCompositor"}) +export constant GtkSourcePrintCompositor = length(widget) + +widget = append(widget, {"gtk_source_search_settings", +{GObject}, + {"new",{},P}, + {"get_search_text",{P},S}, + {"set_search_text",{P,S}}, + {"get_case_sensitive",{P},B}, + {"set_case_sensitive",{P,B}}, + {"get_at_word_boundaries",{P},B}, + {"set_at_word_boundaries",{P,B}}, + {"get_wrap_around",{P},B}, + {"set_wrap_around",{P,B}}, + {"get_regex_enabled",{P},B}, + {"set_regex_enabled",{P,B}}, +"GtkSourceSearchSettings"}) +export constant GtkSourceSearchSettings = length(widget) + +widget = append(widget, {"gtk_source_search_context", +{GObject}, + {"new",{P,P},P}, + {"get_buffer",{P},P,0,GtkSourceBuffer}, + {"get_settings",{P},P,0,GtkSourceSearchSettings}, + {"set_settings",{P,P}}, + {"get_highlight",{P},B}, + {"set_highlight",{P,B}}, + {"get_match_style",{P},P,0,GtkSourceStyle}, + {"set_match_style",{P,P}}, + {"get_occurrences_count",{P},I}, + {"forward",{P,P,P,P},B}, + {"forward_async",{P,P,P,P,P}}, + {"forward_finish",{P,P,P,P,X},B}, + {"backward",{P,P,P,P},B}, + {"backward_async",{P,P,P,P,P}}, + {"backward_finish",{P,P,P,P,X},B}, + {"replace",{P,P,P,P,I,X},B}, + {"replace_all",{P,P,I,X},I}, + {"get_regex_error",{P},P}, +"GtkSourceSearchContext"}) +export constant GtkSourceSearchContext = length(widget) + +export constant fnGetSCPos = define_c_func(LIBSV, + "gtk_source_search_context_get_occurrence_position",{P,P,P},I) + +export function unescape_search_text(object txt) +return gtk_str_func("gtk_source_utils_unescape_search_text",{P}, +{allocate_string(txt,1)}) +end function + +export function escape_search_text(object txt) +return gtk_str_func("gtk_source_utils_escape_search_text",{P}, +{allocate_string(txt,1)}) +end function + +widget = append(widget, {"gtk_source_style_scheme_chooser_button", +{GtkButton,GtkBin,GtkContainer,GtkWidget,GObject}, + {"new",{},P,0,GtkWidget}, +"GtkSourceStyleSchemeChooserButton"}) +export constant GtkSourceStyleSchemeChooserButton = length(widget) + +widget = append(widget, {"gtk_source_style_scheme_chooser_widget", +{GtkBin,GtkContainer,GtkWidget,GObject}, + {"new",{},P,0,GtkWidget}, +"GtkStyleSchemeChooserWidget"}) +export constant GtkSourceStyleSchemeChooserWidget = length(widget) + +widget = append(widget, {"gtk_style_scheme_chooser", +{GtkWidget}, + {"get_style_scheme",{P},P,0,GtkSourceStyleScheme}, + {"set_style_scheme",{P,P}}, +"GtkStyleSchemeChooser"}) +export constant GtkStyleSchemeChooser = length(widget) + +widget = append(widget, {"gtk_style_scheme", +{GObject}, + {"get_id",{P},S}, + {"get_name",{P},S}, + {"get_description",{P},S}, + {"get_authors",{P},A}, + {"get_filename",{P},S}, + {"get_style",{P,S},P,0,GtkSourceStyle}, +"GtkStyleScheme"}) +export constant tkStyleScheme = length(widget) + +widget = append(widget, {"gtk_source_style_scheme_manager", +{GObject}, + {"new",{},P}, + {"get_default",{},P}, + {"set_search_path",{P,P}}, + {"append_search_path",{P,S}}, + {"prepend_search_path",{P,S}}, + {"get_search_path",{P},A}, + {"get_scheme_ids",{P},V}, + {"get_scheme",{P,P},P,0,GtkSourceStyleScheme}, + {"force_rescan",{P}}, +"GtkSourceStyleSchemeManager"}) +export constant GtkSourceStyleSchemeManager = length(widget) + +--------------------------------------------------------------------- + +export enum + GTK_SOURCE_DRAW_SPACES_SPACE = 1, + GTK_SOURCE_DRAW_SPACES_TAB=2, + GTK_SOURCE_DRAW_SPACES_NEWLINE=4, + GTK_SOURCE_DRAW_SPACES_NBSP = 8, + GTK_SOURCE_DRAW_SPACES_LEADING = 16, + GTK_SOURCE_DRAW_SPACES_TEXT = 32, + GTK_SOURCE_DRAW_SPACES_TRAILING = 64, + GTK_SOURCE_DRAW_SPACES_ALL=127, + SPACES = 1, -- shorthand for above; + TABS = 2, + NEWLINES = 4, + NBSP = 8, + LEADING = 16, + TEXT = 32, + TRAILING = 64, + + GTK_SOURCE_SMART_HOME_END_DISABLED = 0, + GTK_SOURCE_SMART_HOME_END_BEFORE, + GTK_SOURCE_SMART_HOME_END_AFTER, + GTK_SOURCE_SMART_HOME_END_ALWAYS, + DISABLED = 0, + BEFORE, + AFTER, + ALWAYS, + + GTK_SOURCE_VIEW_GUTTER_POSITION_LINES = 0, + GTK_SOURCE_VIEW_GUTTER_POSITION_MARKS, + LINES = 0, + MARKS, + + GTK_SOURCE_BACKGROUND_PATTERN_TYPE_NONE=0, + GTK_SOURCE_BACKGROUND_PATTERN_TYPE_GRID, + NONE = 0, + GRID, + + GTK_SOURCE_CHANGE_CASE_LOWER = 0, + GTK_SOURCE_CHANGE_CASE_UPPER, + GTK_SOURCE_CHANGE_CASE_TOGGLE, + GTK_SOURCE_CHANGE_CASE_TITLE, + + GTK_SOURCE_SORT_FLAGS_NONE = 0, + GTK_SOURCE_SORT_FLAGS_CASE_SENSITIVE, + GTK_SOURCE_SORT_FLAGS_REVERSE_ORDER, + GTK_SOURCE_SORT_FLAGS_REMOVE_DUPLICATES + + + diff --git a/eugtk/examples/GtkWebKit.plugin b/eugtk/examples/GtkWebKit.plugin new file mode 100644 index 0000000..7bdbbc7 --- /dev/null +++ b/eugtk/examples/GtkWebKit.plugin @@ -0,0 +1,498 @@ + +--------------- +namespace wk -- "Plug-in" for WebkitGTK +--------------- + +include GtkEngine.e + +----------------------------------------------------------------------- +-- A plug-in appends new widgets to the widget array, adding functions +-- from an additional library file without changing GtkEngine.e source. +-- This needed to be implemented as a plug-in because the webkit +-- library is separate from libgtk3. + +-- Many more functions remain to be added, including style selections, +-- printing options, etc. +----------------------------------------------------------------------- + +include GtkEngine.e + +export constant version = "4.12.0" + +if not equal(version,gtk:version) then + Error(,,"GtkWebKit version mismatch","should be version " & gtk:version) +end if + +ifdef WINDOWS then +export object wkdll = "libwebkit-3.0.dll" +elsedef +export object wkdll = walk_dir("/usr/lib/",routine_id("find_lib"),1) +end ifdef + +function find_lib(object path, object item) -- get the latest! +if match("libwebkit2gtk-3",item[D_NAME]) +or match("libwebkit2gtk-4",item[D_NAME]) then + return path & '/' & item[D_NAME] +end if +return 0 +end function + +atom LIBWK = open_dll(wkdll) + if LIBWK = 0 then + Error(,,"No libwebkit2gtk-3 found!", + "If you're sure you have one, set the library\nname at the top of GtkWebKit.plugin", + GTK_BUTTONS_OK) + crash("ERROR:\n****** No libwebkit2gtk-3 found!") + end if + +ifdef WK then display("WEBKIT:[]",{wkdll}) end ifdef + +LIBS = append(LIBS,LIBWK) + +export constant webkit_version = text:format("[].[].[]", + {gtk_func("webkit_get_major_version"), + gtk_func("webkit_get_minor_version"), + gtk_func("webkit_get_micro_version")}) + +widget = append(widget, {"webkit_uri_request", +{GObject}, + {"new",{S},P}, + {"get_http_headers",{P},S}, + {"get_type",{P},I}, + {"get_uri",{P},S}, + {"set_uri",{P,S}}, +"WebkitUriRequest"}) +export constant WebkitUriRequest = length(widget) + +widget = append(widget, {"webkit_back_forward_list_item", +{GObject}, + {"get_title",{P},S}, + {"get_uri",{P},S}, + {"get_original_uri",{P},S}, +"WebkitBackForwardListItem"}) +export constant WebkitBackForwardListItem = length(widget) + +widget = append(widget, {"webkit_back_forward_list", +{GObject}, + {"get_length",{P},I}, + {"get_current_item",{P},P,0,WebkitBackForwardListItem}, + {"get_back_item",{P},P,0,WebkitBackForwardListItem}, + {"get_forward_item",{P},P,0,WebkitBackForwardListItem}, + {"get_nth_item",{P,I},P,0,WebkitBackForwardListItem}, + {"get_back_list",{P},A,0,GList}, + {"get_back_list_with_limit",{P,I},P,0,GList}, + {"get_forward_list",{P},A,0,GList}, + {"get_forward_list_with_limit",{P,I},P,0,GList}, +"WebkitBackForwardList"}) +export constant WebkitBackForwardList = length(widget) + +widget = append(widget, {"webkit_uri_response", +{GObject}, + {"get_uri",{P},S}, + {"get_status_code",{P},I}, + {"get_content_length",{P},I}, + {"get_mime_type",{P},S}, + {"get_suggested_filename",{P},S}, + {"get_http_headers",{P},P},-- soup message headers; +"WebkitUriResponse"}) +export constant WebkitUriResponse = length(widget) + +widget = append(widget, {"webkit_web_page", +{GObject}, + {"get_dom_document",{P},P}, + {"get_id",{P},I}, + {"get_uri",{P},S}, + {"get_main_frame",{P},P}, + {"get_editor",{P},P}, +"WebkitWebPage"}) +export constant WebkitWebPage = length(widget) + +widget = append(widget, {"webkit_notification", +{GObject}, + {"get_id",{P},I}, + {"get_title",{P},S}, + {"get_body",{P},S}, + {"close",{P}}, +"WebkitNotification"}) +export constant WebkitNotification = length(widget) + +widget = append(widget, {"webkit_hit_test_result", +{GObject}, + {"get_context",{P},I}, + {"context_is_link",{P},B}, + {"context_is_image",{P},B}, + {"context_is_media",{P},B}, + {"context_is_editable",{P},B}, + {"context_is_selection",{P},B}, + {"get_link_uri",{P},S}, + {"get_link_title",{P},S}, + {"get_link_label",{P},S}, + {"get_image_uri",{P},S}, + {"get_media_uri",{P},S}, + {"context_is_scrollbar",{P},B}, +"WebkitHitTest"}) +export constant WebkitHitTest = length(widget) + +widget = append(widget, {"webkit_web_inspector", +{GObject}, + {"get_web_view",{P},P}, + {"get_inspected_uri",{P},S}, + {"get_can_attach",{P},B}, --? + {"is_attached",{P},B}, + {"attach",{P}}, + {"detach",{P}}, + {"show",{P}}, + {"close",{P}}, + {"get_attached_height",{P},I}, +"WebkitWebInspector"}) +export constant WebkitWebInspector = length(widget) + +widget = append(widget, {"webkit_web_context", +{GObject}, + {"get_default",{},P}, + {"clear_cache",{P}}, + {"download_uri",{P,S},P}, + {"get_cookie_manager",{P},P}, + {"get_security_manager",{P},P}, + {"get_spell_checking_enabled",{P},B}, + {"set_spell_checking_enabled",{P,B}}, + {"set_spell_checking_languages",{P,A}}, + {"set_preferred_languages",{P,A}}, + {"set_tls_errors_policy",{P,I}}, + {"get_tls_errors_policy",{P},I}, + {"allow_tls_certificate_for_host",{P,P,S}}, + {"set_web_extensions_directory",{P,S}}, + {"set_web_extensions_initialization_user_data",{P,P}}, + {"prefetch_dns",{P,S}}, + {"set_process_model",{P,P}}, + {"get_process_model",{P},P}, +"WebkitWebContext"}) +export constant WebkitWebContext = length(widget) + +widget = append(widget, {"webkit_context_menu_item", +{GObject}, + {"new",{P},-routine_id("newContextMenuItem")}, + {"get_action",{P},P}, + {"is_separator",{P},B}, + {"set_submenu",{P,P}}, + {"get_submenu",{P},P}, +"WebkitContextMenuItem"}) +export constant WebkitContextMenuItem = length(widget) + + function newContextMenuItem(atom act) + return gtk_func("webkit_context_menu_item_new_from_stock_action",{I},{act}) + end function + +widget = append(widget, {"webkit_context_menu", +{GObject}, + {"new",{},P}, + {"append",{P,P}}, + {"prepend",{P,P}}, + {"insert",{P,P,I}}, + {"move_item",{P,P,I}}, + {"get_items",{P},P,0,GList}, + {"get_n_items",{P},I}, + {"first",{P},P,0,WebkitContextMenuItem}, + {"last",{P},P,0,WebkitContextMenuItem}, + {"get_item_at_position",{P,I},P,0,WebkitContextMenuItem}, + {"remove",{P,P}}, + {"remove_all",{P}}, + {"set_user_data",{P,P}}, + {"get_user_data",{P},P}, +"WebkitContextMenu"}) +export constant WebkitContextMenu = length(widget) + +widget = append(widget, {"webkit_settings", +{GObject}, + {"new",{},P}, + {"get_auto_load_images",{P},B}, + {"set_auto_load_images",{P,B}}, + {"get_enable_frame_flattening",{P},B}, + {"set_enable_frame_flattening",{P,B}}, + {"get_enable_html5_database",{P},B}, + {"set_enable_html5_database",{P,B}}, + {"get_enable_html5_local_storage",{P},B}, + {"set_enable_html5_local_storage",{P,B}}, + {"get_enable_hyperlink_auditing",{P},B}, + {"set_enable_hyperlink_auditing",{P,B}}, + {"get_enable_java",{P},B}, + {"set_enable_java",{P,B}}, + {"get_enable_javascript",{P},B}, + {"set_enable_javascript",{P,B}}, + {"get_enable_offline_web_application_cache",{P},B}, + {"set_enable_offline_web_application_cache",{P,B}}, + {"get_enable_plugins",{P},B}, + {"set_enable_plugins",{P,B}}, + {"get_enable_xss_auditor",{P},B}, + {"set_enable_xss_auditor",{P,B}}, + {"get_javascript_can_open_windows_automatically",{P},B}, + {"set_javascript_can_open_windows_automatically",{P,B}}, + {"get_load_icons_ignoring_image_load_setting",{P},B}, + {"set_load_icons_ignoring_image_load_setting",{P,B}}, + {"get_default_font_family",{P},S}, + {"set_default_font_family",{P,S}}, + {"get_monospace_font_family",{P},S}, + {"set_monospace_font_family",{P,S}}, + {"get_serif_font_family",{P},S}, + {"set_serif_font_family",{P,S}}, + {"get_sans_serif_font_family",{P},S}, + {"set_sans_serif_font_family",{P,S}}, + {"get_cursive_font_family",{P},S}, + {"set_cursive_font_family",{P,S}}, + {"get_fantasy_font_family",{P},S}, + {"set_fantasy_font_family",{P,S}}, + {"get_pictograph_font_family",{P},S}, + {"set_pictograph_font_family",{P,S}}, + {"get_default_font_size",{P},I}, + {"set_default_font_size",{P,I}}, + {"get_default_monospace_font_size",{P},I}, + {"set_default_monospace_font_size",{P,I}}, + {"get_minimum_font_size",{P},I}, + {"set_minimum_font_size",{P,I}}, + {"get_default_charset",{P},S}, + {"set_default_charset",{P,S}}, + {"get_enable_page_cache",{P},B}, + {"set_enable_page_cache",{P,B}}, + {"get_enable_site_specific_quirks",{P},B}, + {"set_enable_site_specific_quirks",{P,B}}, + {"get_draw_compositing_indicators",{P},B}, + {"set_draw_compositing_indicators",{P,B}}, + {"get_enable_private_browsing",{P},B}, + {"set_enable_private_browsing",{P,B}}, + {"get_enable_developer_extras",{P},B}, + {"set_enable_developer_extras",{P,B}}, + {"get_enable_resizable_text_areas",{P},B}, + {"set_enable_resizable_text_areas",{P,B}}, + {"get_enable_tabs_to_links",{P},B}, + {"set_enable_tabs_to_links",{P,B}}, + {"get_enable_dns_prefetching",{P},B}, + {"set_enable_dns_prefetching",{P,B}}, + {"get_enable_caret_browsing",{P},B}, + {"set_enable_caret_browsing",{P,B}}, + {"get_enable_fullscreen",{P},B}, + {"set_enable_fullscreen",{P,B}}, + {"get_print_backgrounds",{P},B}, + {"set_print_backgrounds",{P,B}}, + {"get_enable_webaudio",{P},B}, + {"set_enable_webaudio",{P,B}}, + {"get_enable_webgl",{P},B}, + {"set_enable_webgl",{P,B}}, + {"get_allow_modal_dialogs",{P},B}, + {"set_allow_modal_dialogs",{P,B}}, + {"get_zoom_text_only",{P},B}, + {"set_zoom_text_only",{P,B}}, + {"get_user_agent",{P},S}, + {"set_user_agent",{P,S}}, + {"get_javascript_can_access_clipboard",{P},B}, + {"set_javascript_can_access_clipboard",{P,B}}, + {"set_enable_write_console_messages_to_stdout",{P,B}}, + {"get_enable_write_console_messages_to_stdout",{P},B}, + {"set_enable_developer_extras",{P,B}}, + {"get_enable_smooth_scrolling",{P},B}, + {"set_enable_smooth_scrolling",{P,B}}, + {"get_enable_accelerated_2d_canvas",{P},B}, + {"set_enable_accelerated_2d_canvas",{P,B}}, + {"get_enable_media_stream",{P},B}, + {"set_enable_media_stream",{P,B}}, + {"get_enable_spacial_navigation",{P},B}, + {"set_enable_spacial_navigation",{P,B}}, + {"get_enable_mediasource",{P},B}, + {"set_enable_mediasource",{P,B}}, + {"get_allow_file_access_from_file_urls",{P},B}, + {"set_allow_file_access_from_file_urls",{P,B}}, + {"get_media_playback_allows_inline",{P},B}, + {"set_media_playback_allows_inline",{P,B}}, + {"get_media_playback_requires_user_gesture",{P},B}, + {"set_media_playback_requires_user_gesture",{P,B}}, +"WebkitSettings"}) +export constant WebkitSettings = length(widget) + +widget = append(widget, {"webkit_window_properties", +{GObject}, + {"get_geometry",{P,P}}, + {"get_toolbar_visible",{P},B}, + {"get_statusbar_visible",{P},B}, + {"get_scrollbars_visible",{P},B}, + {"get_menubar_visible",{P},B}, + {"get_locationbar_visible",{P},B}, + {"get_resizable",{P},B}, + {"get_fullscreen",{P},B}, +"WebkitWindowProperties"}) +export constant WebkitWindowProperties = length(widget) + +widget = append(widget, {"webkit_uri_response", +{GObject}, + {"get_uri",{P},S}, + {"get_status_code",{P},I}, + {"get_content_length",{P},I}, + {"get_mime_type",{P},S}, + {"get_suggested_filename",{P},S}, + {"get_http_headers",{P},P}, -- SoupMessageHeaders; +"WebkitURIResponse"}) +export constant WebkitURIResponse = length(widget) + +widget = append(widget, {"webkit_web_resource", +{GObject}, + {"get_uri",{P},S}, + {"get_response",{P},P,0,WebkitURIResponse}, + {"get_data",{P,P,P,P}}, + {"get_data_finish",{P,P,P,P},S}, +"WebkitWebResource"}) +export constant WebkitWebResource = length(widget) + +widget = append(widget, {"webkit_find_controller", +{GObject}, + {"search",{P,S,I,I}}, + {"search_finish",{P}}, + {"search_next",{P}}, + {"search_previous",{P}}, + {"get_search_text",{P},S}, + {"count_matches",{P,S,I,I}}, + {"get_options",{P},I}, + {"get_match_count",{P},I}, + {"get_web_view",{P},P}, +"WebkitFindController"}) +export constant WebkitFindController = length(widget) + +export constant + WEBKIT_FIND_OPTIONS_NONE = 1, + WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE = 2, + WEBKIT_FIND_OPTIONS_AT_WORD_STARTS = 4, + WEBKIT_FIND_OPTIONS_TREAT_MEDIAL_CAPITAL_AS_WORD_START = 8, + WEBKIT_FIND_OPTIONS_BACKWARDS = 16, + WEBKIT_FIND_OPTIONS_WRAP_AROUND = 32 + +widget = append(widget, {"webkit_web_view", +{GtkContainer,GtkWidget,GObject}, + {"new",{},P}, + {"load_uri",{P,S}}, + {"load_html",{P,S,S}}, + {"load_plain_text",{P,S}}, + {"load_alternate_html",{P,S,S,S}}, + {"load_request",{P,P}}, + {"get_context",{P},P,0,WebkitWebContext}, + {"can_go_back",{P},B}, + {"go_back",{P}}, + {"can_go_forward",{P},B}, + {"go_forward",{P}}, + {"get_title",{P},S}, + {"get_page_id",{P},I}, + {"reload",{P}}, + {"reload_bypass_cache",{P}}, + {"stop_loading",{P}}, + {"is_loading",{P},B}, + {"is_playing_audio",{P},B}, + {"get_estimated_load_progress",{P},D}, + {"get_custom_charset",{P},S}, + {"set_custom_charset",{P,S}}, + {"get_back_forward_list",{P},P,0,WebkitBackForwardList}, + {"go_to_back_forward_list_item",{P,P}}, + {"get_uri",{P},S}, + {"get_favicon",{P},P}, + {"set_settings",{P,P}}, + {"get_settings",{P},P,0,WebkitSettings}, + {"get_window_properties",{P},P,0,WebkitWindowProperties}, + {"set_zoom_level",{P,D}}, + {"get_zoom_level",{P},D}, + {"get_inspector",{P},P,0,WebkitWebInspector}, + {"can_show_mime_type",{P,S},B}, + {"save",{P,I,P,P,P}}, + {"save_to_file",{P,P,P,P,P,P}}, + {"save_to_file_finish",{P,P,P},B}, + {"download_uri",{P,S},P}, + {"set_background_color",{P,P}}, -- ? + {"get_main_resource",{P},P,0,WebkitWebResource}, + {"execute_editing_command",{P,S}}, + {"get_find_controller",{P},P,0,WebkitFindController}, +"WebkitWebView"}) +export constant WebkitWebView = length(widget) + +widget = append(widget, {"webkit_download", --? +{GObject}, + {"new",{},P}, + {"get_request",{P},P,0,WebkitUriRequest}, + {"get_destination",{P},S}, + {"set_destination",{P,S}}, + {"get_response",{P},P,0,WebkitUriResponse}, + {"cancel",{P}}, + {"get_estimated_progress",{P},D}, + {"get_elapsed_time",{P},D}, + {"get_received_data_length",{P},I}, + {"get_web_view",{P},P,0,WebkitWebView}, + {"get_allow_overwrite",{P},B}, + {"set_allow_overwrite",{P,B}}, +"WebkitDownload"}) +export constant WebkitDownload = length(widget) + +widget = append(widget, {"webkit_print_operation", -- doesn't currently work. +{GObject}, + {"new",{},P}, +"WebkitPrintOperation"}) +export constant WebkitPrintOperation = length(widget) + +widget = append(widget, {"webkit_user_content_manager", +{GObject}, + {"new",{},P}, + {"add_style_sheet",{P,P}}, + {"remove_all_stylesheets",{P}}, + {"add_script",{P,P}}, + {"remove_all_scripts",{P}}, + {"register_script_message_handler",{P,S},B}, + {"unregister_script_message_handler",{P,S}}, +"WebkitUserContentManager"}) +export constant WebkitUserContentManager = length(widget) + +export enum + WEBKIT_LOAD_STARTED = 0, + WEBKIT_LOAD_REDIRECTED, + WEBKIT_LOAD_COMMITTED, + WEBKIT_LOAD_FINISHED, + +WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION = 0, +WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK, +WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW, +WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK, +WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD, +WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW, +WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK, +WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD, +WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD, +WEBKIT_CONTEXT_MENU_ACTION_OPEN_FRAME_IN_NEW_WINDOW, +WEBKIT_CONTEXT_MENU_ACTION_GO_BACK, --10 +WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD, +WEBKIT_CONTEXT_MENU_ACTION_STOP, +WEBKIT_CONTEXT_MENU_ACTION_RELOAD, +WEBKIT_CONTEXT_MENU_ACTION_COPY, +WEBKIT_CONTEXT_MENU_ACTION_CUT, +WEBKIT_CONTEXT_MENU_ACTION_PASTE, +WEBKIT_CONTEXT_MENU_ACTION_DELETE, +WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL, +WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS, +WEBKIT_CONTEXT_MENU_ACTION_UNICODE, --20 +WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS, +WEBKIT_CONTEXT_MENU_ACTION_NO_GUESSES_FOUND, +WEBKIT_CONTEXT_MENU_ACTION_IGNORE_SPELLING, +WEBKIT_CONTEXT_MENU_ACTION_LEARN_SPELLING, +WEBKIT_CONTEXT_MENU_ACTION_IGNORE_GRAMMAR, +WEBKIT_CONTEXT_MENU_ACTION_FONT_MENU, +WEBKIT_CONTEXT_MENU_ACTION_BOLD, +WEBKIT_CONTEXT_MENU_ACTION_ITALIC, +WEBKIT_CONTEXT_MENU_ACTION_UNDERLINE, +WEBKIT_CONTEXT_MENU_ACTION_OUTLINE, --30 +WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT, +WEBKIT_CONTEXT_MENU_ACTION_OPEN_VIDEO_IN_NEW_WINDOW, +WEBKIT_CONTEXT_MENU_ACTION_OPEN_AUDIO_IN_NEW_WINDOW, +WEBKIT_CONTEXT_MENU_ACTION_COPY_VIDEO_LINK_TO_CLIPBOARD, +WEBKIT_CONTEXT_MENU_ACTION_COPY_AUDIO_LINK_TO_CLIPBOARD, +WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS, +WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP, +WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN, +WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY, +WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PAUSE, +WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE, +WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_VIDEO_TO_DISK, +WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_AUDIO_TO_DISK, +WEBKIT_CONTEXT_MENU_ACTION_CUSTOM + + + diff --git a/eugtk/examples/browser.ex b/eugtk/examples/browser.ex new file mode 100644 index 0000000..6ee8212 --- /dev/null +++ b/eugtk/examples/browser.ex @@ -0,0 +1,118 @@ + +---------------------------------------------------------------------------------- +--# A simple file browser/runner; +---------------------------------------------------------------------------------- + +include GtkEngine.e +include std/sort.e +include std/datetime.e -- using this requires us to namespace gtk: functions + +chdir(login) + +constant win = create(GtkWindow,"size=750x550,border=10,sig.destroy=Quit") + gtk:set(win,"title","EuGTK Browser - " & login) + +constant panel = create(GtkBox,"orientation=VERTICAL") + gtk:add(win,panel) + +constant lbl = create(GtkLabel, + "markup='Use alt-f to search, <enter> or double-click to run!'") + gtk:add(panel,lbl) + +constant store = create(GtkListStore,{gSTR,gSTR,gINT,gSTR,gINT,gSTR}) + +constant tv = create(GtkTreeView,{ + {"model",store}, + {"reorderable",TRUE}, + {"headers clickable",TRUE}, + {"set grid lines",GTK_TREE_VIEW_GRID_LINES_BOTH}, + {"rules hint",TRUE}}) + +constant cols = { -- below is a new way to define cols and renderers in 1 line; + create(GtkColumn,"title=Name,type=text,text=1,sort_column_id=2"), --[1] + create(GtkColumn,"title=Size,type=text,text=3,sort_column_id=3"), + create(GtkColumn,"title=Date,type=text,text=4,sort_column_id=5"), --[2] + create(GtkColumn,"title=Description,type=text,markup=6,sort_column_id=6") +} +--[1] filename in col[1] is sorted by number in col[2] +--[2] date shown in col[4] is sorted on unix date in col[5] + +gtk:add(tv,cols) + +constant selection = gtk:get(tv,"selection") + set(selection,"mode",GTK_SELECTION_MULTIPLE) + +constant scroller = create(GtkScrolledWindow) + pack(panel,scroller,TRUE,TRUE,10) + gtk:add(scroller,tv) + +constant box = create(GtkButtonBox) + pack_end(panel,box) + +constant btn = create(GtkButton,"gtk-quit","Quit") + gtk:add(box,btn) + +-- load file list; +object files = dir("*.ex") + +-- convert dates to usable format; +files = apply(files,routine_id("convert_date")) +files = apply(files,routine_id("convert_filename")) + +-- load files into listview; +gtk:set(store,"data",files) + +-- set up handlers; +gtk:set(tv,"rules hint",TRUE) +gtk:set(tv,"columns autosize") +gtk:set(tv,"search column",6) +gtk:set(tv,"search equal func",_("search_func")) +connect(tv,"row-activated","show_choice") +gtk:set(store,"sort column id",2,GTK_SORT_ASCENDING) -- default startup sort; + +-- run the program! +show_all(win) +main() + +------------------------------------------------ +function convert_filename(object f, object junk) -- allow 'natural' sort order; +------------------------------------------------ +object tmp = io:read_lines(f[1]) +for i = 1 to length(tmp) do + if match("--#",tmp[i]) =1 then + f[6] = tmp[i][5..$] + end if + end for +f[1] = filebase(f[1]) -- drop extension, build index of #s; +object x = filter(f[1],"out",{'0','9'},"[]") +object n = filter(f[1],"in",{'0','9'},"[]") +f[2] = x & pad_head(n,10,'0') +return f +end function + +----------------------------------------- +function convert_date(object a, object b) -- convert dates to unix for sorting; +----------------------------------------- +object dt = datetime:new(a[4],a[5],a[6]) -- convert eu dir() date to datetime; + a[5] = to_unix(dt) -- store as UNIX timestamp for sorting purposes; + a[4] = datetime:format(dt,"%b %d %Y") -- store human-readable date for display; + a[6] = "?" +return a +end function + +------------------------------------------------------------------------------- +function search_func(atom mdl, integer col, object key, atom iter, object data) +------------------------------------------------------------------------------- +key = lower(peek_string(key)) -- key is passed as pointer to string +data = get(mdl,"value",iter,6) -- value from col 6 of liststore (description) +return not match(key,lower(data)) -- find word anywhere in description, 0 = found +end function + +------------------------------ +global function show_choice() +------------------------------ +integer row = gtk:get(selection,"selected row") +object f = gtk:get(store,"col data",row,1) +system(sprintf("eui %s &",{f}),0) -- run it; +return 1 +end function diff --git a/eugtk/examples/documentation/.httpd.css b/eugtk/examples/documentation/.httpd.css new file mode 100644 index 0000000..33137b6 --- /dev/null +++ b/eugtk/examples/documentation/.httpd.css @@ -0,0 +1,11 @@ +/* +-- ==================================================================== +-- Styling for the remote display is set here; +-- ==================================================================== +*/ + +button {width: 100%;} +button.dir {background-color: skyblue;} +button.html {background-color: orange;} + +body {background-image: linear-gradient(180deg, yellow, blue); background-repeat: no-repeat;) diff --git a/eugtk/examples/documentation/Broadway b/eugtk/examples/documentation/Broadway new file mode 100644 index 0000000..5689166 --- /dev/null +++ b/eugtk/examples/documentation/Broadway @@ -0,0 +1,41 @@ + +launchpad.net GTK+3 with the Broadway (HTML5) backend : Nicolas Delvaux + +This is a rebuild of the GTK+3 Ubuntu 12.04, 12.10, 13.04, 13.10, 14.04 and 14.10 packages with an enabled Broadway backend. +Note that this PPA is no longer necessary starting from Ubuntu 15.04, as the Broadway backend is now enabled by default. The main difference with this PPA is that the "broadwayd" binary is shipped in the "libgtk-3-bin" package when it was in a separated "broadwayd" package in the PPA. + +ADDING THIS PPA TO YOUR SYSTEM + ============================== +Run these commands in a terminal: +sudo add-apt-repository ppa:malizor/gtk-broadway + sudo apt-get update + sudo apt-get upgrade + sudo apt-get install broadwayd # For Ubuntu >= 13.10 + +HOWTO SINCE SAUCY (gtk+ >= 3.8) +=============================== +As an example, here is how to run gedit in your browser. + +In a terminal, run: + broadwayd + +In another terminal, run: + GDK_BACKEND=broadway UBUNTU_MENUPROXY= LIBOVERLAY_SCROLLBAR=0 eui test0.ex + +Finally, open you Web browser and go to http://localhost:8080/ +The "UBUNTU_MENUPROXY= LIBOVERLAY_SCROLLBAR=0" is only useful if you use the global-menu and/or overlay-scrollbars. You have to disable them for Broadway, otherwise the program will segfault. +Please see the "broadwayd" manpage for more information. + +HOWTO BEFORE SAUCY (gtk+ < 3.8) + =============================== +As an example, here is how to run gedit in your browser. +In a terminal, run: + GDK_BACKEND=broadway UBUNTU_MENUPROXY= LIBOVERLAY_SCROLLBAR=0 gedit +Finally, open you Web browser and go to http://localhost:8080/ +The "UBUNTU_MENUPROXY= LIBOVERLAY_SCROLLBAR=0" is only useful if you use the global-menu and/or overlay-scrollbars. You have to disable them for Broadway, otherwise the program will segfault. +You can customize the port by setting the BROADWAY_DISPLAY variable. + +DISCLAIMER + ========== +I provide this PPA in the hope that it will be useful and I will try to upload new versions whenever the Ubuntu package is updated. + However, I do NOT guarantee that this PPA will always be stable and up-to-date nor that packages it contains may not destroy your computer, cause the end of the world and kill kittens. AaCharis SIL CompactAaClear Sans AAAAA DarkLightAuto diff --git a/eugtk/examples/documentation/Glade.html b/eugtk/examples/documentation/Glade.html new file mode 100644 index 0000000..5e86e6e --- /dev/null +++ b/eugtk/examples/documentation/Glade.html @@ -0,0 +1,418 @@ + + + + + + + EuGTK and Glade + + + + + + + + GTK LOGO + mongoose +
+ glade +
+  Calendar program being edited in Glade +
+
+


EuGTK 4.11.11 and Glade

+

Drag and Drop interface construction

+
+ + + + + +


Overview

+ +

+It is now possible to use Glade to design your EuGTK +program interface. I've tested with Glade versions 3.16 and 3.18. +You will still have to write snippets of code in Euphoria to handle +user events - just as you would when using Visual Basic™, Delphi™, etc. +

+ +

Begin by reading Starting Glade I and II for an +introduction, thenread the rest of this page for details. +

+ +

+Glade has a preview button so that you can see, to a limited extent, what your program +will look like. Controls won't be linked (can't respond to user interaction) until you +load the glade XML into your Euphoria program and provide the 'handler' functions. +Often, these handler functions will only require a few lines of code. +

+ +

+EuGTK will try to help you with this task by supplying a ready-made template +for undeclared functions, which you copy and paste into your Euphoria code using whatever +text exitor you prefer. +

+ +

This template will appear on the terminal from which you run your +program. See the screenshot below. +

+ +

You must run programs from a terminal (x-term, for example) while +developing and testing. There's no way around this. +

+ +

+Your program begins as usual:
+template + +

 include GtkEngine.e
+ +

+ +

+Next, you tell EuGTK's built-in builder object +to load your program's XML description from the file created by Glade. The builder will +try to connect any signals for which you have declared a handler +(in the Glade Properties/Signals tabs). Finally, you call main() to start the GTK +processing loop. +

+include GtkEngine.e
+add(builder,"~/demos/examples/widgets.glade")
+main()
+

+ +

With just those three lines of code, you are now ready to run your program!

+Of course, it won't do anything, except perhaps spit out a message telling you that +you haven't bothered to write handlers for events declared in Glade. +

+ +

+You should run the program (preferably from WEE with terminal, the BEAR, Geany using + gneui.ex, or directly from an x-term). +EuGTK will prompt you with an error message and hopefully a function template for the +missing function. +You can copy and paste that into your editor, and then fill in the body of the function. +Put these functions after the call to main(). +

+ +
+hint +

+Note that when using Glade, your Euphoria code may use string identifiers to refer to +objects, rather than having to obtain a pointer (a.k.a. 'handle') to them first. +

+ +

+Glade will assign a unique identifier for widgets (which it calls the ID:). +The ID will be something like 'checkbutton1', 'checkbutton2', 'radiobutton1', etc. +

+ +

This ID property is found on the General tab of the Properties dialog. +You may change the IDs if you wish, sometimes changing them can make your code clearer. +

+ +

+Obviously, you should avoid naming two controls with the same name. +

+ +

+If you are using multiple Glade files, you will almost certainly have more than +one 'button1', etc. but this isn't a problem, because a namespace will be prepended. +See namespaces below. +

+
+ +
+ + + +


Namespaces

+

When writing a large program with multiple windows, Glade can become difficult to +navigate safely. Click on the wrong thing in Glade, and you may lose all your work. +This isn't good, so you should try to break up your program into small, safe 'modules', +each with it's own Euphoria include (.e) file and corresponding Glade (.glade) file. +

+ +

+Let's say, for example, I'm going to need a 'main' window, a pop-up 'edit' window, and +the usual "About..." dialog. +I'd create three Glade files, one named main.glade, the second edit.glade, and the third +about.glade. +After laying out these three windows using Glade, it's very likely that Glade will +have used identical names for controls in the files. 'button1', for example, might appear +in all three. You could, if you wish, wade thru all your Glade files and rename these as +necessary to prevent conflicts, but +EuGTK version 4.8.9 and up offers a less labor-intensive way. +

+ +

+EuGTK namespacing allows you to refer to these controls by name in a manner familiar to +Euphoria programmers:
+"button1" (the button1 in main.ex); "edit:button1" and "about:button1" +(buttons in the respective edit.e and about.e files).
+

	set("edit:window1","background","blue")
+
+Note that these are strings. If you wish to convert them to Euphoria objects, you can, +starting with EuGTK 4.8.9, use the new pointer() function: +
	constant win1 = pointer("edit:window1")
+
+Other files can now access the edit.e window in the normal Euphoria way: +
	set(win1,"background",...)
+

+ +

There seems to be no noticeable delay when accessing controls via the string names. +In a test which read and set label text using the constant 'handle' to the label, 20,000 + iterations per second were reported. +When using the label's name in string form, 18,900 per second were reported.

+ +
+hint +

+When using the string form, the namespace prefix will be the same as the Glade file name +(sans the .glade part) which the include file loaded into the GTK builder.

+When exported as a Eu constant or variable, the namespace prefix will be whatever +namespace the included .e file declares. To prevent confusion, it's probably best to use +identical names. IOW, code in 'foo.e' would have the namespace foo. +

+
+ +

+To keep things neatly organized, you should put your Eu code in separate files as well: +main.ex, edit.e, and about.e. +

+ +

+Your Eu file main.ex would then include the line: +

	add(builder,"main.glade")
+

+ +

And your edit.e include file would have the lines: +

+namespace edit
+include GtkEngine.e
+add(builder,"edit.glade")
+
+

+ +

+ + +To examine the namespaced names as loaded by EuGTK, add the line + with define BUILDER +to your main program prior to including GtkEngine.e, +or add -d BUILDER to the command-line. +The namespaced names will be shown on the xterm when you run your program. (as shown above) +

+ +

+Glade objects loaded by the main (.ex) program will not be namespaced. +Those items can be addressed directly without a namespace qualifier. +This is done so that small programs which don't need multiple Glade 'includes' can +use code that isn't cluttered with unnecessary namespacery.

+ +
+ +

Widget names

+Confusingly, Glade also has a Widget name: property, found under the Common tab, +which you should avoid using except under special circumstances. It isn't normally + needed. EuGTK refers to widgets created by Glade by their ID:, e.g. the main window + of a program created by Glade would have the default ID of "window1", and your EuGTK + program would access that window as "window1". +

+ +

+There are a few 'trick' uses for this Widget name property, however:
+

One possible use is to pass data to functions which handle more than one control. +For example, you might have a set of radio buttons which all call a single handler +function. That function could examine the control's 'name' to determine what to do. +If, for example, the buttons select various colors, each button could have a different +color as the name property: 'red', 'green', or 'blue', etc. +

+ +

A more complex use might be to pass function names to a central 'dispatch' function, +which could then call the desired function by converting the 'name' into a routine_id. +

+ +

+Some of the demos in the glade subfolder utilize these tricks. See, for example, the +hello.* files: hello.ex, es.e, +etc... +

+ +
+

Cautions

+The XML file created by Glade may include a "requires..." line, demanding a certain GTK +version be present. You may find it helpful to remove that line under certain conditions, +for example when designing your program on Linux with a current version of GTK/Glade, +but running it on Windows™, which lags behind the other platforms. +Just use a plain-text editor to zap the offending line. +

+ + + +


Common Problems

+

+

    +
  1. I run my program without errors but can't see anything!
    + + You must click on the 'visible' property checkbox for your main window. + This is found on the 'Common' tab under 'Widget Flags'.
    + Oh, and while you're there,
    be sure to link the main window's destroy + signal to the built-in function Quit, so that your program will clean up after itself when finished! + You must do these two things for the main window of every program you write. +
  2. + +
  3. I put buttons in a dialog, such as FileChooserDialog, but they don't do anything!
    + Set a unique 'Response ID' for each button. + This is found on the 'General' tab under 'Button Attributes'.
    + This ID is returned when the dialog closes as a result of a button being clicked. +
    +
  4. + +
  5. How do I make menu items work like check menu items or radio menu items?
    + + I don't know how to do that using Glade. + You'll have to write code in Euphoria, or <gasp!> try to edit the .glade xml directly. + +
  6. + +
  7. I want to use widget x, but can't find it on the Glade palette
    + + Some things are hard to find, and some just aren't there. + New GTK widgets introduced since GTK 3.10 are partially missing. + If you're working on the 'bleeding edge' of GTK3, you probably should be + coding by hand. + +
  8. + +
  9. How do I know how to name the function that responds to a signal?
    + + If you click on the widget's Signals tab, you'll see a list of signals that can be linked.
    + For example, a button has a 'clicked' signal. + You then click on the <type here> space adjacent to the signal name, and press the 'o' key.
    + (That's the letter o, not a zero!)
    + When you do, a suggested function handler name will be plugged in. + You can, of course, type in any global function name you prefer here. + For example, the handler name for a Quit or Exit button should usually be Quit + (no quotes)
    This will call EuGTK's built-in Quit() function when the button is clicked. +
    +
  10. + +
  11. I want to write one Eu function to handle multiple controls.
    + + Instead of accepting the default handler name, supply your own + For example, if you have 3 buttons, Glade will supply handler names: +
    • on_button1_clicked
    • on_button2_clicked
    • on_button3_clicked
    + You simply remove the 1,2,and 3 from the handler names, and name your Eu function + on_button_clicked. All 3 buttons will call that function. + It's then your job to sort them out. +
    +
  12. + +
+ +

+ +
+


Compiling, Binding, etc...

+

+As usual, you can compile, bind, or shroud your program. If you do any of these, your program +will still load the GUI description from the Glade XML file at run-time. This could be either good or bad, depending upon your perspective. +

+ +

+The benefits: +

    +
  • The GUI appearance can be adjusted without messing with the program logic
  • +
+

+ +

+The drawbacks: +

    +
  • Anyone can easily trash your nice program by changing names or removing controls in the .glade file. +
  • +
  • The .glade file must be distributed along with the .ex file +
  • +
+

+ +
+hint +

+Knowing the way some users think...
+It's almost certain that someone will see that Glade™* file,
+think "I don't care about air fresheners.." and delete it. +

+* brand name for a common type of room deodorizer in the U.S. +

+ +
+ +

+One easy solution to this problem is to copy the glade XML, paste it into a new file, +enclose it in triple quotes, and assign it to an exported constant. Below, the added code is in red, while the XML from Glade is shown in black: +

  export constant XML = """
+    <?xml version="1.0" encoding="UTF-8"?>
+    <!-- Generated with glade 3.16.1 -->
+    <interface>
+    <requires lib="gtk+" version="3.10"/>
+    ---etc---
+  """
+

+

+ +Save this new file as an include, perhaps widgets.xml, with the widgets namespace, and then your code becomes: +

+    include GtkEngine.e
+    include widgets.xml
+    add(builder,widgets:XML) -- EuGTK can add objects from either a string variable or a filename
+    main()
+
+

+ +

+Now you can bind or compile your program and the interface will be 'hard coded' into it. Changing or deleting +the widgets.xml or widgets.glade files will make no difference. No changes to your program interface can be made +without re-compiling or re-binding. +

+ +
+ + + diff --git a/eugtk/examples/documentation/HowItWorks.html b/eugtk/examples/documentation/HowItWorks.html new file mode 100644 index 0000000..672094e --- /dev/null +++ b/eugtk/examples/documentation/HowItWorks.html @@ -0,0 +1,1195 @@ + + + + + + How EuGTK Works + + + + + + + mongoose + gtk logo align= + gnome-run + +


How EuGTK Works

+
+ + + +


Overview:

+
+ +
+ +From the GTK docs: + +

+"A GTK+ user interface is constructed by nesting widgets inside widgets. +Container widgets are the inner nodes in the resulting tree of widgets: +they contain other widgets. So, for example, you might have a GtkWindow +containing a GtkFrame containing a GtkLabel. If you wanted an image instead +of a textual label inside the frame, you might replace the GtkLabel widget +with a GtkImage widget. +

+ +

+There are two major kinds of container widgets in GTK+. Both are subclasses of +the abstract GtkContainer base class. +The first type of container widget has a single child widget and derives from +GtkBin. These containers are decorators, which add some kind of functionality +to the child. For example, a GtkButton makes its child into a clickable button; + a GtkFrame draws a frame around its child and a GtkWindow places its child + widget inside a top-level window. +

+ +

+The second type of container can have more than one child; its purpose is to +manage layout. This means that these containers assign sizes and positions to +their children. For example, a GtkBox arranges its children in a horizontal +[or vertical] row, and a GtkGrid arranges the widgets it contains in a +two-dimensional grid." +

+ +
+ + +

+To reiterate the last point: GTK does not expect the programmer to specify +position and size of each widget as is required when programming for Windows™. +GTK handles these things automatically, adjusting things 'on-the-fly', as the user resizes +windows, changes fonts, etc... which makes your programs more user-friendly. +

+ +
+
+ +Quote: + +

+"Note the inherent danger of setting any fixed size - themes, translations into other languages, +different fonts, and user action can all change the appropriate size for a given widget. +So, it's basically impossible to hardcode a size that will always be correct. +" +

+ +
+
+ +

+If you are accustomed to writing programs for Windows™, you'll wonder why there's not +a complex IDE to help lay out your GTK program interface. The answer is: because it's not necessary! +You don't need to specify sizes and positions for GTK controls, GTK takes care of that task for you. +Your main job will be writing Euphoria functions, for which a plain old text editor works +just fine! You do have the option to use Glade to design your program interface if you wish. +See Glade.html. +

+ + +


Keywords

+

EuGTK allows you to program in an object-oriented style.

+

+There are only a handful of new keywords to know. You can create nice-looking, functional +programs with only the six shown here: +

    +
  • create +
    declare a new instance of a given GTK object
    +
  • + +
  • set +
    modify a property of an object
    +
  • + +
  • get +
    retrieve a property of an object
    +
  • + +
  • connect +
    instructs an instance to respond to an event (a.k.a. signal)
    +
  • + +
  • show_all +
    make a container and all objects contained therein visible
    +
  • + +
  • main +
    start the GTK main event loop, waiting for user input
    +
  • +
+

+ +

+You'll find a more complete list of keywords in functions.html +

+ + +


Create

+ +

+New instances of EuGTK containers and controls (collectively called 'widgets' in GTK) +are created by calling the create() function with a class name. +These class names are enumerated in GtkEnums.e, +and they are the same as those used by the GTK +docs. These class names are the ONLY ones you can send to +the create() function. Never try numbers or strings. No quotes. Spelling counts! +

+ +

+The create() function returns a 'handle' (a.k.a. pointer) to the newly created +instance. +That handle can (and usually should) be saved in a Euphoria constant for later access: +

+    constant win = create(GtkWindow) -- generally, a constant is best, because you won't be changing these;
+
+Parameters, if any, which follow the class name vary, and are often optional. +Refer to the demo programs and the GTK docs for details. Also, explore the new, more compact syntax options for the create() function here, as well as variants, below. +

+ +

+GtkEngine.e maintains a list of currently created GTK containers and controls, and directs calls from your Euphoria program to the appropriate +'method' based on the type of widget and whether the call is to +set or to get one of that widget's properties. +

+ + +


Properties

+ +

+Every GTK widget has a list of properties which can be written to +or read from. For example, a window has a title, a border width, +a default size, etc. +

+ +

+Widgets which display information or accept input from users have properties such as +text for labels and text entries, value for numeric widgets, and active +for widgets such as checkboxes. +

+ +

+To find out what properties exist for a given widget, refer +to the GTK docs. Remember that widgets inherit properties from ancestor widgets, so if +you don't find a property for a given widget, follow the Object Hierarchy links in the GTK docs. +As an example, you can select the font, background or text color for a window, +but these properties are actually implemented by GtkWindow's ancestor the GtkWidget, +whereas border width is actually implemented by the GtkWindow's ancestor GtkContainer. +But you don't need to be concerned about this, all you need do is tell the window what to do, and it - or its parents or grandparents - will see that it gets done.

+

+ +

+EuGTK takes care of finding these ancestor properties for you, but if you don't +read the GTK docs, you won't be aware that these properties are available! +In many cases you can just use common sense: for example, if it seems reasonable that a window +should be able to have a blue background, just try it: set(win,"background","blue"). +If you try something that isn't possible, such as setting a window's text, for example, +you will get an error message on your terminal such as: +
+

+object class 'GtkWindow' has no property named 'text' +
+

+ +
+hint +

Remember, when writing your EuGTK programs, you must run them from a terminal, +in order to see warnings such as the one above!

+
+ + +


Set

+

+The set() function takes a 'handle' to a control, plus a 'property' to +be set. Handle is almost always an atom (as assigned by the create() function), +except when you are using Glade to design your interfaces, when you often use the name of the control in string form, e.g. "button1" +or "help:window". +

+ +

+'property' is always a string! Following those are one or more parameters. The type and number of +parameters requred must be determined by looking at the GTK documentation +and the sample programs included here. + +Some examples: +

+    set(win,"title","My Program")
+    set(win,"border_width",10)
+    set(win,"default_size",300,200)
+    set("help:window","Title","Using EuGTK") -- using widget name
+     -- the window directly above is created in an include file 
+     -- which has the namespace "help"
+
+

+ +
+hint +

+Note that you can use widget names to refer to controls, rather than handles, +if you give the control its own individual name. +
(When using Glade, a name will be assigned automatically.) +

+
+ +

+For example: win = create(GtkWindow,"name=Main Window,size=400x300") +

In the above line, you have named this window, and so can refer to it as +"Main Window" in future set() or get() calls. Sometimes this can come in handy, +resulting in more-readable code. +

+ +

+If you supply too many parameters, like: +

+    set(win,"title","My Program", "well isn't that swell?",1,2,3)
+
+That won't usually cause any problem; the excess parameters are just discarded. +You'll get an error message if you get carried away and try to send more than 10. +

+ +

+Too few parameters will usually cause problems, if not crashes, because unfilled values +default to zero: +

+    set(win,"default_size")
+
+This will set the window size to 0x0 pixels, i.e: nothing, which will make it +kinda hard to see! No error message can help in this case, since such a +setting could - for some strange reason - be intentional. +

+ +

+Mismatched parameter types - sending a string where an atom or integer is expected, or vice-versa - +will usually give an error message, but +sometimes a crash (segfault) is unavoidable. Again, read the GTK docs! +

+ + +


Get

+

+The get() function takes a 'handle' to the control, plus a 'property' to +be looked up. Handle is always an atom, except when using Glade to design your +interface, in which case it is sometimes a string. And 'property' is always a string! +Some examples: +

+    get(win,"title")  -- returns a string if a title was set, 0 otherwise 
+    get(win,"border_width") -- returns an integer (pixels), 0 if unset
+    get(win,"default_size") -- returns a sequence {x,y} e.g: {300,200} or {-1,-1} if unset
+    get("prefs:spinbutton1","value")  -- returns an atom or integer
+
+Sending the wrong number of parameters to the get() function will +very likely cause problems! Sometimes a machine-level exception (signal 11). +Fortunately, this is easy to avoid, as there normally AREN'T ANY +parameters to 'get', other than the handle and the property name. +

+ + +


Conveniences

+

+A few very frequently-used functions have simpler 'shorthand' ways to call them: + + + + + + + + + + + + + + + + + + + + + +
FunctionParametersShorthandParameters
 set(x,"add",z)  + For functions on the left,

 x
and z must be atoms
+  (widget handles) 
+  or widget names as strings
 add(x,z)* For shorthand notation,

+  x
must be an atom 
 (a widget handle)
or a widget name as a string
+
 * z can be a handle
 or a {list} of handles
 set(x,"show") show(z)* 
 set(x,"show_all") show_all(z) 
 set(x,"hide") hide(z)*
 set(x,"hide all") hide_all(z)
+

+ +

+These shortcut methods not only save a bit of typing, but more importantly, allow you to send {lists} of items, rather +than calling the routine over and over, once for each item. {lists} are simply sequences of one or more +handles to widgets. For example: +

+	add(panel,{img1,btn1,btn2,btn3})
+	-- or
+	add(panel,x)  -- where x can be a {list} of handles to any number of objects, of mixed types (don't all have to be buttons!)')
+	-- or
+	add(panel,x[1..5]) -- you can send slices as well
+
+

+ +

+GTK provides two 'pack' methods: pack_start and pack_end, which are identical except for direction. +The original calls are still there, but for added convenience, I've also provided pack, which uses the - (neg.) sign to indicate pack at end. This may be helpful when packing several items in one call. +

+	pack(panel,btn1) -- pack_start (top to bottom for vert. containers, left to right for horiz.)
+	-- or
+	pack(panel,-btn1) -- pack_end (this item will go at the bottom / far right of the container)
+
+

+ + +


Variants

+

+There are some GTK widgets which have multiple ways to create +them. An image, for example, might be created from: +

    +
  • a file ~ *.jpg, .png, .gif, etc...
  • +
  • a stock item ~ "gtk-ok", "gtk-cancel", etc...
  • +
  • a pixbuf previously created or loaded from a file.
  • +
  • a themed icon ~ from one of the hundreds supplied: "face-cool", for example.
  • +
  • something else ~ a GIcon, perhaps.
  • +
  • or nothing at all
  • +
+

+ +

+EuGTK tries to figure out which you want by examining the params (if any) you send +to the create() function: +

+	constant img = create(GtkImage) 
+	--it seems you want an empty container which can hold an image to be set at a later time.
+
+	constant img = create(GtkImage,"~/demos/thumbnails/BabyTux.jpg")
+	-- looks like you want to create this from the file named, if such file exists. 
+	-- Note: cannonical_path() is automatically called to convert the filename/path to a usable form.
+
+	constant img = create(GtkImage,"gtk-ok",GTK_ICON_SIZE_DIALOG) 
+	-- looks like you want a stock image, in the size given.
+	-- Note: any name beginning with "gtk-" is considered to be a stock item
+
+	constant img = create(GtkImage,"face-smile",GTK_ICON_SIZE_DIALOG)
+	-- you want an icon, as named, from the current icon theme, in the size specified.
+	-- size can be either one of the GTK_ICON_SIZE_ enums, or can be a pixel value, 
+	-- usually between 16 and 256.
+
+	constant pix = create(GdkPixbuf,"~/demos/thumbnails/mongoose.png",80,80,TRUE)
+	constant img = create(GtkImage,pix)
+	-- by creating a pixbuf from the file, you can specify a size for the image, 
+	-- plus, you have a static pixbuf object which can be re-used. 
+	-- If you create an image directly from a file, you can't resize or re-use that image 
+
+
+

+ + +


Connecting controls to functions

+

+It should be obvious, but just to be clear, GTK programs, like Windows™ programs, +Apple™ programs, and almost every other computer program written in the last few decades, +are event driven. If you aren't sure what that means, find out before you begin designing your +nifty new program. +

+ +

+Your program will need to respond to user actions (events). The various +events emit signals, for example, a button click emits a "clicked" signal. +Your job is to connect a widget's signal to the appropriate function to handle the +event. +

+    connect(win,"destroy","Quit") -- Always do this for the main window!
+
+Where win is the handle, "destroy" [always a string] is a signal, +a.k.a. the name of an event. "Quit" is what to do in that event. The example above will +call the function Quit() when the program's main window is destroyed. +Quit() - a function exported by GtkEngine.e - then shuts down the GTK engine and frees memory it has allocated. +

+ +

+Quit() is one of very few built-in EuGTK functions you will need to connect to. +Most other connections will be made to Euphoria functions YOU write. +Any Euphoria function used for this purpose must be: +

    +
  1. A function, not a procedure
  2. +
  3. Visible to the code doing the calling
  4. +
+

+ +

+You usually do not have to write a separate line of code to connect a widget to a function. The most commonly-used widgets have a convenient way to make that connection +at the time the widget is created, which leads to cleaner and easier to maintain code: + +

+	(A) constant btn1 = create(GtkButton,"gtk-ok","Foo",42) 
+
+	(B) constant btn1 = create(GtkButton,"gtk-ok","Foo","Hello World!")
+
+	(C) constant foo = call_back(routine_id("Foo"))
+	    constant btn1 = create(GtkButton,"gtk-ok",foo,"Hello World!")
+
+ +
+(D) New in 4.11.4!
+  constant btn1 = create(GtkButton,"gtk-ok",_("Foo"),[...])
+
+  The _() function allows linking to local functions, instead of global.
+  It works better than call_back(routine_id()), since it can 
+  'look forward' to find functions which are defined 
+  further down in your code, allowing cleaner program structure.
+
+  Thanks to Greg Haberek for this function.
+
+
+

+ +

+In any of the calls above, you are making a new button with the stock OK image, connecting its default signal (which is 'clicked', in the case of a button) to +call your Euphoria function Foo(), and optionally sending some object +as the data parameter to that function. +The data item is always optional, and can contain almost anything you +want. +

+ +

+See Data passing below for examples of how to pass +various data types to your Euphoria functions. +

+ +

+If you use method (A) or (B) then your Euphoria function declaration could look like this: +

+    --------------------------------------------------------------
+    global function Foo(atom ctl, object data) -- must be global!
+    --------------------------------------------------------------
+
+If you use method (C) or (D) then you can declare your Euphoria functions as local functions, not global: +
+   -----------------------------------------------------------
+   function Foo(atom ctl, object data)
+   -----------------------------------------------------------
+
+

+ +

+The parameter ctl will be filled in with the handle of the control which +dispatched the call, and data will be the data attached to that control, +or null if no data value was provided. +

+ +

+If you compile a program which uses method (A) or (B) to link to functions, it may compile +without error, but you will get a run-time error on the terminal like the following: +
+

Error: function Foo is not in scope
+****** (make it global or link via routine_id)
+

+
+ +
+

+Use the COMPILE flag for a way to quickly detect these errors in advance, before you go to the trouble of compiling. + +

+ $ eui -d COMPILE myprogram.ex +
+

+ +

Connections, alternate methods

+

+You can also connect signals to controls by typing a separate line: +

+	(1) connect(btn1,"clicked","Foo",[...]) -- global function
+
+	(2) connect(btn1,"clicked",call_back(routine_id("Foo")),[...])
+
+	(3) connect(btn1,"clicked",_("Foo"),[...]) -- local function
+
+	(4) constant foo = call_back(routine_id("Foo"))
+	    connect(btn1,"clicked",foo,[...])
+
+
+ +You might use this method instead of the previous one +if you want to connect a signal other than the default, or if there is no default signal provided for +that control. See GTK docs for appropriate signal names, and GtkEngine.e for the implemented defaults +(around line 348 in the create() function). Again, if you plan to compile, use call_back(routine_id()) as shown in (2), (3) or (4). +

+ + +

Function Parameters

+

Different controls can pass different types and number of parameters to your Euphoria "handler" functions when activated, so be sure to check the GTK docs for the particular widget/signal you are using. The GTK docs usually show a prototype of an appropriate signal handler.

+ +Often, your Euphoria functions can ignore the parameters that GTK passes to them. +If you do not need to access these parameters, just don't bother to declare them! +

+ +
+hint +

Note that you can connect more than one signal and/or more than one function to a control. +The calls will be executed in order. + +To do this, use the alternate 'connect' syntax as shown in (1,2,3) above, +repeating the connect line for each different function or signal to be called. +

+ +
+ +

+A practical application of this might be to trap your main window's "delete-event" signal first, +perhaps calling a routine that saves your work if necessary, then allowing (or not) the "destroy" event to call the "Quit" function to end the program. +

+ +
+

+

constant win = create(GtkWindow)
+connect(win,"delete-event",_("AreYouSure")) --[1]
+connect(win,"destroy","Quit") --[2]
+-- note 1: this will be called first
+-- note 2: this may be called next, depending upon the
+-- value returned by #1
+
+-------------------------------------------------
+function AreYouSure()
+-------------------------------------------------
+if dirty then 
+-- *save it* code goes here
+end if
+return Question(win,,"OK to Quit?") != MB_YES
+end function
+
+

+
+ +

+The value returned by the first function will determine whether the succeeding function(s) will be called or skipped. Note that we use the syntax not equal MB_YES. This is so closing the popup Question dialog window without actually answering YES or NO will not kill the program. +

+ +

+If a 1 is returned from the first called function, then succeeding functions will NOT be called, and +a 0 will allow the succeeding function(s) to be called. One way to look at this so it makes sense is to think +of the return value as a report: A 1 or TRUE means "I've handled this myself, don't bother any further", while +a zero or FALSE means "I've done what I can, it's your turn now!". +

+ +
+ +

+If you find that you need to be able to disconnect a signal, +use this alternate method, and save the signal_id: +

   integer sigid = connect(btn1,"clicked",....)
+
+so that later, you can disconnect that signal by calling: +
   disconnect(btn1,sigid)
+
+Do not use this to disable a control, because it does not change the appearance +to indicate that the control is disabled. Instead, use +
   set(btn1,"sensitive",FALSE)
+
+

+ +


How to figure out which control was activated

+

+Since you can connect several controls to a single Eu function, your function may need to determine which +control is doing the calling.

+As a rule, the first parameter passed to a called Eu function will be the +handle of the control that was activated. +The second parameter is usually the data attached +when the connection was made.

+These 'rules' vary on occasion. See the GTK docs for a prototype of the respective callback routine.
+
Here are two ways to determine which control was activated: +

--------------------------------------------
+function Foo(atom ctl, atom data)
+--------------------------------------------
+-- within this function, you might choose to:
+
+
    +
  1. Match the ctl parameter to known control handles
  2. + +
    • switch ctl do
      +   case btn1 then ...
      +   case btn2 then ...

    +
    +
  3. Use the data parameter to pass a unique identifier
  4. + +
    • if data = 42 then ...
    +
    +
+ +Note:
+For control groups (such as RadioButtons), which send a 'toggled' signal, +there will be two controls responding to events, +and thus two calls to your Eu function! +
    +
  • One call being from the previously-selected button +as it is toggled to the de-activated state.
  • +
  • The other being +from the newly-selected button as it is toggled to the activated state. +
+ +You must check the 'active' property +to see which of the two you should respond to. In some cases, you may want to respond to +both , deactivating or closing one thing, and activating or showing another, for example. + +
  • if get(ctl,"active") then ... -- this is the one just clicked
+

+ + +


Data passing

+
+

+Frequently, it is convenient to be able to attach data items to an individual control, +which that control will pass to functions it calls when activated. One advantage of doing things this way +is that it allows you to write a single Eu function which can handle events from multiple controls. +Another advantage is that it makes your code easier to read and maintain.

+Depending upon the method chosen, the data can be almost anything, from a simple integer to +a complex Euphoria sequence containing strings, pointers, routine_id's, and perhaps even images +or other GTK 'widgets'. +

+ +

Method 1

+

+ Often it is enough to simply attach the data to a control's data space, as in the examples + below. This is also the cleanest and most readable method. +

+ +

+

+(1) -- passing an integer
+constant 
+  btn1 = create(GtkButton,"Justin",_("DisplayAge"),17),
+  btn2 = create(GtkButton,"Jamie",_("DisplayAge"),15)
+
+---------------------------------------------------------------
+function DisplayAge(atom ctl, integer age)
+---------------------------------------------------------------
+ printf(1,"Age = %d\n",age)
+
+Integers are passed and used directly, with no conversion needed. 
+All other data types are passed as pointers, 
+and must be 'decoded' by using the unpack() function.
+
+(2) -- passing a float
+
+ constant btn1 = create(GtkButton,"gtk-ok",_("Foo"),123.456) 
+
+ ---------------------------------------------------------------
+ function Foo(atom ctl, object data)
+ ---------------------------------------------------------------
+ atom num = unpack(data)
+ 
+ The unpack() function will return an atom
+
+(3) -- passing a string
+
+ constant btn1 = create(GtkButton,"gtk-ok",_("Foo"),"James Brown") 
+
+ ---------------------------------------------------------------
+ function Foo(atom ctl, object data) -- must be object 
+ ---------------------------------------------------------------
+ data = unpack(data)
+ 
+ The unpack() function will return a string
+
+ (4) -- passing a Euphoria sequence {} containing almost any mix of data  
+ 
+ constant 
+     btn1 = create(GtkButton,"_Pie",_("Foo"),{"Apple Pie",1.95}),
+     btn2 = create(GtkButton,"_Cake",_("Foo"),{"Carrot Cake",2.10})
+
+ ---------------------------------------------------------------
+ function Foo(atom ctl, object data) -- must be object
+ ---------------------------------------------------------------
+ data = unpack(data)
+    Info(win,"Flo's Bakery",
+        format("Two orders of [1]",data),
+        format("$[2.2]",data*2))
+
+The unpack() function will return a sequence
+
+

+

+ +

Method 2

+

+Sometimes, the best way to pass multiple data values of varying types might be with Euphoria's map functions. +One advantage of this method is that it allows you to access the values by +name, rather than by position, as shown in the method above. The disadvantage - verbosity.

+test84 +
+    object jerry = map:new()
+        map:put(jerry,"Name","Jerry")
+        map:put(jerry,"School","Central High")
+        map:put(jerry,"Age",17)
+        map:put(jerry,"Pix",create(GdkPixbuf,"~/demos/thumbnails/Jerry.jpg"))
+        -- above, we store a 'handle' to a picture of 
+        -- Jerry in the map structure
+        
+    constant btn1 = create(GtkButton,"Student 1",_("ShowDetails"),jerry)
+    
+    ----------------------------------------------------------------
+    function ShowDetails(atom ctl, atom data)
+    ----------------------------------------------------------------
+    Info(win,"Student",map:get(data,"Name"),
+        sprintf("School:\n %s\nAge:\n %d",
+            {map:get(data,"School"),
+             map:get(data,"Age")}),,map:get(data,"Pix"))
+        -- above, we use the passed 'handle' to 
+        -- display Jerry's photo  in the Info pop-up
+
+

+ +
+ +

Method 3

+

+Another way is to use each control's "data" space to pass +name/value pairs. It is possible to combine this method with one of the +others listed above to pass even more data. +

+

+A drawback to this method is that you can only pass strings, +not numbers. You can either pass the numbers as strings, e.g. "$1.95", +or use one of the above methods +instead. +

+ +flo.jpg + +
+constant pie = "~/demos/thumbnails/pie.png"
+constant cake = "~/demos/thumbnails/cake.png"
+
+constant 
+    btn1 = create(GtkButton,"gtk-quit","Quit"),
+    btn2 = create(GtkButton,pie & "#_Pie"),
+    btn3 = create(GtkButton,cake & "#_Cake")
+    connect({btn2,btn3},"clicked",_("Foo"))
+    add(box,{btn1,btn2,btn3})
+    
+    set(btn2,"data","dessert","Pumpkin Pie")
+    set(btn2,"data","price","$1.95")
+    set(btn2,"data","pix",pie)
+    
+    set(btn3,"data","dessert","Birthday Cake")
+    set(btn3,"data","price","$2.10")
+    set(btn3,"data","pix",cake)
+
+show_all(win)
+main()
+
+--------------------------------
+function Foo(atom ctl)
+--------------------------------
+Info(win,"Flo's Bakery",
+            get(ctl,"data","dessert"),
+            get(ctl,"data","price"),,,
+            get(ctl,"data","pix"))
+return 1
+end function
+
+
+

+ +

But Wait, There's More!

+

+You can pass almost any type of Euphoria variable as data attached to +a control, which means that you can also pass Euphoria routine_id's - +so your connected function can execute whatever Eu function is attached as +its data item.
+If you combine this with the ability to store and pass other information in +name/value pairs as shown in Method 3 above, you can have a single +Eu function that provides a number of different 'services' with very little code. +

+ + +


Calendarscalendar


+

The GtkCalendar widget has a variety of ways to set and get the calendar date:

+calendar + +
+get(cal,"day") => 26 -- as integers
+get(cal,"month") => 4
+get(cal,"year") => 2015
+
+set(cal,"day",23) -- changes day only
+set(cal,"month",3) -- changes month only
+set(cal,"year",1946) -- changes year only
+
+get(cal,"eu_date") => {115,4,26} -- Y in Eu format
+set(cal,"eu_date",{115,1,4}) => Jan 4, 2015
+set(cal,"eu_date",date()) => current computer date
+
+set(cal,"date",{1960,11,2}) => Nov 2, 1960 
+set(cal,"date",{44,11,15}) => Nov 15, 1944 
+
+set(cal,"date","11/25/1940") => Nov 25, 1940
+setcal,"date","1924/4/25") => Apr 25, 1924 
+
+
+
+get(cal,"datetime") => returns calendar date and current clock time in datetime format.
+get(cal,"datetime",0) => returns calendar date in datetime format with h,m,s = 0.
+
+get(cal,"date") => Tuesday, May 26, 2015 -- if no format provided,returns a string in default format shown
+get(cal,"date","%a on %A!") => "Sun on Sunday!" -- this will be right as often as the weather bureau!
+
+Format string can include the following specifiers, along with other characters of your choice:
+    %% -- a literal %
+    %a -- locale's abbreviated weekday name (e.g., Sun)
+    %A -- locale's full weekday name (e.g., Sunday)
+    %b -- locale's abbreviated month name (e.g., Jan)
+    %B -- locale's full month name (e.g., January)
+    %C -- century; like %Y, except omit last two digits (e.g., 21)
+    %d -- day of month (e.g, 01)
+    %j -- day of year (001..366)
+    %m -- month (01..12)
+    %u -- day of week (1..7); 1 is Monday
+    %w -- day of week (0..6); 0 is Sunday
+    %y -- last two digits of year (00..99)
+    %Y -- year 
+
+For example, get(cal,"date","Today is %A, day #%j of the year %Y")
+
+Results
+Today is Monday, day #126 of the year 2013 + +The calendar will normally open with the current computer date, if you don't tell it otherwise. + +You may also use a datetime function, such as: + + today = datetime:now() + gtk:set(cal,"date",today) + or + gtk:set(cal,"date",datetime:add(today,30,DAYS)) -- shows date 30 days from now + +
+

+ + +


RGBA Colors +colors


+

+GTK 3 uses a 32-bit RGBA color structure which can be a bit tricky to use, so EuGTK +implements some functions to make the process simpler. With EuGTK, you can specify colors by: +

    +
  • name: "red" --this is the preferred way, using the xcolor names + Refer to xcolors.txt for a list of names
  • +
  • hex value: #FF0000 -- #RRGGBB
  • +
  • hex string: "#FF0000" -- as above
  • +
  • decimal value: 16711680 -- seldom useful, who can remember what color this is? +
  • rgb string: "rgb(255,0,0)" -- r,g, and b colors are 0 => 255
  • +
  • rgba string: "rgba(255,0,0,0.5)" -- as above, plus alpha in the range from 0 => 1
  • +
+

+

+To retrieve colors from, for example, the GtkColorChooserDialog, use: +

 object color = get(ccd,"rgba") -- returns rgb or rgba string
+To make manipulating colors easier, there are several format options available for the above call: + +
 object color = get(ccd,"rgba",N) -- see table below for N values
+
    +
  • 0 = Euphoria sequence: {"rgb",255,0,0} or {"rgba",255,0,0,0.51}
  • +
  • 1 = hex string: "#FF0000" -- this is a string, not a hex number
  • +
  • 2 = decimal number: 16711680 -- this is a number, not a string
  • +
  • 3 = 3-element Eu sequence: {255,0,0} -- {R,G,B}, colors are 0=>255
  • +
  • 4 = 4-element Eu sequence: {255,0,0,0.51} -- {R,G,B,A} where alpha is 0=>1
  • +
  • 5 = 4-element Eu sequence: {255,0,0,130.5} -- {R,G,B,A} where alpha is 0=>255
  • +
  • 6 = rgb or rgba string: "rgb(255,0,0)" or "rgba(255,0,0,.51)" -- rgba returned if alpha != 1, otherwise rgb returned
  • +
+Note: there is no mapping back to a xcolor name from any of the above +color formats. +

+ + +


Memory Usagegoose


+ +

+eui
+A modest sized EuGTK program, when run in interpreted mode, may use a relatively large +amount of memory, (a minimum of 25 to 50 megs on my computer). This is because almost +all of the Euphoria std libraries are loaded by EuGTK.
The source code will, +however, run on both 32-bit and 64-bit machines, if they have Euphoria installed. +WEE editor, for example, uses 107 megs. when interpreted. +

+ +

+eubind
+The same program, when bound, may only require 10 or 20 megs, and the bound source will +take up perhaps 4 or 5 megs of disk space, since the binder removes the unused routines. +Bound programs run almost instantly, compared with interpreted programs.
+In addition, binding takes only a moment - often less than a second. Remember that bound +programs must be distributed in two forms - 32-bit and 64-bit versions. WEE uses 35.6 megs. +

+ +

+eushroud
+This also works nicely, producing an obfuscated .il file which loads and runs very + quickly. In addition, the .il file will be much smaller than a bound file - perhaps 1/2 + to 1/5 the size. Like bound programs, there must be both a 32-bit version and a 64-bit + version. WEE uses 22.7 megs. +

+ +

+euc
+When compiled, the program will use only 3 or 4 megs of memory, and the runtime will be +small, perhaps 1 or 2 megs, and will start even faster, but it takes quite a while to +compile. I only compile a program when I'm certain that all the bugs have been worked out. +You may prefer to distribute your program in compiled form. Just remember, you will need +to provide separate 32-bit and 64-bit versions. WEE uses only 8.3 megs! +

+ +

+Conserving Memory
+In general, each widget you create will require some amount of memory, so you should +avoid creating (or re-creating) them in loops that might run for many iterations. +Instead, create them outside the loop, and simply +hide() and show() them as required. If widgets must be created within function +calls, try to destroy() them before +returning from the call to keep from wasting memory. +

+ + +


Debuggingbug


+

+In the table below are some command-line switches you may use to get into the inner +workings of EuGTK. +All but the first are generally only needed when maintaining EuGTK itself, but there +may be times when you can use them to help you find a programming error. +Of course, you must run your program from an x-terminal in order to see the output! +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SwitchOutputComment
-d COMPILE
Caution: function Foo will not link when compiled!
+********
+
Use before compiling so you can fix links
-d CREATE
Create
+    Call: GtkWindow->new
+    Params: Int 
+    Return type: Ptr 
+    Vector: 101
+    Args: {0}
+    GtkWindow=>37278096
+
Vector is the routine_id assigned to the function "gtk_window_new" + by EuGTK's "init" procedure.

The number following the => + is the 'handle' to the newly-created window.
-d SET
Set
+    Call: GtkWindow->set_default_size
+    Params: Ptr Int Int 
+    Return type: None
+    Vector: 107
+    Args: {37278096,300,80}
+
Args are: 'handle' to the widget being 'set', and following that are + the parameters being passed, in this case, two integers, width and height. +
-d GET
Get
+    Call: GtkComboBoxEntry->get_active_text
+    Params: Ptr 
+    Return type: Str 
+    Vector: 277
+    Args: {30175312}
+    Result: Banana
+
Vectors > 0 are direct calls to GTK routines generated via define_c_func or define_c_proc.Vectors less than -1 mean that the call is to a function written in Euphoria, in which case the vector is the negated RID.
-d INIT
Init class:GtkButton...
+    set_image_position 510
+    get_image_position 511
+    set_always_show_image -1
+    get_always_show_image -1
+
The numbers represent the routine_id that Euphoria has assigned to the GTK calls. +
Use -d INITX for detailed listing.
-d INIT_ERR
ERR:GtkWindow set_titlebar -1
+ERR:GtkWindow close -1
+ERR:GtkBox set_baseline_position -1
+ERR:GtkBox get_baseline_position -1
+ERR:GtkButton set_always_show_image -1
+ERR:GtkButton get_always_show_image -1
+ERR:GtkWidget get_frame_clock -1
When the number is -1, that means the call is invalid, usually because the version + of GTK you are using does not implement that call.

+ 'always_show_image' is only available in GTK 3.6+, for example.
-d INI +
-- Ini file for test173.ex
+My Calendar={"date",{2015,4,5}}
+ColorButton={"rgba","rgb(255,255,255)"}
+MyCheckButton1={"active",1}
+FontButton={"font name","Sans"}
+
Used to display data written to settings (ini) file on x-term
-d FUNC
FUNC g_slist_nth_data 162
+    PARAMS {50331649,16777220}
+    Values {24122256,103}
Debug calls to gtk_func() and gtk_str_func()
-d PROC
PROC g_set_prgname 37
+    PARAMS {117440516}
+    Values  widgets.ex
+
Debug calls to gtk_proc
-d PIXBUF
Pixbuf from file /home/irv/Pictures/IMG_0020.JPG
+Scaled 300x300 1
+
For debugging pixbuf creation
-d PIXBUF_ERR
CAUTION: cannot create pixbuf from /home/irv/Pictures/map.pdf
+
For debugging pixbuf errors
-d BUILDERScreenshotUsed to display namespaced objects loaded from Glade
+ +

+ + +


Settingsgears


+ +

Updated for EuGTK 4.11.10

+

+The ability to very easily save selected settings from one run to the next has been added in EuGTK 4.10.0. +This includes saving the 'state' of active controls, such as spin buttons, check buttons, color buttons, +font buttons, etc. as well as saving selected properties of any GtkWidget, such as the preferred background color, +font, position or size of windows, etc., from run to run. +

+ +

+IOW, your arrangement of things at the time the program was closed will be restored next time the program is run. +Refer to test153.ex and test153.ini for some examples. Below is a sample +file, which can have any name and extension. .ini works fine, and is familiar. Note that it is plain text, +so it's easily edited, and comments are preserved when it's updated. It uses simple name (dot) property notation. +

+ +

+For commonly-used controls, there is a default property defined in GtkSettings.e, +which can be saved/loaded simply by adding the control's handle or name to a list of +controls to pass to settings:Save(). Note that controls to be saved MUST have a name! +These default states are restored when the ini file is loaded. +

+ +

+For saving other (non-default) properties, you must add one line of code to save +that property. No additional effort is required when loading the settings, +the property will be reset automatically to the saved value when the ini is loaded. +

+ +

+For saving bits of data which are NOT properties of a given widget, you can use the + widget's named data spaces (a.k.a. key/value pairs) to store almost + anything you want. For these, your program code must specifically read the + data item when it needs to use it: +
get("MainWindow","data","Foobar") => "Baz!" +

+ +


+----------------------------------------------------------------------------
+-- Following items are 'persistent', only changed by editing this file:
+----------------------------------------------------------------------------
+--!MainWindow.icon=face-smile
+--!MainWindow.border width=20
+
+--!Label1.text=Move, resize, change color, etc...
+--!ColorChooserButton.tooltip text=Pick a color for the Main Window background
+--!Font Button.tooltip text=Select font for calendar
+
+------------------------------------------------------------
+-- Following items are added by the settings:Save() command
+-- using the default properties for the controls on the list 
+-- your program provides, or by the settings:Add() command,
+-- using properties you specify.
+------------------------------------------------------------
+
+MainWindow.data.Foobar=Baz!
+MainWindow.data.Message=Thanks a lot!
+MainWindow.background=#729FCF
+MyCalendar.font=Serif Bold Italic 12
+ColorChooserButton.rgba=#729FCF
+FontButton.font name=Serif Bold Italic 12
+MyCalendar.date={2016,4,10}
+
+

+ +
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

Updated for EuGTK version 4.12.0, Sept 15, 2016 +
All code © 2016 by Irv Mullins +

+
+
+ + + diff --git a/eugtk/examples/documentation/README.html b/eugtk/examples/documentation/README.html new file mode 100644 index 0000000..9cb3865 --- /dev/null +++ b/eugtk/examples/documentation/README.html @@ -0,0 +1,1169 @@ + + + + + + + EuGTK README + + + + + + + + mongoose + gtk logo + + +
+ t +
+  Pete Eberlein's WEE Euphoria editor +
+
+ +


EuGTK 4.12.0

+

A cross-platform language binding for Euphoria and the GTK3 graphic user interface

+
+
+ +
+ + + + + +

+This package should be up-to-date with GTK version 3.21.4. +Tested with GTK 3.18.9 on Linux Mint 18 Cinnamon 64-bit and +Gtk 3.10.8 on Mint 17.2 Rafaela 64-bit, as these are the most-popular +distros with the latest stable GTK 3 versions included. +Also, tested on Windows 7 64-bit with Gtk 3.20.2. +

+ +

+ +

+The Good News:
+GTK3 is better both in ease of use and in +the ability to produce attractive, modern program interfaces than any other GUI libraries + I've tried. GTK3, unlike most of the other GUI libraries, has functions +to handle touch screens. +

+ +

+Linux distros such as Ubuntu, Mint, Ultimate, Parsix, etc. come with GTK3 +libraries already installed. If necessary, you can install GTK3 alongside GTK2 without +problems. Apt-get will do it for you. +Or, in your package manager, look for libgtk-3-0. If you can't get libgtk-3, then it +may be time +to think about updating your ancient Linux installation. +

+ +

In addition, EuGTK 4.9.0 and up works with OS X™. +It also works on Windows™, but I cannot recommend this. +Windows has become entirely too awkward to use and maintain. +

+ +

+(Once upon a time I succeeded in nailing some jelly to a tree. +That doesn't mean I'd consider jelly-nailing to be a good career choice.) +

+ +

+The same EuGTK engine and sourcecode can be used +on any of the three platforms without change, except for possibly +missing icons on different platforms. You can supply your own icons +if appearance is important. +

+ +

+More Good News:
+Compared to other programming language/GUI combinations, +EuGTK is very simple to set up and to use. +There is only one 'include' you must add to your programs, which is 'include GtkEngine.e'. +There are only a few files that need to be available when you write, test, +run or perhaps compile your program - GtkEngine.e and GtkEnums.e. Adding, when required, +GtkPrinter.e, etc...

+No additional files are produced or needed other than the code you write and the standard +Euphoria library files. This makes project management simpler, and +if you want to ship EuGTK with your program, the required files only add about 350k to +the total package (74k if compressed!). +

+ +

+Also, EuGTK is easier to use because EuGTK adds some 'intelligence' that is missing from other +languages, (like C or Python), such as the ability to create images from a variety of sources without the +programmer having to call a different function for each source type. See variants. +

+ +

+In addition, EuGTK is easy to keep up-to date with the latest versions of GTK +because all of EuGTK is written in Euphoria, so it can easily be edited by anyone, +with no re-compiling or other tricky steps involved. +

+ +

+You'll need the latest Euphoria 4 interpreter +from OpenEuphoria.org. +I use Euphoria 4.1.0 beta. +Plus, you'll really need the latest GTK docs! Get 'em from gtk.org. +

+ +

+Just open the gzipped package (I guess you've already done that) and drag the 'demos' folder into your home folder. +All files are in the demos folder (and subfolders thereof). +Try them so you'll know what you can do +with GTK! +

+ +

+Installation
+Later, you can put these files - GtkEngine.e, GtkEnums.e, GtkPrinter.e, etc. - +into the folder with your other Euphoria includes, or just add a one-line +eu.cfg file to any directory you wish to work in, pointing to the location +of these files. My Euphoria/include folder is /usr/local/share/euphoria/include. +Moving all the Gtk***.e files from the demos folder into there works.

+ +
+hint +

+Be sure to add this eu.cfg to your home directory as well, otherwise, eu programs will +not be able to find the necessary GtkEngine.e when you start a program +from your file manager (such as caja). +

+ +

+My eu.cfg reads:
+ +~/demos + +

+ +
+ + +


Getting Started:

+ +

+First, open an x-term, cd to the demos directory, and run a program: +$> eui test0 +

+ +
+ + + +

+Running from an x-term is mandatory while you are writing your +Euphoria/GTK programs, so that you can see error messages and crash reports, +but not necessary once you have your program working and debugged. + +

************************************
+Fatal Error: no libgtk-3.so.0 found!
+************************************
+
+ +

If you get the above error message, either you do not have +libgtk-3 installed (try apt-get or your package manager), or it has +been installed in an unexpected location. Check lines 66 thru 88 at the top of +GtkEngine.e and make changes as necessary. +

+ +
+ +
+ +You may also get the above error if you are trying to run -- +32-bit Euphoria on a computer with 64-bit libraries (or vice-versa) -- + +
+ +

+Now try as many of the test programs as you can, they will help you find incompatibilities (if any) with the +version of the GTK library you are using. +

+ +

+Running these test programs is also the best way to see what GTK offers for use in your own programs. +

+

Now, get busy!

+ +
+ + +


WRITING PROGRAMS:

+

If you haven't read How it Works yet, please do so now! +

+ +

+You can use any plain text editor to create your EuGTK programs. I use +either Pete Eberlein's great WEE editor +(written in Euphoria), sometimes Pluma or Geany, + or the GtkSourceView widget, + which also works well, and could easily be expanded into a full-featured + programmer's editor.See Programmer's Resources + for an overview. +

+ +

+The WEE editor (recommended!) automatically colorizes Euphoria source code, and moves the cursor to +the file/line where a syntax error occurs. +

+ +
+hint +

+For WEE:
Pop-up help for both Euphoria and GTK keywords is available by pressing the [F1] key. See +instructions here. +

+
+ +

+In the ~/demos/resources/geany_syntax folder you will find +files to add Euphoria syntax highlighting to Geany, +as well as an add-on program by Kenneth Rhodes which moves the Geany edit cursor to the error line in your Eu program. +

+ +

+In the ~/demos/resources/gedit_syntax folder you will find +files to add Euphoria syntax highlighting to Pluma, GEdit, GtkSourceView, the BEAR, etc. +

+ +


Visual (Drag & Drop) Program design:

+ +

+It is also possible to use Glade to design your program layout. +You will need the latest version of Glade (3.16 or up). See the following programs +for demos: calendar.ex and +calendar.glade. +and clock.ex and clock.glade. +Also, please read XML/GtkBuilder. +

+ +

+Before you start coding, please read HowItWorks to get an overview, then open guide_a.html +in your browser for links to demos showing how the various controls (a.k.a. widgets) are used. +

+ +

+You'll also need the latest GTK 3.0 docs (from gtk.org), since there are perhaps +4x more methods available than I have used in the demos. Some of these methods +can be ignored, since there are easier-to-use equivalents in Euphoria itself. +

+ + + +


Error Messages:

+ +

There are three possible sources of error messages: Euphoria, GTK, and EuGTK.

+ +Euphoria gives you the line number and description of the error, but these will only appear +in a console - there will not be a pop-up error dialog - since these come directly from the Euphoria +interpreter, before GTK is running! Spelling errors, undeclared variables, and such will appear here: +

+ +
<0074>:: Errors resolving the following references:
+	'GtkBufton' (text16.ex:39) has not been declared.
+
+constant okbtn = create(GtkBufton,"gtk-ok","Foo")
+						  ^
+ +

+GTK errors, which also only appear when running from a console, +will sometimes display an enigmatic message that will take some +effort to understand. Best way to debug these errors is to comment out blocks of code, and then +uncomment one line of code at a time, and see which line triggers the error message. Then consult the GTK docs +to see what GTK is expecting vs. what you've written: +

+ +
+(test174.ex:3126): Gtk-WARNING **: Can't set a parent on a toplevel widget
+**
+Gtk:ERROR: /build/buildd/gtk+3.0-3.4.2/./gtk/gtkcontainer.c:3292:
+gtk_container_propogate_draw: assertion failed: (gtk_widget_get_parent(child) ==
+GTK_WIDGET (container))
+Aborted
+
+ +
+Above is the type of error message GTK will present, in this case I was trying +to add a dialog to a window (dialogs are 'run', not added to containers). +
+
+EuGTK itself will (hopefully) display easy-to-understand messages like the one below. +Both warnings and fatal errors are displayed here, so if your program doesn't run, +or doesn't seem to run correctly, run it from a terminal! + (x-term, mate-terminal, etc... whatever you have) +

+ +
Error: function Foo is not in scope
+****** (make it global or link via call_back(routine_id())
+ + + + + +
CAUTION!
+If you plan to compile your EuGTK program, please read +HowItWorks to see the correct way to link +controls to your Euphoria functions! +
+ +

+Another possible error occurs when you create a GTK widget with a version of libgtk-3 which +does not implement that widget. You have 3 choices in this event: use something else, create your own +custom object to simulate the new widget, or update your version of libgtk-3. +The last is often not possible, usually you will +find it easier to +update to a newer Linux distro which includes the latest libgtk-3 instead. +

+ +
+
Fatal Error: GtkMenuButton
+************ not implemented in this GTK library version
+ +

When you use a recently-implemented GTK widget in a program you plan to distribute, it is a good idea to check the +libgtk version and if necessary present an error message. Use the requires() function for this. See test193. +

+ + +

+There are several other flags you can set to display debugging info. See + Debugging section of HowItWorks.html +

+ + +


New Features

+ +Icons +

+Starting with GTK version 3.10, the old GTK stock items are deprecated, and new programs +should not use them. Instead, use named icons. This is good, because the set of stock buttons +was limited, and some were missing altogether. There's a far wider variety of named icons to choose from - except on Windows™, where there are very few. This is a problem which can be avoided by packaging your own custom icons with your program. +

+ +

You can most easily see +all the available icons by running examples/icons.ex. It now has a handy search feature, which is a great help +when choosing the buttons and menus for your nifty new programs! +

+ +

+However, using named icons means more work for the programmer, usually involving several lines of +code just to create each button. To solve this problem and make the transition to named icons easier, +this version of EuGTK adds a new, more flexible way to create GtkButtons.
+

+ +buttons + +

+

    Old Style:
+    constant btn1 = create(GtkButton,"gtk-edit",...)
+    -- button caption and icon are pre-set, not easily changed,
+    -- but nice-looking and easy to use. This is the leftmost button above.
+
+    New Style:
+    constant btn1 = create(GtkButton,"text-editor#_Edit",...)
+    -- this uses a named icon and your own label. 
+    -- Run examples/icons.ex to search for a suitable icon.
+    -- These themed icons should change appearance to match the 
+    -- current theme the user selects.
+
+

+ +

+Please note the new hashtag# syntax: +

constant btn1 = create(GtkButton,{"gtk-edit#_Edit",...}
+    -- changing the caption and hot-key as desired
+    -- icon name is first, caption second, separated by #. 
+    -- Optional underscore prepends the hot-key in caption
+    -- this button is shown above, center
+    
+    constant btn1 = create(GtkButton,"~/demos/thumbnails/4_rhombuses.gif#_Colors",...)
+    -- You can set the button image from a file (even animated!),
+    -- so you can customize your program's appearance.
+    -- You can even have "check images" that change depending 
+    -- upon their state! (see test15)
+
+ + +
+ImageMenuItems + + +image menu +

+Someone now [only temporarily, I hope] in charge of GTK decided that having images on buttons and menu items was a bad idea. +They cite some academic study which 'proved' that people are quicker at choosing the correct button out of an array of buttons if the buttons contain +nothing but boring text captions. +

+ +

+Did this same 'academic study' prove that traffic signs didn't need to be different colors and shapes? If not, why not? +

+

+So they're gone as of GTK3.14. + +I guess they don't want people with dyslexia to use their computers. +

+ +

+If you don't like images, you don't have to use 'em, but if you do like them, +don't worry too much, I can outsmart them and put those images back. See, for example, test25.

+ +
+ +

Interactive Debugger

+

+This change is actually a good idea. You can, starting with GTK3.14, enable a pop-up +GTK+ Inspector by adding one line of code just before the call to main(): +

	show_all(win)
+	set(win,"interactive debugging",TRUE)
+	main()
+
+

+ +

+This interactive debugger allows you to view the widget hierarchy and experiment with various settings +while your program is running! It also lists the applicable properties and signals for each selected widget.

+ +
+ +

New Types

+Gtk widget types have been added to EuGTK. You can now declare Euphoria objects as GTK types, +as follows: +

+ function Foo(Window w, Button b)
+
+As you can see, you just use the Gtk widget name, sans the 'Gtk' part. +It's generally not necessary nor even a good idea to use these. +They are provided mainly for use in the rare occasion where it is necessary to +register and "type cast" a Euphoria function parameter. Most objects passed as +function params already 'know' their type, as do all that are created as Eu +constants, objects, or atoms, so this is seldom necessary. +

+ +
+ +

Settings

+The ability to very easily save selected settings from one run to the next has been added in EuGTK 4.10.0. +This includes saving the state of active controls, such as spin buttons, check buttons, color buttons, +font buttons, etc. as well as saving specified properties of any GtkWidget, such as the preferred background color, +font, position and size of windows, etc., from run to run. You can do this without having to write lines of code to save, parse, and restore each setting. Just supply the name +of an .ini file and a list of control handles you wish to save/restore to the save_settings() or load_settings() functions. +

+ +

+Refer to test153.ex, test153.ini, +test173.ex, test173.ini, +test201.ex, and test201.ini for some examples. Below is a sample +file, which can have any name and extension. (.ini works fine, and is familiar) Note that the file is plain text, so it's easily edited, and comments are preserved when it is updated. + +

----------------------------------------------------------------------------
+-- Following items are 'persistent', only changed by editing this file:
+----------------------------------------------------------------------------
+--!MainWindow.icon=face-smile
+--!MainWindow.border width=20
+
+--!Label1.text=Move, resize, change color, etc...
+--!ColorChooserButton.tooltip text=Pick a color for the Main Window background
+--!Font Button.tooltip text=Select font for calendar
+
+------------------------------------------------------------
+-- Items beginning with + are added via the settings:Add()
+-- function called in your program code, as they are not a
+-- default property as defined in GtkSettings.e
+-- They can also be added by manually editing the ini file.
+
+-- Items without the leading + sign are saved automatically,
+-- by passing a list of names or handles of controls to 
+-- the settings:Save() function.
+
+-- You may also save and restore widgets named data spaces
+-- by settings:Add(ini,ctl,"data.name","value")
+-- see MainWindow.data lines in blue below.  
+------------------------------------------------------------
+
++MainWindow.data.Foobar=Baz!
++MainWindow.data.Message=Thanks a lot!
++MainWindow.background=#FCE94F
++MyCalendar.font=TakaoPGothic Bold Italic 12
+ColorChooserButton.rgba=#FCE94F
+Font Button.font name=TakaoPGothic Bold Italic 12
+MyCalendar.date={2016,6,8}
+
+

+ + + +


New Syntax

+

+In order to make programming even easier, I've added a new way to set +properties at the time a widget is created. This doesn't replace the previous set(... functions, just +allows you to use a shorter method if you wish. It may be faster than +the old method, since it can avoid multiple lookups. +

constant win = create(GtkWindow,{
+    {"title","Simple Text Viewer"},
+    {"default size",600,500},
+    {"position",GTK_WIN_POS_CENTER},
+    {"icon","~/demos/thumbnails/mongoose.png"},
+    {"connect","destroy","Quit"}})
+

+

+In simple cases, an even easier-to-use syntax is possible using key/value pairs. +See screenshot at top of page. +

constant win = create(GtkWindow,
+	"title=Hello world!,size=300x100,background=green,border=10")
+

+ +

You can freely mix these styles in your program, using whichever notation is the cleanest and clearest. +Because this last version uses Eu 4.0 key/value pairs, not all settings can be made this way. You can't, for +example, pass Eu variables or Gtk constants as part of the settings string, except for the constants TRUE, FALSE, HORIZONTAL, and VERTICAL, +which are specifically allowed. +

+


Custom Dialogs

+ +

+EuGTK 4.11.0 has a Custom dialog which allows adding almost any widget(s) to an easy-to-use pop-up dialog, +with basically one line of code. See dialogs.html and test87.ex for details. +

+ + + +


Plug & Socket

+

+A plug and socket demo (plug.ex, sock.ex) has been added, to +allow embedding widgets from one process into another process. +I haven't been able to dream up a real need to do this so far. +

+ +

To Do: find a useful program that needs this!

+
+ +
+


Plugins

+

+EuGTK 4.8.9 has a new 'plug-in' feature, added in order to +implement the GtkSourceView and WebKit widgets. +

+ +
+ +

SourceView

+ +
+SourceView +
 New GtkSourceView plugin
+
+ +

+The SourceView widget offers automatic language recognition and syntax highlighting +for a huge number of programming languages (about 110, I think). +

+ +

I've put the SourceView functions into a plugin. This loads the additional required shared library and the links to the functions contained in that library. +You only need to include the GtkSourceView.plugin when you want to use this +editor widget. +

+ +

A set of syntax files for Euphoria 4.0 by Mario Steele can be found in /demos/resources/gedit-syntax. +Just copy them as instructed in the README. +

+ +

One reason for making this a plugin is that some installations don't automatically +include the GtkSourceView library. Making the sourceview code an integral part of GtkEngine.e would cause +problems if the sourceview library could not be found. A second reason; having it separate makes it easier for me to continue adding sourceview functions. Currently only a few are implemented, but it is useful nevertheless. I use it to edit these web pages and my demo programs. See test201). +

+ +

To Do: implement code completion and search functions

+
+ +
+ +
+Webkit +
 Webkit demo
+
+ +

WebKit

+ +

EuGTK also includes a WebKit plugin, +which allows you to incorporate a web browser widget into your program. +You are free to implement - in Euphoria! - features that may +not even be available on Firefox™ or Chrome™! +

+ +

+The WebKit plugin includes a pop-up Web Inspector, similar to that in +Firefox™ and Chrome™. +

+ +

Like the SourceView, this plugin is still under development, but is quite usable already. +See examples/webkit.ex +

+ + +

To Do: implement security and script-running features

+
+ + +
+ + +


Broadway Server

+ +
+
+Broadway +
 EuGTK running on Broadway server in Firefox™ browser window
+
+
+ +

+With the latest versions of GTK, you can specify the Broadway server +(broadwayd) to run your EuGTK programs, and view them on +any connected device which has an up-to-date HTML5 web browser such as Firefox™. Neither Euphoria nor EuGTK are required on the client! +

+ +

+The Broadway server that comes with Mint 18 works GREAT!. Over 95% of the 200+ demos work +with Firefox 47.0, and most of those that fail could probably could be modified to work. +

+ +

I have had as many as 50 EuGTK programs running simultaneously in +a single Firefox browser window, while only using about 50% CPU. +

+ + +


BEAR

+
+ +bear + +
 The BEAR
+
+ +

+That's an acronym for a small program, a little over 800 lines of code, which took a couple of days +to write and test. +

+ +

Since it's written in Euphoria, the single source code file is only 21.5k in length, +

The BEAR has already been used extensively to edit these doc pages. If you look at the raw +html, you'll see how much cleaner +it is now than before :) +

+ +

Encorporating a full-fledged web browser widget similar to Firefox™, and a source-code + editor which can recognize and colorize over 100 programming languages, this allows me to + browse and edit html pages, and if those pages contain links to source code, display and + edit the source. If the source is Euphoria, you can also test run the program! + (Other languages could easily be added.) +

+ +

+The web browser panel has buttons to zoom in / out, and the editor panel +has selectable fonts, optional line numbers and the ability to make visible +"white space" characters, such as spaces and tabs. + +

+ +

+When html pages are edited, the Web view is refreshed whenever the editor +Save button is clicked, so that changes are instantly visible. +

+ +

+Modified source code is saved to temp files for the test run. +Your BEAR preferences are stored in a hidden file: +.bear.ini located in your $HOME directory. +

+ +

The BEAR requires the latest versions of both libgtksourceview-3 and libwebkit2gtk-3.

+ + +


Compared to C

+ +

+Below is a simple "Hello World!" program written in C, taken from the GTK docs +(with comments removed). Following that is the same program written in EuGTK. +

+ + + + + + + + + + + + + + + + + + + + +
+ C Code +
+
+
+#include <gtk/gtk.h>
+
+static void
+print_hello (GtkWidget *widget,
+	gpointer   data)
+{
+  g_print ("Hello World\n");
+}
+
+static gboolean
+on_delete_event (GtkWidget *widget,
+	    GdkEvent  *event,
+	    gpointer   data)
+{
+  g_print ("delete event occurred\n");
+  return TRUE;
+}
+
+int
+main (int   argc,
+	 char *argv[])
+{
+  GtkWidget *window;
+  GtkWidget *button;
+
+  gtk_init (&argc, &argv);
+
+  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_title (GTK_WINDOW (window), "Hello");
+  g_signal_connect (window, "delete-event", G_CALLBACK (on_delete_event), NULL);
+  g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
+  gtk_container_set_border_width (GTK_CONTAINER (window), 10);
+  button = gtk_button_new_with_label ("Hello World");
+  g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL);
+  g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
+  gtk_container_add (GTK_CONTAINER (window), button);
+  gtk_widget_show (button);
+  gtk_widget_show (window);
+  gtk_main ();
+
+  return 0;
+}
+
+
Euphoria
+
-----------------------------------------------------------------
+-- Purpose:
+-- Show a window with a button; when the button is clicked, 
+-- print "Hello World" on the terminal, then exit.
+---------------------------------------------------------------------
+
+include GtkEngine.e
+
+constant window = create(GtkWindow,
+    {"title","Hello"},
+    {"border width",10},
+    {"connect","destroy","Quit"},
+    {"connect","delete-event","on_delete_event"}})
+
+constant button = create(GtkButton,
+    {"label","Hello World"},
+    {"connect","clicked","print_hello"},
+    {"connect","clicked",destroy,window}})
+    add(window,button)
+
+show_all(window)
+main()
+
+global function print_hello()
+    puts(1,"Hello World\n")
+    return FALSE
+end function
+
+global function on_delete_event()
+    puts(1,"delete event occurred\n")
+    return FALSE
+end function
+
+
+ +

Now you know why C programmers grow bald at an earlier age than others.

+ +

+Even with this simple program, you can see the difference. As C programs grow larger, +they become increasingly littered with type-casts, pointer references, etc., +while the Euphoria code remains shorter and much more readable. +

+

+For example, compare the following two equivalent lines of code: +

    +
  • gtk_window_set_title (GTK_WINDOW ( window), "Hello"); /* C */
  • +
  • set(window,"title","Hello") -- Euphoria
  • +
+The code shown in blue is required because C is not object-oriented, so you must specify the correct routine to be +called, and must tell C what type of object the window variable is. EuGTK tracks objects as they are +created, so it knows which routine to call, and what type of object it is dealing with without +the programmer having to specify each time. +

+ +

+Or to put it another way, the C code is full of distracting 'noise', while Euphoria is cleaner and quieter. Other than that, +the program structure is in other respects pretty similar, so that you can port a C or Python program to Eu in many cases without +much difficulty. I've done just that for many of the test programs in this package. +

+ +
+


Recent Changes

+ +

+4.11.5: To make space for new openGL graphics, the seldom-used Pango text and Cairo drawing functions have been moved to their own include: +GtkCairo.e. If your program uses Cairo graphics or PangoFont calls, the only change needed in your source code is to include GtkCairo.e following GtkEngine.e. See test60 for example. +

+ + +


Wee Help Mod

+ +

To add [F1] pop-up html help for +Gtk widgets, as well as Euphoria keywords, +make the change shown below to wee.exw:


+global procedure context_help()
+    sequence text, decls, word, name_space, path
+    integer pos, junk
+    object help
+
+    text = get_edit_text()
+    pos = get_pos()
+    word = word_pos(text, pos)
+    if length(word) < 2 then
+	name_space = ""
+	word = ""
+    else
+	name_space = word[2]
+	word = word[1]
+    end if
+
+-- add the following 4 lines to add pop-up GTK help:
+  if match("Gtk",word) = 1 then
+    ui_show_uri("FILE://" & canonical_path(sprintf("~/gtk3/%s.html",{word})))  
+    return
+  end if
+  -- my GTK docs are in a gtk3 folder in my home directory
+  -- adjust as necessary for your setup.	 
+
+

+ + +


Tested Platforms:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tested with
EuphoriaGTKDistroArchPlatform
4.0.43.0.8Ultimated Edition 3.032-bit AMD Athlon II X2 220 processor, 2800mhz, 4gig
4.0.53.0.8Ultimated Edition 3.032-bit AMD Athlon 64x2 processor, 1000mhz, 873meg
4.0.53.2.0Mint 12 *32-bitPentium M processor, 1500 mhz. 487 megs
4.1.03.0.8Mint 1132-bitPentium M processor 1.5ghz, 512meg
4.1.03.4.1Luninux (Ubuntu 12.04)64-bit AMD Athlon II X2 220 processor, 2800mhz, 4gig
4.1.03.4.2Mint 13 *64-bit
4.1.03.6.0Mint 14 * 64-bit
4.1.03.6.2Manjaro xfce 0.8.3-x86-64 *64-bit
4.1.03.6.4Mint 15 Mate *64-bit
4.1.03.8.4,Mint 16 Cinnamon *64-bit
No longer testing on older platforms listed above.
Above, 14-year-old laptops
4.1.0 rev. 4467,3.10.6Parsix 4.0 (Gloria) *64-bitIntel Core 2 Quad CPU 2.33 ghz 8 gig
4.1.0 rev. 57833.8.4Mint 16 *64-bit
4.1.03.10.2SalentOS (Ubuntu 14.04) *64-bit
4.1.0 rev. 62383.10.8Mint 17 Cinnamon *64-bit
4.1.03.10.8Mint 17 Mate *64-bit
4.1.03.14.7Ubuntu Vivid 3.18.0-9-generic *64-bit
4.1.03.6.4Windows 764-bit
4.1.0 b23.10.8Mint 17 *64-bit
4.1.0 b23.14Ubuntu Vivid64-bit
4.1.0 development3.16.6Ubuntu MATE 15.10 *64-bit
4.1.0 rev. 63183.16.6Mint 17 * works fine!64-bit
4.1.0 rev. 63183.18.9Ubuntu 16 * has a few bugs64-bit
4.1.0 rev. 63183.18.9Mint 18 *64-bit
4.1.0 rev. 63183.20.2Windows™ 764-bit
* Best results
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
History
EuGTK 4.6.7Added GtkPrinter.e, an engine to handle most common printing tasks!
EuGTK 4.6.9Modified Kenneth Rhodes' gneui.ex to parse ex.err and position Geany editor at error position. +
EuGTK 4.7.0Complete re-write to make the code cleaner and hopefully faster! +
EuGTK 4.7.5Major code cleanup, new features, improved documentation, more demos!
EuGTK 4.7.6Updated GtkPrinter.e and documentation.
EuGTK 4.8.0Update for new GTK versions and bug-fix
EuGTK 4.8.1Changes and tests to work with GTK 3.10+
EuGTK 4.8.6Improved ListView functions & documentation, new button and menu options.
EuGTK 4.8.7Improved Glade compatibility, added new Glade demos.
EuGTK 4.8.9Implemented Glade namespacing, new button images
EuGTK 4.9.0Windows 7™, 64-bit tests run 85% successfully! OS X™ also reported to work.
EuGTK 4.9.5Updated GtkSettings.e, added plugin capability.
EuGTK 4.9.8Bug fixes, inproved Windows™ compatibility.
EuGTK 4.9.9Broadway server - run EuGTK programs over network! No Euphoria or GTK required on clients!
EuGTK 4.10.0Added convenient functions to save control values and states to a +config or ini type file.
EuGTK 4.10.1Added demos of GtkSourceView and GtkWebKit plugins.
EuGTK 4.11.0Updated demos and documentation. Tested new GTK 3.16 widgets and functions.
EuGTK 4.11.2Added plug/socket demo, updated plug-ins, improved GtkPrinter, fixed some memory leaks.
EuGTK 4.11.4Fixed most (hopefully, all) memory leaks, added SourceView functions.
EuGTK 4.11.5Moved Cairo functions to a separate include; graphics will use GtkGLArea in the future.
EuGTK 4.11.6Updated numerous programs & documentation, added new browser program and BEAR.ex
EuGTK 4.11.7Improved httpd.ex and webserver.ex; colorized documentation sourcecode; debugged the BEAR :)
EuGTK 4.11.8Improved httpd.ex, added GTK 3.21 functions
EuGTK 4.11.9Debugged and tested on Windows 7™; about 80% working.
EuGTK 4.11.10Windows™ debugging, improved stability of the BEAR.
EuGTK 4.11.11Broadway server works with 90% of demos! (Mint 18); more stable BEAR!
EuGTK 4.12.095% of demos run on Windows 7,
added style chooser to SourceView editor.
Disclaimer
With the many different options available, I cannot guarantee that everything +will work 'just fine' everywhere.
Different platforms, window managers, +themes, and unpredictable user-settings make this impossible.
+If you want to be sure your program will work +on a given computer, send me your program and the computer, I'll be glad to test it, +providing I can keep the computer afterward :)
+ +
+ + + + + diff --git a/eugtk/examples/documentation/ServerHelp.html b/eugtk/examples/documentation/ServerHelp.html new file mode 100644 index 0000000..9c77b58 --- /dev/null +++ b/eugtk/examples/documentation/ServerHelp.html @@ -0,0 +1,184 @@ + + + + + Eu Server + + + + + +
+ GTK Logo + OpenEuphoria Logo + server + +

EuGTK 4.12.0

+ +


Euphoria Web Server

+

version 1.1

+
+ + + + + +
+This uses a heavily modified httpd.ex (from the Eu demos) to serve up files over the local network. +

+ +

+Apache would work, but who wants to deal with all that arcane stuff?, Besides, +I'd still have to write cgi code to display the pages... so why go thru all that +just to share some files? +This solution is much simpler, and is written in Euphoria, so you can modify it as you wish! +

+ +

+Httpd.ex can work from a command line - just issue + %> eui httpd to see the options. When running from the command line, you'll need to enter +your server's IP address (use ifconfig to get that), and port, perhaps 8080, and the root (starting directory). +

+ +

+You can run more than one server at a time, just use a different port for each. For example, +set the root for port 8081 to your Music/Blues folder, and the root for port 8082 to your +Music/Opera folder - that way, listeners won't have to wade thru albums they may be allergic to:) +

+ +

+To make the server easier to use, I've added the EuGTK GUI shown above, which lets you select some options, and then starts the server running in the background + when you click the OK button. Once it's running, you just enter the IP address and port in your tablet or phone's +browser address bar to connect. e.g: 192.168.1.100:8080 +

+ + +


httpd.ex

+
    +
  • -help displays Usage
  • +
  • -bind required ip_address:port, e.g. 192.168.1.100:8080
  • +
  • -root required e.g. /home/irv/demos/documentation
  • +
  • -log optional, name of log file
  • +
  • -h optional, show hidden files in directory listing
  • +
  • -s optional, sort directory listings
  • +
  • -r optional, include full request and response in log
  • +
  • -t optional, number of tries to obtain port before giving up
  • +
+ +


webserver.ex

+
+

+ + + +Screenshot-18 + +

+The appearance of the page is controlled by a file named .httpd.css, if it exists in the +currently-browsed folder. This is done so that directory +listings from different folders can have their own individual appearances (see screenshot above). +If no .httpd.css exists in a given folder, defaults built into +httpd.ex will be used. +

+ +Screenshot-11 +

+Above, webserver.ex serving a specified file as entered on the address bar, or by clicking on a link in a previous page. +

+ +

+After closing the server, or a crash, it may take several seconds to minutes for your computer to +free the port you've used. Trying to run again too soon using the same port will result in an error (-2). +I have included a loop which will retry up to 20 times (unless overridden by the -t option), and then abort. If this happens, and you are running from the GUI, you can try hitting the OK button again. It may take +several tries, or you may have to shut down the port manually from a terminal. +

+ +
+ +
+ +
+ + + diff --git a/eugtk/examples/documentation/StartingGlade.html b/eugtk/examples/documentation/StartingGlade.html new file mode 100644 index 0000000..bafddd8 --- /dev/null +++ b/eugtk/examples/documentation/StartingGlade.html @@ -0,0 +1,271 @@ + + + + + Starting Glade Chap. 1 + + + + + +glade test 1 + +

Using Glade 1

+ + +

Getting Started

+

Step 1 - Design a Window

+

+

    +
  1. Open Glade, and create a new file +
    (File/New menu item)
    +
  2. + + +
  3. Click on the Window icon +
    (leftmost item under the Toplevels tab)
    +
    + This will add a main window to your glade program. + It will be named window1.
    +
  4. + +
  5. Next, click on the Common tab in the Window Properties pane +
    (lower right) and scroll down a bit to the Widget Flags section.
    +
  6. + +
  7. Check the Visible checkbox. +
    If you don't make the main window visible, + how are you going to be able to tell if your program + is running? :)
    +
  8. + +
  9. Save it with the extension .glade, e.g. test1.glade
  10. +
+

+ +

+This will produce a .glade xml file which describes the interface. +

+ +

+You don't need to be concerned with this xml, there's no need even +to look at it, much less edit it. The sample below is provided just +to satisfy your curiosity: +

+ +
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <object class="GtkWindow" id="window1">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="title" translatable="yes">Glade Test 1</property>
+    <child>
+      <placeholder/>
+    </child>
+  </object>
+</interface>
+ +

Step 2 - Link to Euphoria

+

+Create a Euphoria program to load and run the .xml you just created: +

+
include GtkEngine.e
+
+add(builder,"~/demos/examples/glade/test1.glade") 
+
+main()
+
+ +

+Save this as test1.ex. If you keep the names the same, it will be less confusing. +

+ +

Step 3 - Test Run

+

test1 +

+You will always run from an x-terminal (mate-terminal, etc) until your program is completely finished. There is no way around this if you ever expect to get it completely debugged.

+ +

+Run the program: +

+$> eui test1 +
+

+ +
+ +
+ +
+ +

Step 4 - Adding Widgets

+

x2 +

    +
  • Add a container for a menu and button to your window
  • +
      +
    1. Go back to Glade, and select a container. +
      Box will do nicely
      +
      (see in screenshot above)
      +
    2. + +
    3. Drag and drop it into the window +
      (accept the default number of items, and click Create)
      +
    4. +
    + +
  • Add a standard menu to your window
  • +
      +
    1. Click on File +
      (in the little 3-sided box under Containers, also)
      +
    2. + +
    3. Drop it into the top panel in the window.
    4. +
    + +
  • Add a Quit button to your window
  • +
      +
    1. Click on the OK button +
      (under the Control and Display tab)
      +
    2. + +
    3. Drop that into the bottom panel of the window.
    4. + +
    5. Click on the actual button (in the window) to select it.
    6. + +
    7. Select the General tab under Button properties +
      (lower right pane)
      +
    8. + +
    9. Scroll down to the Button Content section, click Stock Button, and from the combo box select Quit
      (scroll down the list)
      +
    10. + +
    11. Click on the Signals tab in the Button properties pane.
    12. + +
    13. Select the clicked signal] +
      where it says <Type here>, enter Quit -- no quotes please
      +
    14. + +
    15. Be sure to hit enter or click on something else +
      (so that your typed entry will be saved. -- this is a quirk of Glade)
      +
    16. +
    + +
  • Save your work +
      +
    • Ctl-s, File/Save, or click on the "save the current project" toolbar icon.
    • +
    +
+ +

+ +
+ +

+test2 +You'll now have a window with a fairly complete menu and a functioning Quit button. +

+ +

+But wait!
The button works, but the File/Quit menu item doesn't! +

+ +

+Let's fix that: +

    +
  • In Glade, click on the File menu item on your new window +
    + (not the Glade File menu, your new menu) +
    +
    +
      +
    • This will select menuitem1 in the upper right Glade pane
    • +
    • Click the arrow to open the submenu (menu1)
    • +
    • Click its arrow to expand the actual menu items
    • +
    • Select imagemenuitem5 + (That will be your File/Quit menu item.) +
    • +
    +
    +
  • + +
  • From the Menu Item Properties pane (lower right) select the Signals tab.
  • +
  • Select the activate signal, and as you did with the Quit button, type in Quit.
  • +
+

+ +

+Now your File menu Quit option will...erm.. quit.

+

+ +
+

Step 5 - Connecting Euphoria Functions

+

+Let's add some actual Euphoria code next. Follow the steps directly above, but this time click on +the Help menu item, and expand the list so that you can select imagemenuitem10 (Help/About). +

    +
  • In the Signals tab, select activate and type in help_me (again, no quotes, hit enter)
  • +
  • Save your work, and run the program again.
  • +
+ +

In your terminal you should see something like:

+ +
+
+-----------------------------------------------
+-- Undeclared function in test1.glade
+-----------------------------------------------
+
+---------------------------
+global function help_me() 
+---------------------------
+
+return 1
+end function
+
+
+ +

+What to do? Copy the function prototype and paste it into your Euphoria program. +Then edit it to look like the one below: +

test3 + +
 --------------------------
+ global function help_me() 
+ --------------------------
+ Info(,,"About","My fine program!")
+ return 1
+ end function
+
+ +

+Run it again, and click on the Help/About menu item. Note that your program is still only +7 lines of code. +

+ +
+ +

+


+
On to topic two +
+

+ +
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

Updated for EuGTK version 4.11.11, Sept 1, 2016
+ All code © 2016 by Irv Mullins +

+
+
+ + + + diff --git a/eugtk/examples/documentation/StartingGlade2.html b/eugtk/examples/documentation/StartingGlade2.html new file mode 100644 index 0000000..affe23d --- /dev/null +++ b/eugtk/examples/documentation/StartingGlade2.html @@ -0,0 +1,208 @@ + + + + + Starting Glade - Chap. 2 + + + + + +

Using Glade

+ +glade + +

Linking more functions

+

Opening a file

+ +

+Use Glade to select the File/Open menu item, which will be named imagemenuitem2
+(note that you are free to change the name of any item by typing the new name +into the ID: entry on the General tab for that item. +

+ +

+Let's do so, and change this to the more meaningful name: file_open +(as usual, no quotes). +

+ +

+Now select the Signals tab, and set the activate handler to be open_file +(ok, so I'm not being very original, too bad :p) +

+ +

Click the Save the Current Project toolbutton, and run your program again. +In your terminal you should see something resembling: +

+-------------------------------------------------
+-- Undeclared function in test1.glade
+-------------------------------------------------
+
+------------------------------
+global function open_file() 
+------------------------------
+
+return 1
+end function
+
+ +

+You should have expected that. Copy this template, paste it into your Eu program, +and fill in the blank. +

+ +

For this program, you'll also have to +add include GtkFileSelector.e to your program. +

+ +

+include GtkEngine.e
+include GtkFileSelector.e
+
+add(builder,"~/demos/examples/glade/test1.glade")
+
+main()
+
+---------------------------
+global function help_me() 
+---------------------------
+return Info(,,"About","My fine program!")
+end function
+
+----------------------------
+global function open_file() 
+----------------------------
+object fname = fileselector:Open("*.ex")
+if sequence(fname) then
+	Info(,,"You Selected",fname)
+end if
+return 1
+end function
+
+
+ +

+Click on a file, and you should see the filename displayed in +a neat pop-up box. +

+ +
+ +glade test 1 +

Adding Widgets

+

Containers

+ +

+If you recall, the original Boxgreen star we added as the first item in our window had +3 'divisions'. We filled the first (top) with a menu, and the 3rd (bottom) with +a button. The middle one was left empty, and so it doesn't show at all. +

+ +

Let's add some things to the middle. +We can't put more than one item in there; try it, you'll see. +

+ +

+We'll need a container if we want more than one thing there, so choose another +Box green star, +drop it into the empty middle space, change number of items to 2, and click create. +The default orientation is vertical, which won't do for this particular demo, so change it +to horizontal. +

+ +

+Into the left-hand panel of the Box we just added, drop an image container. It's the little house with the yellow roof in the Control and Display section of the left-hand toolbar. little house +

+ +

+In the right-hand panel, drop a label container. It's also in the Control and Display section. Under Appearance/Label: type in some text. Use markup if you like, and click the Use Markup checkbox. +Save your work, you should do this frequently. +

+ +test5 + +

+What about the image? +We'll need to pick one, so click on the little missing image +icon on your program's window, and choose one of the following: +

    +
  • A stock id from the drop-down combo
  • +
  • An icon name
    face-cool, for example
  • +
  • A file +
    Choose one from the file selector on the right.
    +
    (You'll find that if you use an image loaded from a file, + the image must be in the same folder as your program, + otherwise it's difficult, but not impossible, +for your program to find it at runtime.) +
    +
  • +
+

+ +

+Run the program again, and note that no changes or additions or adjustments were required to the 12 lines of Euphoria source code. +

+ +
+
+ +Calendar +

+Suppose we want an image more pleasing than the one above? +Just change the open_file function a bit: +

+ +

+

 -----------------------------
+ global function open_file() 
+ -----------------------------
+ fileselector:filters = {"image"}
+ object newfile = fileselector:Open("*")
+ if sequence(newfile) then
+   set("image1","from file",newfile)
+ end if
+ return 1
+ end function
+
+

+ +

+Just click on the image you prefer. I like this one! +

+ +
+

In Conclusion

+

Chapters 3...99

+ +

+Building more complex objects such as TreeViews, ListViews, etc. with Glade will involve some experimenting. +Explaining these in detail (using words) would require a whole book, which, like most such +books, would cost $99.00 plus tax, and would bore you half to death. +

+ +

+So, if you really feel that you can't handle it on your own from here, start saving your $99.00 (plus tax) for the book. You might have a long wait. +

+ +

But frankly, Glade doesn't save any time when creating these objects, since the process is somewhat tedious. You can achieve the same outcome by writing just a few +lines of code with an ordinary text editor, cutting and pasting from demo programs where applicable. Try it - this isn't rocket science! +

+ +
+ +
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

Updated for EuGTK version 4.11.11, Sept 1, 2016
+ All code © 2016 by Irv Mullins +

+
+
+ + + diff --git a/eugtk/examples/documentation/bear.html b/eugtk/examples/documentation/bear.html new file mode 100644 index 0000000..4794b43 --- /dev/null +++ b/eugtk/examples/documentation/bear.html @@ -0,0 +1,153 @@ + + + + Bear Docs + + + + + +
+


The Bear Help file

+
+ +
+ + bear +
+  The BEAR can even view Bear videos! + +
+
+ +
+ +

Browser Controls

+ + +

+To open a page from the web, click the Network button. A dialog box +will appear for you to type in a web address: http://OpenEuphoria.org, +for example. This button will be disabled if you are not on a network. +

+

+To open a local file (.html or otherwise), click the Local button. In most cases, +the file type will be automatically recognized and placed into the appropriate +window. +

+ +
+hint + +

+The sourcecode editor does not automatically 'track' the +current web page being viewed. If you want to edit the current web page +.html, you must click on the Edit button in the Browser toolbar!

+
+ +
+ +

Source Controls

+ + + +

+Click New or Open to create or edit a text file (Euphoria source code, for example). +If the file extension is .ex, then the Execute button in the Source toolbar +will be enabled; clicking on it will run a temporary copy of the program in the Source pane. +If you are satisfied with the way the temporary copy ran, just click on the Save or SaveAs buttons +to write the updated code to disk. +

+ + + +

+The Execute button will be disabled if the code being edited is not +a Euphoria program, but the Save and SaveAs buttons will function to save +text, including .html that you may have modified. If the file is .html, then +the WebView will be reloaded to show the updated web page. +

+ +
+

Preferences

+

+Options for the source code editor are: +

    +
  • Set Editor Font
    (only monospace fonts are shown in the +font dialog, since this is primarily for editing source and html +code)
  • +
  • Use Line Numbers
  • +
  • Spaces and Tabs
    Make whitespace characters visible
  • +
+

+
+ +
+ +Navigating +

+In order to more easily edit html source code, you can highlight +words or a phrase in the web view, and select 'copy' from the pop-up menu. +Then click on the Find button in the Web Page control panel. +This will try to scroll the editor +pane to find the matching word(s). +

+ +

Avoid clicking on text that +includes markup, such as italics or bold, as those won't match a text search. +Neither will markup items such as & < >, etc., +or hidden markup such as links. +

+ +

This scheme doesn't always work perfectly, +(sometimes not at all, try clicking on the find button again), +but it's certainly +better than nothing! If you know of a better way, please let me know! +

+ +
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

+ Updated for EuGTK version 4.11.11, Aug 15, 2016
+ All code © 2016 by Irv Mullins +

+
+
+ + + diff --git a/eugtk/examples/documentation/dialogs.html b/eugtk/examples/documentation/dialogs.html new file mode 100644 index 0000000..03194df --- /dev/null +++ b/eugtk/examples/documentation/dialogs.html @@ -0,0 +1,277 @@ + + + + + + + EuGTK Dialogs + + + + + +
+ + + gnome-run + +


EuGTK 4.12.0

+

Built-in Dialogs


+
+ + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Built-in Dialogs
+ +
+hint +

New:
+An easy-to-use Custom dialog, and non-modal dialogs! +

+
+ +

+ There are five pre-built modal dialogs in EuGTK, which you can use + in your own programs to save time and typing, while making your program + code much easier to read and maintain. They require only one line of code, + whereas using GTK's Dialogs or MessageDialogs can require many lines of code. There's also a non-modal dialog. +

+

+ Dialogs have a title, a primary text item, a secondary text item, + plus one or more buttons. +

+

+ Note that each dialog has different default titles, icons and buttons. + The primary and secondary text however, must be supplied by the programmer. +

+

+ Dialogs appearance and contents can be changed by exercising various options. See 8 below. +

+

+ All defaults can be overridden when creating a dialog. The + parameters to the dialog are shown below. All are optional.
+

    +
  1. Parent of the dialog +
    If you want the dialog to use the parent window's titlebar icon (and window theme allows), put the parent's handle here
  2. + +
  3. Title appearing on the titlebar +
    If omitted, title will be the type of dialog, e.g. Info, Error, Warning, or Question
  4. + +
  5. Primary text +
    Will be bold if there is secondary text, use markup if you wish
  6. + +
  7. Secondary text +
    Will be smaller than primary text, use markup if you wish
  8. + +
  9. Button set +
    Leave empty to use the default button set,
    +
    or use GTK_BUTTONS_ enums to change button set.
    +
    NULL (0) in this slot means don't use any buttons!
  10. + +
  11. Dialog icon +
    A GtkImage, GdkPixbuf, path to an image file, or name of stock or theme icon, + will override the default dialog icon with a custom image.
    +
    NULL in this slot means don't use a dialog icon.
    +
    Leave empty to use default Info, Warn, Error, Question icons
  12. + +
  13. Titlebar Icon +
    Name of icon, this overrides icon set by dialog.
    +
    NULL here means use parent's icon.
    +
    Leave empty to use default Info, Warn, Error, Question icons
    +
    Note: some themes refuse to show an icon on the titlebar.
  14. + +
    + +
  15. Modality +
    MODAL/NONMODAL
    +
  16. + +
  17. Addon + new in EuGTK 4.10 +
    You can pass the handle to a widget here, + and the widget will be added to the dialog. + The widget can, of course, be a container which + may contain several items. See example on the right, + which adds a GtkTextView widget to the + standard Info dialog.
    +
  18. + +
  19. X position + new in EuGTK 4.11 +
    You can pass an x position for the dialog, following the addon option
    +
  20. +
  21. Y position + new in EuGTK 4.11 +
    You can pass a y position for the dialog, following the X option
    +
  22. +
+

+
info dialog
error dialog
warn dialog
question dialog
custom dialog
+ + + + +


Creating the dialogs

+

+

    +
  • result = Info( [parent], [title], "Primary Text", "Secondary Text",
     [button type], [dialog icon], [titlebar icon], [modal], [addon], [x pos], [y pos])
  • +
  • result = Error( [parent], [title], "Primary Text", "Secondary Text",
     [button type], [dialog icon], [titlebar icon], [modal], [addon], [x pos], [y pos])
  • +
  • result = Warn( [parent], [title], "Primary Text", "Secondary Text",
     [button type], [dialog icon], [titlebar icon], [modal], [addon], [x pos], [y pos])
  • +
  • result = Question( [parent], [title], "Primary Text", "Secondary Text",
     [button type], [dialog icon], [titlebar icon], [modal], [addon], [x pos], [y pos])
  • +
  • result = Custom( [parent], [title], "Primary Text", "Secondary Text",
     [button type], [dialog icon], [titlebar icon], [modal], [addon], [x pos], [y pos])
  • +
+

+

+ Primary and Secondary text can be marked up as desired. [optional] parameters can be left empty, + defaults will be used. +

+ +
+ +


Modal Dialogs

+

Modal dialogs lock you out of doing other things until you reply to them, then return various values when dismissed via button clicks +or the titlebar 'close' button. These values are:
+

    +
  • MB_ABORT (-4) when dialog is closed using the titlebar 'close' button [X]
  • +
  • MB_OK (-5) when OK button is clicked
  • +
  • MB_CANCEL (-6) when Cancel button is clicked
  • +
  • MB_CLOSE (-7) when Close button is clicked
  • +
  • MB_YES (-8) when the Yes button is clicked
  • +
  • MB_NO (-9) when the No button is clicked
  • +
  • MB_APPLY (-10)
  • + +
+

+ +
+ + +


Non-modal dialogs

+

+ All the above built-in dialogs are by default modal, in that they capture the program focus until + they are dismissed. This is probably appropriate for most notification purposes. For places where + you need non-modal dialogs which you can leave on the screen while you work on + other windows in the same program, you'll have to do this a different way. +

+

+ Why, you ask? +

+

+ Because the reason for leaving dialogs on the screen is so they can + they interact with your code, perhaps + changing items in other windows in response to changes in dialog options. + I can't predict what those options and connections might be, so I can't provide a ready-to-use dialog. + You might start with a basic GtkDialog, and build one up yourself, but this can be a lot of work, so I've + added a pre-built Custom dialog with options. +

+ +
+ +

+ A non-modal dialog needs to be able to trigger actions before closing, + since it can remain on the screen for as long as the user wants. + Therefore, the dialog's buttons must be connected to user-written functions + prior to adding them to the dialog. +

+

+ To add buttons to a Custom dialog, use the following syntax: +

+ -- for one button
+object btn  = {{"gtk-ok",say,"OK"}} -- say is the call_back to your function Say(), and "OK" is text to send to the function.
+
+ -- or, for more than one
+object btns = { 
+	{"gtk-ok",say,"OK"},
+	{"gtk-cancel"}, -- any button not provided with a call_back will be used to cancel the dialog  (regardless of what the button caption says) 
+	{"gtk-quit","Quit"} -- this does the obvious, killing the whole program, probably not something you'd want to do from a non-modal dialog!
+}
+

+ +Next, you put the btn or btns array as the 5th parameter passed to the dialog constructor: +
	Custom(win,"Fonts Help","Instructions",help_text,btns)
+
+

+ +

+Most often, you will want to add some control(s) other than buttons to a non-modal dialog, for example, one +or more color chooser buttons, or a font chooser, etc., or perhaps some scrolling text or an image. +These would look out of place if they were added to the button area of a dialog. +

+ +

+To add these to the dialog's content area, create the item and pass the handle of this item as the Addon (9th) parameter to the dialog. +If you need several, pack them into a container and pass the handle of the container. See test200.ex. +

+ +

+It is best to limit the use of non-modal dialogs, since they tend to clutter up the screen. If you're using lots of these, +you are most likely doing something wrong. Menu options, sidebars, or moveable panes are often better substitutes. +

+ +
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

+ Updated for EuGTK version 4.12.0, Sept 15, 2016
+ All code © 2016 by Irv Mullins +

+
+
+ + + diff --git a/eugtk/examples/documentation/favicon.ico b/eugtk/examples/documentation/favicon.ico new file mode 100644 index 0000000..6eebd39 Binary files /dev/null and b/eugtk/examples/documentation/favicon.ico differ diff --git a/eugtk/examples/documentation/functions.html b/eugtk/examples/documentation/functions.html new file mode 100644 index 0000000..c7316ab --- /dev/null +++ b/eugtk/examples/documentation/functions.html @@ -0,0 +1,253 @@ + + + + + EuGTK Internals + + + + + + GTK LOGO + mongoose + gnome-run + +


EuGTK 4.12.0

+

Quick Function List

+
+ + + + + + + + +


Public functions ~ commonly-used

+
    +
  • create() returns handle to newly-created widget: win = create(GtkWindow)
  • +
  • set() sets a property for a widget: set(win,"background","blue")
  • +
  • get() gets a property: ? get(win,"background")
  • +
  • add() adds a widget to a container: add(win,panel); spaces divided equally
  • +
  • pack_start() adds at top/left
  • +
  • pack_end() adds at bottom/right
  • +
  • show() show a widget: show(btn)
  • +
  • show_all() show a container and all items contained within: show_all(win)
  • +
  • hide() hide a widget: hide(btn)
  • +
  • hide_all() hide a container and all items contained within: hide_all(win)
  • +
  • connect() connect a signal to a Eu function: connect(btn1,"clicked","FooBar",33) Note: connect() returns a sigid, usually ignored unless you plan to disconnect.
  • +
  • disconnect() disconnect a signal: disconnect(btn1,sigid)
  • +
  • main() start the GTK main processing loop: main()
  • +
  • requires() pop up an Error dialog if not available: requires("3.10","GtkRevealer")
  • +
  • destroy() destroy a widget: destroy(win)
  • +
  • unpack() convert data attached to a control back into format usable by Euphoria: unpack(data)
  • +
  • show_uri() call default handler for uri (file, http, etc...): show_uri("http://gtk.org")
  • +
  • "Quit" global call to shut down the GTK main processing loop: connect(win,"destroy","Quit")
  • +
  • pointer() obtains a handle, a.k.a. pointer, to an object loaded from Glade +constant win = pointer("help:window1")
  • +
  • _() shorthand for call_back(routine_id()), links signals to local functions, no global declarations required
  • +
  • $... shorthand for signal links e.g. $destroy=Quit
  • +
+ +

+See HowItWorks for details on the above functions, you will use some of them frequently! +

+ + +

See also: settings

+ + +


Utility functions ~ sometimes used

+
General functions
+
    +
  • has_icon(name) returns TRUE if named icon exists in current theme
  • +
  • list_icons() returns a {list} of all icon names in current theme
  • +
  • valid_icon({list}) given a list of possible icon names, returns handle to an image made from first valid name
  • +
  • valid_icon_name({list}) given a list of possible icon names, returns first valid name
  • +
  • icon_info(handle) returns a sequence: pointer to info struct, name, path, size, scale
  • +
  • class_name(handle) returns the classname from a widget handle: display(classname(win)) => "GtkWindow"
  • +
  • class_id(handle) returns the enumerated class for the handle: if classid(win) = GtkWindow then ...
  • +
  • object_name(handle) returns name if object has a name, -nil- otherwise
  • +
  • register(handle,class) registers handle as a class: register(win,GtkWindow) hardly ever needed.
  • +
  • to_sequence(GList) converts a glist pointer back into a Eu sequence: rarely used!
  • +
  • to_rgba(str) converts a color description to a pointer: ? to_rgba("skyblue")
  • +
  • from_rgba(ptr) converts a color pointer into "rgb(r,g,b)" or "rgba(r,g,b,a)"
  • +
  • pixbuf_formats() returns a list of implemented formats for pixbuf loader
  • +
+ +
+ +
Settings
+
    +
  • settings:Save()
  • +
  • settings:Load()
  • +
  • settings:Add()
  • +
+ +
+ +
Events
+
    +
  • events:id returns unique event id: ? events:id(event)
  • +
  • events:xy returns location of event
  • +
  • events:axes
  • +
  • events:time
  • +
  • events:state
  • +
  • events:window
  • +
  • events:device
  • +
  • events:clicks returns # of mouse clicks in event
  • +
  • events:scroll_dir
  • +
  • events:key returns keypressed value
  • +
  • events:button returns mouse button 1..3 when given an event: + ? events:button(event)
  • +
  • events:pending used when multitasking
  • +
  • events:main_iteration
  • +
  • events:main_iteration_do
  • +
+ +
+ +
Networking
+
    +
  • networked returns TRUE if your computer is part of a network
  • +
  • inet_connected returns TRUE if internet could be reached
  • +
  • get_net_address returns 127.0.0.1 or your current ip
  • +
+ +

See events

+ + +


Exported constants ~ available if you need them

+ +test0 screenshot + +
    +
  • version EuGTK version: "4.11.8"
  • +
  • release EuGTK release date: "Aug 1, 2014"
  • +
  • copyright EuGTK copyright: "(c) 2015 by Irv Mullins"
  • +
  • major_version for GTK 3.10.1: 3
  • +
  • minor_version for GTK 3.10.1: 10
  • +
  • micro_version for GTK 3.10.1: 1
  • +
  • user_name The user logged-in: irv
  • +
  • real_name Full name: Irv Mullins
  • +
  • host_name host name of computer: Mint17
  • +
  • host_addr host address: 192.168.1.100
  • +
  • home_dir logged-in user's home: /home/irv
  • +
  • temp_dir user's temp dir: /tmp
  • +
  • curr_dir user's currently-logged into directory
  • +
  • conf_dir user's config directory /home/irv/.conf
  • +
  • runt_dir user's runtime directory /run/user/1000
  • +
  • prg_name current program test0.ex
  • +
  • os_name Linux
  • +
  • os_distro Mint 17
  • +
  • os_version 3.13.0-24-generic
  • +
  • os_comp #46-Ubuntu SMP Thu Apr 10...
  • +
  • os_arch x86_64
  • +
  • os_term xterm
  • +
  • os_shell /bin/bash
  • +
  • eu_version version string: "4.1.0"
  • +
  • eu_revision revision # 6318
  • +
  • eu_date date compiled
  • +
  • today date program started
  • +
  • start_time time program started
  • +
    +
  • def_lang default language en-us
  • +
    +
  • CMD1 command_line[1] e.g. eui
  • +
  • CMD2 command_line[2] e.g. /home/irv/demos/test1.ex
  • +
    +
  • LGPL Text of the Lesser General Public License
  • +
  • stock_list List of GTK stock items - soon to be deprecated!
  • +
+ +

+Note 1: these constants are generated when EuGTK starts up, and are available in two different forms: +

    +
  • As individual constants
  • +
  • As key/value pairs in the gtk:info structure, + provided mainly for convenience when displaying them: +   display("[{prg_name}]",gtk:info)
  • +
+ See
test0 for an example. +

+ +

+ +


Other Stuff

+ + +Identifiers +

Below are unique identifiers used to specify storage types in List/Tree models, not only do these control how the value +is stored, but also how it is displayed: +

    +
  • gINT Store and display as an integer (rounds floats down)
  • +
  • gDBL Store and display as a double
  • +
  • gSTR Store and display as a string
  • +
  • gPTR Generic pointer - seldom used
  • +
  • gFLT Displays with six digits following the decimal point
  • +
  • gBOOL anything other than 0 displays TRUE, 0 displays FALSE
  • +
  • gPIX Stores handle to a pixbuf, displays that image
  • +
  • gCOMBO Stores handle to a GtkComboBox
  • +
+ +

Unique identifiers below save space in method prototypes; +programmer may use them when calling the three user functions which follow. +

    +
  • P = C_POINTER expected parameter is a pointer
  • +
  • I = C_INT expected parameter is an integer
  • +
  • S = E_OBJECT expected parameter is a string
  • +
  • B = C_BYTE expected parameter is boolean
  • +
  • D = C_DOUBLE expected parameter is a double
  • +
  • F = C_FLOAT expected parameter is a floating-point value
  • +
  • A = E_SEQUENCE expected parameter is an array
  • +
+ +
+User functions +

While mostly used internally by EuGTK, they may be useful +when testing or when implementing GTK methods which haven't been added to EuGTK. +

+
    +
  • gtk_func Example: gtk_func("gtk_label_set_text",{P},{allocate_string("Hello")})
  • +
  • gtk_str_func Example: puts(1,gtk_str_func("gtk_label_get_text",{P},{lbl})
  • +
  • gtk_proc Example: gtk_proc("gtk_widget_hide",{P},{win})
  • +
+ +
+ + + + diff --git a/eugtk/examples/documentation/guide_a.html b/eugtk/examples/documentation/guide_a.html new file mode 100644 index 0000000..bf0a9f0 --- /dev/null +++ b/eugtk/examples/documentation/guide_a.html @@ -0,0 +1,1558 @@ + + + + + + Alphabetical Guide + + + + + + + GTK LOGO + mongoose + + Cows from Space + + +


EuGTK 4.12.0

+

Alphabetical guide to GTK widgets

+
+
+ +Buttons below link to at least one example of each control: + + + + +
+hint + For more exhaustive - not to mention exhausting! - documentation, +see the GTK 3.0 docs

+
+ +
+ + +A
+ + +test28 + + +
    +
  • AboutDialog +test25, test28 +
    a pre-built pop-up dialog to display credits, license, etc...
    +
  • + +
  • Accelerators + test25, test80, test144 +
  • + +
  • Adjustment +test82, test83, test154 +
  • + +
  • Alignment +
    (deprecated, use 'align' and 'margin' properties instead)
    +
  • + +
  • Animated gifs test10 +
    on buttons: test102
    +
  • + +
  • AppChooserButton test123 +
    choose approprite app based on filetype
    +
  • + +
  • AppChooserDialog test115 +
    as above, but as a pop-up dialog
    +
  • + +
  • AppChooserWidget test124
  • +
    as above, but as a widget to add to your program window
    + + +
  • Arrows test93 +
    (deprecated as of GTK 3.14 - use icons instead)
    +
  • + +
  • AspectFrame test140, test161 +
    a frame which maintains its relative proportions when resized
    +
  • + +
  • Assistant test62 +
    a step-by-step guide for your users, helpful for program installation, setup, etc...
    +
  • + +
  • Auto-scrolling text test130 +
    (implemented with a timer
    +
  • + +
+ + +B
+ + +test157 + + + + + +C
+ +test116 + + +
    +
  • Cairo graphics test60, test61, + test65 +
  • + +
  • Calendar test31 +
    See Calendars
    +
  • + +
  • CellRendererCombo test121 +
    drop-down selections in lists
    +
  • + +
  • CellRendererPixbuf test35, test116 +
    display images in list rows
    +
  • + +
  • CellRendererProgress test33 +
    display progress bars in list rows
    +
  • + +
  • CellRendererSpin test148 +
    display numeric input in list rows
    +
  • + +
  • CellRendererText test33, test96 +
    display text in list rows
    +
  • + +
  • CellRendererToggle test35, test96 +
    display toggle or check buttons in list rows
    +
  • + + + + +
  • CheckButton test13, test15 +
  • + +
  • CheckMenuItem test54, test25 +
  • + +
  • Clipboard + + + +
  • + +
  • Colors see RGBA Colors +
    see also CSS below
    +
  • + +
  • ColorButton test59 +
    small button to select colors
    +
  • + +
  • ColorChooserDialog test185 +
    pop-up dialog to select colors
    +
  • + +
  • ColorChooserWidget test169 +
    widget to add to your window to select colors
    +
  • +
+ + + +
    +
  • ComboBox test116 +
    choose from a drop-down list of options
    +
  • + +
  • ComboBoxEntry test16.ex +
    as above, but includes an input box so user can type in an unlisted item
    +
  • + +
  • ComboBoxText test12 +
    as above, but easy-to-use for simple text options
    +
  • + +
  • Control 'data' fields test22 +
    associative lists to pass data via control actions
    +
  • +
+ + +test212 + + + + + +D
+ + +World Flags + + +
    +
  • Data Passing +
    attaching data items to controls, see Data Passing
    +
  • + +
  • Decorated property test110 +
    creates window without title-bar, etc. use with caution!
    +
  • + +
  • delete-event (trapping) test114 +
  • + +
  • Default buttons test4, test13, test14 +
  • + +
  • Dialogs built-in dialogs, see: dialogs.html +
  • + +
  • Display status test76 +
    (screen size, pointer location, etc.)
    +
  • + +
  • Drawing with Cairo + +
      +
    • complex demo with numerous examples: test60
    • +
    • graphics primitives: test61
    • +
    • shapes, borders and transparency: test65
    • +
    • text: test70
    • +
    +
    +
  • + +
+ +
+ + +E
+ + +entry + + +
    +
  • Entry + +
      +
    • single-line text entry widget: test7
    • +
    • selecting text: test146
    • +
    • with shared buffer: test57
    • +
    • with clickable icons: test174
    • +
    +
    +
  • + +
  • EntryCompletion test58 +
    show pop-down list of matching items
    +
  • + +
  • Error dialog see dialogs.html +
  • + +
  • EventBox
    trap events, add background colors to labels,etc..
    +
  • + +
  • Expander test131
  • +
    show/hide subsidiary info
    +
+ + +F
+ + +test136 + + +
    + +
  • FileChooserButton test120 +
    small button to pop up a file chooser
    +
  • + +
  • FileChooserDialog test23, test25 +
    pop-up dialog to select a file
    +
  • + +
  • FileChooserWidget test122 +
    to add to your window
    +
  • + +
  • FileFilter test23, test25 +
    select only certain types of files to show in the Chooser
    +
  • + +
  • Fixed + don't use this! See note below +
  • + +
  • FlowBox test202 +
    container that allows reflowing its children
    +
    requires GTK3.12+
    +
  • + +
  • Fonts test97, test133 +
    See also: fonts
    +
  • + +
  • FontChooserDialog test136 +
    pop up to select a font
    +
  • + +
  • FontSelectionDialog +
    deprecated, do not use!
    +
  • + +
  • FontButton test36, test59 +
    small button to add to your window to select a font
    +
  • + +
  • FontChooserWidget test183 +
    widget to add to your window to select a font
    +
  • + +
  • FontFilter test36 +
    use with font choosers
    +
  • + +
  • Frames + + + +
    See note below
    +
  • + +
+ +
+ + +G
+ +test34 + + + + + +H
+ +
    + +
  • HeaderBar test196 requires GTK 3.10+ +
  • + +
  • HSV (deprecated - never did work - removed) +
  • + +
+ + +I
+ + + icons + + + + + +J
+ +
    +
  • Justify property for labels test11 +
  • +
+ + +K
+
    +
  • Keyboard Accelerators test144 +
    using alt-key or ctl-key combinations
    +
  • + +
  • Keypress event processing - see examples/hangman
  • +
+ + +L
+ + +test5 + + +
    +
  • Labels + + + +
  • + +
  • Layout test38 +
    specify exact x/y positioning - avoid when possible!
    +
  • + +
  • LevelBar test187 +
    changes color based on value
    +
    requires GTK 3.6+
    +
  • + +
  • Links to web pages in labels: test103 +
  • + +
  • LinkButton test53 +
    button with web link
    +
  • + +
  • Linking to Euphoria Functions + test4 +
    See HowItWorks
    +
    linking multiple functions: test108
    +
  • + +
  • ListBox test196 +
    requires GTK 3.10+
    +
  • + + +test33 + + +
  • ListView
    + + New! simpler to use, please read ListView/TreeView + + +
  • + +
  • Locale test31 +
    customizing numbers and dates for your area
    +
  • + +
+ +
+ + +M
+ + +menus + + + + +
+ + +N
+ + + +
+ + +O
+ + + +test109 + + +
    +
  • Opacity property +test109, test209 +
    if window manager allows
    +
  • + +
  • OS Info test0, test160 +
  • + +
  • Overlay test113 +
  • + +
  • Override Color
    use "color" in most instances
    +
  • + +
  • Override Cursor test2 +
    use "cursor"
    +
  • + +
  • Override Font +
    use "font"
    +
  • + +
+ + +P
+ + + + +Q
+ + + +
+ + +R
+ + +test59 + + +
    +
  • RadioButton test14, test67, test96 +
    for selecting one item in a group of buttons
    +
  • + +
  • RadioMenuItem test54, test23, test25 +
    same, for menus
    +
  • + +
  • RadioToolButton test175 +
    for selecting one from a group of tool buttons
    +
  • + +
  • RecentChooser test125, test126 +
  • + +
  • RecentChooserDialog test73 +
    pop-up window for above
    +
  • + +
  • RecentChooserMenu test25 +
    menu version of above
    +
  • + +
  • RecentFilter test25 test125 +
    select what files are shown based on file types
    +
  • + +
  • Resizing images test27, test86 +
    using GdkPixbuf
    +
  • + +
  • Revealer test199 +
    fade in/out or slide left/right/up/down to show/hide items
    +
    requires GTK 3.10+
    +
  • + +
  • RGBA Colors see RGBA Colors +
  • + +
  • Rich Text test59 +
  • + +
+ + +S
+ + +test9 + + +
    +
  • ScaleButton test55 +
    button which changes icons based on value
    +
  • + +
  • Scale test9, test134 +
    for getting/setting numeric values
    + + + +
  • + +
  • SearchBar test167 +
    requires GTK 3.10+
    +
  • + +
  • SearchEntry test192 +
    text entry field with search and clear icons
    +
    requires GTK 3.6+
    +
  • + +
  • Search function for ListView browser.ex
  • + +
  • Screen Dimensions test76 +
  • + +
  • ScrolledWindow test48 +
    container for long lists, large pix, etc
    +
  • + +
  • Scrolling text demo test130 +
    auto-scroll some lengthy text
    +
  • + +
  • Separator test139 +
    ~ a thin horizontal or vertical divider bar
    +
  • + +
  • SeparatorMenuItem test54, test25 +
    ~ a horizontal divider for drop-down menus
    +
  • + +
  • ShowUri() +test120, test103 +
    build-in function which calls the registered handler app for most common files
    +
  • + +
  • SizeGroup test94 +
    force all widgets in the group to be identical size
    +
  • + +
  • SourceView +test201 also, read SourceView +
    view and edit source code in many languages
    +
    (must install Euphoria syntax files from ~/demos/resources)
    +
  • + +
  • SpinButton test8 +
    for numeric entry
    +
  • + +
  • Spinner examples/task.ex +
    round and round it goes....
    +
  • + +
  • Stack test156, test168 +
    requires GTK 3.10+
    +
  • + +
  • StatusIcon test101 +
    adds an icon to your screen's status bar, with optional tooltip
    +
  • + +
  • Stock Items test39 +
    (deprecated as of GTK3.10 - use named icons instead)
    +
    See README)
    +
  • + +
  • Stock Icons test141 +
    these are the replacements for stock items
    +
  • + +
  • SVG images test27 +
    the best choice if images are to be resized
    +
  • + +
  • Switch test15 +
    a simple on/off button
    +
  • + +
+ + +T
+ +
    + +
  • Table deprecated. Use GtkGrid +
  • + + +test31 + + +
  • testall + a EuGTK program which runs test programs 10 at a time. +
  • + +
  • TextBuffer + + + +
  • + + +
  • Text angle property test137 +
    rotate text in labels
    +
  • + +
  • Text justification in labels test11 +
    justify multi-line text in labels; right, left, center
    +
  • + +
  • TextTags test59 +
    creating named style tags which can be applied to text
    +
  • + +
  • TextView test112, test25, test59 +
    see note below
    +
  • + +
  • Themed Icons examples/icons.ex +
    for a list of icons see themeicons.txt
    +
  • + +
  • Timers test51, test52 +
    ~ call a function every x/1000 sec, or whenever computer is not otherwise busy
    +
  • + +
  • Title property test2.ex +
    text to appear on window titlebar
    +
  • + +
  • TitleBar
    -- new in GTK 10+ (but not worth the effort right now, wait for improvements.)
    +
  • + +
  • Titlebar icon test5 +
    see note below
    +
  • + +
  • ToggleButton test15 +
  • + +
  • ToggleToolButton test176 +
  • + +
  • ToolButtons test118, test119, test132 +
  • + +
  • ToolBars + + + +
  • + +
  • ToolPalette test132 +
    ~ show/hide groups of toolbuttons
    +
  • + +
  • Tooltips + + + +
  • + +
  • TreeView test33, test63 +
    generic container for List and Tree Views
    +
  • + +
+ + + +U,V
+ +utf + +
    + +
  • Unicode test111 +
  • + +
  • URI test85 +
    clickable links in labels
    +
  • + +
  • Versions test0 +
    display versions of EuGTK, GTK, and Euphoria
    +
  • + +
  • VolumeButton test56 +
  • + +
+ +
+ + +W
+ +
    +
  • Warning dialog see dialogs.html +
  • + +
  • Window (any of the demo programs!) +
    decorated: test110 use with great care!
    +
    opacity: test109 must be running a compositing window manager!
    +
  • + +
  • Window Size test65
  • + +
  • Window Title
    if you don't enter one, default is the program filename
    +
  • + +
+ +
+ + +X
+ + +


Notes:

+ + + +

GtkFixed

+ +

The GtkFixed widget lets you lay out things the Windows™ way, which is - no surprise - + the wrong way. +

+ +
+

+Quote from the GTK docs:

+ +"For most applications, you should not use this container! It keeps you from having to learn about the other GTK+ containers, but it results in broken applications. With GtkFixed, the following things will result in truncated text, overlapping widgets, and other display bugs: +

    +
  • Themes, which may change widget sizes.
  • +
  • Fonts other than the one you used to write the app will of course change the size of widgets containing text; keep in mind that users may use a larger font because of difficulty reading the default, or they may be using Windows or the framebuffer port of GTK+, where different fonts are available. +
  • Translation of text into other languages changes its size. Also, display of non-English text will use a different font in many cases.
  • +
+In addition, the fixed widget can't properly be mirrored in right-to-left languages such as Hebrew and Arabic. i.e. normally GTK+ will flip the interface to put labels to the right of the thing they label, but it can't do that with GtkFixed. So your application will not be usable in right-to-left languages. +

+ +

+Finally, fixed positioning makes it kind of annoying to add/remove GUI elements, since you have to reposition all the other elements. This is a long-term maintenance problem for your application. +" + +

+ +

+This is good advice. If you choose to ignore it, you'll have to do a lot of extra work, only to find that users are upset that your programs +don't work as they expect well-behaved Linux programs to work. +

+ +
+ + +

Icons

+

+
+Window Icons are the small icons that appear on the titlebar (see mongoose at far left), but where +these appear, and whether they appear at all, depends upon the theme in use. If you don't see +these in the demos, try changing your window theme. +

+ +

+Icons can be made from .jpg, .png, .gif, etc... files, gtk-stock items, or named icons from your +current theme. Run test39 to see stock items, and + examples/icons.ex to view and enumerate available theme icons +in themeicons.txt. +

+ +
+ + +

Fonts

+

+There are several ways to modify fonts. For text controls, such as labels: +

+
For the entire control:
+
+    set(ctl,"font","Courier 12") -- set font and size
+    set(ctl,"font","36") -- sets size only, keep user's font preference
+    set(ctl,"font","italic") -- italicises user's preferred font. Try also 'bold', 'bold italic', etc.
+
+

+You can specify several possible fonts. Gtk will use the first one it finds on the computer, +so put your choice as the first on the list. If you want to specify a point size, put it last +on the list (not separated with a comma!) +

+    set(ctl,"font","Century Schoolbook L, Serif, Purisa, Bitstream Charter")
+    set(ctl,"font","Purisa, Courier, Sans 18") -- first valid font will be shown in 18pt
+
+

+

+

Or, you may mark up portions of the text:
+
+   set(ctl,"markup","This is some <b>marked-up</b> <i>text</i>") -- styling text using a subset of HTML markup
+   set(ctl,"markup","<span font='Sans 24' color='red'>Hello</span>") -- selecting font style and size using markup
+
+See Pango Markup for details on the available markup attributes.
+For other controls, such as buttons, the appearance is determined by the chosen window theme, and the programmer has few options: either go along with the user's choice, or design a custom button. +

+ +

+In certain situations where you need more control, such as fonts with drop shadows, you might consider using CSS to change fonts. The CSS can be loaded either from a standard *.css file, or inline in your program. +Example: test72 and mystyle.css +

+

+The GTK docs have some detailed info on css options. +

+ +
+ +

Font Choosers

+

+When writing a program which uses a GtkFontButton, GtkFontChooser or GtkFontDialog, you will +probably want to have some control over which fonts are shown in the list of available fonts. +You can do this by writing a simple filter function to examine the font names and/or font face +names, and returning TRUE if that font should be shown in the dialog, or FALSE if not. +

+

Then set the font button or font dialog filter function to your filter routine:
+  set(btn,"filter func",_("MyFontFilter"))

+See test201 for an example. +

+ +
+ + + +test138 + +

Frames

+

In the transition to using CSS to control GTK widget appearance, some of the frame attributes have been lost, +meaning that the style settings (raised, sunken, etc) don't have any effect. +Therefore, if the exact appearance is important, you may have to use both the old-style settings plus the +new CSS styling below.

+
+ + + +

CSS

+

+Support for styling GTK apps with css is improving. You can create some +interesting effects, such as creating decorative backgrounds, rounded corners +on buttons and frames, and 'animated' buttons which change color when mouse passes +over or clicks them. +

+ +

+See test138 and test157 +for examples. +

+ +

+New in EuGTK4.11.2 you can load css directly in-line, without using a separate .css file. See test160. +

+ +

An alternative to css in some cases can be to use an ini file to control colors and styles +of specific widgets. See test153 +and test173. +

+ +
+ + + +

Colors

+

+EuGTK has greatly simplified GTK color managment. You can specify colors in +various ways - as hex values: #FF0000, quoted hex: "#FF0000", +as Red/Green/Blue strings: "rgb(255,0,0)" +or "rgba(255,0,0,0.5)" if you want to set alpha transparency. +

+ +

+The best way, however, is by name. The names used are +the xcolor names. See xcolors.txt. +Case doesn't matter. +

+ +
Gtk Widget Colors
+

+For normal GTK widgets, you can set foreground color, which generally applies to labels, fonts, etc. +and background color, which applies to windows, etc., but not labels, which have a +transparent background. Setting the background color for a container such as a GtkBox +does nothing, as these containers have a transparent background, +but setting the box's foreground color will affect any labels added to the box. +

+ +

+You can determine what will happen by examining the 'properties' of a given widget, +as well as the widget's ancestor properties - or, you can do this the easy way: just +set a color and see what happens. +

+ +

+Generally, 'color' can be used as a more-logical synonym for 'foreground' when setting widget colors. +Widget colors may also change depending upon the widget's 'state': mouse-over, pressed, selected, insensitive etc. +To set these state colors, use 'override color' and 'override background color'. +Whether or not these work depends entirely on the window manager preferences. +

+ +
Cairo Colors
+

+When you are drawing with Cairo, you have several ways to choose a drawing color: +

    +
  1. set(cr,"color","red") -- easy
  2. +
  3. set(cr,"color",#FF0000) -- hex value
  4. +
  5. set(cr,"color","#FF0000") -- quoted hex value
  6. +
  7. set(cr,"source rgb",1,0,0) -- to conform to the Cairo way. values are r,g,b in range 0=>1.0
  8. +
  9. set(cr,"source rgba",1,0,0,0.5) -- the Cairo way to set color and alpha. ranges are 0=>1.0
  10. +
+Note that you cannot use the "rgb(255,0,0)" or"rgba(255,0,0,1)" formats which work for widgets when defining colors for Cairo. +

+ +
+ + + +glade + + +

XML/GtkBuilder

+

GTK has a GtkBuilder object which can parse XML markup to create your user +interface. This means you can use Glade to build the interface 'visually', rather +than coding it by hand. You should try to update Glade so that it knows about +the latest GTK3 objects. Glade 3.16.1 seems to work ok, older versions, not so much. +

+ +

+The latest versions of EuGTK (4.9.0 and up) have improved functions for working with Glade, including +namespacing which works in a manner similar to Euphoria's namespacing, and access to Glade objects by name (in string form) rather than via pointer. +

+See EuGTK and Glade and Glade examples in ~/demos/glade. +

+ +
+ +
+ + +

Images

+

+Images can be created from almost any graphic file format: .jpg, .png, +.tiff, .gif, .xpm.... etc. simply by specifying the filename:
+

+    constant img = create(GtkImage,"~/demos/thumbnails/mongoose.png")
+ -- canonical_path() is automatically called to correct the filepath
+
+This will create an image 'widget' which can be used exactly once, +and it will be created at the same size as the original image in the file. +

+ +

Sometimes this is not what you want.

+ +

+If you need to re-use an image without having to reload it repeatedly, +or if you need to change its size, then you should load the image into +memory as a pixbuf, and create your image(s) from that pixbuf (which can be re-used). +

+    constant pix = create(GdkPixbuf,"~/demos/thumbnails/mongoose.png") 
+   -- note that this call is to GdkPixbuf, not GtkPixbuf!   
+    constant img = create(GtkImage,pix)
+
+

+ + +

Notes: When calling create(GdkPixbuf,...) +

    +
  1. If the above create() line contains only a filename +
    a pixbuf is returned at the natural size of the image file
  2. +
    +
  3. If one number follows the filename +
    the image will be scaled to +that width (original height x width ratio is retained)
  4. +
    +
  5. If two numbers follow the filename, (height x width) +
    the image will be stretched to those dimensions, predictably with ugly results, +unless you retained the h/w ration when figuring the new dimensions!
  6. +
    +
  7. If three numbers follow the filename, the third must be 1 or 0 + ~ a.k.a. TRUE or FALSE +
    if TRUE, then the original h x w ration will be maintained, and the +image will be scaled to either h or w, whichever is smaller.
    +
    if FALSE, then results will be the same as in line (3) above
  8. +
+
+ +

+In addition, images can be created from GtkStock items (deprecated), +or from named icons. +When using named icons, you can specify a size for the icon, either as one of +the GTK_ICON_SIZE enums, or in pixels, or omit the size altogether: +

+    constant oops = create(GtkImage,"face-surprise",GTK_ICON_SIZE_DIALOG) -- see GTK_ICON_SIZE_ enums
+    constant oops = create(GtkImage,"face-surprise",128) -- width in pixels
+    constant oops = create(GtkImage,"face-surprise") -- 'natural' size
+
+

+ +

+You cannot (AFAIK) load named icons into GdkPixbufs. If you need to do this, convert the icon into a .png or .jpg, +using a graphic program such as the Gimp. +

+

+In EuGTK 4.10.0+, there's a simple utility to convert .xpm image files into +Euphoria includes. When imported as a normal include.e file, the image(s) +become part of the source code, and are bound into the executable, so you can distribute +a bound, shrouded, or compiled program without having to also distribute a number +of related image files. See ~/demos/examples/xpm_include_test.ex +

+ +
+ + +

TextView

+
+

+Quote from the GTK docs:

+ +"GTK+ has an extremely powerful framework for multiline text editing." + +

+
+

+With power comes complexity, because it has to deal with multi-byte characters, +different text directions, input methods, fonts, etc... See test59. +

+

+The good news; it does work, and for most purposes, it will not be +necessary to delve into the arcane commands too deeply. +After all, you are not likely to write a full-fledged rich-text editor +in Euphoria, since there are dozens of these things already freely available. +

+ +
+ + +sourceview +

SourceView Plugin

+

+Beginning with EuGTK 4.10.0, there's a GtkSourceView plugin which can be added to +EuGTK. This will allow your program to view/edit syntax-colored source code for over 100 +different programming languages. +

+

+Only the most important parts of the SourceView widget have been 'wrapped' so far, +but the control is already quite usable. I even use it for editing these +html pages. Additional features, such as auto-completion, +searching, etc. will be added as time permits. +

+

+

+

+ +
+ +
+ + +

WebKit Plugin

+ +webkit + +

+Also, there's a plug-in for LibWebKit, which adds a web browser 'widget' to +EuGTK. This includes a pop-up 'inspector', which works very nicely. +

+ +

+

+

+ +
+
+ +
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

+ Updated for EuGTK version 4.12.0, Sept 15, 2016
+ All code © 2016 by Irv Mullins +

+
+
+ + + diff --git a/eugtk/examples/documentation/images/bear0.png b/eugtk/examples/documentation/images/bear0.png new file mode 100644 index 0000000..efd1a48 Binary files /dev/null and b/eugtk/examples/documentation/images/bear0.png differ diff --git a/eugtk/examples/documentation/images/bear1.png b/eugtk/examples/documentation/images/bear1.png new file mode 100644 index 0000000..61c4773 Binary files /dev/null and b/eugtk/examples/documentation/images/bear1.png differ diff --git a/eugtk/examples/documentation/images/bear2.png b/eugtk/examples/documentation/images/bear2.png new file mode 100644 index 0000000..14070b5 Binary files /dev/null and b/eugtk/examples/documentation/images/bear2.png differ diff --git a/eugtk/examples/documentation/images/bear3.png b/eugtk/examples/documentation/images/bear3.png new file mode 100644 index 0000000..26185e2 Binary files /dev/null and b/eugtk/examples/documentation/images/bear3.png differ diff --git a/eugtk/examples/documentation/images/bear4.png b/eugtk/examples/documentation/images/bear4.png new file mode 100644 index 0000000..371e4dd Binary files /dev/null and b/eugtk/examples/documentation/images/bear4.png differ diff --git a/eugtk/examples/documentation/pango_markup.html b/eugtk/examples/documentation/pango_markup.html new file mode 100644 index 0000000..8f329ff --- /dev/null +++ b/eugtk/examples/documentation/pango_markup.html @@ -0,0 +1,267 @@ + + + + + Pango Markup + + + + + + + gtk logo + mongoose + + test5 + +

EuGTK 4.12.0

Pango Markup

+
+
+ + + + +

Markup

+

+While you can set text font, size and style for most Gtk widgets using normal +method calls, this affects all text displayed by that widget. +Changing only selected portions of the text cannot be done that way. +Instead, we can use a subset of HTML to embed changes within +the text string. +

+ +Quote from the Pango Docs (formatting added) + +
+
+

Pango Text Attribute Markup Language

+

+Frequently, you want to display some text to the user with attributes applied +to part of the text (for example, you might want bold or italicized words). +With the base Pango interfaces, you could create a PangoAttrList and apply +it to the text; the problem is that you'd need to apply attributes to some +numeric range of characters, for example "characters 12-17." This is broken +from an internationalization standpoint; once the text is translated, the +word you wanted to italicize could be in a different position. +

+ +

+The solution is to include the text attributes in the string to be translated. +Pango provides this feature with a small markup language... +

+ +

+A simple example of a marked-up string might be: +"<span foreground='blue' size='x-large'>Blue text</span> is <i>cool</i>!" +

+ +

+Pango uses #GMarkup to parse this language, which means that XML features such as numeric + character entities such as &#169; for © can be used too. +

+ +

+The root tag of a marked-up document is <markup>, but pango_parse_markup() +allows you to omit this tag, so you will most likely never need to use it. +The most general markup tag is <span>, then there are some convenience tags. +<span> has the following attributes: +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Attributes
font, font_descA font description string, such as "Sans Italic 12". + See pango_font_description_from_string() for a description of the format of the + string representation . Note that any other span attributes will override this + description. So if you have "Sans Italic" and also a style="normal" attribute, + you will get Sans normal, not italic.
font_family, faceA font family name
font_size, sizeFont size in 1024ths of a point, or one of the absolute sizes 'xx-small', + 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the + relative sizes 'smaller' or 'larger'. If you want to specify a absolute size, + it's usually easier to take advantage of the ability to specify a partial font + description using 'font'; you can use font='12.5' rather than size='12800'
font_style, styleOne of 'normal', 'oblique', 'italic'
font_weight, weightOne of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', + or a numeric weight
font_variant, variantOne of 'normal' or 'smallcaps'
font_stretch, stretchOne of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', + 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'
foreground, fgcolor, colorAn RGB color specification such as '#00FF00' or a color name such as 'red'
background, bgcolorAn RGB color specification such as '#00FF00' or a color name such as 'red'
underlineOne of 'none', 'single', 'double', 'low', 'error'
underline_colorThe color of underlines; an RGB color specification such as '#00FF00' or a + color name such as 'red'
riseVertical displacement, in Pango units. Can be negative for subscript, positive + for superscript.
strikethrough'true' or 'false' whether to strike through the text
strikethrough_colorThe color of strikethrough lines; an RGB color specification such as '#00FF00' + or a color name such as 'red'
fallback'true' or 'false' whether to enable fallback. If disabled, then characters + will only be used from the closest matching font on the system. No fallback will + be done to other fonts on the system that might contain the characters in the text. + Fallback is enabled by default. Most applications should not disable fallback.
langA language code, indicating the text language
letter_spacingInter-letter spacing in 1024ths of a point.
gravityOne of 'south', 'east', 'north', 'west', 'auto'.
gravity_hintOne of 'natural', 'strong', 'line'.
The following convenience tags are provided:
<b>Bold
<big>Makes font relatively larger, equivalent to <span size="larger">
<i>Italic
<s>Strikethrough
<sub>Subscript
<sup>Superscript
<small>Makes font relatively smaller, equivalent to <span size="smaller">
<tt>Monospace font
<u>Underline
+

+
+ + +
+ + + diff --git a/eugtk/examples/documentation/platforms.html b/eugtk/examples/documentation/platforms.html new file mode 100644 index 0000000..d6d9a4e --- /dev/null +++ b/eugtk/examples/documentation/platforms.html @@ -0,0 +1,141 @@ + + + + + EuGTK Platforms + + + + + +
+ GTK LOGO + mongoose + +
+ Windows 7 +
 EuGTK running on Windows 7
+
+
+

EuGTK 4.12.0

+

Platforms

+
+ + + +
+ +

+EuGTK is native for Linux
+Most modern Linux distros come with GTK3 already installed. If not, you can usually +install the GTK3 libraries easily with your package manager (apt-get or similar). +No special setup or configuration steps are involved. +

+ +

+EuGTK is also reported to work with OS X™. First, install MacPorts, and +then the GTK3 library with this command: +sudo port install gtk3 +That should eventually install the library to /opt/local/lib/libgtk-3.dylib. + I cannot test this, since I have no computer running OSX, but Pete Eberlein's + cross-platform Euphoria editor WEE runs on OS X using EuGTK for the user interface. + That's a pretty good test. +

+ +

+EuGTK works with Windows™, more or less, starting with version 4.9.0! +I have only tested this on Windows 7, 64-bit, as I have no other version of Windows +available. +

+ +

You'll need the GTK3 dll's for Windows; download them from +the download page at https://github.com/tschoonj/GTK-for- +Windows-Runtime-Environmane-Installer. Be sure to chose the correct +set, either 32-bit or 64-bit, and make sure you are running the matching version of +Euphoria (32-bit or 64-bit). I use Euphoria 4.0.1 beta 2, which seems to work fine. +Mixing 32 and 64 bit software is sure to cause strange problems, such as reports that +dll's can't be found, even though they are right there in plain sight. +

+ +

+Once you've installed the GTK3 package, you'll need to download some +Windows-compatible icons. Unzip these and put them in +C:/ProgramData/icons. +

+ +

EuGTK programs may run on any platform.
+You can even run EuGTK programs on a remote client (anything that has an HTML5 web +browser, including tablets, phones, etc.), by using broadway on the server. +Clients do not need EuGTK, Euphoria, or GTK to be installed. +

+ +

+The Broadway server can be downloaded using apt-get, or your package manager, +and it also comes 'stock' with the latest Mint 18, and perhaps some other distros as well. +

+ +

+This is still experimental, but most of the demos in this package work ok +with a web browser, and some work when browsing with a tablet. Probably the +demo programs need to listen for 'motion' events (swipes, etc) to get these +working fully, or perhaps the browsers on my tablet aren't up-to-date with HTML5? +

+ +

+If you create a 'batch' Eu program, as shown below, you can start the broadway +server, and open a firefox page with your EuGTK program running +in the browser:
+

+-- name this go.ex
+-- then start your program with:
+-- eui go test1 (where test1 is the program to run)
+include GtkEngine.e
+
+object cmd = command_line()
+system(sprintf("firefox %s:8080 & broadwayd & ",{inet_address()}),0)
+setenv("GDK_BACKEND","broadway")
+system(sprintf("%s %s",{cmd[1],cmd[3]}),0)
+system("killall broadwayd",0)
+
+

+ +
+Broadway +
 Three EuGTK demos running in a Firefox™ window +
+
+ +
+
+ +
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

+ Updated for EuGTK version 4.12.0, Sept 15, 2016
+ All code © 2016 by Irv Mullins +

+
+
+ + + diff --git a/eugtk/examples/documentation/printing.html b/eugtk/examples/documentation/printing.html new file mode 100644 index 0000000..d529807 --- /dev/null +++ b/eugtk/examples/documentation/printing.html @@ -0,0 +1,327 @@ + + + + + EuGTK Printing + + + + + + + gtk logo + mongoose + +
+ test150 + +
 GtkPrinter
+
+ +


EuGTK 4.12.0

+

GtkPrinter support functions

+ +
+ +
+ + + + +


Introduction

+ +

+This include adds very easy-to-use printing capabilities to +EuGTK; most printing tasks require only one or two extra lines +of code. +

+ +

+It offers the ability to print documents on physical + printers as well as to print them as .pdf or .ps +(postscript), and perhaps .svg files, depending upon the +hardware and software installed on your pc. +

+ +
+ +


Setup

+ +

+When printing, font size, lines-per-page, and page length +must be taken into account. +Obviously, the larger the font, the fewer lines will fit +on a given page. +

+ +

+By default (on Linux), GtkPrinter.e will print using an Ubuntu Mono 8pt. font and print +62 lines per 8.5x11 inch (na_letter) page or 84 lines on 8.5x14 (na_legal) paper. +Other paper sizes and orientations are available from the pop-up printer dialog, +and these should also be computed automatically, as long as the font isn't changed. +Try test190. +

+ +

+Other fonts may not work so well with the default lines_per_page settings. They often take up more (or less) space, both vertically +and horizontally, than the same size Ubuntu Mono font. For these, you must set lines_per_page manually. +

+ +

Example 1: +

+        printer:font = "Ubuntu mono 10"
+        printer:lines_per_page = 65
+
+Example 2: +
      
+        printer:font = "Purisa 12"
+        printer:lines_per_page = 34
+
+

+ +

+Some options, +like the paper size and orientation, can also be changed by selections in +the pop-up printer dialogs. When paper size or orientation is changed via +the pop-up dialog, the auto_lpp will adjust for those. If you're specifying +fonts manually, or auto_lpp is FALSE, you'll have to set these in advance. +

+ +

+Your program can override many other settings exported by GtkPrinter.e, +some of the most useful being: +

    +
  • Customized page headers and/or footers + (see headers) +
  • + +
  • paper_name + default is us_letter, + see resources/papersizes.txt +
  • + +
  • lines_per_page default is 58
  • + +
  • use_line_numbers default is TRUE
  • + +
  • use_color default is TRUE; + currently, only prints Eu comments in red +
  • + +
  • font the usual font description: e.g. "Courier 12", or "Georgia bold 16"... +
  • + +
  • show_progress default is TRUE, see progress bar +
  • + +
  • orientation portrait, landscape
  • + +
  • quality draft, etc.
  • + +
  • number_up print 2-up or 4-up on a single sheet
  • + +
  • number_up_layout see GTK docs
  • + +
  • Margins top_margin, left_margin, etc.; default is .25 inch
  • + +
  • units default is GTK_UNIT_INCH
  • + +
  • scale default is 100%
  • + +
  • n_pages max number of pages to print, defaults to full document
  • + +
  • order 0 = normal (first to last page), 1 = reverse (last to first)
  • + +
  • name printer name
  • + +
  • plaintext set to TRUE to print text containing < or > or & chars
  • + +
  • wrap_at default is 0 (no wrap)
  • + +
  • tabs replace each tab with spaces or other chars, default is 2 spaces
  • + +
  • jobname shown in printer queue, defaults to filename and job #
  • + +
  • track_status default is TRUE
  • + +
  • settings_file filename to save print job settings to. +
    -- this is not the same as the GtkSettings ini file!
    +
  • + +
  • setup_file see the GTK docs
  • + +
  • parent pass the main window handle here [optional]
  • + +
  • action one of the following enums: + GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG +
    -- show printer setup dialog, then print (this is the default)
    + GTK_PRINT_OPERATION_ACTION_PRINT +
    -- print without showing any dialogs
    +
    GTK_PRINT_OPERATION_ACTION_PREVIEW +
    -- preview only, without dialogs, don't print
    +
    GTK_PRINT_OPERATION_ACTION_EXPORT +
    -- write a pdf to [export_file] without dialogs
    +
  • + +
  • export_file name to use for .pdf file
  • + +
  • confirm pop up a dialog when job is complete, default is FALSE
  • +
+ +Be sure to use the printer: namespace when modifying the above variables. +Certain other things, such as selecting a range of pages to print, or +putting a job on hold, can only be done by the user in the print setup +dialogs at this time. +

+ + +


Printing

+

+Adding print capability to your program is actually pretty easy. There are two main options: +

    +
  1. Print from a disk file
  2. +
  3. Print from in-line or generated text
  4. +
+And, there are two ways to start the print process: +
    +
  1. Connect the print_file or print_text function to a button, and attach the filename or text as the button's data item
  2. +
  3. Call the exported function PrintFile() or PrintText()
  4. +
+ +
+


Connecting to buttons

+

+Often, you can save a lot of typing by simply connecting a call to print_file or +print_text to a button, followed by the file name, file handle or text to print as the data item: +

+ +

    constant btn1 = create(GtkButton,"gtk-print",print_file,"~/demos/GtkEngine.e")-- default title will be GtkEngine.e
+    constant btn2 = create(GtkButton,"gtk-print",print_text,LGPL) 
+    constant btn3 = create(GtkButton,"gtk-print",print_file,fn) -- using a Eu file handle to a previously opened file
See
test189 and test190 for various ways to call these functions. +

+ + +


Calling via function calls

+

+If you call the print routines via a normal function call, you have the option to add +a page title to appear in the header.

    PrintFile("~/demos/GtkEngine.e") -- default title will be "GtkEngine.e"
+    PrintFile("License Terms","~/demos/license.txt") -- title will be "License Terms"
+ +See
test189 and test190 for various ways to call these functions.
    PrintText("",LGPL) -- no title
+    PrintText("Lesser General Public License",LGPL) -- prints "Lesser General Public License" as the title
+
+ +See test191 to see how to print direct to a .pdf file. +

+ + +


Headers and Footers

+

+You may wish to override the default page header and/or footer formats.
+Headers and footers are printed using text:format(), so you can choose what info shows +and in what order by using square brackets.
For example: +

 printer:header = ""  -- no header
+ printer:header = "Title: <b>[1]</b> User: [9]\n\n" -- prints page title (bold) and user name
+The numbers in the format box or boxes in the header or footer will be replaced with:
+
    +
  1. page title heading for all pages, unless there's a subtitle
  2. +
  3. page subtitle heading to use on pages after pg 1
  4. +
  5. file name
  6. +
  7. short name file name w/o path
  8. +
  9. current page number
  10. +
  11. n_pages printed
  12. +
  13. n_copies requested
  14. +
  15. today's date in date_format
  16. +
  17. user name
  18. +
  19. real name
  20. +
  21. font name used for this print job
  22. +
  23. file length (bytes) for named files only
  24. +
  25. file timestamp for named files only
  26. +
  27. export filename for pdf files
  28. +
+ +You can use these in any order and combined with other text as you wish. +If you define custom headers or footers, be sure to end the header string, and begin the footer string, with one or two '\n' to separate them from the body text!
+You may use any of the normal
markup tokens in the header and footer, including font and color specifications. +

+ +header +

+

+If you use custom headers or footers, be sure to declare them after you call + show_all(mainwindow). This way, they won't be accessed until after the GTK engine has been fully initialized. Of course, if you print from +a Eu function you have written, you can declare the header and/or footer formats at the start of the function. They won't be set until +the function is called. +

+

+The current date display format can be changed by overriding printer:date_format.The format is the same as used in std/datetime.e.

+

+ + +


Progress Bar

+

+There's a ready-to use progressbar exported by GtkPrinter.e. To use it, +just add it in the appropriate place on your window or dialog: +
+

+ pack(panel,printer:progress)
+
+The progressbar will be updated automatically. Sometimes it's nice to hide the progressbar until printing begins. +

+ +
+


Custom Tabs

+

+You can construct a custom tab and page which will be added to the print dialog. +To do so, you will need to override 3 variables in GtkPrinter.e. +

    +
  1. custom_tab_label
  2. +
  3. custom_tab_func +
    A call_back to your function which creates and returns the handle to a container (GtkBox) with one or more controls embedded.
    This will be the contents of your added page.
  4. +
  5. custom_tab_hook +
    A call_back to a function which retrieves the settings from your embedded controls and applies them as appropriate.
  6. +
+

+ +
+ + + diff --git a/eugtk/examples/documentation/style.css b/eugtk/examples/documentation/style.css new file mode 100644 index 0000000..0befaf4 --- /dev/null +++ b/eugtk/examples/documentation/style.css @@ -0,0 +1,107 @@ + +body {margin-right: 10px; margin-left: 10px;} + +h3 {color: blue;} +img {margin-right: 10px;} +p.small {font-size: small; font-style: italic;} + +em {color: red;} +em.kw {color: blue;} +em.gtk {color: magenta; } +em.str {color: green;} +em.black {color: black;} +em.blue {color: blue;} +em.green {color: green;} +em.brown {color: brown; font-style: normal;} +em.orange {color: orange;} + +button {margin-bottom: 5px; background-color: #A6F583;} +b.x {background-color: #A6F583;} + +figure {background-color: #EFEFEB;} + +table {margin: 10px;} +th {background-color: #FCFAC7;} +tr.note {background-color: yellow;} +tr.subtitle {font-size: smaller;} +td { + background-color: #F2F9FA; + padding-left: 10px; + padding-right: 10px; + font-size: smaller; + } + +td.eucode {background-color: #F2F9FA;} +td.emphasis {background-color: #FBF00A;} +td.note {background-color: yellow;} +td.ba {background-color: cyan;} +td.bb {background-color: skyblue;} +td.bc {background-color: #A3FCA3;} + +ol li {margin-bottom: 10px;} +ul li {margin-bottom: 5px;} +ul.small {font-size: small;} +ol.small {font-size: small;} + +dfn {font-size: small; color: blue;} +dd {font-size: smaller;} + +div.hdr { + display: block; + padding:3px; + border:none; + background: skyblue; + color:yellow; + font-style: italic; + } + +div.hint { + display: block; + border: thin solid black; + padding: 8px; + font-size: small; + border-radius: 20px; + margin-left: 20px; + margin-right: 20px; + background-color: #D9F9E4; + } + +div.quote { + display: block; + border: 1px dashed black; + padding: 5px; + background: #F0F0F0; + margin: 5px; + } + +div.scrn { + display: block; + border: 2px solid green; + padding: 4px; + font-size: 12pt; + color: #00FF00; + background-color: black; + width: 100%; + } + +div.urgent { + display: block; + border: 4px dashed red; + padding: 4px; + margin: 4px; + font-size: 12pt; + color: red; +} + +img {margin-left: 5px; margin-bottom: 5px;} +img.x {margin:0px;} + +figure {margin-left: 2px; margin-bottom: 2px;} +figcaption {background-color: #F2F2F2;} +footer {font-size: smaller;} + + + + + + diff --git a/eugtk/examples/documentation/treeviews.html b/eugtk/examples/documentation/treeviews.html new file mode 100644 index 0000000..41d7440 --- /dev/null +++ b/eugtk/examples/documentation/treeviews.html @@ -0,0 +1,496 @@ + + + + + TreeView/ListView + + + + + +
+ + + + test33.jpg + +


EuGTK 4.12.0

+

ListViews / TreeViews

+
+
+ +
+ + + + + +


ListView/TreeView Overview

+

+Gtk TreeViews and Listviews are used to display one or more columns of data in +a scrollable, sortable, reorderable table format. +

+ +

GTK3 uses the Model/View/Controller scheme for organizing and +displaying data. +

    +
  • In theory, this is more versatile, allowing you to display +the same data in various forms simultaneously.
  • +
  • In reality, you rarely need to do this sort of thing, and when you do, you probably know an easier way.
  • +
  • In practice, this MVC design makes even simple lists mind-bogglingly difficult to +understand and use.
  • +
+

+ +

+Don't let this deter you, however, because EuGTK handles all the twiddling with iterators +and paths, etc. that make using the List/TreeViews so difficult. You can accomplish almost anything you need to do +by cutting and pasting from example code, thereby getting some programming done instead of +sitting there wondering "what were they thinking?" +

+ +


Getting Started

+

+The first step will be to create a model in which to store your data. +The model can be thought of as a table with one or more rows of data, +arranged in one or more columns, +where each column contains one specific type of data.

+

+A model is not unlike a Euphoria sequence. Take, for example, the +following: +

sequence students { -- name, age, amt due
+	{"Sam Smith", 15, 19.95},
+	{"Sue Jones", 14, 12.99},
+	$ -- etc...
+	}
+ +In the above, col 1 contains strings, col 2 contains integers, col 3 contains floats. +Your model must mirror the number and types of +data in the sequence to be used. +

+ +


Models

+

+There are two kinds of model which come +pre-built with GTK, plus others you can supposedly devise, if you believe the GTK docs! + - Let's stick with the two easy ones:
+

    +
  • GtkListStore
  • +
  • GtkTreeStore
  • +
+You'll have noted that, just to make things even more confusing, GTK decided to call the +list model a ListStore, and the tree model a TreeStore. So we might as well give our Euphoria +object variable the name store. +

+ +

+Creating your model a.k.a. store is easy, you just need to specify a data type +for each of the columns to match the type of data to be stored there. +

+ +

+For the example Euphoria sequence shown above, (students) we do this: +

+  constant store = create(GtkListStore,{gSTR,gINT,gFLT}) -- name, age, amt due
+
+

+ +

+Note: by specifying a data type for each column, you are not only indicating what type of data +can be stored there, but also describing the way you want the data to look. IOW, you might +define the "name" column as gINT, but that would result in the name column displaying +the pointers to the students name strings, rather than the names in readable form. +Likewise, gINT, gFLT, and gDBL result in different ways to display the same numeric +contents. +Note: EuGTK implements a 'convenience' here for numbers: see floats. +

+ +

+Next, you need to load the model with your data: + +This can be done in one swell foop by simply typing: +

 set(store,"data",students)
+ +


Columns

+

+TreeView columns are created as you might expect.
+Note: there are no ListView columns, everything uses a TreeViewColumn.
+

 constant col1 = create(GtkTreeViewColumn) -- no params needed
+Each column will display a "vertical slice" of your Eu sequence.

+

+You do not need to define a column for each column of data in your original Eu sequence. +Only create a column for each item you want to see in the listview. +In addition, the columns do not have to be in the same order as the original +Eu sequence. You can specify which column in the store is to provide the values to +be displayed in each column. See connecting below. +

+ +


Cell Renderers

+

+In order to be able to display the data, each column must have a cell renderer associated with it. +Every cell in a given column displays the same type of data: string, integer, or float, + but using individual values which are gotten from the 'model' attached to the view. +

+Cell renderers are created by: +

 constant rend1 = create(GtkCellRendererText) -- no params needed
+Where the renderer can be one of several types.
+
    +
  • GtkCellRendererText
  • +
  • GtkCellRendererPixbuf
  • +
  • GtkCellRendererProgress
  • +
  • GtkCellRendererSpin
  • +
  • GtkCellRendererToggle
  • +
  • GtkCellRendererCombo
  • +
+As you can see, the names indicate different ways to display the data from the model. +For example, the CellRendererText will display strings, integers, or floats in human-readable form, +i.e. alpha-numeric characters, while the CellRendererProgress will display percentages as a variable-length bar.

+The CellRendererToggle displays boolean values as a check-box, CellRendererSpin displays a potentially +changeable numeric value, and a CellRendererPixbuf displays an image when given the handle to a GdkPixbuf. +

+ +
+ +

+You will always create a column and a renderer together, and pack the renderer into the +column. It is possible to pack more than one renderer into a single column. +

 constant col1 = create(GtkTreeViewColumn)
+	set(col1,"title","Name") -- you may set some properties of the column
+
+ constant rend1 = create(GtkCellRendererText)
+	set(rend1,"font","Courier 8") -- you may set some properties of the renderer, these affect the entire column
+	set(col1,"pack start",rend1) -- and finally, add the renderer to the column!
+
+
+

+ + + +


Connecting data to column renderers

+

+Next, you need to associate each column in the view with the column in the model where it +will find its data. +Of course, it can't be this easy. Instead, you have to tell the column to tell its +cell renderer where to find the data:
+

 set(col1,"add attribute",rend1,"text",1)
+Which means: col1 should get the text to be displayed by its cell renderer (rend1) from column #1 of the model. +In the example, this would be the name of the student. +

+ +

+Often you may have more data in your Eu sequence - and hence, in your model - than you wish to display, +and/or you may want to display the columns in a different order than they appear in the original sequence. +This "add attribute" call allows you to control that. +

+ +

+'Text' is only one attribute that the GtkCellRendererText has to offer; some of the others are +'markup', 'background', 'foreground', 'language', 'font', etc. By now, you won't be surprised to find that these +aren't called attributes by the GTK docs, instead you'll find them listed under Properties for +the various GtkCellRenderers. +

+ +But wait, there's more! +

+Just to keep things from getting boring, there are two ways to set an attribute a.k.a. property for a cell renderer. +The first, as shown below, is to tell the column to tell the renderer where to get its background for this particular +cell. +Let's assume col# 2 of the model contains color names, perhaps a different color for +each row in the list:
+

    set(col1,"add attribute",rend1,"background",2)
+

+ +

+On the other hand, suppose you tell the cell renderer directly to set a property. +This will affect all cells in the column which contains that renderer. This is done +as follows: +

    set(rend1,"background","skyblue") -- entire column will have a sky blue background
+    set(rend1,"size-points",36) -- and all text in that column will be 36 points
+
+

+ +


Finally

+

+Now you only have to create a GtkTreeView to hold the columns.
+(Here again, there is no GtkListView, everything uses a GtkTreeView)
+

    constant tv = create(GtkTreeView)
+	set(tv,"rules hint",TRUE) -- set some appearance options for the tree view:
+
+ +Then tell it which model it should use to obtain its data; and append the column(s): +
	set(tv,"model",store)
+	set(tv,"append columns",{col1...})
+
+

+ +

+And, more often than not, you'll add the view to a scrolled window and viewport, which keeps long +lists from extending past the bottom of the screen. +

+ +


Signals

+

+The normal signal to connect to is "row-activated", which will select +a row when it is double-clicked or a row is highlighted and the <enter> key is pressed. +

    connect(tv,"row-activated",call_back(routine_id("Foo")))
+
+If you are using GTK version 3.8 or above, you can choose to activate on a +single click by setting the following: +
    set(tv,"activate on single click",TRUE)
+
+

+ +


Easy Syntax! ~ new in EuGTK 4.11.2

+

+Below is the code needed to produce a listview; it isn't such a big deal, as you can see. +Refer to the simple test3.ex demo, +and the overly-fancy test33.ex demo. +

+ +

constant  store = create(GtkListStore,{gSTR,gSTR,gSTR})  -- describe type of data to be stored in each column;
+
+set(store,"data",{  -- here's the data;
+    {"Apple", "doz",5.00}, 
+    {"Cherry","lb", 3.69}, -- note: 3rd column is numeric,
+    {"Lime",  "ea",  .99}, -- but will automatically be converted 
+    {"Orange","ea", 0.79}, -- to a string by the store
+    {"Banana","lb", 1.89}
+    })
+
+constant scroller = create(GtkScrolledWindow)
+  pack(panel,scroller,TRUE,TRUE)
+
+constant  tv = create(GtkTreeView,{
+  {"model",store},    
+  {"connect","row-activated",_("ShowChoice")}}) -- see  function below
+  add(scroller,tv)
+  
+constant
+ col1 = create(GtkColumn,"title=Name,type=text,text=1,sort_column_id=1"),
+ col2 = create(GtkColumn,"title=Quantity,type=text,text=2"),
+ col3 = create(GtkColumn,"title=Price,type=text,text=3,sort_column_id=3") 
+
+set(tv,"append columns",{col1,col2,col3})
+  
+constant selection = get(tv,"selection")
+
+---------------------
+function ShowChoice() -- our function to handle selections
+---------------------
+object choice = get(selection,"selected row data")
+Info(,,choice[1],format("Price: $[3] per [2]",choice))
+return 1
+end function
+
+

+ +


Functions ~ new in EuGTK 4.8.7

+

+ Please don't bother trying to figure out the GTK docs when it comes to using a list or tree view.
You'll find yourself + ... lost in an endless maze of twisty +passages... +

+

+The stock GtkListView/GtkTreeView scheme is rediculously complex, and nearly impossible to understand. +With this version of EuGTK, I have implemented easier ways to deal with these things. +

+ +

+After you create a ListView model, you can load it with an ordinary Euphoria sequence* +and manipulate it using familiar calls. Note that there is no direct connection between the Eu +data sequence and the list view store, so changing the Eu sequence does not change the list view, +or vice-versa. To keep the two in sync, you must update as appropriate. See the hint below. +

+ +

+   constant store = create(GtkListStore,{gSTR,gSTR,gFLT})
+
+   sequence customers = {-- first, last, balance due
+	{"Sue","Jones",40.95},
+	{"Ralph","Wiggums",29.44}} 
+
+   sequence new_cust = {"Ferd","Merkle",12.50}
+
    +
  • Working with entire contents as Eu Sequence
  • +
    set(store,"data",customers) -- store Eu sequence to listview
    +
    get(store,"data") -- retrieve listview data as Eu sequence
    +
    set(store,"clear") -- clear listview, does not affect original Eu sequence
    + +
    + +
  • Working with individual rows
  • +
    get(selection,"selected row") -- returns integer row number
    +
    get(selection,"selected rows") -- returns sequence of row numbers: {2,6,23}
    + + +
    set(store,"append row",new_cust) -- add to bottom of list, invalid if view is sorted
    +
    set(store,"prepend row",new_cust -- add to top of list, invalid if view is sorted
    +
    set(store,"insert row",new_cust,pos#) -- add at pos, invalid if view is sorted +
    set(store,"remove row",row#)
    +
    set(store,"replace row",row#,new_cust) -- replace row or list of selected rows with new data
    +
+ +
+hint +

The above set() calls actually return + the modified data, which you can ignore, + or use to sync the modified data to disk, if you wish, whenever data is changed.

+
+ +
    +
  • Working with a single row/column
  • +
    set(store,"col data",row#,col#,data)
    +
    get(store,"col data",row#,col#)
    +
    +
  • Other functions
  • +
    set(store,"swap",row_a,row_b) -- trade places. row_a and row_b are integer row numbers
    +
    set(store,"move before",row_a,row_b) -- only valid if view is unsorted
    +
    set(store,"move after",row_a,row_b) -- only valid if view is unsorted
    +
    NOTE: the above return the modified sequence, could be used to save updates to disk, etc.
    + +
    + +
  • Information functions
  • +
    get(store,"n rows") -- returns current number of rows in model
    +
    get(store,"n cols") -- returns number of columns in model
    +
    get(store,"is sorted")
    +
    get(store,"sort column id") -- 1..n
    +
    get(store,"sort order") -- 0 = ascending, 1 = descending
    +
    NOTE: sort order is only valid if "is sorted" = TRUE
    +
+
+

+ +

* +Eu sequences must be conformant - IOW, each column must contain one consistent type of data: +if the first column contains strings, then all entries in column one must be strings, if a column contains numbers, for example, +age or balance due, then all entries in that column should be numbers. +

+ +

+Each view column can have an optional sort column id - this tells the view column which column in the model (store) contains the value to use in the sort. +In practical terms, this means that you could tell column #1 (names) that it should be sorted based on the value in #3 (amt_due). +You may also want to make the TreeView's headers clickable, so the user can sort each column when desired. +You can also, thru code, tell the model to sort itself by column and direction: +

 set(store,"sort column id",3,GTK_SORT_ASCENDING) 
+        -- instead of an integer column #, you can use:
+        -- GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID (-2) = no sorting 
+        -- sort directions are, as you would expect: GTK_SORT_ASCENDING | GTK_SORT_DESCENDING 
+
+

+ +

+You can also write your own custom sorting function, and tell the TreeView to use that function. +See the GTK docs on GtkTreeSortable for a prototype (GtkTreeIterCompareFunc) you can use when writing your +Euphoria function. +

+ +


Retrieving data

+To get the full data set back as a Euphoria sequence, just use: +
    get(store,"data")
+

+ +

+To get the selected data back from a ListView/TreeView, you must first obtain a GtkSelection object +from the view. Normally, this can be done at the time the view is created: +

    constant selection = get(tv,"selection") -- this tracks the changing selection(s)
+    set(selection,"mode",GTK_SELECTION_SINGLE)
+

+ +

+Then, you can get the data contained in the selected row if selection mode is + GTK_SELECTION_SINGLE or GTK_SELECTION_BROWSE; +or rows, if selection mode is GTK_SELECTION_MULTIPLE. +

+ +
 object rowlist = get(selection,"selected rows") -- this returns a Eu sequence of one or more integers, e.g. {3} or {1,3,5,6}
+ object data
+        for i = 1 to length(rowlist) do
+            data = get(store,"row data",rowlist[i]) -- use each row # to get the row's data
+            -- here, you do something with that data...
+

+ +

+Sometimes, it's convenient get the contents of a single cell in a row by calling: +

   data = get(store,"col data",row,2) -- where 2 is the column# 
+

+ +

+The above instructions apply primarily to CellRendererText renderers. +Lists using other types of CellRenderers require different methods to retrieve the contents/results of a selection. +Please refer to the alphabetical guide, the GTK docs on CellRenderer properties, and the respective demos. +

+ +


Floats

+
+test194 + + +


+The default display format for floating point numbers (gFLT) used in ListViews will probably not +be what you want - there will be too many digits following the decimal point. +In order to fix this, you can connect your own cell data function formatting routine. +See test66 for an example of how to do this.

+

+ +
+ +

+As a convenience, another way to handle common values with 2 decimal points +is to declare the column as gSTR, but to pass atoms or integers. +No cell data formatting function is needed for this special case.

+test3 + +
+ +
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

+ Updated for EuGTK version 4.12.0, Sept 15, 2016
+ All code © 2016 by Irv Mullins +

+
+
+ + + diff --git a/eugtk/examples/eu.cfg b/eugtk/examples/eu.cfg new file mode 100644 index 0000000..12ac99d --- /dev/null +++ b/eugtk/examples/eu.cfg @@ -0,0 +1 @@ +~/demos diff --git a/eugtk/examples/examples/.httpd.css b/eugtk/examples/examples/.httpd.css new file mode 100644 index 0000000..33137b6 --- /dev/null +++ b/eugtk/examples/examples/.httpd.css @@ -0,0 +1,11 @@ +/* +-- ==================================================================== +-- Styling for the remote display is set here; +-- ==================================================================== +*/ + +button {width: 100%;} +button.dir {background-color: skyblue;} +button.html {background-color: orange;} + +body {background-image: linear-gradient(180deg, yellow, blue); background-repeat: no-repeat;) diff --git a/eugtk/examples/examples/README.html b/eugtk/examples/examples/README.html new file mode 100644 index 0000000..ab2fe48 --- /dev/null +++ b/eugtk/examples/examples/README.html @@ -0,0 +1,118 @@ + + + + + README + + + + + +
+ GTK Logo + OpenEuphoria Logo + +

EuGTK 4.11.7

+
+ +

This folder contains some more-complex examples

+ +

Click on the link below the picture to view the source code.

+ +
+worldflags.ex +
World Flags test your memory
+
+ +
+hangman.ex +
Hangman guess the word game
+
+ +
+passwords +
Password Generator requires apg
+
+ +
+webserver +
Web Server
+
+ +
+ +webkit + +
Webkit build your own browser!
+
+ +
+color codes +
Color codes
+
+ +
+ +icons + +
Icon Viewer
+
+ +
+ +browser + +
Eu Browser
+
+ +
+ +leaktest + +
Leak Test
+
+ +
+ +

Utilities

+

+

    +
  • Audio Converter + convert between various audio formats; requires ffmpeg +
  • + +
  • Convert numbers + convert between Gray, binary, hex, decimal bases +
  • + +
  • Talk + give your computer a voice (more than one, actually); requires spd-say +
  • + +
  • xpm_to_eu_include + Convert xpm data to an image as a Euphoria include file +
  • + +
+ +

+ +
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

+ Updated for EuGTK version 4.11.10 June 15, 2016
+ All code © 2016 by Irv Mullins +

+
+
+ + + + + diff --git a/eugtk/examples/examples/audio_converter.ex b/eugtk/examples/examples/audio_converter.ex new file mode 100644 index 0000000..227ed93 --- /dev/null +++ b/eugtk/examples/examples/audio_converter.ex @@ -0,0 +1,193 @@ + +------------------------------------------------------------------------ +--# Converts audio file formats, requires ffmpeg! +------------------------------------------------------------------------ +-- formats handled are in the constant x below. +-- You can, of course, add more formats if you want. +-- Put the default input format first on the list, +-- and the default output format last, so you won't +-- have to select them each time you run this program. +------------------------------------------------------------------------ + +include GtkEngine.e +include GtkEvents.e +include std/sort.e +include std/task.e +include std/os.e + +constant x = {"wma","wav","ogg","mp3"} + +object folder, files + +constant win = create(GtkWindow) + connect(win,"destroy","Quit") + set(win,"border width",10) + set(win,"default size",600,250) + set(win,"position",GTK_WIN_POS_CENTER) + +constant panel = create(GtkBox,VERTICAL) + add(win,panel) + +constant top = create(GtkBox,HORIZONTAL) + pack(panel,top) + +constant path = create(GtkFileChooserButton, -- select music folder; + "Select a folder",GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) + connect(path,"current-folder-changed","LoadList") + set(path,"tooltip text","Select a music folder") + pack(top,path,TRUE,TRUE) + +constant extension1 = create(GtkComboBoxText) -- input file format; + for i = 1 to length(x) do + set(extension1,"append text",x[i]) + end for + set(extension1,"tooltip text","Select input format") + set(extension1,"active",1) + pack(top,extension1) + +constant extension2 = create(GtkComboBoxText) -- output file format; + for i = 1 to length(x) do + set(extension2,"append text",x[i]) + end for + set(extension2,"tooltip text","Select output format") + set(extension2,"active",length(x)) + pack(top,extension2) + +constant scroller = create(GtkScrolledWindow) + pack(panel,scroller,TRUE,TRUE) + +constant store = create(GtkListStore,{gSTR,gINT,gINT}) -- file list; + +constant tv = create(GtkTreeView) + add(scroller,tv) + set(tv,"hover selection",TRUE) + set(tv,"headers clickable",TRUE) + set(tv,"rules hint",TRUE) + set(tv,"model",store) + +constant selection = get(tv,"selection") + set(selection,"mode",GTK_SELECTION_BROWSE) + +constant col1 = create(GtkTreeViewColumn) + constant ren1 = create(GtkCellRendererText) + set(col1,"title","Filename") + set(col1,"pack start",ren1) + set(col1,"add attribute",ren1,"markup",1) + set(col1,"sort column id",1) + set(tv,"append column",col1) + +constant col2 = create(GtkTreeViewColumn) +constant ren2 = create(GtkCellRendererToggle) + set(col2,"title","Converted") + set(col2,"pack start",ren2) + set(col2,"add attribute",ren2,"active",2) + set(tv,"append column",col2) + +constant box = create(GtkButtonBox), + btn1 = create(GtkButton,"gtk-quit","Quit"), + btn2 = create(GtkButton,"gtk-help","Help"), + btn3 = create(GtkButton,"gtk-ok","Convert") + set(box,"margin top",10) + set(btn1,"tooltip text","Click to exit") + set(btn2,"tooltip text","Click for help") + set(btn3,"tooltip text","Click to start conversion") + add(box,{btn1,btn2,btn3}) + pack(panel,-box) + +show_all(win) + +if system_exec("which ffmpeg",0) != 0 then + set(btn3,"sensitive",FALSE) + Warn(win,"Error","Cannot find ffmpeg program","Please install one!") +end if + +main() + +------------------------------------------ +global function LoadList() +------------------------------------------ +object ext_in = get(extension1,"active") + folder = get(path,"filename") + ext_in = x[ext_in] + + files = dir(folder & "/*." & ext_in) + if atom(files) then return -1 end if + + files = sort(vslice(files,1)) + set(store,"clear") + set(store,"data",files) + +return 1 +end function + +--------------------------- +global function Convert() +--------------------------- +atom iter +object in, out, + ext1 = x[get(extension1,"active")], + ext2 = x[get(extension2,"active")], + parameters = " -ab 128k " + + switch ext2 do + case "ogg" then parameters = " -acodec libvorbis -ab 128k " + case "mp3" then parameters = " -acodec libmp3lame -ab 128k " + end switch + + set(path,"sensitive",FALSE) + set(extension1,"sensitive",FALSE) + set(extension2,"sensitive",FALSE) + set(tv,"scroll to point",0,1) + + for i = 1 to length(files) do + in = filebase(files[i]) + out = filebase(files[i]) + iter = get(store,"iter from string",sprintf("%d",i-1)) + + set(store,"col data",iter,1, + sprintf("%s.%s",{in,ext1})) + while events:pending() do + main_iteration() + end while + + system_exec(sprintf("ffmpeg -y -i \"%s/%s.%s\" %s \"%s/%s.%s\"\n", + {folder,in,ext1,parameters,folder,out,ext2}),0) + + set(store,"col data",iter,1, + sprintf("%s.%s",{out,ext2})) + + set(store,"col data",iter,2,"active",TRUE) + set(tv,"scroll to point",0,(i-1)*25) + while events:pending() do + main_iteration() + end while + end for + + set(path,"sensitive",TRUE) + set(extension1,"sensitive",TRUE) + set(extension2,"sensitive",TRUE) + +return 1 +end function + +------------------------------------------------------------ +global function Help() +------------------------------------------------------------ +return Info(win,"Audio Converter", "Converts audio files",""" +_____to/from your choice of output formats + + It does not overwrite the original, + just creates a copy in the new format, + unless the input and output filenames are the same. + + Run this program from an x-term + if you want to monitor the ffmpeg progress. + + Select a directory in the box at top, + and the input and output formats using the drop-down + options on the right.""" +) +end function + + + diff --git a/eugtk/examples/examples/base_converter.ex b/eugtk/examples/examples/base_converter.ex new file mode 100644 index 0000000..e84f365 --- /dev/null +++ b/eugtk/examples/examples/base_converter.ex @@ -0,0 +1,159 @@ + +--------------------------------------------------------------- +--# Gray code/Decimal/Hex/Octal/Binary conversion program +-- I needed a Gray code generator, and it just kept growing! +-- Run with -d CODE to display Gray code table on console +---------------------------------------------------------------- + +include GtkEngine.e +include std/console.e +include std/convert.e +include std/sequence.e + +-- change MAX_BIN_DIGITS to suit yourself; the bigger the number, +-- the longer it takes to generate a Gray code list; +constant MAX_BIN_DIGITS = 16 + +-- compute largest number possible given max_bin_digits: +constant MAX_NUM = power(2,MAX_BIN_DIGITS) -1 + +constant -- define max # of digits allowed in inputs; + DMAX = length(format("[]",MAX_NUM)), + BMAX = length(format("[B]",MAX_NUM)), + HMAX = length(format("[X]",MAX_NUM)), + OMAX = length(sprintf("%o",MAX_NUM)) + +constant -- allowable sets of chars (used to filter out unwanted key presses) + BINNUM = {{'0','1'}}, + DECNUM = {{'0','9'}}, + OCTNUM = {{'0','7'}}, + HEXNUM = {{'0','9'},{'A','F'},{'a','f'}} + +constant msg = "1. Enter a value in any box \n2. press enter" +constant docs = sprintf("Converter\n\nConverts numbers between 0 and %d",MAX_NUM) + +enum BIN = 2, DEC = 10, HEX = #F, OCT = 8 + +--------------------------------------------------------------- +-- Generate Gray code table using the manual (pencil & paper) +-- method, 'cause it's easy to code and I flunked calculus ;) +--------------------------------------------------------------- +object Gray = {"0","1"} + +for i = 1 to MAX_BIN_DIGITS-1 do + Gray = Gray & reverse(Gray) -- {"0","1","1","0"} + for j = 1 to length(Gray) do + if j <= length(Gray)/2 then + Gray[j] = "0" & Gray[j] -- prepend "0" to first half, + else + Gray[j] = "1" & Gray[j] -- prepend "1" to second half + end if + end for +end for + +ifdef CODE then -- display code table on terminal; + for i = 1 to length(Gray) do + printf(1,"%d %s\n",{i-1,Gray[i]}) + end for +end ifdef + +-------------------------------------------------------------------------------------- +-- Build GUI +-------------------------------------------------------------------------------------- +constant win = create(GtkWindow, + "title=Code Converter,size=120x150,border=20,position=1,$destroy=Quit") + +constant panel = create(GtkBox,"orientation=VERTICAL") + add(win,panel) + +constant lbl1 = create(GtkLabel) + set(lbl1,"markup",docs) + add(panel,lbl1) + +constant + inpGray = BuildInput("Gray",BIN,MAX_BIN_DIGITS), + inpDec = BuildInput("Decimal",DEC,DMAX), + inpHex = BuildInput("Hex",HEX,HMAX), + inpOct = BuildInput("Octal",OCT,OMAX), + inpBin = BuildInput("Binary",BIN,BMAX) + + set(inpGray,"tooltip text","Accepts binary digits 1 or 0") + set(inpDec,"tooltip text","Accepts decimal digits 0-9, max 65,535") + set(inpHex,"tooltip text","Accepts hex digits 0-9,A-F, max FFFF") + set(inpOct,"tooltip text","Accepts octal digits 0-7, max 177777") + set(inpBin,"tooltip text","Accepts binary digits 1 or 0") + +constant lbl2 = create(GtkLabel) + add(panel,lbl2) + set(lbl2,"markup",msg) + +show_all(win) +main() + +-------------------------------------------------------------- +function BuildInput(sequence caption,integer base,integer max) +-------------------------------------------------------------- +object lbl = create(GtkLabel,caption) +object inp = create(GtkEntry) + set(inp,"font","Courier Bold 16") + set(inp,"size request",100,40) +object buf = get(inp,"buffer") + set(buf,"max length",max) + connect(buf,"inserted-text",call_back(routine_id("FilterBase")),base) + connect(inp,"activate",call_back(routine_id("UpdateDisplay"))) + add(panel,{lbl,inp}) +return inp +end function + +-------------------------------------------------- +function UpdateDisplay(atom ctl) +-------------------------------------------------- +object buf = get(ctl,"buffer") +object val = get(buf,"text") +object dec = 0 + + set(lbl2,"markup",msg) + + switch ctl do -- convert from ctl's base to decimal value; + case inpDec then dec = to_number(val) + case inpHex then dec = to_number(sprintf("#%s",{val})) + case inpOct then dec = to_number(sprintf("@%s",{val})) + case inpBin then dec = to_number(sprintf("!%s",{val})) + case inpGray then + val = pad_head(val,MAX_BIN_DIGITS,'0') + dec = find(val,Gray)-1 + end switch + + if dec > MAX_NUM then + set(lbl2,"markup","Warning - number too large!") + + else -- update the number in all input fields, converting dec to base as needed; + set(inpGray,"text",Gray[dec+1]) + set(inpDec,"text",format("[]",dec)) + set(inpHex,"text",format("[X]",dec)) + set(inpOct,"text",sprintf("%o",dec)) + set(inpBin,"text",format("[B]",dec)) + end if + +return 1 +end function + +---------------------------------------------------------------------------------------- +function FilterBase(atom buf, integer pos, object char, integer n, integer base) +---------------------------------------------------------------------------------------- +object txt = get(buf,"text") + + char = peek_string(char) + + switch base do -- if char entered isn't valid for base, delete it. + case BIN then if not char_test(char,BINNUM) then set(buf,"delete text",pos,1) end if + case OCT then if not char_test(char,OCTNUM) then set(buf,"delete text",pos,1) end if + case DEC then if not char_test(char,DECNUM) then set(buf,"delete text",pos,1) end if + case HEX then if not char_test(char,HEXNUM) then set(buf,"delete text",pos,1) end if + end switch + +return 1 +end function + + + diff --git a/eugtk/examples/examples/browser.ex b/eugtk/examples/examples/browser.ex new file mode 100644 index 0000000..25a740e --- /dev/null +++ b/eugtk/examples/examples/browser.ex @@ -0,0 +1,118 @@ + +---------------------------------------------------------------------------------- +--# A simple file browser/runner; +---------------------------------------------------------------------------------- + +include GtkEngine.e +include std/sort.e +include std/datetime.e -- using this requires us to namespace gtk: functions + +chdir(login) + +constant win = create(GtkWindow,"size=750x550,border=10,$destroy=Quit") + gtk:set(win,"title","EuGTK Browser - " & login) + +constant panel = create(GtkBox,"orientation=VERTICAL") + gtk:add(win,panel) + +constant lbl = create(GtkLabel, + "markup='Use alt-f to search, <enter> or double-click to run!'") + gtk:add(panel,lbl) + +constant store = create(GtkListStore,{gSTR,gSTR,gINT,gSTR,gINT,gSTR}) + +constant tv = create(GtkTreeView,{ + {"model",store}, + {"reorderable",TRUE}, + {"headers clickable",TRUE}, + {"set grid lines",GTK_TREE_VIEW_GRID_LINES_BOTH}, + {"rules hint",TRUE}}) + +constant cols = { -- below is a new way to define cols and renderers in 1 line; + create(GtkColumn,"title=Name,type=text,text=1,sort_column_id=2"), --[1] + create(GtkColumn,"title=Size,type=text,text=3,sort_column_id=3"), + create(GtkColumn,"title=Date,type=text,text=4,sort_column_id=5"), --[2] + create(GtkColumn,"title=Description,type=text,markup=6,sort_column_id=6") +} +--[1] filename in col[1] is sorted by number in col[2] +--[2] date shown in col[4] is sorted on unix date in col[5] + +gtk:add(tv,cols) + +constant selection = gtk:get(tv,"selection") + set(selection,"mode",GTK_SELECTION_MULTIPLE) + +constant scroller = create(GtkScrolledWindow) + pack(panel,scroller,TRUE,TRUE,10) + gtk:add(scroller,tv) + +constant box = create(GtkButtonBox) + pack_end(panel,box) + +constant btn = create(GtkButton,"gtk-quit","Quit") + gtk:add(box,btn) + +-- load file list; +object files = dir("*.ex") + +-- convert dates to usable format; +files = apply(files,routine_id("convert_date")) +files = apply(files,routine_id("convert_filename")) + +-- load files into listview; +gtk:set(store,"data",files) + +-- set up handlers; +gtk:set(tv,"rules hint",TRUE) +gtk:set(tv,"columns autosize") +gtk:set(tv,"search column",6) +gtk:set(tv,"search equal func",_("search_func")) +connect(tv,"row-activated","show_choice") +gtk:set(store,"sort column id",2,GTK_SORT_ASCENDING) -- default startup sort; + +-- run the program! +show_all(win) +main() + +------------------------------------------------ +function convert_filename(object f, object junk) -- allow 'natural' sort order; +------------------------------------------------ +object tmp = io:read_lines(f[1]) +for i = 1 to length(tmp) do + if match("--#",tmp[i]) =1 then + f[6] = tmp[i][5..$] + end if + end for +f[1] = filebase(f[1]) -- drop extension, build index of #s; +object x = filter(f[1],"out",{'0','9'},"[]") +object n = filter(f[1],"in",{'0','9'},"[]") +f[2] = x & pad_head(n,10,'0') +return f +end function + +----------------------------------------- +function convert_date(object a, object b) -- convert dates to unix for sorting; +----------------------------------------- +object dt = datetime:new(a[4],a[5],a[6]) -- convert eu dir() date to datetime; + a[5] = to_unix(dt) -- store as UNIX timestamp for sorting purposes; + a[4] = datetime:format(dt,"%b %d %Y") -- store human-readable date for display; + a[6] = "?" +return a +end function + +------------------------------------------------------------------------------- +function search_func(atom mdl, integer col, object key, atom iter, object data) +------------------------------------------------------------------------------- +key = lower(peek_string(key)) -- key is passed as pointer to string +data = get(mdl,"value",iter,6) -- value from col 6 of liststore (description) +return not match(key,lower(data)) -- find word anywhere in description, 0 = found +end function + +----------------------- +global function show_choice() +----------------------- +integer row = gtk:get(selection,"selected row") +object f = gtk:get(store,"col data",row,1) +system("eui " & f,0) -- run it; +return 1 +end function diff --git a/eugtk/examples/examples/clown.e b/eugtk/examples/examples/clown.e new file mode 100644 index 0000000..343ebe7 --- /dev/null +++ b/eugtk/examples/examples/clown.e @@ -0,0 +1,1053 @@ +namespace clown + +-- exports clown:icon as GdkPixbuf + +include GtkEngine.e + +constant clown_xpm = { +"90 90 952 2", +" c None", +". c #FF943D", +"+ c #FF933D", +"@ c #FF943E", +"# c #FF933E", +"$ c #FF953E", +"% c #FF933F", +"& c #FAAB4A", +"* c #F5CC5E", +"= c #F4D262", +"- c #F6C55B", +"; c #FCA548", +"> c #FF963F", +", c #FAAE4D", +"' c #F9B853", +") c #FAB14F", +"! c #FF9740", +"~ c #F7C158", +"{ c #F1E36C", +"] c #F9B551", +"^ c #FCA245", +"/ c #F3DA67", +"( c #F2DC68", +"_ c #FAAA4A", +": c #000000", +"< c #FF943C", +"[ c #FBA84B", +"} c #F1E16B", +"| c #FE9C43", +"1 c #FE953E", +"2 c #F2DF6A", +"3 c #FD9E43", +"4 c #9D5A25", +"5 c #321D0B", +"6 c #231509", +"7 c #523013", +"8 c #573416", +"9 c #6C5125", +"0 c #866F33", +"a c #C49F49", +"b c #F9B14E", +"c c #F5CC5F", +"d c #F6C85C", +"e c #FCA347", +"f c #F8BC55", +"g c #F5CB5E", +"h c #F9B450", +"i c #FF973F", +"j c #FF923E", +"k c #FE9B42", +"l c #FAB24F", +"m c #E2AF50", +"n c #522F14", +"o c #1B1A0C", +"p c #8B803D", +"q c #EBDE69", +"r c #F3D966", +"s c #FD9F44", +"t c #FF953D", +"u c #F7C359", +"v c #F1E16A", +"w c #B8AE53", +"x c #18160A", +"y c #211F0F", +"z c #C3B757", +"A c #F4D363", +"B c #F6C459", +"C c #A39949", +"D c #080703", +"E c #363318", +"F c #817A3A", +"G c #B29042", +"H c #B86A2C", +"I c #4D2C14", +"J c #353B44", +"K c #7A899E", +"L c #7B889E", +"M c #7A889E", +"N c #79889E", +"O c #77869B", +"P c #0B0C0E", +"Q c #090804", +"R c #A29848", +"S c #FD9C42", +"T c #FF923D", +"U c #FE9840", +"V c #F1E26B", +"W c #AFA54E", +"X c #050402", +"Y c #2B2813", +"Z c #B9AE53", +"` c #FE9D43", +" . c #5D6778", +".. c #20252B", +"+. c #040506", +"@. c #596373", +"#. c #515A69", +"$. c #432710", +"%. c #745123", +"&. c #8D853F", +"*. c #8A823E", +"=. c #746D34", +"-. c #3F3C1C", +";. c #040402", +">. c #BDB255", +",. c #FF9840", +"'. c #C1B656", +"). c #0C0C06", +"!. c #6D6631", +"~. c #F0E26C", +"{. c #D2A266", +"]. c #958A8A", +"^. c #4C5563", +"/. c #030304", +"(. c #5E6877", +"_. c #929DAF", +":. c #99A4B5", +"<. c #9DA8B8", +"[. c #9CA6B7", +"}. c #95A0B1", +"|. c #8794A8", +"1. c #1F2228", +"2. c #060708", +"3. c #333942", +"4. c #79879D", +"5. c #B78C71", +"6. c #F4A14C", +"7. c #D4C75F", +"8. c #555026", +"9. c #19170B", +"0. c #E0D364", +"a. c #F7C258", +"b. c #F7BF57", +"c. c #FCA247", +"d. c #FF943F", +"e. c #FE933D", +"f. c #FCA448", +"g. c #FCA749", +"h. c #FBA848", +"i. c #E5D766", +"j. c #1E1C0E", +"k. c #89813D", +"l. c #D3CD78", +"m. c #8E9795", +"n. c #939EB0", +"o. c #B9C0CC", +"p. c #A1A4A9", +"q. c #B1B2B3", +"r. c #FFFFFF", +"s. c #F8F9FA", +"t. c #BABDC1", +"u. c #5F6267", +"v. c #959EAC", +"w. c #7D8AA0", +"x. c #828999", +"y. c #BFB27D", +"z. c #EFE16C", +"A. c #7D7638", +"B. c #6B6530", +"C. c #F7C058", +"D. c #FF933C", +"E. c #FBAA4A", +"F. c #5C5629", +"G. c #EBDE6F", +"H. c #A7AA8B", +"I. c #7B889D", +"J. c #7F8CA1", +"K. c #B0B9C6", +"L. c #E5E8EC", +"M. c #F4F5F7", +"N. c #C3C9D3", +"O. c #8A96AA", +"P. c #909794", +"Q. c #DBD275", +"R. c #605B2B", +"S. c #060503", +"T. c #D0C45D", +"U. c #FAB14E", +"V. c #FE943E", +"W. c #FCA246", +"X. c #DFD264", +"Y. c #1A190C", +"Z. c #544F26", +"`. c #D7CF77", +" + c #899398", +".+ c #7D8BA0", +"++ c #B7BFCB", +"@+ c #FCFDFD", +"#+ c #CED3DB", +"$+ c #8895A8", +"%+ c #7E8A9D", +"&+ c #BDBB82", +"*+ c #E8DB68", +"=+ c #88803D", +"-+ c #0E0D06", +";+ c #22200F", +">+ c #E7D967", +",+ c #CBC57C", +"'+ c #7E8B9C", +")+ c #9AA5B6", +"!+ c #EBEDF0", +"~+ c #EDEDED", +"{+ c #FEFEFE", +"]+ c #F9F9FA", +"^+ c #B6BECA", +"/+ c #7B899F", +"(+ c #A9AC8A", +"_+ c #8B833E", +":+ c #EFE16B", +"<+ c #F2DE69", +"[+ c #D7CA60", +"}+ c #C2B657", +"|+ c #C3C07F", +"1+ c #7B899E", +"2+ c #7C8AA0", +"3+ c #BFC6D1", +"4+ c #FDFEFE", +"5+ c #5E5E5E", +"6+ c #A0A0A0", +"7+ c #F1F1F1", +"8+ c #686868", +"9+ c #DDE1E6", +"0+ c #9FA48E", +"a+ c #C7BC59", +"b+ c #F4D463", +"c+ c #F3D765", +"d+ c #C9C47D", +"e+ c #818FA3", +"f+ c #DDE0E6", +"g+ c #BFBFBF", +"h+ c #6B6B6B", +"i+ c #0B0B0B", +"j+ c #212121", +"k+ c #CECECE", +"l+ c #6E6E6E", +"m+ c #979797", +"n+ c #F6F6F6", +"o+ c #F3F4F6", +"p+ c #A3A78C", +"q+ c #706932", +"r+ c #B1A64F", +"s+ c #E9DC69", +"t+ c #FC923D", +"u+ c #F7C057", +"v+ c #DAD176", +"w+ c #7F8DA2", +"x+ c #DFE2E7", +"y+ c #DBDBDB", +"z+ c #333333", +"A+ c #323232", +"B+ c #444444", +"C+ c #232323", +"D+ c #545454", +"E+ c #F0F0F0", +"F+ c #C7C7C7", +"G+ c #414141", +"H+ c #010101", +"I+ c #696969", +"J+ c #ECECEC", +"K+ c #F7F8F9", +"L+ c #949FB1", +"M+ c #B6B685", +"N+ c #F6C65B", +"O+ c #FE943D", +"P+ c #BD6C2D", +"Q+ c #FE9941", +"R+ c #EADE6F", +"S+ c #8A9497", +"T+ c #D9DDE3", +"U+ c #E0E0E0", +"V+ c #181818", +"W+ c #363636", +"X+ c #D4D4D4", +"Y+ c #B7B7B7", +"Z+ c #1B1B1B", +"`+ c #383838", +" @ c #F8F8F8", +".@ c #A9A9A9", +"+@ c #040404", +"@@ c #424242", +"#@ c #B9B9B9", +"$@ c #EEEEEE", +"%@ c #E6E6E6", +"&@ c #1F1F1F", +"*@ c #E5E5E5", +"=@ c #8E9AAC", +"-@ c #D2CB7A", +";@ c #F4D362", +">@ c #FAA94A", +",@ c #D77D34", +"'@ c #FE9A41", +")@ c #F6C45A", +"!@ c #A6A98B", +"~@ c #C7CDD6", +"{@ c #585858", +"]@ c #202020", +"^@ c #F2F2F2", +"/@ c #7C7C7C", +"(@ c #6C6C6C", +"_@ c #D1D1D1", +":@ c #060606", +"<@ c #919191", +"[@ c #E3E3E3", +"}@ c #616161", +"|@ c #FDFDFD", +"1@ c #C2C2C2", +"2@ c #BBBBBB", +"3@ c #FCFCFC", +"4@ c #E8E8E8", +"5@ c #474747", +"6@ c #828FA4", +"7@ c #86919A", +"8@ c #FA913D", +"9@ c #A56028", +"0@ c #D0CA7A", +"a@ c #A8B2C0", +"b@ c #EAEAEA", +"c@ c #8B8B8B", +"d@ c #909090", +"e@ c #484848", +"f@ c #0E0E0E", +"g@ c #E4E4E4", +"h@ c #595959", +"i@ c #818181", +"j@ c #626262", +"k@ c #A8A8A8", +"l@ c #B0B0B0", +"m@ c #D4D9E0", +"n@ c #FBA548", +"o@ c #E18336", +"p@ c #FBAB4B", +"q@ c #8D9796", +"r@ c #8390A5", +"s@ c #F5F6F7", +"t@ c #BDBDBD", +"u@ c #121212", +"v@ c #EBEBEB", +"w@ c #959595", +"x@ c #858585", +"y@ c #111111", +"z@ c #505050", +"A@ c #464646", +"B@ c #DDDDDD", +"C@ c #EFEFEF", +"D@ c #6F6F6F", +"E@ c #A5AEBD", +"F@ c #DBD276", +"G@ c #B7692B", +"H@ c #C8CED7", +"I@ c #D0D0D0", +"J@ c #A3A3A3", +"K@ c #F4F4F4", +"L@ c #A2A2A2", +"M@ c #242424", +"N@ c #515151", +"O@ c #434343", +"P@ c #CDCDCD", +"Q@ c #AFAFAF", +"R@ c #F0F1F4", +"S@ c #7E8CA1", +"T@ c #A0A68E", +"U@ c #FAA648", +"V@ c #FA913C", +"W@ c #F8B954", +"X@ c #919A94", +"Y@ c #8A96A9", +"Z@ c #FCFCFD", +"`@ c #3E3E3E", +" # c #727272", +".# c #272727", +"+# c #151515", +"@# c #6D6D6D", +"## c #898989", +"$# c #0A0A0A", +"%# c #E7E7E7", +"&# c #A1A1A1", +"*# c #DCDCDC", +"=# c #B2BAC7", +"-# c #E0D673", +";# c #F2DD68", +"># c #F3D865", +",# c #FC9D44", +"'# c #FE933E", +")# c #864C1F", +"!# c #F9B651", +"~# c #C5CBD5", +"{# c #030303", +"]# c #FAFAFA", +"^# c #BABABA", +"/# c #A6A6A6", +"(# c #131313", +"_# c #101010", +":# c #666666", +"<# c #D8D8D8", +"[# c #DFDFDF", +"}# c #191919", +"|# c #525252", +"1# c #FFFAFA", +"2# c #FFE4E3", +"3# c #FFDDDB", +"4# c #FFE3E2", +"5# c #FFF2F2", +"6# c #7C899F", +"7# c #B3B486", +"8# c #FD9C43", +"9# c #E78738", +"0# c #683B19", +"a# c #FBA146", +"b# c #FAAF4D", +"c# c #AFB188", +"d# c #090909", +"e# c #797979", +"f# c #888888", +"g# c #141414", +"h# c #BCBCBC", +"i# c #0C0C0C", +"j# c #343434", +"k# c #D5D5D5", +"l# c #868686", +"m# c #FFE9E8", +"n# c #FFC4C1", +"o# c #FFBFBC", +"p# c #FFD7D5", +"q# c #FFFDFD", +"r# c #9FA9B9", +"s# c #879398", +"t# c #F0E36D", +"u# c #F1E06A", +"v# c #CD7732", +"w# c #EE8939", +"x# c #FE953D", +"y# c #8D9696", +"z# c #A2ABBB", +"A# c #FFF2F1", +"B# c #FFE0DE", +"C# c #FFDEDC", +"D# c #FFE7E6", +"E# c #6A6A6A", +"F# c #080808", +"G# c #838383", +"H# c #FEF6F6", +"I# c #FBC5C5", +"J# c #F9ADAD", +"K# c #F9B0B0", +"L# c #FBCDCD", +"M# c #FFFCFC", +"N# c #7A7A7A", +"O# c #F5F5F5", +"P# c #FFC0BD", +"Q# c #FFDCDA", +"R# c #CED4DC", +"S# c #DCD374", +"T# c #F6C75B", +"U# c #7B5438", +"V# c #AD642A", +"W# c #E4DA71", +"X# c #C6CCD5", +"Y# c #878787", +"Z# c #646464", +"`# c #FCD4D4", +" $ c #F35757", +".$ c #ED0707", +"+$ c #ED0000", +"@$ c #EE0F0F", +"#$ c #F56D6D", +"$$ c #FDE8E8", +"%$ c #5B5B5B", +"&$ c #FFC4C2", +"*$ c #F2F3F5", +"=$ c #FC9A43", +"-$ c #E29252", +";$ c #788498", +">$ c #373F48", +",$ c #F59243", +"'$ c #FBA74A", +")$ c #CCC87B", +"!$ c #E8EAEE", +"~$ c #FFF3F2", +"{$ c #F89C9C", +"]$ c #EE1414", +"^$ c #FBC0C0", +"/$ c #E9E9E9", +"($ c #B2B2B2", +"_$ c #FFDBD9", +":$ c #FFC3C0", +"<$ c #8F9BAE", +"[$ c #A4A88D", +"}$ c #F4D161", +"|$ c #F2DB67", +"1$ c #FE9942", +"2$ c #FA9849", +"3$ c #8D8C93", +"4$ c #77849A", +"5$ c #A68B7E", +"6$ c #FAAA4B", +"7$ c #B9B983", +"8$ c #F9B1B1", +"9$ c #ED0101", +"0$ c #EE0A0A", +"a$ c #FCD9D9", +"b$ c #FFEFEE", +"c$ c #FFD8D6", +"d$ c #A7B0BF", +"e$ c #929A93", +"f$ c #FE9A43", +"g$ c #FFB477", +"h$ c #FFF3E9", +"i$ c #D7DCE2", +"j$ c #6E7B90", +"k$ c #C2A18C", +"l$ c #FF9946", +"m$ c #FCA64A", +"n$ c #FBA94A", +"o$ c #FE9C44", +"p$ c #AE947C", +"q$ c #8E9AAD", +"r$ c #EF2020", +"s$ c #F34E4E", +"t$ c #FFE1E0", +"u$ c #FFCFCD", +"v$ c #FFFBFB", +"w$ c #BBC2CE", +"x$ c #838B98", +"y$ c #FF9641", +"z$ c #FFD5B4", +"A$ c #FFD4B1", +"B$ c #FFD9BB", +"C$ c #FFF2E7", +"D$ c #C1C8D2", +"E$ c #434A56", +"F$ c #FFF7F0", +"G$ c #FFCEA8", +"H$ c #FFB57B", +"I$ c #FFB173", +"J$ c #FFB77D", +"K$ c #A78C7E", +"L$ c #FFD9D7", +"M$ c #FFF0F0", +"N$ c #FBC2C2", +"O$ c #ED0303", +"P$ c #FEF0F0", +"Q$ c #E1E1E1", +"R$ c #FFF5F4", +"S$ c #FFDBDA", +"T$ c #FFD4D2", +"U$ c #FFEAE9", +"V$ c #C6CCD6", +"W$ c #FED5B5", +"X$ c #8B97AA", +"Y$ c #697589", +"Z$ c #A09594", +"`$ c #A0AABA", +" % c #F9A5A5", +".% c #CACACA", +"+% c #9D9C9C", +"@% c #CDD3DB", +"#% c #BAC1CC", +"$% c #79879C", +"%% c #E3E6EB", +"&% c #A0A9B8", +"*% c #FABBBB", +"=% c #FEEBEB", +"-% c #AFAEAE", +";% c #393838", +">% c #F7F7F7", +",% c #D9DDE4", +"'% c #FAFBFC", +")% c #FEF7F7", +"!% c #EE1111", +"~% c #F13A3A", +"{% c #A1A0A0", +"]% c #484747", +"^% c #838282", +"/% c #E6E9ED", +"(% c #3A424C", +"_% c #FEFFFF", +":% c #AFB7C4", +"<% c #333232", +"[% c #F89696", +"}% c #FBC4C4", +"|% c #060404", +"1% c #535151", +"2% c #BCC3CE", +"3% c #E0E3E8", +"4% c #2D333B", +"5% c #F5F6F8", +"6% c #747474", +"7% c #262525", +"8% c #BEBEBE", +"9% c #F56F6F", +"0% c #F89D9D", +"a% c #B4B4B4", +"b% c #301B1A", +"c% c #A34742", +"d% c #171515", +"e% c #D2D2D2", +"f% c #95A0B2", +"g% c #CBD0D9", +"h% c #D7DBE2", +"i% c #D6DAE1", +"j% c #E9EBEF", +"k% c #717171", +"l% c #8F8E8E", +"m% c #F9A8A8", +"n% c #F02626", +"o% c #5C5B5B", +"p% c #3A1C1B", +"q% c #E3645D", +"r% c #FF7068", +"s% c #542523", +"t% c #CCCCCC", +"u% c #FBFBFB", +"v% c #919DAF", +"w% c #A9B2C1", +"x% c #A0AAB9", +"y% c #727F93", +"z% c #F1F3F5", +"A% c #B1B0B0", +"B% c #FBCACA", +"C% c #F79292", +"D% c #F67A7A", +"E% c #F67D7D", +"F% c #F89A9A", +"G% c #FCD8D8", +"H% c #7E7C7C", +"I% c #292424", +"J% c #7A3632", +"K% c #F86D65", +"L% c #A44842", +"M% c #A6A5A5", +"N% c #C5CBD4", +"O% c #E3E6EA", +"P% c #576171", +"Q% c #79889D", +"R% c #E2E5EA", +"S% c #A4AEBD", +"T% c #313030", +"U% c #2C1514", +"V% c #221818", +"W% c #716F6F", +"X% c #BDBCBC", +"Y% c #331F1E", +"Z% c #7C3733", +"`% c #E2635C", +" & c #CE5A54", +".& c #999898", +"+& c #D1D5DD", +"@& c #EEF0F3", +"#& c #B4BCC9", +"$& c #863A36", +"%& c #FB6E66", +"&& c #BF544E", +"*& c #793632", +"=& c #512926", +"-& c #4B3736", +";& c #5F5E5E", +">& c #7F7E7E", +",& c #8E8D8D", +"'& c #9A9999", +")& c #979696", +"!& c #848383", +"~& c #5D5D5D", +"{& c #41302F", +"]& c #542623", +"^& c #873B37", +"/& c #CB5953", +"(& c #DA6059", +"_& c #A09F9F", +":& c #A2ACBB", +"<& c #FDFFFF", +"[& c #F1F2F5", +"}& c #96A1B3", +"|& c #4C5462", +"1& c #DADEE4", +"2& c #E4E7EC", +"3& c #C9CED7", +"4& c #72332F", +"5& c #F66C64", +"6& c #DD615A", +"7& c #D75E58", +"8& c #CC5A53", +"9& c #D45D56", +"0& c #F16A62", +"a& c #CA5952", +"b& c #B7B6B6", +"c& c #D2D6DE", +"d& c #ECEEF1", +"e& c #808EA3", +"f& c #5F6A7B", +"g& c #97A2B3", +"h& c #D0D5DD", +"i& c #C0C7D1", +"j& c #808DA2", +"k& c #8D99AC", +"l& c #783532", +"m& c #AC4B46", +"n& c #7A879E", +"o& c #576170", +"p& c #CCD2DA", +"q& c #81433F", +"r& c #F2F4F6", +"s& c #697487", +"t& c #515B6A", +"u& c #748296", +"v& c #7A879D", +"w& c #6B778A", +"x& c #6D7A8E", +"y& c #6E7B8F", +"z& c #758399", +"A& c #8592A6", +"B& c #222121", +"C& c #AB4B45", +"D& c #79605E", +"E& c #A7B1BF", +"F& c #262B32", +"G& c #2F353D", +"H& c #49515E", +"I& c #545C6B", +"J& c #505968", +"K& c #414A56", +"L& c #3E4550", +"M& c #050404", +"N& c #D55E57", +"O& c #FA6A63", +"P& c #F4645C", +"Q& c #F5655D", +"R& c #FC6C65", +"S& c #E9665F", +"T& c #999797", +"U& c #D5DAE1", +"V& c #4B5461", +"W& c #5B6475", +"X& c #0F0706", +"Y& c #FD6F67", +"Z& c #DA473F", +"`& c #BD271F", +" * c #B01911", +".* c #B72118", +"+* c #D34037", +"@* c #F3635B", +"#* c #97433E", +"$* c #EEF0F2", +"%* c #8390A4", +"&* c #707D92", +"** c #090A0C", +"=* c #210B0D", +"-* c #6E7A8D", +";* c #2F2E2E", +">* c #6C302D", +",* c #FE7068", +"'* c #EF5E56", +")* c #BA241C", +"!* c #B21C13", +"~* c #DC4A41", +"{* c #C0544E", +"]* c #716160", +"^* c #762A31", +"/* c #9C0000", +"(* c #6F0000", +"_* c #0D0000", +":* c #180000", +"<* c #A80000", +"[* c #CE2025", +"}* c #7B859B", +"|* c #4E2320", +"1* c #ED6861", +"2* c #F05F57", +"3* c #B31D14", +"4* c #D9463D", +"5* c #F26A63", +"6* c #733532", +"7* c #908E8E", +"8* c #FAFAFB", +"9* c #9AA4B5", +"0* c #AC4B57", +"a* c #D70000", +"b* c #550000", +"c* c #2E0000", +"d* c #D90000", +"e* c #C52F37", +"f* c #7B879D", +"g* c #636363", +"h* c #180B0A", +"i* c #9E4540", +"j* c #FC6F67", +"k* c #FE6F67", +"l* c #BE2920", +"m* c #B31C14", +"n* c #A52A23", +"o* c #4F3D3C", +"p* c #A15A68", +"q* c #EC0101", +"r* c #7D0000", +"s* c #950000", +"t* c #BA3C46", +"u* c #7E8BA1", +"v* c #BBBABA", +"w* c #2A1311", +"x* c #903F3A", +"y* c #D9544E", +"z* c #B21B13", +"A* c #B32720", +"B* c #872621", +"C* c #513C3A", +"D* c #B2B1B1", +"E* c #976575", +"F* c #EA0405", +"G* c #C50000", +"H* c #A10000", +"I* c #C43138", +"J* c #7E849A", +"K* c #F0F2F4", +"L* c #B8B7B7", +"M* c #0D0C0C", +"N* c #361211", +"O* c #74241F", +"P* c #952B25", +"Q* c #A32C26", +"R* c #A62C26", +"S* c #A02924", +"T* c #982822", +"U* c #872722", +"V* c #5A1A17", +"W* c #2D2020", +"X* c #CFCFCF", +"Y* c #BFC6D0", +"Z* c #A45664", +"`* c #E90404", +" = c #C60000", +".= c #9D0000", +"+= c #D31E23", +"@= c #87798C", +"#= c #9F9E9E", +"$= c #807F7F", +"%= c #676767", +"&= c #ADACAC", +"*= c #D6DBE1", +"== c #7D859B", +"-= c #B93D47", +";= c #C10000", +">= c #970000", +",= c #E40A0C", +"'= c #9D5E6D", +")= c #CCD1DA", +"!= c #8A7689", +"~= c #B80000", +"{= c #870000", +"]= c #C92B32", +"^= c #86778B", +"/= c #9BA6B6", +"(= c #E1E4E9", +"_= c #FBFBFC", +":= c #EBEDF1", +"<= c #7D8499", +"[= c #B34550", +"}= c #E90506", +"|= c #720000", +"1= c #C0343C", +"2= c #7B7183", +"3= c #9BA5B6", +"4= c #A6B0BE", +"5= c #909CAE", +"6= c #827F93", +"7= c #B04753", +"8= c #E20D0F", +"9= c #8A0000", +"0= c #600000", +"a= c #9B1F24", +"b= c #52525F", +"c= c #707D91", +"d= c #7A849A", +"e= c #956271", +"f= c #730000", +"g= c #520000", +"h= c #E00000", +"i= c #6A0101", +"j= c #15171B", +"k= c #A13740", +"l= c #AD4C58", +"m= c #916C7E", +"n= c #8C7385", +"o= c #8A7588", +"p= c #916D7E", +"q= c #986474", +"r= c #5E525F", +"s= c #5A3F4A", +"t= c #BE2228", +"u= c #650000", +"v= c #4A0000", +"w= c #940000", +"x= c #B20000", +"y= c #2B0000", +"z= c #540000", +"A= c #5D0000", +"B= c #430000", +"C= c #820000", +"D= c #E20000", +"E= c #060000", +"F= c #3B0000", +"G= c #280000", +"H= c #EB0000", +"I= c #4C0000", +"J= c #6A0000", +"K= c #780000", +"L= c #CD0000", +"M= c #110000", +"N= c #E80000", +"O= c #090000", +"P= c #E50000", +"Q= c #E90000", +"R= c #690000", +"S= c #640000", +"T= c #D60000", +"U= c #330000", +"V= c #CE0000", +"W= c #140000", +"X= c #8D0000", +"Y= c #CC0000", +"Z= c #340000", +"`= c #030000", +" - c #1C0000", +".- c #0A0000", +"+- c #800000", +"@- c #9A0000", +"#- c #0B0000", +"$- c #AF0000", +"%- c #2A0000", +"&- c #A60000", +"*- c #EC0000", +"=- c #B60000", +"-- c #0E0000", +";- c #530000", +">- c #A20000", +",- c #D30000", +"'- c #E70000", +")- c #B40000", +"!- c #6C0000", +"~- c #130000", +"{- c #240000", +"]- c #7A0000", +"^- c #EA0000", +"/- c #B70000", +"(- c #5E0000", +"_- c #040000", +":- c #070000", +"<- c #100000", +"[- c #160000", +"}- c #480000", +"|- c #590000", +"1- c #5F0000", +"2- c #510000", +"3- c #360000", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . + + + @ ", +" # . $ % @ # + & * = - ; + ", +" @ > , ' ) ! + + ~ { { { { { ] + ", +" $ ^ / { { { ( _ + : : : : : < @ + + . . [ { { { { { { } | + + + + @ < ", +" . 1 $ . < > ( { { { { { 2 3 # 4 5 : : : : : : : : : 6 7 8 9 0 a b $ c { { { { { { { d e f c g h i . ", +" j + k ) l ; + ] { { { { { { { m n : : : : : : : : : : : : : : : : : : : : : : : o p q { { { { { { { { { { { { { r s t ", +" # $ u } { { { r v { { { { { { w x : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : y z { { { { { { { { { { { { { A + ", +" + B { { { { { { { { { { { { C D : : : : : E F G H I : : : : : : : J K L M N O P : : : : : : : : : : : : : : : : Q R { { { { { { { { { { { { { S T ", +" @ U V { { { { { { { { { { { W X : : : : Y Z { { { ` . ...: : : +.@.M M M M M #.: : : : : : $.%.&.*.=.-.;.: : : : D >.{ { { { { { { { { { { } 1 + + . ", +" + + ,.V { { { { { { { { { { '.).: : : : !.q { { { ~.{.].M M M ^./.+.(._.:.<.[.}.|.M 1.: 2.3. .4.5.6.{ { { { 7.8.: : : : 9.0.{ { { { { { { { { { { ~ a.b.c.+ d. ", +" e.@ f.g.h.} { { { { { { { { { i.j.: : : : k.{ { { { l.m.M M M M n.o.p.q.r.r.r.r.r.r.r.s.t.u.v.w.M M M x.y.z.{ { { { A.: : : : B.{ { { { { { { { { { { { { { { C.+ D. ", +" . E.r { { { { { { { { { { { { { F.: : : : A.{ { { G.H.I.M M J.K.L.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.M.N.O.M M M P.Q.{ { { { R.: : : S.T.{ { { { { { { { { { { { { { { U.. ", +" V.W.} { { { { { { { { { { { { { X.Y.: : : Z.~.{ { `. +M M .+++M.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.@+#+$+M M %+&+{ { { *+o : : : !.{ { { { { { { { { { { { { { { A + ", +" + g { { { { { { { { { { { { { { { q =+-+;+>+{ { ,+'+M M )+!+r.~+{+r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.]+^+/+M M (+z.{ { _+: : : o :+{ { { { { { { { { { { { { { <++ ", +" + ( { { { { { { { { { { { { { { { { { [+}+{ { |+1+M 2+3+4+r.r.5+6+r.r.r.r.r.r.r.r.r.r.r.r.r.r.7+8+r.r.r.r.r.r.9+$+M M 0+z.{ 0.S.: : Q a+{ { { { { { { { { { { { { { b++ ", +" + c+{ { { { { { { { { { { { { { { { { { { { d+1+M e+f+r.{+g+h+i+j+k+r.r.r.r.r.r.r.r.r.r.r.r.r.l+: m+n+r.r.r.r.r.o+}.M M p+~.{ B.q+r+s+{ { { { { { { { { { { { { { { ] t+ ", +" + u+{ { { { { { { { { { { { { { { { { { { v+'+M w+x+r.y+z+: A+B+C+: D+E+r.r.r.r.r.r.r.r.r.F+G+H+: : i+I+J+r.r.r.r.K+L+M M M+{ { { { { { { { { { { { { { { { { { { N+O+P+ ", +" # Q+r { { { { { { { { { { { { { { { { { R+S+M w.T+r.U+V+W+X+r.r.r.Y+Z+`+ @r.r.r.r.r.r.r..@+@@@#@$@%@m+Z+&@*@r.r.r.r.M.=@M 1+-@{ { { { { { { { { { { { { { { { ;@>@+ ,@ ", +" @ '@)@} { { { { { { { { { { { { { { { !@M M ~@r.r.{@]@E+r.^@/@(@k+_@:@<@r.r.r.r.r.r.[@i+}@|@1@2@3@r.4@&@5@r.r.r.r.r.!+6@M 7@R+{ { { { { { { { { { { { { { { , 8@9@ ", +" $ + U.{ { { { { { { { { { { { { { 0@M M a@r.b@c@+@d@r.r.e@: : f@g@h@z+r.r.r.r.r.r.i@f@7+j@: : 5@|@r.k@: l@r.r.r.r.r.m@M M (+{ { { { { { { { { { { { { { { n@o@ ", +" @ p@{ { { { { { { { { { { { { ~.q@M r@s@r.t@u@: 2@r.v@: : : : w@x@y@r.r.r.r.r.r.z@A@B@: : : : g+r.C@: : D@r.r.r.r.r.E@M I.F@{ { { { { { { { { { { { { r V.G@ ", +" # U } { { { { { { { { { { { { d+M M H@r.r.r.I@: J@r.K@+@: : : L@h+M@r.r.r.r.r.r.N@O@P@: : : : Q@r.J+: h@{+r.r.r.r.r.R@S@M T@{ { { { { { { { { { { { 2 U@V@ ", +" + W@{ { { { { { { { { { { { X@M Y@Z@r.r.r.r.W+`@{+r. #: : .#%@+#@#r.r.r.r.r.r.##$#%#.#: : +#$@r.&#: *#r.r.r.r.r.r.r.=#M 1+-#{ { { { { { { { ;#>#N+,#'#)# ", +" D.+ !#2 { { { { { { { { { F@M M ~#r.r.r.r.r.g+{#@#]#r.^#/#U+O@(#*@r.r.r.r.r.r.J+_#D+U+@#:#<#r.[#}#|#r.r.1#2#3#4#5#r.R@6#M 7#{ { { { { { { { 8#+ + 9#0# ", +" . '#V.a#b#{ { { { { { { c#M .+s@r.r.r.r.r.r.L@d#.#e#f#l+g#Z+F+r.r.r.r.r.r.r.r.h#i#j#k@B@k#l#(#A+$@r.m#n#o#o#o#o#p#q#r#M s#t#{ { { { { { u#e.v# ", +" w#x#{ { { { { { { y#M z#r.r.r.A#B#C#D#1#[#E#y@F#`+G#E+r.H#I#J#K#L#M#r.r.r.k#N@:@: : u@N#O#r.5#P#o#o#o#o#o#o#Q#R#M M S#{ { { { { { T#+ U# ", +" V#+ = { { { { { W#M M X#r.q#p#o#o#o#o#n#m#r.Y#Z#r.r.`# $.$+$+$+$+$@$#$$$r.r.r.7+%$&@n+r.r.r.Q#o#o#o#o#o#o#o#&$*$L M &+{ { { { { r =$-$;$>$ ", +" ,$'$} { { { { )$M M !$r.Q#o#o#o#o#o#o#P#~$n+*@r.{$.$+$+$+$+$+$+$+$+$]$^$r.r.r./$($r.r.r.r._$o#o#o#o#o#o#o#:$r.<$M [$b+}$<+|$~ 1$2$3$M 4$ ", +" N 5$# 6$/ { { { 7$M .+@+r.&$o#o#o#o#o#o#o#Q#r.r.8$9$+$+$+$+$+$+$+$+$+$+$0$a$r.r.r.r.r.r.r.r.b$o#o#o#o#o#o#o#c$r.d$M e$f$+ + + + g$h$i$2+M j$ ", +" M M k$l$$ m$n$o$p$M q$r.r.n#o#o#o#o#o#o#o#_$r.M#r$+$+$+$+$+$+$+$+$+$+$+$+$s$r.r.r.r.r.r.r.r.r.t$P#o#o#o#o#u$v$r.w$M x$y$z$A$B$C$r.r.r.D$M M E$ ", +" M M e+M.F$G$H$I$J$K$M :.r.r.L$o#o#o#o#o#o#o#M$r.N$+$+$+$+$+$+$+$+$+$+$+$+$+$O$P$r.r.r.r.O#Q$3@r.r.R$S$T$p#U$r.r.r.V$M I.W$r.r.r.r.r.r.r.Z@X$M Y$ ", +" M M o.r.r.r.r.r.r.Z$M `$r.r.v$u$o#o#o#o#P#t$r.r. %+$+$+$+$+$+$+$+$+$+$+$+$+$+$`#r.r.r.3@.%+%5@}@C@r.r.r.r.r.r.r.r.@%M M K+r.r.r.r.r.r.r.r.#%M $% ", +" M M %%r.r.r.r.r.r.&%M `$r.r.r.r.U$p#T$S$R$r.r.r.*%+$+$+$+$+$+$+$+$+$+$+$+$+$+$=%r.r.r.r.r.r.r.-%;%>%r.r.r.r.r.r.r.#+M M K+r.r.r.r.r.r.r.r.,%M M ", +" M M '%r.r.r.r.r.r.d$M :.r.r.r.r.r.r.r.r.r.r.r.r.)%!%+$+$+$+$+$+$+$+$+$+$+$+$~%r.r.r.r.r.r.r.r.{%]%^%r.r.r.r.r.r.r.V$M L {+r.r.r.r.r.r.r.r./%M M (% ", +" M 2+_%r.r.r.r.r.r.:%M <$r.r.r.r.r.r.>%8+<%y+r.r.r.[%+$+$+$+$+$+$+$+$+$+$+$O$}%r.r.r.r.r.r.r.k#|%1%E#3@r.r.r.r.r.r.2%M 6@r.r.r.r.r.r.r.r.r.3%M M 4% ", +" M M 5%r.r.r.r.r.r.D$M w.@+r.r.r.r.r.6%7%8%r.r.r.r.r.9%+$+$+$+$+$+$+$+$+$O$0%r.r.r.r.r.r.r.a%b%c%d%Q$e%r.r.r.r.r.r.d$M f%r.r.r.r.r.r.r.r.r.g%M M ", +" M M h%r.r.r.r.r.r.i%M M j%r.r.r.r.7+N@E+k%l%]#r.r.r.r.m%n%+$+$+$+$+$+$~%I#r.r.r.r.r.r.O#o%p%q%r%s%t%u%r.r.r.r.r.r.v%M w%r.r.r.r.r.r.r.r.r.x%M y% ", +" M M d$r.r.r.r.r.r.z%M M H@r.r.r.r.v@ @r.{+e#7%A%{+r.r.r.q#B%C%D%E%F%G%r.r.r.r.r.r. @H%I%J%K%r%r%L%M%r.r.r.r.r.r.M.L M N%r.r.r.r.r.r.r.r.O%L M P% ", +" Q%M /+R%r.r.r.r.r.r.<$M S%r.r.r.r.r.r.r.r.r.T%U%V%W%Q$r.r.r.r.r.r.r.r.r.r.r.7+X%:#Y%Z%`%r%r%r%r% &.&r.r.r.r.r.r.+&M M !$r.r.r.r.r.r.r.]+<$M 4$ ", +" M M $+@&r.r.r.r.r.#&M S@K+r.r.r.r.r.r.r.r.5+$&%&&&*&=&-&;&>&,&'&)&!& #~&{&]&^&/&r%r%r%r%r%r%r%(&_&r.r.r.r.r.r.:&M 6@<&r.r.r.r.r.r.[&}&M M |& ", +" M M |.1&r.r.r.r.2&M M 3&r.r.r.r.r.r.r.r.Z#4&r%r%r%r%r%5&6&7&8&8&9&q%0&r%r%r%r%r%r%r%r%r%r%r%a&b&r.r.r.r.r.o+w.M M f%c&'%r.r.d&#%e&M M f& ", +" M M M g&3+h&h&i&j&M k&|@r.r.r.r.r.r.r.{@l&r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%m&g@r.r.r.r.r.++M n&M M M M 6@S@M M M N o& ", +" M M M M M M M M M M p&r.r.r.r.r.r.r.A@$&r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%q&r.r.r.r.r.r&j&M s&t&u&M M M M M v&w&4% ", +" x&N M M M y&z&M A&5%r.r.r.r.r.r.B&C&r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%D&r.r.r.r.r.E&M M F& G&H&I&J&K& ", +" L&M M w%r.r.r.r.r.K@M&N&r%r%r%r%r%r%r%r%r%r%r%O&P&Q&R&r%r%r%r%r%r%r%r%S&T&r.r.r.r.U&M M V&: : : : ", +" : : : W&M M g%r.r.r.r.g+X&Y&r%r%r%r%r%r%r%r%R&Z&`& * * * *.*+*@*r%r%r%r%r%#*g@r.r.r.$*%*M &***: : : : : ", +" : : : : : =*-*M S@x+r.r.r.E+;*>*,*r%r%r%r%r%r%'*)* * * * * * * * *!*~*r%r%r%{*]*r.r.r.K+_.M v&^*/*(*_*: : : ", +" : : : :*<*+$[*}*M 6@L.r.r.r.*@<%|*1*r%r%r%r%2*3* * * * * * * * * * * *4*5*6*7*{+r.r.8*9*M M 0*+$+$+$a*b*: : ", +" : : c*d*+$+$+$e*f*M j&T+r.r.r.K@g*h*i*j*r%k*l* * * * * * * * * * * *m*n*o*X+r.r.r.[&v%M M p*q*+$+$+$+$+$r*: : ", +" : : s*+$+$+$+$+$t*f*M u*H@_%r.r.r.v*<%w*x*y* * * * * * * * * *z*A*B*C*D*{+r.r.r.2&k&M M E*F*+$+$+$+$+$+$G*: : ", +" : : H*+$+$+$+$+$+$I*J*M M :&K*r.r.r.|@L*N@M*N*O*P*Q*R*S*T*U*V*W*D@X*r.r.r.r.Z@Y*.+M M Z*`*+$+$+$+$+$+$+$ =: : ", +" : : .=+$+$+$+$+$+$+$+=@=M M j&i&s.r.r.r.r. @F+#=$=8+%=k%,&&=*#{+r.r.r.r._%*==@M M ==-=+$+$+$+$+$+$+$+$+$;=: : ", +" : : >=+$+$+$+$+$+$+$+$,='=M M M %*o.$*r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.]+)=v%M M M !=+=+$+$+$+$+$+$+$+$+$+$~=: : ", +" : : {=+$+$+$+$+$+$+$+$+$+$]=^=M M M L /=D$(=_=r.r.r.r.r.r.r.{+:=)=w%e&M M M <=[=}=+$+$+$+$+$+$+$+$+$+$+$H*: : ", +" : : |=+$+$+$+$+$+$+$+$+$+$+$`*1=2=M M M M M L Y@3=:&4=E@<.5=u*M M M M M 6=7=8=+$+$+$+$+$+$+$+$+$+$+$+$+$9=: : ", +" : : 0=+$+$+$+$+$+$+$+$+$+$+$+$+$+$a=b=c=M M M M M M M M M M M M M d=e=e*}=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$f=: : ", +" : : g=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$h=i=j=k=l='=m=n=!=o=p=q=r=s=t=F*+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$u=: : ", +" : : v=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$w=: x=+$+$+$+$+$+$+$+$y=z=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$A=: : ", +" : : B=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$w=: C=+$+$+$+$+$+$+$D=E=z=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$b*: : ", +" : : F=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$w=: G=H=+$+$+$+$+$+$9=: z=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$I=: : ", +" : : c*+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$J=: : K=+$+$+$+$+$L=M=: F=N=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$F=: : ", +" : : O=P=+$+$+$+$+$+$+$+$+$+$+$+$+$Q=R=: : : : S=T=+$Q=.=:*: : : U=V=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$Q=W=: : ", +" : : X=+$+$+$+$+$+$+$+$+$+$+$+$Y=Z=: : : : : : `= -_*: : : : : : .-+-N=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$@-: : : ", +" : : #-$-+$+$+$+$+$+$+$+$+$P=r*#-: : : : : : : : : : : : : : : : : %-&-*-+$+$+$+$+$+$+$+$+$+$+$+$=---: : ", +" : : `=;->-,-*-+$+$'-)-!-~-: : : : : : : : {-]- =+$+$+$+$+$+$+$^-/-(-_-: : : ", +" : : : : : :-<---: : : : : : : : : : : : [-}-|-1-1-2-3-_*: : : : : ", +" : : : : : : : : : : : : : : : : : : : : : : : : : ", +" : : : : : : : : : : : : : : ", +" : : : : : ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "} +------------------------------------------------------------------------------ +export constant icon = xpm_to_pixbuf(clown_xpm) +------------------------------------------------------------------------------ diff --git a/eugtk/examples/examples/color_codes.ex b/eugtk/examples/examples/color_codes.ex new file mode 100644 index 0000000..1277125 --- /dev/null +++ b/eugtk/examples/examples/color_codes.ex @@ -0,0 +1,185 @@ + +--------------------------------------------------------------------------- +--# Resistor color codes; +-- Note: some GTK themes have a bug which adds space around images, +-- so the resistor image may appear to be 'sliced up'. +-- This can be fixed by using css to set image padding to 0. +--------------------------------------------------------------------------- + +include GtkEngine.e +include std/locale.e +include std/convert.e +include std/filesys.e + +object resistor -- an array of images + +object valdisp = create(GtkLabel) + +constant colors1 = { -- color bands; + "Black","Brown","Red","Orange","Yellow", + "Green","Blue","Violet","Gray","White" + }, + -- multipliers; + colors2 = colors1 & {"Silver","Gold"}, + + -- tolerance; + colors3 = {"Gold","Silver","None"}, + + -- formatting string for value display; + tolerance = {" +/- 5%"," +/- 10%"," +/- 20%"}, + + -- location of the color band images; + wp = canonical_path("~/demos/resources/colorcode/") + +constant tens = create(GtkComboBoxText) + for i = 2 to length(colors1) do + gtk:set(tens,"append text",colors1[i]) + end for + +constant ones = create(GtkComboBoxText) + for i = 1 to length(colors1) do + gtk:set(ones,"append text",colors1[i]) + end for + +constant mult = create(GtkComboBoxText) + for i = 1 to length(colors2) do + gtk:set(mult,"append text",colors2[i]) + end for + +constant tol = create(GtkComboBoxText) + for i = 1 to length(colors3) do + gtk:set(tol,"append text",colors3[i]) + end for + gtk:set(tol,"active",1) + +constant update = call_back(routine_id("Update")) + + connect(tens,"changed",update) + connect(ones,"changed",update) + connect(mult,"changed",update) + connect(tol,"changed",update) + +constant win = create(GtkWindow,{ + {"title","Resistor Color Codes"}, + {"position",GTK_WIN_POS_CENTER}, + {"border width",10}, + {"resizable",FALSE}, + {"icon","~/demos/thumbnails/mongoose.png"}, + {"connect","destroy","Quit"}}) + +constant panel = create(GtkBox,VERTICAL) + add(win,panel) + +-- this creates a composite image of a resistor; +resistor = repeat(0,5) + resistor[1] = create(GtkImage,wp & "leftend.jpg") + resistor[2] = create(GtkImage,wp & "bar.jpg") + resistor[3] = create(GtkImage,wp & "bar.jpg") + resistor[4] = create(GtkImage,wp & "bar.jpg") + resistor[5] = create(GtkImage,wp & "end1.jpg") + +constant top = create(GtkBox) + add(panel,top) + add(top,resistor) + +constant bot = create(GtkBox) + add(panel,bot) + pack(bot,{tens,ones,mult,tol}) + +constant css = create(GtkCssProvider,"GtkImage {padding:0;}") + +valdisp = create(GtkEntry) + add(panel,valdisp) + +show_all(win) +main() + +----------------------------------------------------------- +function Format(integer t, integer o, integer m, integer p) +----------------------------------------------------------- +-- a utility to correctly format the value displayed; +object vs +atom v = 0 +object prec = "", fmt = "[1] [2] [3] ([4] ~ [5] [2])" + +integer i +object min_v, max_v, var, suffix + + vs = sprintf("%d%d",{t,o}) + + if m < 1 then + v = to_number(vs) + end if + + if m > 0 and m < 10 then + vs &= repeat('0',m) + v = to_number(vs) + end if + + if m = 10 then + v = to_number(vs)/10 + end if + + if m = 11 then + v = to_number(vs)/100 + end if + + if p > -1 then + prec = tolerance[p] + switch p do + case 3 then var = v * 0.20 + case 2 then var = v * 0.10 + case 1 then var = v * 0.05 + end switch + min_v = v - var + max_v = v + var + end if + + if v >= 1e6 then + return format(fmt,{v/1e6,"Meg Ω",prec,number(min_v/1e6),number(max_v/1e6)}) + + elsif v >= 1000 then + return format(fmt,{v/1000,"K Ω",prec,number(min_v/1000),number(max_v/1000)}) + + else + return format(fmt,{v,"Ω",prec,number(min_v),number(max_v)}) + + end if + +end function + +-------------------------------------------------- +function Update() -- called when values chg +-------------------------------------------------- +integer t,o,m,p + +-- get selections from combo boxes, + t = gtk:get(tens,"active") + o = gtk:get(ones,"active") -1 + m = gtk:get(mult,"active") -1 + p = gtk:get(tol,"active") + +-- set resistor color bands to match entered values; + if t > 0 then + gtk:set(resistor[2],"from file",sprintf(wp & "bar%d.jpg",t)) + end if + + if o > 0 then + gtk:set(resistor[3],"from file",sprintf(wp & "bar%d.jpg",o)) + end if + + if m > 0 then + gtk:set(resistor[4],"from file",sprintf(wp & "bar%d.jpg",m)) + end if + + if p > 0 then + gtk:set(resistor[5],"from file",sprintf(wp & "end%d.jpg",p)) + end if + +-- display value in text form; + if t > 0 and o > 0 and m > 0 then + gtk:set(valdisp,"text",Format(t,o,m,p)) + end if + +return 0 +end function diff --git a/eugtk/examples/examples/colornames.ex b/eugtk/examples/examples/colornames.ex new file mode 100644 index 0000000..d5fce9d --- /dev/null +++ b/eugtk/examples/examples/colornames.ex @@ -0,0 +1,68 @@ + +------------------------------------------------------------------------ +--# displays the x-color names and samples; +------------------------------------------------------------------------ + +include GtkEngine.e + +constant xcolors = canonical_path("~/demos/resources/xcolors.txt") + +constant win = create(GtkWindow,{ + {"icon","~/demos/thumbnails/preferences-color.svg"}, + {"default size",400,800}, + {"position",GTK_WIN_POS_CENTER}}) + connect(win,"destroy","Quit") + +constant panel = create(GtkBox,VERTICAL) + add(win,panel) + +constant scroller = create(GtkScrolledWindow) + pack(panel,scroller,TRUE,TRUE) + +constant rend1 = create(GtkCellRendererText), + col1 = create(GtkTreeViewColumn,{ + {"pack start",rend1}, + {"title","Name"}, + {"sort column id",1}, + {"add attribute",rend1,"text",1}}) + +constant rend2 = create(GtkCellRendererText), + col2 = create(GtkTreeViewColumn,{ + {"pack start",rend2}, + {"title","Color"}, + {"add attribute",rend2,"background",1}}) + +constant store = create(GtkListStore,{gSTR,gSTR,gINT}) + +sequence names = read_lines(xcolors) + set(store,"data",names) + +constant tv = add(scroller,create(GtkTreeView,{ + {"model",store}, + {"headers clickable",TRUE}, + {"grid lines",GTK_TREE_VIEW_GRID_LINES_BOTH}, + {"append columns",{col1,col2}}})) + +constant + btn1 = create(GtkButton,"gtk-quit","Quit"), + btn2 = create(GtkButton,"gtk-refresh","Restore") + set(btn2,"tooltip text","Restore original (unsorted) order") + +constant box = add(panel,create(GtkButtonBox,{ + {"layout",GTK_BUTTONBOX_SPREAD}, + {"margin top",10}, + {"margin bottom",10}})) + add(box,{btn1,btn2}) + +show_all(win) +main() + +------------------------- +global function Restore() -- returns list to original order +------------------------- + set(store,"clear") + set(store,"sort column id",UNSORTED) + set(store,"data",names) +return 1 +end function + diff --git a/eugtk/examples/examples/eu.cfg b/eugtk/examples/examples/eu.cfg new file mode 100644 index 0000000..480e3be --- /dev/null +++ b/eugtk/examples/examples/eu.cfg @@ -0,0 +1 @@ +~/demos \ No newline at end of file diff --git a/eugtk/examples/examples/hangman.ex b/eugtk/examples/examples/hangman.ex new file mode 100644 index 0000000..a3392f3 --- /dev/null +++ b/eugtk/examples/examples/hangman.ex @@ -0,0 +1,154 @@ + +------------------------------------------------------------------------ +--# Turn over the letters and guess the word game. +------------------------------------------------------------------------ +-- if you don't see yellow and green letters as you click on them, +-- try changing your theme - mint doesn't show 'em, most others do. + +include GtkEngine.e +include GtkEvents.e + +------------------------------------------------------------------------ +-- variables; +------------------------------------------------------------------------ +integer max_tries, ct = 0 + +sequence words = read_lines(locate_file("resources/words.txt")) + +object avail, blanks, current_word + +------------------------------------------------------------------------ +-- interface; +------------------------------------------------------------------------ +constant win = create(GtkWindow, -- the main window; + "border=10,position=1,$destroy=Quit,$key-press-event=LetterSelected") + +constant panel = create(GtkBox,1) + add(win,panel) + +constant display = create(GtkLabel) -- for word being guessed; + set(display,"font","bold 24") + add(panel,display) + +constant lbl1 = create(GtkLabel,"Guess the word") -- for status; + set(lbl1,"font","8") + add(panel,lbl1) + +constant grid = create(GtkGrid) -- to display button set; + add(panel,grid) + set(grid,"row spacing",2) + set(grid,"column spacing",1) + +object letters = series('a',1,26) -- build an array of buttons; +integer x = 1, y = 3, z = 0 + + for i = 1 to length(letters) do -- load the letter button grid; + letters[i] = create(GtkButton,sprintf("_%s",letters[i]),"LetterSelected",letters[i]) + set(letters[i],"border",0) set(letters[i],"margin",0) + set(grid,"attach",letters[i],x,y,1,1) + x += 1 + if x > 13 then -- move to next line; + x = 1 y += 1 + end if + end for + +new_word() -- on startup, get a random word and initialize counters; + +show_all(win) +main() + +------------------------------------------------------------------------ +procedure new_word() -- selects a random word, resets available letters; +------------------------------------------------------------------------ + current_word = words[rand(length(words))] + avail = series('a',1,32,'+') -- set of {'a'...'z'} + blanks = repeat('_',length(avail)) -- to hide unguessed letters; + ct = 0 -- number of tries; + max_tries = 2 * length(current_word)-- number of tries allowed; + + set(display,"markup",FormatWord(current_word)) + + for i = 1 to length(letters) do -- reset colors; + set(letters[i],"background","white") + set(letters[i],"sensitive",TRUE) + end for + +end procedure + +------------------------------------------------------------------------ +global function LetterSelected(atom ctl, atom event) -- event handler; +------------------------------------------------------------------------ +integer key + +-- this function is linked to both keypresses and button clicks, +-- so we first need to determine which happened; + + if is_in_range(event,{'a','z'}) then key = event -- button was clicked; + else key = events:key(event) -- was keyboard input; + end if + + if is_in_list(key,avail) then -- if in set of unused letters + ct += 1 -- new guess counts; + set(letters[key-'a'+1],"sensitive",FALSE) -- used + + if find(key,current_word) > 0 then + set(letters[key-'a'+1],"background","green") -- used in word + else + set(letters[key-'a'+1],"background","yellow")-- not in word + end if + + avail = remove_all(key,avail) -- remove the letter from available set; + + set(display,"markup",FormatWord(current_word)) + + if ct > max_tries then -- too many tries, give up; + if Question(win,"Sorry", + sprintf("The word was %s",{current_word}), + "Play again?") = MB_YES then + new_word() + else abort(0) + end if + end if + + end if + +return 1 +end function + +--------------------------------------------------------------------------- +function FormatWord(object word) -- handles display and testing for a win; +------------------------------------------------------------------------ +object result = "" + + set(lbl1,"text",sprintf("%d letter word,\n%d guesses left.", + {length(current_word),max_tries-ct})) + +-- change 'unguessed' letters to underscores, +-- using the still un-tried letters remaining; + word = transmute(word,avail,blanks) + +-- add spaces between letters (looks better!); + for i = 1 to length(word) do + result &= word[i] & ' ' + end for + +-- if no hidden letters are left, the puzzle is solved! + if not find('_',word) then + set(display,"markup",sprintf("%s",{result})) + + if Question(win,"Congratulations!",current_word, + sprintf("You guessed it in %d tries!\nYour score is %d\nPlay again?", + {ct,100*(length(current_word)/ct)})) = MB_YES then + new_word() + return FormatWord(current_word) + else + Info(win,"Thanks!","Thanks","Please play again sometime") + abort(0) + end if + + end if + +return result +end function + + diff --git a/eugtk/examples/examples/httpd.ex b/eugtk/examples/examples/httpd.ex new file mode 100755 index 0000000..7887338 --- /dev/null +++ b/eugtk/examples/examples/httpd.ex @@ -0,0 +1,403 @@ +--====================================================================-- +--# A modified version of Euphoria's httpd.ex by RDS + +-- Httpd.ex can be run stand-alone started from a command line %>eui httpd +-- If needed parameters aren't supplied, a usage message will be printed. +-- It can also be called from an Eu program using system_exec() +-- with parameters and flags included in the command line. +--====================================================================-- + +--This library is free software; you can redistribute it +--and/or modify it under the terms of the GNU Lesser General +--Public License as published by the Free Software Foundation; +--either version 2 of the License, or (at your option) any later +--version. + +--This library is distributed in the hope that it will be useful, +--but WITHOUT ANY WARRANTY; without even the implied warranty of +--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +--See the GNU Lesser General Public License for more details. + +--You should have received a copy of the GNU Lesser General Public +--License along with this library; if not, write to the Free Software +--Foundation, Inc., 59 Temple Pl, Suite 330, Boston, MA 02111-1307 USA + +include std/socket.e as sock +include std/text.e +include std/types.e +include std/sort.e +include std/convert.e +include std/sequence.e +include std/io.e +include std/os.e +include std/math.e +include std/net/url.e +include std/console.e +include std/filesys.e +include std/datetime.e +include std/map.e as m + +----------------------------------------------------------------------- +-- END STYLING +----------------------------------------------------------------------- + +object server_log = 0, show_hidden = 0, sort_listing = 0, show_request = 0 +object bind_addr = "127.0.0.1:8080" +object doc_root = "." +object image_width = "600px" + +m:map mime_types = m:new() + +sequence typs = { -- you may need to add additional types here; + { "htm", "text/html" }, + { "html", "text/html" }, + { "css", "text/css" }, + { "png", "image/png" }, + { "jpg", "image/jpeg" }, + { "jpeg", "image/jpeg" }, + { "gif", "image/gif" }, + { "bmp", "image/bmp" }, + { "png", "image/png" }, + { "svg", "image/svg+xml" }, + { "xpm", "image/x-xpixmap"}, + { "wma", "audio/x-ms-wma"}, + { "wav", "audio/x-wave"}, + { "ogg", "audio/x-vorbis+ogg"}, + { "mov", "video/quicktime"}, + { "vob", "video/mpeg"}, + { "mp3", "audio/mpeg"}, + { "mp4", "video/mp4"}, + { "mpeg", "video/mpeg"}, + { "mpg", "video/mpeg"}, + { "pdf", "application/pdf"}, + { "zip", "application/zip"}, + $ +} + +for i = 1 to length(typs) do + m:put(mime_types, typs[i][1], typs[i][2]) +end for + +constant RESPONSE_STRING = """ +HTTP/1.0 %d +Content-Type: %s +Connection: close +Content-length: %d + + +""" + +constant ERROR_404 = """ + +404 Not Found + +

404 Not Found

+

Sorry!

+

+%s was not found on this server. +

+ + +""" +------------------------------------------------------------------------ +function SortDirectoriesFirst(object a, object b) +------------------------------------------------------------------------ +return compare(b[2],a[2]) +end function +atom directories_first = routine_id("SortDirectoriesFirst") + +------------------------------------------------------------------------ +function SortIgnoreCase(object a, object b) +------------------------------------------------------------------------ +return compare(upper(a),upper(b)) +end function +atom ignore_case = routine_id("SortIgnoreCase") + + +-- Styled objects; +constant style_header = """%s""" +constant style_listing = """""" +constant style_directory = """""" +constant style_html = """""" + +------------------------------------------------------------------------ +function create_index(sequence path) -- builds an html index on-the-fly +------------------------------------------------------------------------ +sequence data = sprintf(""" + + + + Eu Server + + + + +""",{path}) + +object files = dir(path), name, tmp + +integer ct = 1 + + if atom(files) then return 0 end if + + if sort_listing then + files = custom_sort(ignore_case,files) + files = custom_sort(directories_first,files) + end if + + data &= "\n\n" + + data &= sprintf(style_header,{path}) + + for i = 1 to length(files) do + + name = files[i][D_NAME] + + if show_hidden = 0 then + if name[1] = '.' then continue end if + end if + + if find('d', files[i][D_ATTRIBUTES]) then + data &= sprintf(style_directory,{name,name}) + data &= "\n\t" + else + tmp = name + tmp = split(tmp,'.') + if length(tmp) > 1 then + tmp = tmp[1] + else + tmp = name + end if + -- try to deal with accented chars : ò, for example, in song titles + for n = 1 to length(tmp) do + if tmp[n] = 195 then + tmp = tmp[1..n-1] & sprintf("&#%d;",{tmp[n+1]+64}) & tmp[n+2..$] + end if + end for + if match("htm",lower(fileext(name))) then + data &= sprintf(style_html,{url:encode(name),name}) + else + data &= sprintf(style_listing, {url:encode(name),name}) + end if + data &= "\n\t" + end if + + if remainder(ct,4)=0 then + data &= "\n" + end if + ct += 1 + + end for + + data &= "
\n" + + return data + +end function + +------------------------------------------------------------------------------------ +procedure handle_request(sock:socket server, sequence client, sequence doc_root=".") +------------------------------------------------------------------------------------ +sock:socket client_sock = client[1] +sequence client_addr = client[2] +object command,path,content_type,fileinfo,data +object request = sock:receive(client_sock,0) +object req_time = datetime:format(datetime:now_gmt(),"%Y/%m/%d %H:%M:%S ") +integer fn, fo, len, fsize, result_code +object fname=0, t1 = 0, t2 = 0 + + if atom(request) then + return + else + request = split(request,"\r\n") + if show_request then + if string(server_log) then + append_lines(server_log,request) + else + display(request) + end if + end if + end if + + if length(request) >= 1 then + command = request[1] + end if + + if length(request) >= 2 then + path = request[2] + end if + + t1 = split(command,' ') + t1 = url:decode(t1[2]) + +object a = split(doc_root,'/') +object b = split(t1,'/') +object c = {} + +for i = 1 to length(b) do +if i > length(a) then + c = b[i..$] + exit +end if +if equal(a[i],b[i]) then +else + c = b[i..$] + exit +end if +end for + +fname = join(a,'/') & '/' & join(c,'/') + +-- for logging; + fsize = file_length(fname) + + if string(server_log) then + append_lines(server_log, + {text:format("[] [] [] []",{req_time,client_addr,fname,fsize})}) + else + display("[] [] [] []",{req_time,client_addr,fname,fsize}) + end if + +-- we need to handle directories and files differently; + + switch file_type(fname) do + + case 0 then + result_code = 404 + content_type = "text/html" + data = sprintf(ERROR_404,{filename(fname)}) + + sock:send(client_sock, sprintf(RESPONSE_STRING, { + result_code, content_type, length(data)}), 0) + sock:send(client_sock, data, 0) + + case 1 then + data = read_file(fname) + content_type = m:get(mime_types,lower(fileext(fname)),"text/plain") + result_code = 200 + if not equal("ex",fileext(fname)) then + sock:send(client_sock, sprintf(RESPONSE_STRING, { + result_code, content_type, length(data)}), 0) + end if + sock:send(client_sock, data, 0) + + + case 2 then + data = create_index(fname) + content_type = "text/html" + result_code = 200 + + sock:send(client_sock, sprintf(RESPONSE_STRING, { + result_code, content_type, length(data)}), 0) + sock:send(client_sock, data, 0) + + end switch + + +end procedure + +------------------------------------------------------------------------ +function server() +------------------------------------------------------------------------ +sequence args = command_line(), starttime + + if length(args) = 2 then + show_usage() + end if + + display(args) + +integer n_tries = 20 +integer i = 3 + while i < length(args) do + switch args[i] do + case "-h" then show_hidden = 1 + case "-s" then sort_listing = 1 + case "-r" then show_request = 1 + case "-t" then n_tries = to_number(args[i+1]) + case "-bind" then bind_addr = args[i+1] i += 1 + case "-root" then doc_root = args[i+1] i += 1 + case "-log" then server_log = args[i+1] i += 1 + case else -- fail on invalid option; + printf(1,"Unknown option: %s\n",{args[i]}) + show_usage() + abort(1) + end switch + i += 1 + end while + +integer ct = 1 +label "retry" + + chdir(doc_root) + + sock:socket server = sock:create(sock:AF_INET, sock:SOCK_STREAM, 0) + + if sock:bind(server,bind_addr) != sock:OK then -- retry a few times; + printf(1,"Could not bind %s, error=%d try=%d\n", + {bind_addr, sock:error_code(),ct}) + sleep(2) + ct += 1 + if ct >= n_tries then -- fail after too many tries; + printf(1,"Failed to bind []\n",{bind_addr}) + if string(server_log) then + append_lines(server_log, + {sprintf("Failed to bind %s\n",{bind_addr}), + sprintf("Tried %d times",ct)}) + end if + abort(ct) + end if + goto "retry" + end if + + starttime = datetime:format(datetime:now_gmt(),"%Y/%m/%d %H:%M:%S ") + + printf(1,"Listening for request on %s\n",{bind_addr}) + if string(server_log) then + append_lines(server_log, + {sprintf("-----SERVER STARTED %s",{starttime}), + sprintf("-----Listening for request on %s",{bind_addr})}) + end if + + while sock:listen(server,10) = sock:OK do + object client = sock:accept(server) + if sequence(client) then + handle_request(server,client,doc_root) + sock:close(client[1]) + end if + end while + + sock:close(server) + + return 1 +end function + +---------------------- +procedure show_usage() +---------------------- +puts(1, ` + + Usage: httpd.ex + -bind ip_address:port + -root document_root + [-h show_hidden files] + [-s sort listing] + [-r show full request in log] + [-t number of tries to obtain port] + [-log name of log file] + short options must come before long options + `) + +puts(1,"\n") +abort(0) +end procedure + +server() +------------------------ +--© 2014 by Irv Mullins +------------------------ diff --git a/eugtk/examples/examples/icon_E.e b/eugtk/examples/examples/icon_E.e new file mode 100644 index 0000000..1afc0de --- /dev/null +++ b/eugtk/examples/examples/icon_E.e @@ -0,0 +1,641 @@ + +namespace e + +-- exports e:icon + +include GtkEngine.e + +constant e_xpm = { +"176 250 379 2", +" c None", +". c #000000", +"+ c #000001", +"@ c #000102", +"# c #000103", +"$ c #000204", +"% c #000205", +"& c #000306", +"* c #000307", +"= c #000408", +"- c #000409", +"; c #00050A", +"> c #00050B", +", c #00060C", +"' c #00060D", +") c #00070E", +"! c #00070F", +"~ c #000810", +"{ c #000811", +"] c #000912", +"^ c #000913", +"/ c #000A14", +"( c #000A15", +"_ c #000B16", +": c #000B17", +"< c #000C18", +"[ c #000C19", +"} c #000D1A", +"| c #000D1B", +"1 c #000E1C", +"2 c #000E1D", +"3 c #000F1E", +"4 c #000F1F", +"5 c #001020", +"6 c #001021", +"7 c #001122", +"8 c #001123", +"9 c #001224", +"0 c #001225", +"a c #001326", +"b c #001327", +"c c #001428", +"d c #001429", +"e c #01152A", +"f c #01152B", +"g c #01162C", +"h c #01162D", +"i c #01172E", +"j c #01172F", +"k c #011830", +"l c #011831", +"m c #011932", +"n c #011933", +"o c #011A34", +"p c #011A35", +"q c #011B36", +"r c #011B37", +"s c #011C38", +"t c #011C39", +"u c #011D3A", +"v c #011D3B", +"w c #011E3C", +"x c #011E3D", +"y c #011F3E", +"z c #01203F", +"A c #012040", +"B c #012141", +"C c #012142", +"D c #012243", +"E c #012244", +"F c #012345", +"G c #012346", +"H c #012447", +"I c #012448", +"J c #012549", +"K c #01254A", +"L c #01264B", +"M c #01264C", +"N c #01274D", +"O c #01274E", +"P c #01284F", +"Q c #012850", +"R c #012951", +"S c #012952", +"T c #022A53", +"U c #022A54", +"V c #022B55", +"W c #022B56", +"X c #022C57", +"Y c #022C58", +"Z c #022D59", +"` c #022D5A", +" . c #022E5B", +".. c #022E5C", +"+. c #022F5D", +"@. c #022F5E", +"#. c #02305F", +"$. c #023060", +"%. c #023161", +"&. c #023162", +"*. c #023263", +"=. c #023264", +"-. c #023365", +";. c #023366", +">. c #023467", +",. c #023569", +"'. c #02356A", +"). c #02366B", +"!. c #02366C", +"~. c #02376D", +"{. c #02376E", +"]. c #02386F", +"^. c #023870", +"/. c #023468", +"(. c #023971", +"_. c #023972", +":. c #023A74", +"<. c #023B75", +"[. c #023B76", +"}. c #023C77", +"|. c #023C78", +"1. c #023D79", +"2. c #023A73", +"3. c #023D7A", +"4. c #023E7B", +"5. c #023E7C", +"6. c #023F7D", +"7. c #033F7D", +"8. c #03407E", +"9. c #03407F", +"0. c #034180", +"a. c #034181", +"b. c #034283", +"c. c #034384", +"d. c #034385", +"e. c #034486", +"f. c #034487", +"g. c #034588", +"h. c #034589", +"i. c #03468A", +"j. c #034282", +"k. c #03468B", +"l. c #03478D", +"m. c #03488E", +"n. c #03488F", +"o. c #034990", +"p. c #034991", +"q. c #034A92", +"r. c #034A93", +"s. c #03478C", +"t. c #034B94", +"u. c #034B95", +"v. c #034C96", +"w. c #034C97", +"x. c #034D98", +"y. c #034D99", +"z. c #034E9A", +"A. c #034E9B", +"B. c #034F9D", +"C. c #03509E", +"D. c #03509F", +"E. c #0351A0", +"F. c #0351A1", +"G. c #0352A2", +"H. c #0352A3", +"I. c #034F9C", +"J. c #070707", +"K. c #080707", +"L. c #080708", +"M. c #070807", +"N. c #070708", +"O. c #070808", +"P. c #080808", +"Q. c #080807", +"R. c #0B0C0B", +"S. c #0B0C0C", +"T. c #0B0B0B", +"U. c #0C0C0B", +"V. c #0B0B0C", +"W. c #0C0B0B", +"X. c #0C0B0C", +"Y. c #0C0C0C", +"Z. c #0F0F0F", +"`. c #0F0F10", +" + c #0F100F", +".+ c #131313", +"++ c #131312", +"@+ c #131212", +"#+ c #131213", +"$+ c #121313", +"%+ c #121213", +"&+ c #121312", +"*+ c #171616", +"=+ c #161717", +"-+ c #171617", +";+ c #171716", +">+ c #161617", +",+ c #171717", +"'+ c #161716", +")+ c #161616", +"!+ c #1A1A1B", +"~+ c #1A1A1A", +"{+ c #1B1B1A", +"]+ c #1A1B1A", +"^+ c #1B1A1A", +"/+ c #1A1B1B", +"(+ c #1B1A1B", +"_+ c #1B1B1B", +":+ c #1E1E1E", +"<+ c #1E1E1F", +"[+ c #1E1F1E", +"}+ c #1F1E1E", +"|+ c #222222", +"1+ c #212222", +"2+ c #222221", +"3+ c #222122", +"4+ c #212122", +"5+ c #212221", +"6+ c #222121", +"7+ c #212121", +"8+ c #252626", +"9+ c #262526", +"0+ c #262525", +"a+ c #252525", +"b+ c #262626", +"c+ c #252625", +"d+ c #262625", +"e+ c #252526", +"f+ c #1E1F1F", +"g+ c #2A2929", +"h+ c #292929", +"i+ c #2A2A29", +"j+ c #292A2A", +"k+ c #29292A", +"l+ c #2A2A2A", +"m+ c #292A29", +"n+ c #2E2D2D", +"o+ c #2D2D2D", +"p+ c #2D2D2E", +"q+ c #2D2E2D", +"r+ c #2E2E2D", +"s+ c #2D2E2E", +"t+ c #1F1E1F", +"u+ c #313131", +"v+ c #313130", +"w+ c #303130", +"x+ c #2A292A", +"y+ c #343434", +"z+ c #353535", +"A+ c #353534", +"B+ c #343435", +"C+ c #353434", +"D+ c #343534", +"E+ c #303131", +"F+ c #393839", +"G+ c #393938", +"H+ c #383839", +"I+ c #393838", +"J+ c #383938", +"K+ c #313231", +"L+ c #353435", +"M+ c #3C3C3C", +"N+ c #3D3D3C", +"O+ c #2E2D2E", +"P+ c #1F1F1E", +"Q+ c #1F1F1F", +"R+ c #403F40", +"S+ c #404040", +"T+ c #3C3C3D", +"U+ c #383939", +"V+ c #343535", +"W+ c #323131", +"X+ c #303031", +"Y+ c #444344", +"Z+ c #414040", +"`+ c #404140", +" @ c #3C3D3C", +".@ c #3D3C3D", +"+@ c #100F0F", +"@@ c #0572E2", +"#@ c #0571E0", +"$@ c #0570DD", +"%@ c #056FDB", +"&@ c #056ED9", +"*@ c #056CD6", +"=@ c #056BD4", +"-@ c #056AD2", +";@ c #0469CF", +">@ c #0468CD", +",@ c #0467CB", +"'@ c #0466C9", +")@ c #0465C7", +"!@ c #0464C5", +"~@ c #0463C3", +"{@ c #0462C2", +"]@ c #0461C0", +"^@ c #0461BF", +"/@ c #0460BD", +"(@ c #045FBC", +"_@ c #045EBB", +":@ c #045EBA", +"<@ c #045DB9", +"[@ c #045DB8", +"}@ c #045CB7", +"|@ c #045CB6", +"1@ c #045BB5", +"2@ c #045BB4", +"3@ c #045AB3", +"4@ c #045AB2", +"5@ c #0459B0", +"6@ c #0458AF", +"7@ c #0457AD", +"8@ c #0456AB", +"9@ c #0455A9", +"0@ c #0354A6", +"a@ c #313232", +"b@ c #0570DE", +"c@ c #056FDC", +"d@ c #056DD7", +"e@ c #0466CA", +"f@ c #0465C8", +"g@ c #0464C6", +"h@ c #0463C4", +"i@ c #0460BE", +"j@ c #0459B1", +"k@ c #0458AE", +"l@ c #0454A7", +"m@ c #0353A5", +"n@ c #056DD8", +"o@ c #056CD5", +"p@ c #056BD3", +"q@ c #0469D0", +"r@ c #0462C1", +"s@ c #0457AC", +"t@ c #0456AA", +"u@ c #0353A4", +"v@ c #393939", +"w@ c #056AD1", +"x@ c #0468CE", +"y@ c #0455A8", +"z@ c #313031", +"A@ c #383838", +"B@ c #056EDA", +"C@ c #0467CC", +"D@ c #100F10", +"E@ c #0571DF", +"F@ c #0573E3", +"G@ c #0572E1", +"H@ c #3C3D3D", +"I@ c #40403F", +"J@ c #444444", +"K@ c #434444", +"L@ c #444343", +"M@ c #484748", +"N@ c #434344", +"O@ c #484847", +"P@ c #484747", +"Q@ c #444443", +"R@ c #474848", +"S@ c #4C4B4C", +"T@ c #484848", +"U@ c #474747", +"V@ c #4B4C4B", +"W@ c #4B4B4B", +"X@ c #474847", +"Y@ c #4C4C4B", +"Z@ c #4F4F4F", +"`@ c #4B4B4C", +" # c #3D3D3D", +".# c #4C4B4B", +"+# c #474748", +"@# c #3D3C3C", +"## c #434343", +"$# c #2E2E2E", +"%# c #0F1010", +"&# c #10100F", +"*# c #313132", +"=# c #313030", +"-# c #121212", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + @ @ @ @ @ @ @ @ @ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @ @ @ @ @ @ @ @ @ + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + @ @ @ @ @ @ # # # # # # # # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ # # # # # # # # @ @ @ @ @ @ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + @ @ @ @ # # # # $ $ $ $ $ % % % % % % % % & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & % % % % % % % % $ $ $ $ $ # # # # @ @ @ @ + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # # # $ $ $ % % % % % & & & & & & & * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * & & & & & & & % % % % % $ $ $ # # # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # $ $ $ % % % & & & * * * * * = = = = = = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = = = = = = * * * * * & & & % % % $ $ $ # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ $ % % & & * * * = = = - - - - ; ; ; ; ; ; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ; ; ; ; ; ; - - - - = = = * * * & & % % $ $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ % % & & * * = = - - ; ; > > > , , , ' ' ' ' ' ' ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' ' ' ' ' ' , , , > > > ; ; - - = = * * & & % % $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ # # $ $ % % & * * = = - ; ; > > , ' ' ) ) ) ! ! ! ~ ~ ~ ~ ~ ~ { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { ~ ~ ~ ~ ~ ~ ! ! ! ) ) ) ' ' , > > ; ; - = = * * & % % $ $ # # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # # $ $ % & & * = - - ; > , , ' ) ) ! ! ~ ~ { { ] ] ] ^ ^ ^ ^ ^ ^ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / ^ ^ ^ ^ ^ ^ ] ] ] { { ~ ~ ! ! ) ) ' , , > ; - - = * & & % $ $ # # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # $ $ % & & * = - ; ; > , ' ) ! ~ ~ { ] ^ ^ / / ( ( _ _ _ : : : : : : < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < : : : : : : _ _ _ ( ( / / ^ ^ ] { ~ ~ ! ) ' , > ; ; - = * & & % $ $ # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # # $ $ % & * * = - ; > , ' ) ! ~ { ] ^ / ( _ _ : < < [ [ } } } | | | | | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | | | | | } } } [ [ < < : _ _ ( / ^ ] { ~ ! ) ' , > ; - = * * & % $ $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ $ % & * = - ; > , ' ! ~ { ] ^ ( _ : < [ } } | 1 2 2 3 3 4 4 4 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 5 5 5 5 5 4 4 4 3 3 2 2 1 | } } [ < : _ ( ^ ] { ~ ! ' , > ; - = * & % $ $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - ; , ' ) ~ { ] / ( _ < [ } | 2 3 4 5 5 6 7 7 8 8 9 9 0 0 0 0 0 a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 0 0 0 0 0 9 9 8 8 7 7 6 5 5 4 3 2 | } [ < _ ( / ] { ~ ) ' , ; - = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - > , ' ! ~ ] ^ ( _ < } | 1 3 4 5 7 8 9 0 a a b c c d d d e e e e e f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f e e e e e d d d c c b a a 0 9 8 7 5 4 3 1 | } < _ ( ^ ] ~ ! ' , > - = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = ; > , ) ~ { ^ ( : < } 1 3 4 6 8 9 a b c e f g g h i j j k k k l l l l l m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m l l l l l k k k j j i h g g f e c b a 9 8 6 4 3 1 } < : ( ^ { ~ ) , > ; = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ % & * = ; > ' ) ~ ] / ( : [ | 2 4 6 8 0 b d e g h j k l m n o o p p q q r r r r r s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s r r r r r q q p p o o n m l k j h g e d b 0 8 6 4 2 | [ : ( / ] ~ ) ' > ; = * & % $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ % & * = - > , ) ~ ] / _ < } 2 4 6 8 a c e g i k l n o q r s t u v w w x x x y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y x x x w w v u t s r q o n l k i g e c a 8 6 4 2 } < _ / ] ~ ) , > - = * & % $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = - > , ) ~ ] / : [ | 3 5 8 a c f h j m o q s u v x y y z A B C D D E E F F F F F G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G F F F F F E E D D C B A z y y x v u s q o m j h f c 0 8 5 3 | [ : / ] ~ ) , > - = * % % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - ; , ) ~ ] / : [ 1 4 6 9 b e h j m p r u w y z B D E G H I J K K L M M M N N N N N N O O O O O O O O N N N N N N N N N N N N N N N N N N N N M M M M L L L K K J I H G F D C A y x v t r o m j g d b 9 6 3 1 [ : / ] ~ ) , ; - * & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = ; , ' ~ ] / : [ 1 4 7 0 c f i l o r u x z B D G I K L N O P Q R S T T U U V V V V W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W V V V V U U T T S R Q P O N L J I G D B z x u r o l i f c 0 7 4 1 [ : / ] ! ' , ; = * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - > ' ! { / _ [ 1 4 7 0 d g j n q t x z C F H K M O Q S U V X Y Z ` . .....+.+.+.+.+.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.+.+.+.+.+..... . .` Z Y X V U S Q O M K H F C z x t q n j g c 0 7 4 1 [ _ ^ { ! ' > - = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * - ; , ) ~ ^ ( < | 3 7 0 d g k o s v y B F I L O R U W Y ` ..@.#.$.%.&.*.=.=.-.-.;.;.;.;.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.;.;.;.;.-.-.=.=.*.&.%.$.#.@...` Y W U R O L I F B y v s o k g d 0 7 3 | < ( ^ ~ ) , ; - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; > ' ~ ] ( : | 3 6 0 d g k o s x A D H L P S V Y .@.$.&.=.;.>.,.'.).!.~.~.{.{.].].].].^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.].].].].{.{.~.~.!.).'.,.>.;.=.&.$.@. .Y V S P L H D z w s o k g d 0 6 3 } : ( ] ! ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + + @ # $ % & * - ; , ) { ^ _ [ 2 5 9 c g k o t x A F J N R V Z ..#.&.-./.'.!.{.^.(._.:.<.<.[.}.}.}.|.|.|.|.|.|.1.1.1.1.1.1.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.}.}.}.}.[.[.<.:.:.2._.^.].~.).,.>.=.&.#. .Y U Q N I E A x s o k g c 9 5 1 [ _ ^ { ) , ; - * & % $ # @ + + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = - > ' ~ ] ( < | 4 8 b f j o s x B F K P T X .#.*.>.'.~.^._.:.[.|.3.4.5.6.7.8.8.9.9.0.0.0.0.0.0.0.a.a.a.a.a.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.9.9.9.8.8.8.7.6.5.4.3.1.}.<.2.(.].!.,.;.&.#. .X S O J F A x s n j f a 7 4 | < ( ] ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # # $ & * = ; , ) { / : } 2 6 0 e i n s w A F K P U Z @.&.;.'.{.(.:.}.3.5.8.9.a.b.c.d.e.f.f.g.g.h.h.h.h.h.h.h.i.i.i.i.i.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.g.g.g.g.f.f.e.e.d.c.b.j.0.9.7.5.1.}.:.^.~.,.-.%.+.Y U P K F A w r m i d 0 6 2 } _ ^ { ) , ; = * % $ # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ' ! ] ( < 1 4 9 c g l q v z F K P V ` #.=./.~.(.<.1.5.8.a.c.e.g.i.k.l.m.n.n.o.p.p.p.q.q.q.q.q.q.r.r.r.r.r.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.p.p.p.p.o.o.n.n.m.l.s.i.h.f.d.b.0.7.4.|.:.^.!./.*.@.Z U P J E z v q l g b 8 4 | < ( ] ! ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = ; , ) ~ ^ _ } 2 6 a e j o u y D J P U ` #.-.'.].:.|.5.9.b.e.h.s.m.o.q.t.u.v.w.x.y.y.z.z.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.z.z.z.z.z.z.z.z.z.z.y.y.y.y.x.x.w.v.v.t.r.q.o.m.s.i.f.c.a.8.4.}._.~.,.*.@.Z T O I D y t o j e 0 6 2 [ _ ^ ~ ) > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! { / < | 4 8 c h m r x B H N T Z #.-.'.^.<.3.7.j.e.i.l.o.r.u.x.z.A.B.C.D.E.F.F.G.G.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.G.G.G.G.G.G.G.G.G.G.F.F.F.F.E.E.D.C.B.I.A.y.x.v.t.p.m.k.g.c.0.6.|.2.{.,.*.+.Y S M G A w q l g b 8 4 | : / { ) , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # # % & * - > ' ! ] ( [ 2 6 0 e j o u z F L R X +.*.'.].J.J.J.K.J.L.M.N.L.O.J.L.M.O.L.K.K.P.Q.N.O.Q.L.P.Q.N.M.L.Q.Q.N.N.Q.M.P.Q.K.J.Q.J.L.P.K.P.P.N.P.J.N.M.K.N.O.J.J.J.Q.L.N.L.N.Q.O.M.L.L.P.M.L.P.O.J.Q.N.P.J.{./.&...W Q K E y t o i d 0 5 1 < ( ] ! ' > - * & $ # # @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # $ % & = - > ) ~ ^ _ } 3 7 b g l r x C I O V .&./.].<.J.R.S.T.R.U.T.T.V.V.V.V.T.W.R.U.R.T.X.T.V.T.R.V.W.V.X.S.R.W.T.X.S.T.X.V.T.V.T.T.V.T.T.R.T.T.X.V.T.T.Y.V.W.T.U.T.T.R.R.T.V.T.T.R.T.W.W.V.T.V.T.V.S.W.S.M.2.!.;.$.` T N H A v q k f a 7 2 } _ ^ ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + + @ # $ % & = ; , ) { / < | 4 9 d i o t y F L S Z #.;.~.:.3.Q.W.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.`.Z. +Z.Z.Z. +Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.T.L.}.(.'.=.+.X Q J D y s m h c 8 4 | : / { ) , ; = & % $ # @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! ] ( < 1 6 0 e k q w B I O V ..*.'.(.|.8.N.W.Z..+++@+#+$+%+.+.+&+.+#+.+#+.+%+%+++$+++.+$+.+.+#+++#+@+.+.+.+.+++.+.+.+.+#+.+.+++#+.+$+.+$+++#+++.+%+.+.+.+%+.+.+.+.+.+.+#+++#+.+@+.+++.+#+.+Z.V.P.4.<.{.>.$.Z T M F z u o i d 9 5 | < / { ) , ; = & % $ # @ + + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ! ] _ [ 2 7 b g l r y D K R Y #.;.{.<.5.j.L.W.Z.$+*+=+-+;+>+,+-+;+'+)+,+*+'+,+'+)+;+;+,+)+-+-+;+=+;+=+,+;+*+=+;+;+>+,+=+,+,+*+>+'+-+,+,+)+'+,+,+=+;+-+;+)+'+;+,+-+)+=+'+,+'+'+,+=+,+'+;+=+.+Z.T.O.7.|.(.'.*...V O H B v p k e 0 6 1 < ( ] ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # # $ & * - > ' ~ ^ _ } 3 8 c h n t z G N U .*.'._.1.9.e.J.T.Z.++;+!+~+~+!+{+]+^+/+!+]+(+^+!+^+_+]+^+^+^+/+]+{+_+^+/+^+!+^+/+]+^+~+~+(+~+~+]+~+!+{+!+/+]+!+/+~+~+]+{+/+]+!+]+_+!+^+~+~+]+{+/+{+~+!+~+!+)+.+`.R.Q.a.4.:.~.;.@.X Q J C x r l f a 6 2 [ ( ] ! ' ; - * % $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ) { / : | 4 9 d j p v B H P W @.-.~.:.5.b.i.Q.R.Z..+'+^+:+:+:+:+:+<+[+[+}+:+:+:+[+:+:+:+:+:+:+:+:+:+:+:+:+[+:+:+:+:+:+:+:+<+:+:+:+:+:+:+[+[+:+:+[+:+<+:+:+<+:+:+}+}+:+:+:+<+<+[+:+:+:+<+~+=+.+Z.T.K.b.6.[.]./.$.Z S L E y s m g b 7 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ) { / < 1 5 0 e k q w C J R Y $./.].}.8.e.l.L.W.Z..+*+]+:+|+|+|+|+|+|+|+1+1+|+|+|+2+|+3+2+1+|+|+|+|+4+|+|+3+3+3+|+|+3+3+5+|+6+2+|+|+1+1+3+2+|+|+|+|+|+1+|+|+3+|+4+3+7+5+|+|+|+|+|+|+|+:+!+,+&+Z.T.N.d.8.|.(.,.&.` T M F y t n h c 8 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! { ( < 1 6 a f l r y E L S ` &.'._.3.a.h.o.M.T.Z..+=+{+:+1+8+9+0+a+b+b+c+c+d+8+e+8+8+d+e+9+d+0+0+9+8+0+0+0+d+a+d+8+a+d+b+d+d+b+c+c+8+8+c+a+9+b+0+d+a+c+8+9+b+8+8+d+d+8+d+b+8+c+0+d+|+f+~+,+.+Z.V.P.f.0.1._.'.*. .U N G z t n h c 8 3 } _ ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! ] ( [ 2 7 b g m s y F M U ..=.!.:.5.c.k.r.Q.R.Z..+=+/+:+1+c+g+h+h+i+j+j+k+h+h+k+k+l+g+h+m+m+h+h+i+g+h+i+l+h+j+m+k+h+h+g+m+l+m+m+h+h+h+h+i+k+l+k+m+g+h+j+g+m+g+m+k+h+h+m+m+g+j+j+0+|+:+!+;+#+Z.T.J.g.a.3.2.).=...V N G z u o i c 8 4 } : ^ ~ ' > - * & % # # @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] ( [ 3 7 b h n t z G O W @.;.{.[.8.e.m.v.P.V.Z..+;+!+:+|+0+g+n+o+n+o+n+o+o+p+q+o+o+p+o+o+o+o+o+o+o+n+o+o+n+o+o+p+o+o+o+o+r+p+o+q+o+q+o+n+o+o+s+p+q+o+o+o+o+p+o+o+o+p+o+o+n+o+l+b+|+[+^+,+.+Z.R.N.g.a.4.2.!.=...V O G A u o i d 8 4 | : ^ ~ ) > - * & % # # @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] _ } 3 8 c i o u A H P X #.>.^.|.9.g.o.x.P.T.Z..+*+~+t+|+9+h+o+u+u+v+u+u+w+u+u+u+u+v+u+u+v+u+u+o+i+m+g+m+m+i+g+j+i+h+g+m+l+l+g+k+x+h+g+j+i+x+x+m+k+g+h+g+k+j+h+g+i+i+i+m+k+j+l+9+|+:+!+)+$+Z.R.L.g.a.4.2.!.=...V O G A u o i c 8 4 | : ^ ~ ) > - * & % # # @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + @ @ # $ % * - > ' ~ ^ _ } 3 8 c i o v B I Q Y $.,.(.3.a.i.q.z.Q.T.Z..+,+/+:+|+a+h+o+u+y+z+z+z+z+A+z+A+B+C+D+D+D+u+q+h+b+8+9+9+b+b+8+8+b+9+d+9+b+9+a+d+d+c+b+b+b+9+b+b+9+9+8+b+b+d+9+b+8+b+b+d+b+9+9+b+2+:+^+,+++Z.S.Q.g.a.4.2.).=...V N G z u o i c 8 4 } : ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ _ } 4 9 d j p w C J R Z &.'.2.4.b.k.t.I.M.W.Z.&+;+~+}+|+8+j+o+E+z+F+G+H+G+G+F+I+G+J+F+z+K+n+l+b+|+|+|+|+|+2+2+|+|+1+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+2+|+2+|+2+|+|+|+|+|+|+|+|+|+|+|+:+/+*+.+`.U.L.f.0.1._.'.*. .U N G z t n h c 8 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ : | 4 9 d j q w C K S ` &.).:.5.c.l.u.B.Q.T.Z..+,+]+:+1+a+i+o+u+L+I+M+M+M+M+M+N+M+F+A+u+O+x+b+|+:+:+:+:+:+[+[+:+}+}+:+[+t+:+[+t+:+P+Q+:+:+:+<+:+[+P+:+:+[+:+<+:+:+:+:+<+:+t+:+}+f+[+^+,+.+Z.U.Q.e.8.|.(.,.&.` T M F y t n h c 8 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 4 9 e k q x D L T .*.!.<.7.d.m.v.D.M.Y.Z.@+'+~+:+|+8+m+p+u+L+G+M+R+S+S+S+T+U+V+W+o+x+c+|+<+^+/+~+{+!+{+!+/+]+_+~+(+]+^+]+]+~+/+~+~+^+^+!+]+/+~+!+(+_+]+!+^+{+(+{+^+(+!+]+!+^+]+!+;+.+`.V.L.c.7.}.]./.%.Z S L E y s m g b 7 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 5 0 e k q x D L T .=.~.<.7.e.n.w.D.J.W.Z..+,+/+:+|+b+k+o+X+V+J+M+S+Y+Z+N+U+z+u+o+i+b+|+:+(+;+-+-+*+=+>+,+,+>+=+'+;+=+'+>+,+>+=+-+,+-+,+-+=+=+,+,+;+-+'+'+;+,+>+>+,+'+;+=+,+'+-+)+=+.+`.T.N.j.5.<.{.;.#.Y R K D x r l f a 7 2 [ ( ] ! ' ; - * % $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 e k r y E M U ..-.~.[.8.f.o.x.F.P.X.Z..+;+^+[+|+9+h+o+u+z+J+N+S+`+ @G+V+u+q+h+b+|+<+~+=+.+$+&+$+++#+#+$+.+.+#+++.+#+.+.+.+.+$+.+$+.+.+++.+.+&+.+.+$+#+.+.+$+#+.+.+$+++.+.+.+.+.+$+Z.T.M.0.3.2.!.=.+.W P I C w q k f a 6 2 [ ( ] ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 f l r y E M U +.-.{.}.9.g.o.y.F.Q.X.Z..+=+]+[+|+9+h+q+u+y+H+.@S+T+I+z+K+p+g+d+|+:+~+=+@+Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.+@Z.Z.`.Z.Z.Z.+@Z.Z.Z.Z.Z.Z.Z.Z.+@Z.Z.Z.Z.Z.Z. + +Z.+@Z.Z.+@Z.Z.Z.W.O.7.}.^.,.&. .U N H A v p j e 0 5 1 < / { ! , ; = & % $ # @ + + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / : 1 5 0 f l r y F M V +.;.{.}.9.g.p.z.G.J.T.Z.#+'+/+:+|+e+h+o+u+L+U+M+M+F+z+K+o+j+b+|+[+^+>+#+Z.W.S.S.X.T.Y.Y.V.W.T.R.R.T.U.X.U.T.R.T.T.U.R.T.T.T.V.U.W.S.U.R.T.W.X.R.T.S.W.R.T.T.T.R.V.R.R.V.N.4.:.{.>.$.Z S L F y t n i d 9 4 | : / { ) , ; = & % $ # @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l r y F N V +.;.].}.9.g.p.z.G.N.R.Z..+;+~+}+3+b+g+n+u+V+F+M+I+L+u+r+x+b+|+:+]+>+.+`.T.L.P.O.J.P.Q.M.N.P.O.M.P.K.J.L.N.M.Q.P.M.M.K.N.P.M.O.Q.L.N.N.K.O.L.K.L.P.O.L.N.L.Q.N.P.J.Q.K.J.K.|._.).=.@.X Q J D y s m h b 8 3 } : ^ ~ ) > - = & % $ # @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s y F N V +.;.].|.0.h.q.z.H.K.V.Z..+,+_+}+|+9+h+o+E+z+G+G+L+u+o+x+9+|+<+]+*+.++@T.Q.@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@(@(@_@:@<@<@[@}@|@1@2@3@4@5@6@7@8@9@0@H.E.I.x.t.n.i.d.9.4.:.{./.%. .U O H B w q k f a 7 2 [ _ ^ ~ ' > - * & % # # @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s y F N V +.;.].|.0.h.q.z.H.M.R.Z..+;+^+:+|+b+h+o+u+A+H+F+z+a@n+m+b+|+:+(+,+#+Z.W.L.#@b@c@&@d@=@-@;@>@e@f@g@h@{@]@i@/@(@_@:@<@[@}@|@1@2@3@4@j@5@6@k@7@8@9@l@m@G.D.I.y.u.o.s.f.j.6.}.(.).-.#.Y S L F z u o j e 0 6 1 [ ( ] ! ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 a f l s y F N V @.;.].|.0.h.q.A.H.P.Y.Z.&+,+{+<+1+e+h+q+u+L+I+U+z+u+O+j+b+2+:+^+*+.+Z.T.N.#@$@%@n@o@p@q@>@,@f@g@~@r@^@/@(@_@<@}@|@1@2@3@4@j@5@6@k@7@s@8@t@9@l@m@H.F.C.A.x.u.p.l.g.b.8.3.:.{./.&...W P J D y s n h c 9 4 | < / { ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y F N V @.>.].|.0.h.q.A.u@N.W.Z.#+'+~+P+2+8+m+p+u+B+G+v@V+u+p+l+b+6+:+(+=+.+Z.R.P.b@c@&@*@p@w@x@,@f@g@~@]@i@(@_@<@}@1@2@3@j@5@6@k@7@s@8@t@9@y@l@0@m@H.F.D.B.z.x.u.p.l.h.d.0.5.}.(.).;.$.Z T N H B w r l g b 8 3 | : / { ) , ; = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y F N V @.>.].|.0.h.q.A.u@J.W.Z.$+,+~+:+3+d+h+n+z@A+A@v@z+u+o+h+e+|+:+/+,+.+Z.S.P.$@B@d@=@w@;@C@'@g@~@]@i@(@:@[@|@2@4@5@6@k@s@8@t@9@y@l@0@0@u@H.G.F.D.B.A.y.w.t.p.l.i.e.a.7.1.:.{./.*.+.X R L F z u p k f a 6 2 } _ ^ ~ ) > - = & % $ # @ + + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y G N W @.>.^.1.a.i.r.I.u@N.X.Z..+)+]+:+|+b+g+o+u+V+I+F+z+u+o+k+b+|+:+~+-+.+Z.W.J.$@B@d@=@w@>@e@)@h@r@i@(@:@[@1@3@j@5@k@s@8@t@9@l@0@m@u@u@H.F.E.D.C.I.z.x.v.t.p.m.i.f.b.8.4.[.(.!.;.$.` V P J D y t n i d 0 5 1 [ ( ] ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y G N W @.>.^.1.a.i.r.I.u@N.V.Z.#+*+^+}+|+8+x+o+u+z+F+J+z+u+o+l+d+|+<+!+>+++Z.U.L.%@&@o@-@;@C@'@!@{@^@(@_@[@1@3@j@6@7@8@t@y@l@0@m@u@H.G.F.E.D.B.I.A.y.w.u.r.p.m.k.g.c.0.6.|.2.{.,.=.@.Y T N H B x r m h c 9 5 1 < ( ] ! ' > - * & $ # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y G N W @.>.^.1.a.i.r.I.u@Q.T.Z.++;+~+:+|+0+m+o+E+V+U+v@z+W+o+g+8+|+[+~+*+.+D@T.P.%@n@o@w@x@,@f@h@r@i@(@<@|@2@j@6@7@8@9@y@0@m@u@H.G.F.E.D.C.I.A.z.y.w.u.r.p.n.s.h.d.j.8.4.[.(.!.>.&...X R L F A v q l g b 8 4 | : / { ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@L.S.Z.&+-+~+:+|+d+x+o+u+y+A@F+L+W+p+j+b+|+<+!+*+.+Z.W.Q.B@d@=@w@>@e@g@~@]@/@_@[@1@4@5@k@8@9@y@0@m@H.G.F.E.D.C.B.I.z.y.x.w.u.r.p.n.l.i.f.b.0.6.1.:.^.).-.$. .V P K E z u p k f a 7 3 } : / { ) , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@J.W.Z..+*+~+<+2+8+x+o+u+L+A@v@z+u+q+j+0+|+:+]+=+.+Z.V.K.B@d@p@q@>@'@g@~@^@(@:@}@2@j@6@7@8@9@l@m@u@G.F.E.D.C.B.I.A.y.x.w.v.t.q.o.m.k.h.e.j.9.5.|.2.{.,.=.#.Z U O J D y t o j e a 6 2 } _ ^ ~ ) , ; = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@O.R.Z..+,+^+:+|+d+x+p+u+y+J+v@A+u+q+l+c+|+}+~+,+.+Z.R.L.B@d@p@q@>@'@g@~@^@(@:@}@2@j@6@7@8@9@l@m@u@G.F.E.D.C.B.I.z.y.x.w.u.t.q.o.m.k.g.d.j.8.4.}.2.{.,.=.@.Z T O I C y t n i e 0 6 2 [ _ ^ ~ ) > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@Q.U.Z..+,+/+:+|+0+j+o+E+A+I+v@z+u+p+g+b+|+f+~+*+.+`.S.J.B@d@p@q@>@'@g@~@^@(@:@}@2@j@6@7@8@9@l@m@u@G.F.E.D.C.B.A.z.y.x.w.u.t.q.o.l.k.g.d.j.8.4.}._.~./.*.@.Y T N H C x s n i d 0 5 2 [ _ ^ ~ ' > - = & % $ # @ + + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@N.V.Z.++*+(+:+|+9+h+o+u+z+v@v@V+u+s+i+c+|+f+(+;+.+ +S.K.B@d@=@w@>@e@g@~@]@/@_@[@1@4@5@k@8@9@y@0@u@H.G.F.E.C.B.I.A.z.y.x.v.t.r.o.m.s.h.e.j.8.4.}._.{.,.*.@.Y T N H C x s n i d 9 5 1 [ ( ] ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@K.W.Z..+)+(+:+|+c+i+o+u+z+U+v@z+u+o+l+d+|+:+^+,+$+Z.S.Q.%@n@o@w@x@,@f@h@r@i@(@<@|@2@j@6@7@8@9@y@0@m@u@H.F.E.D.C.B.I.A.y.x.v.t.q.o.l.i.f.b.0.6.|.2.].,.=.#.Z T O I C y s n i d 0 5 1 [ ( ] ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@N.V.Z.++-+^+[+|+b+j+p+u+y+I+F+z+u+r+j+b+|+:+]+=+.+Z.V.Q.%@&@o@-@;@C@'@!@{@^@(@_@[@1@3@j@6@7@8@t@y@l@0@u@H.G.F.E.D.C.B.A.z.x.v.t.p.n.s.g.d.a.7.1.<.^.'.-.#.` U O I D y s n i d 0 5 1 [ ( ] ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@O.T.Z..+>+~+:+|+a+x+o+E+z+G+v@A+u+p+m+b+|+:+~+,+.+Z.V.M.$@B@d@=@w@>@e@)@h@r@i@(@:@[@1@3@j@6@k@s@8@t@y@l@0@m@u@H.G.F.D.C.I.A.y.v.t.p.m.k.f.b.9.4.[.(.!.;.%. .V P J D y t o j e 0 6 2 [ _ ] ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@J.X.Z.$+-+~+:+|+0+i+o+E+L+J+A@z+u+o+g+9+|+:+^+;+.+Z.T.K.b@%@n@o@-@;@C@'@g@~@r@i@(@:@[@|@2@4@5@6@k@s@8@t@9@y@l@0@m@u@G.F.D.B.A.y.w.t.p.l.h.d.a.6.|.2.{./.&...W Q K E z u o j e 0 6 2 [ _ ^ ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@N.R.+@.+,+(+:+2+9+h+o+u+V+A@v@z+u+q+l+8+|+:+/+;+$+Z.R.L.E@c@B@d@=@w@x@,@'@g@~@r@i@(@_@<@}@|@2@3@j@5@6@k@7@s@8@t@9@l@0@m@H.F.D.B.z.w.t.o.s.g.c.9.4.[.^.'.=.@.Y S M G A v p k f a 7 2 } _ ^ ~ ) > - = & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@K.V.+@.+-+~+:+|+8+g+s+E+A+v@G+L+u+n+i+9+|+<+]+=+$+`.V.O.#@b@%@&@*@p@q@x@,@f@g@h@r@^@/@(@_@<@[@|@1@2@3@4@j@5@6@7@s@8@t@y@l@m@H.E.B.A.w.t.o.k.f.j.7.|._.!.;.$.` T N H B w q l g b 7 3 } _ ^ ~ ) > - = & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@Q.V.Z..+>+~+:+1+d+m+o+u+D+U+F+L+u+n+l+b+|+Q+!+,+.+Z.R.N.@@E@$@B@n@o@p@q@x@,@'@)@h@{@]@^@/@(@_@:@<@}@|@1@2@3@4@j@5@6@k@s@t@y@0@u@F.C.A.w.r.m.i.d.9.4.<.].,.&...V P J C x r m h c 8 4 | : / { ) , ; = & % $ # @ + + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@Q.V.Z.#+*+^+}+|+d+x+o+u+V+I+U+z+u+r+k+c+1+:+^+,+.+Z.T.N.F@G@E@c@B@d@o@-@q@x@C@'@)@!@h@{@]@^@i@(@(@_@:@<@[@}@|@1@2@3@j@5@k@s@t@l@m@F.C.z.v.q.l.g.j.6.}.(.).=.@.X Q K E y s n h c 8 4 | : / { ) , ; = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@L.T.Z..+>+!+:+|+d+x+p+u+z+H+M+F+A+K+o+i+8+|+:+_+,+.+Z.V.O.K.M.J.J.P.J.P.P.L.P.K.P.O.L.N.K.L.Q.P.K.N.Q.K.P.L.Q.N.L.Q.Q.Q.O.J.Q.Q.Q.O.L.O.P.Q.P.L.L.L.3.:.~.>.$.Z T M F z u o i d 9 5 1 < / { ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@O.W. +.+;+(+:+3+d+x+o+u+z+H+M+T+v@V+u+n+g+9+3+}+^+,+#+Z.T.W.W.W.T.T.R.T.T.T.W.V.R.T.T.W.T.V.T.T.S.W.W.T.R.T.R.T.R.R.T.V.T.Y.V.R.W.T.V.R.T.T.X.W.R.Q.6.[.^.,.&. .U N H A v p j e 0 5 1 < ( ] ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@P.T.Z.$+,+~+<+1+e+i+o+u+z+H+T+S+H@v@C+u+p+k+b+|+<+!+=+@+Z.Z.Z.Z.`.+@Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.+@Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z. +Z.Z.Z.Z.Z.Z.Z.U.L.8.1._.).=.+.W P I C w q k f a 6 2 [ ( ] ! ' ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@J.R.Z..+,+^+:+|+c+h+o+u+C+I+M+S+S+M+v@L+u+r+h+b+2+t+~+;+.+.+.+++.+.+.+@+.+.+.+.+.+.+&+++.+$+&+$+.+.+.+$+#+$+$+++.+.+$+.+&+.+#+#+&+.+.+.+.+&+.+Z.T.O.a.4.:.~.;.#.Y Q K D x r l g a 7 2 [ _ ] ! ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@N.T.Z..+*+!+:+|+0+i+o+u+L+H+M+S+Y+S+N+A@V+u+o+g+8+|+:+]+*+-+'+-+-+>+;+,+-+,+*+;+,+,+*+=+;+'+)+>+*+,+=+=+)+>+*+)+'+*+;+,+;+,+=+'+=+>+>+,+)+'+.+Z.T.O.b.6.[.].>.$.Z S L E y s m g b 7 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@J.R.Z.$+)+]+:+|+d+h+o+u+L+F+M+I@J@K@S+M+F+z+u+q+i+a+|+}+{+~+]+!+~+^+~+^+(+~+{+^+~+^+!+{+]+^+~+~+(+~+]+{+]+/+~+]+/+!+^+~+~+!+(+_+~+_+(+/+{+;+.+Z.R.N.d.8.|.^.,.&.` T M F y t n h c 8 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@K.W.+@.+=+^+:+|+d+h+o+u+B+A@M+S+L@M@J@S+T+v@z+u+o+j+9+|+:+:+<+:+:+:+:+:+:+:+:+:+}+:+:+:+}+f+<+:+:+:+:+:+:+:+:+<+:+:+[+:+t+:+:+:+:+<+:+:+^+,+.+Z.R.O.f.0.1._.).*...U N G z u n i c 8 4 } : ^ ~ ' > - * & % # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@M.T.Z.++'+~+:+|+d+k+n+u+L+A@ @S+N@O@P@Q@S+M+H+A+u+s+j+b+3+|+|+5+2+|+|+5+3+3+2+|+|+|+2+|+|+1+6+4+6+3+1+|+|+|+1+3+|+|+1+2+|+|+|+1+2+|+|+<+^+;+.+ +T.K.g.a.4.2.).=...V O G A u o i d 9 4 | : ^ ~ ) > - * & % # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@K.T.Z.@+;+~+:+1+0+k+o+u+D+I+ @S+L@R@S@T@J@S+T+U+A+z@p+m+d+e+e+b+c+d+8+9+0+e+a+9+b+b+d+d+d+e+9+d+b+a+9+d+d+e+b+9+b+9+9+8+a+8+e+9+b+8+|+P+/+*+.+Z.X.Q.h.j.4.:.!.=.+.V O H A u o i d 9 4 | : ^ ~ ) > - * & % # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@K.R. +.+'+]+:+|+b+x+o+u+z+H+M+S+J@U@V@W@T@N@S+M+F+B+u+q+h+j+j+m+h+g+k+x+g+h+h+m+g+g+k+l+x+i+i+l+h+g+x+h+j+h+j+k+k+m+x+g+m+h+g+m+x+9+2+:+!+'+.+Z.T.M.h.j.5.:.~.-.+.W O H A v o i d 9 4 | : / ~ ) > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@L.W.Z.%+;+^+[+|+b+h+p+u+D+A@M+S+L@X@Y@Z@Y@O@J@S+M+J+A+u+o+o+p+o+o+o+o+n+o+o+o+o+o+o+o+n+o+o+o+o+o+o+o+p+o+o+n+o+n+o+o+o+o+o+o+o+x+b+|+:+/+-+.+Z.V.J.h.j.5.:.!.-.+.W O H A v o i d 9 4 | : / ~ ) > - * & % # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@O.W.Z.#+,+{+[+|+d+h+q+u+A+I+M+S+J@P@`@S@M@J@S+ @U+z+u+o+i+k+j+j+j+j+m+j+j+k+j+i+m+l+g+i+g+h+h+g+h+h+x+g+x+m+i+i+l+m+h+j+k+l+x+x+l+c+|+:+~+-+.+Z.U.M.h.j.4.:.!.=.+.V O H A u o i d 9 4 | : ^ ~ ) > - * & % # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@N.T.+@.+;+!+:+|+9+m+o+u+z+F+ #S+J@T@.#O@J@S+M+H+V+u+p+g+b+8+9+b+0+9+8+e+d+c+b+c+d+b+d+b+8+b+b+b+b+9+b+b+b+b+c+b+b+8+c+b+b+d+b+9+b+9+|+<+(+-+.+Z.R.Q.g.a.4.2.).=...V O G A u o i d 8 4 | : ^ ~ ) > - * & % # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@M.W.Z..+-+{+:+|+9+h+p+u+z+F+M+S+J@T@+#J@`+@#U+z+u+o+k+b+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+1+1+2+|+|+|+|+|+|+|+3+|+|+|+|+|+|+:+~+*+++Z.R.L.e.9.1._.'.*. .U N G z t n h c 8 3 } : ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@Q.U.Z.$+-+~+:+3+b+i+o+u+B+J+M+S+##M@J@Z+ @I+B+u+n+k+b+|+<+}+}+}+:+:+<+:+:+t+:+:+:+:+:+:+:+:+[+}+<+<+:+:+P+:+<+[+<+[+:+<+:+[+:+:+:+:+:+:+{+-+#+D@T.Q.d.8.|.^.,.&.` T M F y t n h c 8 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@N.U.Z..+;+~+:+3+d+l+o+u+L+A@T+I@J@J@S+ @v@L+u+n+h+9+|+[+~+]+/+^+/+~+^+!+]+!+^+~+~+{+~+^+!+(+]+!+!+]+^+]+/+{+~+(+{+~+^+]+(+{+^+{+^+(+~+(+_+,+#+`.V.N.j.5.<.{.>.$.Y R K D y s m g b 7 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@L.U.+@.+'+{+:+|+0+h+o+u+B+F+M+I@Y+S+H@G+z+u+q+j+8+|+<+]+,+=+-+-+*+)+-+-+*+'+*+;+,+*+,+)+-+-+,+,+*+,+'+,+>+>+*+;+,+;+=+*+'+,+*+-+-+,+;+,+=+-+.+Z.T.K.0.3.2.!.-.@.X Q J C x r l f a 6 2 [ ( ] ! ' > - * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@L.W.Z.&+*+!+}+|+b+i+o+u+z+J+M+I@S+N+A@z+u+$#j+b+|+:+{+>+#+@+%+.+$+%+$+&+.+.+.+.+$+.+#+.+.+.+++++.+.+.+$+++.+.+.+.+.+.+.+.+.+.+.+.+.+#+++.+.+.+Z.R.Q.7.|.(.'.*...V O H B w q k e 0 6 1 [ ( ] ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@N.X.`.#+=+]+}+|+8+k+o+u+A+G+@#S+N+A@V+u+o+k+8+|+:+]+=+#+ +Z. +Z.Z.Z.Z.Z.Z.Z.Z.%#Z.Z.Z.`.+@Z.`.Z.Z.Z. +Z.&#+@+@`.Z.`.+@ +`.Z.Z.Z.Z.Z.Z. +Z.Z.Z.Z.W.P.4.<.{.>.$.` T M G z u o j d 9 5 1 < ( { ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@P.T.Z.#+=+^+:+1+b+l+o+u+D+A@ @N+U+z+u+q+j+b+|+:+]+>+%+Z.T.S.S.R.R.S.U.T.W.V.R.V.R.V.V.R.T.T.T.W.Y.V.S.R.S.X.T.V.W.T.T.R.U.V.T.R.R.R.T.W.T.R.W.T.Y.Q.|.(.).=.@.X R K E y t n h c 9 4 | : / { ) , ; = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@Q.V.Z..+,+/+<+1+a+g+n+u+z+I+M+v@B+u+p+g+8+|+[+^+*+.+Z.V.L.K.P.J.Q.L.P.M.K.Q.Q.N.O.M.L.Q.O.K.P.O.Q.P.N.P.Q.L.N.M.P.Q.O.N.M.Q.K.Q.K.M.L.O.J.J.M.J.O.M.:.{./.%. .V O I C x r l g b 8 3 } : ^ ~ ) , ; = & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@M.T.Z..+'+^+:+|+9+m+p+u+B+J+G+L+*#o+i+9+|+t+~+*+&++@T.Q.E@$@B@d@=@-@;@C@'@)@h@r@^@/@(@:@[@|@1@3@4@j@5@6@k@7@s@8@9@y@l@m@u@G.E.B.A.x.t.p.l.h.c.9.4.[.^.'.=.@.Y S M G A v p k f a 6 2 } _ ^ ~ ' > - = & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@L.V.Z.$+-+^+:+|+b+m+n+u+z+A@G+z+u+O+g+9+|+:+/+=+.+Z.V.K.b@%@n@o@-@;@C@'@g@~@r@i@(@:@[@|@2@4@5@6@k@s@8@t@9@y@l@0@m@H.G.F.D.B.A.y.v.r.o.l.h.d.0.6.|.2.~.>.&...W Q K E y t o j e 0 6 2 [ ( ] ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@P.W.Z.++,+~+}+1+9+h+O+u+L+J+v@z+u+s+k+b+|+}+~+-+.+`.T.Q.%@&@o@-@;@C@'@!@{@^@(@_@[@1@3@j@6@7@8@t@y@l@0@u@H.G.F.E.D.C.I.A.y.x.v.r.p.m.k.g.c.0.6.|.:.].,.=.@.Z T N H C x s m h c 9 5 1 < ( ] ! ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@K.R.Z.$+,+/+}+|+e+h+p+u+C+J+U+L+u+o+j+8+|+:+!+=+.+Z.X.J.&@*@p@q@C@'@!@{@^@(@<@|@3@j@k@s@t@y@0@u@H.F.E.D.C.I.A.z.y.x.w.u.t.q.o.m.s.h.e.b.9.6.1.:.^.).;.%. .W Q L F A v q l g b 8 4 | < / { ! , ; - * & $ # # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@P.R.Z..+-+]+<+|+9+i+o+E+B+A@A@A+u+n+x+0+|+<+]+,+.+Z.V.L.d@=@w@>@'@g@{@i@(@[@1@4@6@s@9@l@m@G.F.D.B.I.z.y.x.w.v.u.r.q.p.o.m.l.k.h.e.c.a.8.5.|.:.^.!.>.&.+.Y T N I D y t o j f a 7 3 } : / { ) , ; = * & $ # # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@P.T.Z..+-+^+:+1+9+i+n+u+L+J+A@z+u+O+x+b+|+:+_+>+.+Z.T.P.*@-@x@,@)@~@^@(@<@1@4@k@8@y@m@H.E.C.I.z.y.w.v.t.r.q.p.o.n.m.s.k.i.g.e.c.j.0.7.4.|.:.(.~./.=.#. .W R L G B x s n i e 0 6 2 } : ^ { ) , ; = * % $ # # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@N.T.Z..+'+~+:+|+8+k+o+u+L+A@F+z+u+O+x+8+|+}+/+-+$+D@R.O.=@w@>@'@!@r@/@:@|@3@6@8@y@m@G.D.B.A.y.w.u.r.q.p.n.m.l.s.k.i.h.f.e.c.b.a.9.6.4.|.<._.{.'.;.&.+.Z U P K F A w r m h d 0 6 2 } _ ^ { ) , ; = * % $ # # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@L.T.Z..+,+~+:+|+b+l+o+=#D+J+F+z+u+O+h+e+|+t+~+-+.+Z.W.L.p@;@,@)@~@i@_@}@3@6@8@y@u@F.C.A.y.v.t.q.o.n.l.s.k.h.g.f.e.d.c.b.a.0.8.6.4.1.}.:.(.{.).>.*.#. .W R N I D y u q l h c 9 5 2 [ _ ^ ~ ) , ; = * % $ # # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@O.T.Z..+)+!+:+|+b+g+o+v+D+I+I+z+u+$#j+8+|+[+(+,+.+Z.R.N.-@x@e@!@r@/@:@1@j@7@9@0@G.D.I.y.v.t.p.n.m.s.i.h.g.f.d.c.b.j.a.0.9.7.6.4.1.}.:._.].!.,.-.%.+.Z V Q M H C y u p l g c 9 5 1 [ _ ^ ~ ) , ; = * & $ # # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@O.R.Z..+)+]+<+|+e+k+o+u+A+H+v@z+u+s+x+8+|+P+/+,+.+Z.V.K.q@C@f@h@]@(@[@2@6@8@l@u@E.B.y.v.t.p.n.l.k.h.g.e.d.c.b.j.a.9.8.7.6.5.3.|.}.:._.^.~.'.>.*.$...Y U P L G C y t p k g c 9 5 1 [ _ ^ { ) , ; = * & $ $ # @ + + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@N.T.Z.++>+~+:+2+e+m+r+u+L+J+v@L+u+p+l+9+|+:+!+)+++Z.U.N.q@C@)@~@^@_@}@4@k@t@0@G.C.A.x.u.q.n.l.k.h.f.e.c.b.j.a.0.9.8.7.5.4.3.|.}.<.2.(.{.!.,.;.&.#. .X T P K G B y t p k g c 9 5 2 [ _ ^ { ) , ; - * & % $ # @ + + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@P.T.Z.#+-+]+:+1+b+x+o+E+C+U+U+z+*#r+j+8+|+:+/+-+.+Z.U.L.;@,@)@~@i@_@|@4@k@9@m@F.C.z.w.t.p.n.s.i.g.e.d.b.j.a.0.9.8.7.6.5.3.1.|.[.:.2.^.{.).,.;.&.#. .X T P L G C y u p l h d 0 6 2 } : / { ! ' > - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@J.T.Z..+'+(+<+|+b+k+p+u+C+J+I+z+u+r+m+b+|+}+^+-+.+Z.T.Q.;@,@)@{@i@:@|@j@7@9@m@F.B.y.v.r.o.m.k.h.f.e.c.b.a.0.9.8.7.6.5.4.3.|.}.[.:._.^.{.)./.;.&.#. .Y U P L H C y u q m h d 0 6 3 } : / ] ! ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@M.T.Z.$+-+]+:+|+9+m+o+u+z+F+G+z+u+p+i+b+|+:+/+=+.+Z.T.K.;@,@)@~@i@_@|@4@k@9@m@F.C.z.w.t.p.n.s.i.g.e.d.c.j.a.0.9.8.7.6.5.4.3.|.}.<.2.(.].~.'.>.=.$.+.Z V R N I E z w r n j e a 8 4 | < ( ] ~ ) > ; = * % $ # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@L.W. +.+'+!+:+|+8+j+n+u+V+I+A@z+u+p+h+8+2+:+!+'+$+Z.T.K.q@C@)@~@^@_@}@4@k@t@0@G.C.A.x.u.q.n.l.k.h.f.e.d.b.j.a.0.9.8.7.6.5.4.3.|.}.<.2.(.{.).,.-.&.#. .X T O K G B x t o k g c 9 5 1 [ _ ^ { ) , ; = * & % $ # @ + + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@P.T.Z..+,+!+:+|+c+h+$#u+z+I+G+L+u+o+m+b+|+:+{+,+$+`.T.M.q@C@f@h@]@(@[@2@6@8@l@u@E.B.y.v.t.p.n.l.k.h.g.e.d.c.b.j.a.0.9.8.7.6.5.3.1.}.<.2.^.{.)./.=.%.+.Z V R M I D y v q m h d 0 6 3 } : / { ! ' > - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y G O W @.>.^.1.a.i.r.I.u@N.U.Z.#+-+^+}+3+b+g+o+u+L+A@F+A+u+o+h+b+|+[+~+-+$+Z.T.L.-@x@e@!@r@/@:@1@j@7@9@0@G.D.I.y.v.t.q.o.m.s.k.h.g.f.e.d.c.b.j.a.0.9.8.6.5.3.|.[.:.(.{.)./.=.$...Y T P K G B x t o j f b 8 4 1 < ( ] ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y G N W @.>.^.1.a.i.r.I.u@P.T.Z..+,+{+<+|+8+j+r+u+C+U+G+z+u+n+m+8+|+<+(+,+.++@R.J.p@;@,@)@~@i@_@}@3@6@8@y@u@F.C.A.y.v.t.q.o.n.l.s.k.i.h.g.f.e.d.c.b.j.a.0.8.6.4.1.}.:.(.{.).>.*.#. .W S N I D z v q l h d 0 6 2 [ _ ^ { ) , ; = * & $ # # @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y G N W @.>.^.1.a.i.r.I.u@P.W.Z..+)+~+:+|+e+i+O+u+z+F+G+z+u+o+k+8+|+}+(+>+.+Z.T.N.=@w@>@'@!@r@/@:@|@3@6@8@y@m@G.D.B.A.y.w.u.t.q.p.o.n.m.l.s.k.i.h.g.f.e.d.b.a.9.7.5.1.[.2.].).>.*.#.` V R M H C y t o j f a 7 3 | < / ] ! ' > - * & % $ # @ + + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y G N W @.>.^.1.a.i.r.I.u@P.T.Z.$+*+~+:+2+e+k+o+E+L+v@A@z+u+q+h+8+|+<+~+*+.+Z.T.Q.*@-@x@,@)@~@^@(@<@1@4@k@8@y@m@H.E.C.I.z.y.w.v.u.t.r.q.p.o.n.m.l.s.k.i.h.f.d.b.a.9.6.3.}.2.].).>.&.@.Z U P K E z v q l h c 9 5 1 [ _ ^ ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y F N V @.>.].|.0.h.q.A.H.P.V.Z..+=+~+:+|+b+h+o+u+z+I+v@z+u+p+h+8+|+:+{+)+.+Z.T.N.d@p@q@C@'@!@{@i@_@[@1@4@6@s@9@l@u@G.F.D.B.I.A.z.x.x.w.v.u.t.r.q.p.o.n.m.s.i.g.e.b.a.8.4.|.:.^.).>.&.+.Y S N I C y t o j e a 7 3 } : / { ) , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y F N V @.>.].|.0.h.q.A.H.P.S.Z..+'+~+:+|+0+h+o+z@z+v@v@L+u+o+h+b+|+:+]+=+.+Z.T.Q.&@*@-@;@C@f@!@{@i@(@<@|@3@5@k@s@t@y@0@u@H.F.E.D.C.B.B.I.A.z.y.x.w.v.u.r.q.o.m.s.h.e.b.0.6.1.<.^.).;.%...W R L G A w q l h c 8 4 1 < ( ] ! ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 a f l s y F N V @.;.].|.0.h.q.A.H.J.W.Z.&+*+/+[+|+e+x+o+u+V+U+F+L+u+s+i+b+|+}+^+>+#+Z.S.O.%@n@o@-@;@,@f@!@{@^@(@:@[@1@3@j@6@7@8@t@y@l@0@m@u@H.G.G.F.E.D.C.B.I.A.y.x.v.t.p.n.s.h.d.a.7.3.<.^.).-.$.` U P J D y t o j e 0 6 2 [ _ ^ ~ ' > - = & % $ # @ + + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s y F N V +.;.].|.0.h.q.z.H.P.T.Z.$+-+^+<+|+d+x+n+u+z+v@v@A+K+q+l+b+|+:+~+,+#+Z.T.P.c@B@d@=@w@x@,@f@!@~@]@/@(@:@}@1@2@4@5@6@k@7@s@8@t@9@y@l@l@0@m@u@H.G.F.D.C.I.y.w.t.p.m.i.e.j.8.3.<.].'.=.@.Y S M G A w q l g b 8 3 } : / { ) , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s y F N V +.;.].|.0.h.q.z.H.K.T.Z..+*+/+:+|+b+m+o+z@V+A@G+z+u+q+l+9+|+}+!+*+.+Z.U.J.b@%@&@*@p@w@x@,@f@g@~@r@^@(@_@:@[@|@1@2@4@j@5@6@6@k@7@s@s@8@t@9@y@l@0@u@H.F.C.I.y.v.r.n.k.f.j.7.1.2.{./.&...V P J D y s n i d 9 5 1 < ( ] ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l r y F N V +.;.].}.9.g.p.z.G.M.R.Z.$+>+]+:+|+8+h+o+v+L+G+ @I+L+u+o+k+9+|+}+{+>+.++@R.Q.N.N.Q.P.O.M.L.P.M.K.Q.M.O.P.N.K.J.N.L.M.O.P.Q.M.K.P.Q.Q.Q.O.L.K.N.P.N.K.O.J.K.J.O.L.O.L.J.J.K.P.J._.!.;.#.Z S M G A v p k e a 6 2 [ _ ] ~ ' > - * & % # # @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / : 1 5 0 f l r y F M V +.;.{.}.9.g.p.z.G.N.T.+@++)+]+:+1+0+x+p+u+B+I+M+M+U+A+u+r+j+c+|+:+_+,+++Z.Y.T.T.Y.S.T.W.T.T.S.S.W.W.T.T.T.W.R.W.R.V.T.T.S.W.U.R.T.V.R.U.R.S.W.S.T.T.T.T.R.T.W.U.T.W.R.T.T.T.N.[.^.,.*...V P I C x r l g b 7 3 } _ ^ ~ ) > - = & % $ # @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 f l r y E M U +.-.{.}.9.g.o.y.F.J.X.Z.++,+~+:+|+8+k+p+E+z+v@M+I@M+v@z+u+p+g+b+|+:+(+*+.+Z.Z.`.Z.Z.Z.Z.Z.Z. +Z.Z.Z.Z.Z.Z.+@Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z.Z. +Z. ++@Z.Z.Z.Z.Z.Z.Z.Z.Z.U.P.1.2.!.;.#.Y R L E y t n h c 8 4 | : / { ) , ; = & % $ # @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 e k r y E M U ..-.~.[.8.f.o.x.F.L.X.Z..+-+{+:+|+b+i+o+u+L+G+M+I@S+ @F+V+u+o+l+8+|+:+/+*+.+@+#+.+#+.+#+.+.+.+.+.+.+++.+.+.+$+@+.+.+&+.+.+.+.+.+.+++&+.+.+#+#+#+$+.+.+$+++.+.+.+.+.+.+.++@W.P.6.[.^.,.&. .U N G A u p j e 0 5 1 < / { ! , ; = & % $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 5 0 e k q x D L T .=.~.<.7.e.n.w.D.K.U. +#+,+/+:+2+a+m+o+u+z+v@ @S+N@S+M+G+z+u+n+x+8+|+:+!+;+=+-+;+,+,+;+-+*+,+'+>+*+,+=+>+)+,+-+;+=+*+)+)+,+;+=+,+)+;+,+=+)+>+)+;+-+>+;+,+-+;+=+)+;+;+#+Z.V.P.9.1._.).=.+.W P I B w q k f a 6 1 [ ( ] ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 4 9 e k q x D L T .*.!.<.7.d.m.v.D.J.S.Z..+'+~+:+2+9+h+O+u+L+v@ @I@S+S+S+T+v@L+u+n+j+b+|+:+~+{+^+]+!+(+^+!+~+(+{+^+^+!+^+{+]+/+!+~+!+!+]+^+(+~+/+!+~+^+~+!+]+^+^+!+^+~+~+~+!+^+~+]+~+=+.+Z.W.P.a.5.<.~.;.#.Y Q K D x r l g a 7 2 [ ( ] ! ' > - * % $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ : | 4 9 d j q w C K S ` &.).:.5.c.l.u.B.M.T.Z..+,+_+:+|+8+m+o+z@z+I+M+@#.@@#H@T+T+v@z+u+p+i+b+5+:+:+:+:+[+:+<+:+:+:+:+:+:+:+:+:+:+:+:+[+:+:+:+:+[+:+[+:+:+:+:+:+:+:+:+:+:+<+}+:+:+:+:+:+{+=+.+ +T.N.c.7.}.]./.%.Z S L E y s m g b 7 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ _ } 4 9 d j p w C J R Z &.'.2.4.b.k.t.I.L.T.+@.+*+~+:+2+d+h+q+u+D+H+v@v@A@H+H+H+I+v@H+z+u+q+g+c+|+2+1+1+2+|+|+|+|+|+|+|+|+|+|+|+|+|+4+|+|+3+|+|+3+2+|+|+|+|+|+1+|+3+1+|+|+|+1+6+2+|+|+[+{+,+.+Z.R.K.e.9.|.(.,.&.` T M F y t n h c 8 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + @ @ # $ % * - > ' ~ ^ _ } 3 8 c i o v B I Q Y $.,.(.3.a.i.q.z.M.V.+@%+,+^+<+|+a+j+n+u+V+z+z+z+z+A+z+z+z+L+z+z+z+E+o+x+b+d+9+8+b+a+8+a+8+b+9+8+9+9+0+9+b+c+9+d+8+9+e+e+c+a+9+8+b+0+c+0+0+b+9+0+9+8+d+9+0+d+|+[+_+=+#++@T.N.f.9.1._.'.*. .U N G z t n h c 8 3 } _ ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] _ } 3 8 c i o u A H P X #.>.^.|.9.g.o.x.J.S.Z..+)+!+:+|+b+h+o+u+u+u+W+u+u+u+u+K+u+u+u+u+u+*#u+p+h+j+x+i+h+x+g+g+h+h+k+g+h+g+j+x+g+h+l+k+g+x+h+j+i+m+m+x+m+h+g+i+k+k+k+h+x+m+m+x+h+e+|+:+/+=+$+Z.T.P.f.0.3._.).*...U N G z u n i c 8 4 } : ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] ( [ 3 7 b h n t z G O W @.;.{.[.8.e.m.v.P.W.Z..+'+_+}+1+a+j+p+n+o+s+q+r+o+o+q+q+q+o+q+o+o+q+p+p+p+p+o+o+o+o+n+s+o+o+o+o+o+o+o+o+o+o+p+n+n+q+o+o+q+o+q+o+n+o+n+q+q+o+q+o+n+o+o+o+m+b+|+}+{+'+.++@T.J.f.0.3._.).*...U N G z u n i c 8 4 } : ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! ] ( [ 2 7 b g m s y F M U ..=.!.:.5.c.k.r.L.X.Z..+'+{+:+|+d+h+l+j+h+j+g+i+l+m+i+j+i+i+h+h+g+h+k+k+x+x+m+l+i+j+x+i+x+k+k+h+h+j+k+x+g+g+m+g+m+j+m+x+g+m+j+i+l+j+i+x+g+k+x+i+m+h+m+i+i+c+|+:+{+=+-#Z.T.Q.f.0.3._.).*...U N G z u n i c 8 4 } : ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! { ( < 1 6 a f l r y E L S ` &.'._.3.a.h.o.O.W.Z.#+)+]+:+|+0+b+c+d+b+8+c+8+b+8+b+d+9+9+b+9+0+b+e+b+b+8+b+b+b+b+b+8+b+c+9+b+b+d+b+8+b+b+a+9+b+b+8+b+e+9+e+9+b+b+8+9+8+b+b+b+b+b+b+b+9+b+|+:+]+;+#+ +U.L.e.9.1.(.'.&. .U M F z t n h c 8 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ) { / < 1 5 0 e k q w C J R Y $./.].}.8.e.l.J.S.Z.-#-+(+:+2+|+|+|+|+|+|+|+2+|+|+1+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+3+2+|+|+|+|+|+3+3+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+|+3+|+|+|+|+|+|+|+[+]+=+.+Z.T.Q.d.8.}.^.,.%.` T M F y t m h b 8 3 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ) { / : | 4 9 d j p v B H P W @.-.~.:.5.j.i.N.W.Z.#+-+_+:+:+:+[+}+:+}+}+P+:+}+:+<+:+}+:+[+[+<+P+[+:+:+:+:+P+:+:+:+}+:+:+}+t+f+:+:+}+}+[+:+:+:+[+<+:+:+:+:+:+:+:+:+:+:+<+:+P+:+:+:+[+}+P+}+:+_+,++++@T.O.b.6.[.{.>.$.Z R K E y s m g b 7 3 [ _ ] ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # # $ & * - > ' ~ ^ _ } 3 8 c h n t z G N U .*.'._.1.9.e.N.W.Z.#+-+(+(+!+_+!+(+]+]+]+~+~+!+/+(+{+(+/+{+^+{+]+]+!+]+^+!+{+!+^+~+~+^+]+]+{+{+!+]+]+{+^+~+_+_+~+{+^+]+]+]+~+/+(+{+^+~+/+!+!+~+^+~+/+/+]+^+!+{+,+.+Z.U.M.0.3.2.!.-.@.X Q J C x r l f a 6 2 [ ( ] ! ' ; = * % $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ! ] _ [ 2 7 b g l r y D K R Y #.;.{.<.5.j.P.V.Z..+>+=+>+=+>+;+=+,+,+,+=+=+;+,+*+,+=+=+'+,+*+=+>+,+;+>+,+'+;+=+;+'+,+;+)+=+=+'+,+'+,+,+;+,+*+-+*+;+'+,+,+=+'+'+'+*+;+)+;+,+;+,+>+-+'+=+,+,+>+=+#+Z.W.M.7.|.(.'.*...V O H B v p k e 0 6 1 < ( ] ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! ] ( < 1 6 0 e k q w B I O V ..*.'.(.|.8.Q.S.Z..+.+#+#+@+++.+++&+.+$+&+&+.+&+#+#+.+$+.+.+.+$+$+$+.+.+$+.+.+++#+++.+.+.+.+.+.+&+.+.+.+++.+.+#+.+.+.+$+.+.+.+.+.+$+.+%+++.+$+++.+.+.+.+.+.+++.+.+Z.T.N.3.:.~.>.$.Z S M F z u o i d 9 5 | < / { ) , ; = & % $ # @ + + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + + @ # $ % & = ; , ) { / < | 4 9 d i o t y F L S Z #.;.~.:.3.J.T.Z. +Z.Z.Z.Z.Z. +Z.Z.D@`.Z.Z.Z.Z.Z.Z.Z.Z.Z.`.+@Z.Z.Z. +Z.Z.Z.Z.Z. + +Z.Z.Z.Z.`.+@+@Z.Z.+@Z. ++@`.Z.Z.&#Z.Z.Z.Z.Z.Z.Z.Z.Z.+@Z.Z.Z.Z.Z.+@`.Z.Z.Z. +Z.Z.W.J.}.^.'.*.+.W Q J D y s m h c 8 3 } : ^ { ) , - = & % $ # @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # $ % & = - > ) ~ ^ _ } 3 7 b g l r x C I O V .&./.].<.O.T.V.T.R.R.W.T.T.U.W.T.T.T.V.W.T.X.R.V.V.S.V.U.S.T.V.T.T.T.V.R.V.W.R.W.V.T.S.S.U.U.T.T.U.V.T.V.W.U.W.V.W.T.X.V.V.V.W.R.W.R.V.V.R.T.T.R.T.X.R.T.T.X.V.V.W.O.2.!.;.$.` T N H A v q k f a 7 2 } _ ^ ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # # % & * - > ' ! ] ( [ 2 6 0 e j o u z F L R X +.*.'.].Q.M.M.J.P.O.L.N.Q.K.Q.M.O.Q.L.K.K.K.K.L.P.Q.O.J.J.Q.P.O.M.Q.L.P.P.N.P.L.Q.K.K.N.P.N.K.J.L.M.Q.J.N.O.P.P.J.O.M.L.Q.L.J.N.M.O.J.K.Q.K.O.Q.J.K.M.N.M.K.N.J.N.Q.{./.&...W Q K E y t o i d 0 5 1 < ( ] ! ' > - * & $ # # @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! { / < | 4 8 c h m r x B H N T Z #.-.'.^.<.3.7.j.e.i.l.o.r.u.x.z.A.B.C.D.E.F.F.G.G.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.G.G.G.G.G.G.G.G.G.G.G.G.F.F.F.F.E.E.D.C.B.I.A.y.x.v.t.p.m.k.g.c.0.6.|.2.{.,.*.+.Y S M G A w q l g b 8 4 | : / { ) , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = ; , ) ~ ^ _ } 2 6 a e j o u y D J P U ` #.-.'.].:.|.5.9.b.e.h.s.m.o.q.t.u.v.w.x.y.y.z.z.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.z.z.z.z.z.z.z.z.z.z.z.z.y.y.y.y.x.x.w.v.v.t.r.q.o.m.s.i.f.c.a.8.4.}._.~.,.*.@.Z T O I D y t o j e 0 6 2 [ _ ^ ~ ) > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ' ! ] ( < 1 4 9 c g l q v z F K P V ` #.=./.~.(.<.1.5.8.a.c.e.g.i.k.l.m.n.n.o.p.p.p.q.q.q.q.q.q.r.r.r.r.r.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.p.p.p.p.o.o.n.n.m.l.s.i.h.f.d.b.0.7.4.|.:.^.!./.*.@.Z U P J E z v q l g b 8 4 | < ( ] ! ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # # $ & * = ; , ) { / : } 2 6 0 e i n s w A F K P U Z @.&.;.'.{.(.:.}.3.5.8.9.a.b.c.d.e.f.f.g.g.h.h.h.h.h.h.h.i.i.i.i.i.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.g.g.g.g.f.f.e.e.d.c.b.j.0.9.7.5.1.}.:.^.~.,.-.%.+.Y U P K F A w r m i d 0 6 2 } _ ^ { ) , ; = * % $ # # @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = - > ' ~ ] ( < | 4 8 b f j o s x B F K P T X .#.*.>.'.~.^._.:.[.|.3.4.5.6.7.8.8.9.9.0.0.0.0.0.0.0.a.a.a.a.a.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.9.9.9.8.8.8.7.6.5.4.3.1.}.<.2.(.].!.,.;.&.#. .X S O J F A x s n j f a 7 4 | < ( ] ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + + @ # $ % & * - ; , ) { ^ _ [ 2 5 9 c g k o t x A F J N R V Z ..#.&.-./.'.!.{.^.(._.:.<.<.[.}.}.}.|.|.|.|.|.|.1.1.1.1.1.1.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.}.}.}.}.[.[.<.:.:.2._.^.].~.).,.>.=.&.#. .Y U Q N I E A x s o k g c 9 5 1 [ _ ^ { ) , ; - * & % $ # @ + + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; > ' ~ ] ( : | 3 6 0 d g k o s x A D H L P S V Y .@.$.&.=.;.>.,.'.).!.~.~.{.{.].].].].^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.].].].].{.{.~.~.!.).'.,.>.;.=.&.$.@. .Y V S P L H D z w s o k g d 0 6 3 } : ( ] ! ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * - ; , ) ~ ^ ( < | 3 7 0 d g k o s v y B F I L O R U W Y ` ..@.#.$.%.&.*.=.=.-.-.;.;.;.;.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.;.;.;.;.-.-.=.=.*.&.%.$.#.@...` Y W U R O L I F B y v s o k g d 0 7 3 | < ( ^ ~ ) , ; - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - > ' ! { / _ [ 1 4 7 0 d g j n q t x z C F H K M O Q S U V X Y Z ` . .....+.+.+.+.+.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.+.+.+.+.+..... . .` Z Y X V U S Q O M K H F C z x t q n j g c 0 7 4 1 [ _ ^ { ! ' > - = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = ; , ' ~ ] / : [ 1 4 7 0 c f i l o r u x z B D G I K L N O P Q R S T T U U V V V V W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W V V V V U U T T S R Q P O N L J I G D B z x u r o l i f c 0 7 4 1 [ : / ] ! ' , ; = * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - ; , ) ~ ] / : [ 1 4 6 9 b e h j m p r u w y z B D E G H I J K K L M M M N N N N N N O O O O O O O O N N N N N N N N N N N N N N N N N N N N N N M M M M L L L K J J I H G F D C A y x v t r o m j g d b 9 6 3 1 [ : / ] ~ ) , ; - * & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = - > , ) ~ ] / : [ | 3 5 8 a c f h j m o q s u v x y y z A B C D D E E F F F F F G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G F F F F F E E D D C B A z y y x v u s q o m j h f c 0 8 5 3 | [ : / ] ~ ) , > - = * % % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ % & * = - > , ) ~ ] / _ < } 2 4 6 8 a c e g i k l n o q r s t u v w w x x x y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y x x x w w v u t s r q o n l k i g e c a 8 6 4 2 } < _ / ] ~ ) , > - = * & % $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ % & * = ; > ' ) ~ ] / ( : [ | 2 4 6 8 0 b d e g h j k l m n o o p p q q r r r r r s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s r r r r r q q p p o o n m l k j h g e d b 0 8 6 4 2 | [ : ( / ] ~ ) ' > ; = * & % $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = ; > , ) ~ { ^ ( : < } 1 3 4 6 8 9 a b c e f g g h i j j k k k l l l l l m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m l l l l l k k k j j i h g g f e c b a 9 8 6 4 3 1 } < : ( ^ { ~ ) , > ; = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - > , ' ! ~ ] ^ ( _ < } | 1 3 4 5 7 8 9 0 a a b c c d d d e e e e e f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f e e e e e d d d c c b a a 0 9 8 7 5 4 3 1 | } < _ ( ^ ] ~ ! ' , > - = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - ; , ' ) ~ { ] / ( _ < [ } | 2 3 4 5 5 6 7 7 8 8 9 9 0 0 0 0 0 a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 0 0 0 0 0 9 9 8 8 7 7 6 5 5 4 3 2 | } [ < _ ( / ] { ~ ) ' , ; - = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ $ % & * = - ; > , ' ! ~ { ] ^ ( _ : < [ } } | 1 2 2 3 3 4 4 4 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 5 5 5 5 5 4 4 4 3 3 2 2 1 | } } [ < : _ ( ^ ] { ~ ! ' , > ; - = * & % $ $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # # $ $ % & * * = - ; > , ' ) ! ~ { ] ^ / ( _ _ : < < [ [ } } } | | | | | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | | | | | } } } [ [ < < : _ _ ( / ^ ] { ~ ! ) ' , > ; - = * * & % $ $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # $ $ % & & * = - ; ; > , ' ) ! ~ ~ { ] ^ ^ / / ( ( _ _ _ : : : : : : < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < : : : : : : _ _ _ ( ( / / ^ ^ ] { ~ ~ ! ) ' , > ; ; - = * & & % $ $ # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # # $ $ % & & * = - - ; > , , ' ) ) ! ! ~ ~ { { ] ] ] ^ ^ ^ ^ ^ ^ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / ^ ^ ^ ^ ^ ^ ] ] ] { { ~ ~ ! ! ) ) ' , , > ; - - = * & & % $ $ # # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ # # $ $ % % & * * = = - ; ; > > , ' ' ) ) ) ! ! ! ~ ~ ~ ~ ~ ~ { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { ~ ~ ~ ~ ~ ~ ! ! ! ) ) ) ' ' , > > ; ; - = = * * & % % $ $ # # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ % % & & * * = = - - ; ; > > > , , , ' ' ' ' ' ' ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' ' ' ' ' ' , , , > > > ; ; - - = = * * & & % % $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ $ % % & & * * * = = = - - - - ; ; ; ; ; ; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ; ; ; ; ; ; - - - - = = = * * * & & % % $ $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # $ $ $ % % % & & & * * * * * = = = = = = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = = = = = = * * * * * & & & % % % $ $ $ # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # # # $ $ $ % % % % % & & & & & & & * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * & & & & & & & % % % % % $ $ $ # # # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + @ @ @ @ # # # # $ $ $ $ $ % % % % % % % % & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & % % % % % % % % $ $ $ $ $ # # # # @ @ @ @ + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + @ @ @ @ @ @ # # # # # # # # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ # # # # # # # # @ @ @ @ @ @ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + @ @ @ @ @ @ @ @ @ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @ @ @ @ @ @ @ @ @ + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "} +------------------------------------------------------------------------------ +export constant icon = create(GtkImage,xpm_to_pixbuf(e_xpm)) +------------------------------------------------------------------------------ diff --git a/eugtk/examples/examples/icon_I.e b/eugtk/examples/examples/icon_I.e new file mode 100644 index 0000000..f82d72a --- /dev/null +++ b/eugtk/examples/examples/icon_I.e @@ -0,0 +1,544 @@ + +namespace i + +-- exports i:icon + +include GtkEngine.e + +constant i_xpm = { +"130 250 282 2", +" c None", +". c #000000", +"+ c #010100", +"@ c #020200", +"# c #030300", +"$ c #040400", +"% c #050500", +"& c #060500", +"* c #070600", +"= c #080700", +"- c #090800", +"; c #0A0900", +"> c #0B0A00", +", c #0C0A00", +"' c #0D0B00", +") c #0E0C00", +"! c #0F0D00", +"~ c #100E00", +"{ c #110F00", +"] c #120F00", +"^ c #131000", +"/ c #141100", +"( c #151200", +"_ c #161300", +": c #171400", +"< c #181400", +"[ c #191500", +"} c #1A1600", +"| c #1B1700", +"1 c #1C1800", +"2 c #1D1900", +"3 c #1E1A00", +"4 c #1F1A00", +"5 c #201B00", +"6 c #211C00", +"7 c #221D00", +"8 c #231E00", +"9 c #241F00", +"0 c #251F00", +"a c #262000", +"b c #272100", +"c c #282200", +"d c #292300", +"e c #2A2401", +"f c #2B2401", +"g c #2C2501", +"h c #2D2601", +"i c #2E2701", +"j c #2F2801", +"k c #302901", +"l c #312901", +"m c #322A01", +"n c #332B01", +"o c #342C01", +"p c #352D01", +"q c #362E01", +"r c #372E01", +"s c #382F01", +"t c #393001", +"u c #3A3101", +"v c #3C3301", +"w c #3D3401", +"x c #3E3401", +"y c #3E3501", +"z c #3F3601", +"A c #403701", +"B c #423901", +"C c #433901", +"D c #443A01", +"E c #453B01", +"F c #463C01", +"G c #413801", +"H c #473D01", +"I c #483E01", +"J c #4A3F01", +"K c #4B4001", +"L c #4C4101", +"M c #4D4201", +"N c #493E01", +"O c #4E4301", +"P c #4F4301", +"Q c #514501", +"R c #524601", +"S c #534702", +"T c #544802", +"U c #554902", +"V c #3B3201", +"W c #504401", +"X c #574A02", +"Y c #594C02", +"Z c #5A4D02", +"` c #5B4E02", +" . c #5C4E02", +".. c #5D4F02", +"+. c #584B02", +"@. c #5F5102", +"#. c #605202", +"$. c #625302", +"%. c #635402", +"&. c #645502", +"*. c #655602", +"=. c #665702", +"-. c #685802", +";. c #6A5A02", +">. c #6B5B02", +",. c #6C5C02", +"'. c #6D5D02", +"). c #695902", +"!. c #6E5D02", +"~. c #705F02", +"{. c #726102", +"]. c #736202", +"^. c #746302", +"/. c #756302", +"(. c #766402", +"_. c #786602", +":. c #7A6802", +"<. c #7B6802", +"[. c #7C6902", +"}. c #7D6A02", +"|. c #7D6B03", +"1. c #716002", +"2. c #7F6D03", +"3. c #816E03", +"4. c #826F03", +"5. c #847103", +"6. c #857203", +"7. c #6F5E02", +"8. c #776502", +"9. c #7E6C03", +"0. c #877303", +"a. c #897503", +"b. c #8A7603", +"c. c #8C7803", +"d. c #8D7803", +"e. c #796702", +"f. c #887403", +"g. c #8B7703", +"h. c #8E7903", +"i. c #907B03", +"j. c #927D03", +"k. c #937D03", +"l. c #947E03", +"m. c #0B0B0B", +"n. c #0A0A0B", +"o. c #0A0B0A", +"p. c #0B0A0B", +"q. c #0B0A0A", +"r. c #0A0B0B", +"s. c #0A0A0A", +"t. c #101010", +"u. c #100F10", +"v. c #10100F", +"w. c #0F0F10", +"x. c #0F1010", +"y. c #100F0F", +"z. c #151515", +"A. c #151415", +"B. c #1B1A1A", +"C. c #1A1A1B", +"D. c #1A1B1A", +"E. c #1B1A1B", +"F. c #1A1A1A", +"G. c #0B0B0A", +"H. c #20201F", +"I. c #1F1F20", +"J. c #201F20", +"K. c #1F201F", +"L. c #201F1F", +"M. c #1F2020", +"N. c #1F1F1F", +"O. c #867203", +"P. c #252524", +"Q. c #252424", +"R. c #252425", +"S. c #252525", +"T. c #242524", +"U. c #242525", +"V. c #161515", +"W. c #564902", +"X. c #5E5002", +"Y. c #2A2A2A", +"Z. c #2A292A", +"`. c #0F100F", +" + c #2F302F", +".+ c #302F2F", +"++ c #2F2F2F", +"@+ c #30302F", +"#+ c #1A1B1B", +"$+ c #151516", +"%+ c #343535", +"&+ c #343435", +"*+ c #353535", +"=+ c #353434", +"-+ c #353435", +";+ c #353534", +">+ c #302F30", +",+ c #837003", +"'+ c #3A3A3A", +")+ c #393A3A", +"!+ c #3A393A", +"~+ c #393A39", +"{+ c #2F3030", +"]+ c #202020", +"^+ c #968003", +"/+ c #3F3F3F", +"(+ c #675802", +"_+ c #988203", +":+ c #444444", +"<+ c #444445", +"[+ c #9A8303", +"}+ c #444544", +"|+ c #4A4949", +"1+ c #49494A", +"2+ c #2A2B2A", +"3+ c #9C8503", +"4+ c #393939", +"5+ c #494A49", +"6+ c #4F4F4F", +"7+ c #4A4A49", +"8+ c #444545", +"9+ c #403F40", +"0+ c #3A3A39", +"a+ c #2F2F30", +"b+ c #957F03", +"c+ c #9D8603", +"d+ c #3F3E3F", +"e+ c #4F4F4E", +"f+ c #9E8703", +"g+ c #343534", +"h+ c #4E4E4F", +"i+ c #4A494A", +"j+ c #3F3F40", +"k+ c #8F7A03", +"l+ c #978103", +"m+ c #9F8703", +"n+ c #2A2A29", +"o+ c #454544", +"p+ c #4A4A4A", +"q+ c #454444", +"r+ c #403F3F", +"s+ c #A08803", +"t+ c #0F0F0F", +"u+ c #4E4F4E", +"v+ c #998203", +"w+ c #A18903", +"x+ c #4F4E4E", +"y+ c #2A2A2B", +"z+ c #917C03", +"A+ c #A28A03", +"B+ c #494949", +"C+ c #242425", +"D+ c #4E4F4F", +"E+ c #806D03", +"F+ c #A38B03", +"G+ c #454545", +"H+ c #3F4040", +"I+ c #9B8403", +"J+ c #494A4A", +"K+ c #3F403F", +"L+ c #2B2A2A", +"M+ c #A48C03", +"N+ c #1B1B1B", +"O+ c #4F4E4F", +"P+ c #303030", +"Q+ c #1B1B1A", +"R+ c #39393A", +"S+ c #343434", +"T+ c #454445", +"U+ c #151615", +"V+ c #3A3939", +"W+ c #3E3F3F", +"X+ c #40403F", +"Y+ c #2A2B2B", +"Z+ c #151514", +"`+ c #3F3F3E", +" @ c #4E4E4E", +".@ c #141515", +"+@ c #242424", +"@@ c #161516", +"#@ c #404040", +"$@ c #292A2A", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ # # # # # # @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + @ @ @ @ @ @ # # # # # # # # # # # # # # # # # # # # # # # # @ @ @ @ @ @ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + @ @ @ @ # # # # $ $ $ $ $ % % % % % % % % % % % % % % % % % % $ $ $ $ $ # # # # @ @ @ @ + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # # # $ $ $ % % % % % & & & & & & & & & & & & & & & & % % % % % $ $ $ # # # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # $ $ $ % % % & & & & * * * * = = = = = = = = = = = = * * * * & & & & % % % $ $ $ # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ $ % % & & * * * = = = - - - - - ; ; ; ; ; ; ; ; - - - - - = = = * * * & & % % $ $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ % % & & * * = = - - ; ; > > > , , , , , , , , , , , , , , > > > ; ; - - = = * * & & % % $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ # # $ $ % % & * * = = - ; ; > > , , ' ' ) ) ) ! ! ! ! ! ! ! ! ! ! ) ) ) ' ' , , > > ; ; - = = * * & % % $ $ # # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # # $ $ % & & * = - - ; > , , ' ) ) ! ! ~ ~ { { { { ] ] ] ] ] ] { { { { ~ ~ ! ! ) ) ' , , > ; - - = * & & % $ $ # # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # $ $ % & & * = - ; ; > , ' ) ! ~ ~ { ] ] ^ / / / ( ( ( ( ( ( ( ( ( ( / / / ^ ] ] { ~ ~ ! ) ' , > ; ; - = * & & % $ $ # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # # $ $ % & * * = - ; > , ' ) ! ~ { ] ^ / ( _ _ : : < < [ [ [ [ [ [ [ [ < < : : _ _ ( / ^ ] { ~ ! ) ' , > ; - = * * & % $ $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ $ % & * = - ; > , ' ! ~ { ] ^ / _ : < [ [ } | 1 1 2 2 2 2 3 3 2 2 2 2 1 1 | } [ [ < : _ / ^ ] { ~ ! ' , > ; - = * & % $ $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - ; , ' ) ~ { ] / ( _ < [ } | 1 2 3 4 5 5 6 6 7 7 7 7 7 7 6 6 5 5 4 3 2 1 | } [ < _ ( / ] { ~ ) ' , ; - = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - > , ' ! ~ ] ^ ( _ < [ | 1 3 4 5 6 7 8 9 0 0 a a a b b a a a 0 0 9 8 7 6 5 4 3 1 | [ < _ ( ^ ] ~ ! ' , > - = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = ; > , ) ~ { ^ ( : < } 1 3 4 6 8 9 0 b c d e f f g g h h h h g g f f e d c b 0 9 8 6 4 3 1 } < : ( ^ { ~ ) , > ; = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ % & * = ; > ' ) ~ ] / ( : [ | 2 4 6 8 0 b d e g h i j k l l m m m m m m l l k j i h g e d b 0 8 6 4 2 | [ : ( / ] ~ ) ' > ; = * & % $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ % & * = - > , ) ~ ] / _ < } 2 4 6 8 a c e g i j l n o p q r s s s t t s s s r q p o n l j i g e c a 8 6 4 2 } < _ / ] ~ ) , > - = * & % $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = - > , ) ~ ] / : [ | 3 5 8 0 c e h j l o q r t u v w x y y z z z z y y x w v u t r q o l j h e c 0 8 5 3 | [ : / ] ~ ) , > - = * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - ; , ) ~ ] / : [ 1 4 6 9 b e h j m p r t v x y A B C D E E F F F F E E D C B A y x v t r p m j h e b 9 6 4 1 [ : / ] ~ ) , ; - = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = ; , ' ~ ] / : [ 1 4 7 0 c f i l o r u w y G C E H I J K L M M M M M M L K J I H E C G y w u r o l i f c 0 7 4 1 [ : / ] ~ ' , ; = * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - > ' ! { / _ [ 1 4 7 0 d g j n q t w z B D H N L O P Q R S T T U U T T S R Q P O L N H D B z w t q n j g d 0 7 4 1 [ _ / { ! ' > - = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * - ; , ) ~ ^ ( < | 3 7 0 d g k o s V y G E I K O W S U X Y Z ` ......... .` Z Y X U S W O K I E G y V s o k g d 0 7 3 | < ( ^ ~ ) , ; - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; > ' ~ ] ( : | 3 6 0 d g k o s v z C H K O R U +.Z ..@.#.$.%.&.*.*.*.*.&.%.$.#.@...Z +.U R O K H C z v s o k g d 0 6 3 | : ( ] ~ ' > ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + + @ # $ % & * - ; , ) { ^ _ [ 2 5 9 c g k o t w A E N M Q U +. .@.$.&.=.-.;.>.,.'.'.'.'.,.>.;.-.=.&.$.@. .+.U Q M N E A w t o k g c 9 5 2 [ _ ^ { ) , ; - * & % $ # @ + + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = - > ' ~ ] ( < | 4 8 b f j o s w G E J P S X ` @.%.=.).,.!.~.{.].^././././.^.].{.~.!.,.).=.%.@.` X S P J E G w s o j f b 8 4 | < ( ] ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # # $ & * = ; , ) { / : } 2 6 0 e i n s v A E J P T Y ..$.=.;.'.~.].(._.:.<.[.}.|.|.}.[.<.:._.(.].~.'.;.=.$...Y T P J E A v s n i e 0 6 2 } : / { ) , ; = * & $ # # @ + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ' ! ] ( < 1 4 9 c g l q V z E J P U Z @.&.-.,.1.^._.<.}.2.3.4.5.5.6.6.5.5.4.3.2.}.<._.^.1.,.-.&.@.Z U P J E z V q l g c 9 4 1 < ( ] ! ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = ; , ) ~ ^ _ } 2 6 a e j o u y C N P T Z @.*.;.7.].8.<.9.3.5.0.a.b.c.d.d.d.d.c.b.a.0.5.3.9.<.8.].7.;.*.@.Z T P N C y u o j e a 6 2 } _ ^ ~ ) , ; = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! { / < | 4 8 c h m r w G H M S Y @.&.;.7.^.e.|.3.6.f.g.h.i.j.k.l.l.l.l.k.j.i.h.g.f.6.3.|.e.^.7.;.&.@.Y S M H G w r m h c 8 4 | < / { ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # # % & * - > ' ! ] ( [ 2 6 0 e j o u z E K Q X ..%.).7.m.n.o.p.q.r.o.m.r.n.m.r.m.r.o.n.s.n.s.s.r.m.p.n.p.q.r.q.7.).%...X Q K E z u o j e 0 6 2 [ ( ] ! ' > - * & % # # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # $ % & = - > ) ~ ^ _ } 3 7 b g l r w B I O U ` $.-.!./.r.t.u.t.v.t.w.u.v.x.t.y.u.v.t.t.t.x.t.u.t.t.x.u.t.w.t.o./.!.-.$.` U O I B w r l g b 7 3 } _ ^ ~ ) > - = & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + + @ # $ % & = ; , ) { / < | 4 9 d i o t y E K R Y @.=.'.].:.p.u.z.z.z.z.z.A.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.z.t.n.:.].'.=.@.Y R K E y t o i d 9 4 | < / { ) , ; = & % $ # @ + + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! ] ( < 1 6 0 e k q v G I O U .%.;.1._.|.p.t.z.B.C.D.D.E.F.C.F.F.D.D.B.F.C.B.F.F.B.F.B.F.F.z.t.G.|._.1.;.%. .U O I G v q k e 0 6 1 < ( ] ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ! ] _ [ 2 7 b g l r x C J Q +.@.=.!./.[.4.n.x.z.F.H.I.J.J.J.J.K.L.H.J.I.M.M.K.N.M.I.J.N.N.F.z.v.s.4.[./.!.=.@.+.Q J C x r l g b 7 2 [ _ ] ! ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # # $ & * - > ' ~ ^ _ } 3 8 c h n t z F M T ` %.;.1.e.2.O.s.w.z.F.K.P.Q.R.P.S.R.S.S.S.R.S.S.T.S.U.P.P.Q.M.F.V.t.n.O.2.e.1.;.%.` T M F z t n h c 8 3 } _ ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ) { / : | 4 9 d j p V G H P W.X.*.'.^.[.4.b.G.t.z.B.L.U.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Z.Y.Y.Y.Y.Y.S.M.F.z.t.o.b.4.[.^.'.*.X.W.P H G V p j d 9 4 | : / { ) > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ) { / < 1 5 0 e k q v B N Q +.#.-.7.8.9.O.d.n.`.A.F.L.R.Y. +.+ +++++++++++@+++++++.+++Y.P.J.#+$+t.m.d.O.9.8.7.-.#.+.Q N B v q k e 0 5 1 < / { ) , ; = & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! { ( < 1 6 a f l r x D K R Z $.;.{.:.3.a.i.n.t.z.B.J.S.Y.++%+%+&+*+=+-+%+;+=+;+=+=+>+Y.S.H.#+z.x.G.i.a.3.:.{.;.$.Z R K D x r l f a 6 1 < ( { ! , ; = & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! ] ( [ 2 7 b g m s y E L T .&.,.^.[.,+g.k.r.y.z.B.K.S.Y.++%+'+)+'+'+!+'+'+'+!+~+=+{+Y.S.]+C.z.`.m.k.g.,+[.^.,.&. .T L E y s m g b 7 2 [ ( ] ! , ; = & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] ( [ 3 7 b h n t z F O W.X.=.!.(.9.O.h.^+G.w.z.D.L.R.Y.@+-+)+/+/+/+/+/+/+/+/+'+%+ +Y.P.L.E.z.`.m.^+h.O.9.(.!.=.X.W.O F z t n h b 7 3 [ ( ] ! ' ; = * % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] _ } 3 8 c i o u A H P X @.(+~._.2.f.i._+o.u.z.C.L.U.Y.>+-+)+/+:+:+<+<+:+<+/+'+*+ +Y.S.]+F.z.v.p._+i.f.2._.~.(+@.X P H A u o i c 8 3 } _ ] ! ' ; = * % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + @ @ # $ % * - > ' ~ ^ _ } 3 8 c i o V G I W +.#.).1.:.3.b.j.[+q.t.z.B.I.S.Y.++&+'+/+}+|+|+1+1+:+/+'+&+++2+P.H.D.z.u.o.[+j.b.3.:.1.).#.+.W I G V o i c 8 3 } _ ^ ~ ' > - * % $ # @ @ + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ _ } 4 9 d j p v B N Q Y $.;.].<.,+g.l.3+n.x.z.F.N.U.Y..+-+4+/+:+5+6+6+7+8+9+0+%+a+2+S.H.B.z.v.s.3+l.g.,+<.].;.$.Y Q N B v p j d 9 4 } _ ^ ~ ' > - * % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ : | 4 9 d j q v B J R Z $.>.^.[.5.d.b+c+o.x.z.F.M.T.Y.++=+'+d+<+5+e+6+1+:+/+'+;+ +Y.S.M.F.z.u.G.c+b+d.5.[.^.>.$.Z R J B v q j d 9 4 | : ^ ~ ' > - * % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 4 9 e k q w C K S ` %.,./.|.6.h.^+f+m.w.z.C.J.S.Y..+g+'+/+<+7+h+6+i+8+j+'+=+a+Y.S.I.F.z.x.p.f+^+h.6.|./.,.%.` S K C w q k e 9 4 | : ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 5 0 e k q w C K S ` &.'./.|.O.k+l+m+p.v.z.C.N.R.n+++-+'+/+o+1+6+6+p+q+r+'+;+.+Y.S.N.F.$+u.m.m+l+k+O.|./.'.&.` S K C w q k e 0 5 | : ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 e k r x D L T .*.'.(.9.0.i._+s+q.t+z.F.H.S.Y.a+&+)+/+<+i+u+6+7+q+j+'+*+++Y.S.N.B.z.u.p.s+_+i.0.9.(.'.*. .T L D x r k e 0 5 | : / ~ ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 f l r x D L T ..*.!.8.2.f.i.v+w+s.x.z.D.M.T.Y..+*+!+/+8+|+x+6+i+q+r+'+=+++y+U.N.C.z.u.o.w+v+i.f.2.8.!.*...T L D x r l f 0 5 | : / ~ ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / : 1 5 0 f l r x E L U ..=.!.8.2.f.z+[+A+q.t.z.B.]+S.Y.a+-+!+/+}+B+h+6+i+}+/+'+g+a+Y.S.I.F.z.t.q.A+[+z+f.2.8.!.=...U L E x r l f 0 5 1 : / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l r x E M U ..=.7.8.2.f.z+[+A+r.u.z.B.K.C+Y.++;+0+/+:+B+D+6+7+:+/+'+%+>+Y.S.K.F.z.v.s.A+[+z+f.2.8.7.=...U M E x r l f 0 5 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s y E M U ..=.7._.E+a.j.[+F+p.`.z.F.L.Q.n+.+;+~+/+q+|+D+6+p+G+H+)+-+a+Y.S.]+D.z.v.o.F+[+j.a.E+_.7.=...U M E y s l f 0 5 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s y E M U ..=.7._.E+a.j.[+F+G.`.z.F.I.U.Y.a+*+4+/+:+B+D+6+p+}+/+'+;+>+Y.S.M.C.z.t.n.F+[+j.a.E+_.7.=...U M E y s l f 0 5 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 a f l s y E M U X.=.7._.E+a.j.I+F+G.t.z.C.L.S.Y..+;+)+/+}+J+e+6+p+}+/+'+;+{+Y.S.N.B.z.t.G.F+I+j.a.E+_.7.=.X.U M E y s l f a 5 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y E M U X.(+7._.E+a.j.I+F+r.u.z.B.L.P.Y..+%+'+/+<+|+6+6+p+:+K+'+;+@+L+R.H.D.V.x.G.F+I+j.a.E+_.7.(+X.U M E y s l f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y E M U X.(+7._.E+a.j.I+F+p.t.z.D.H.U.Y.a+=+'+/+}+7+6+6+i+q+K+'+*+a+Y.P.]+F.z.v.n.F+I+j.a.E+_.7.(+X.U M E y s l f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y F M W.X.(+~.e.3.b.k.3+M+m.`.z.N+M.U.Y..+%+!+/+:+B+u+6+7+:+/+'+*+a+y+S.H.C.z.t.G.M+3+k.b.3.e.~.(+X.W.M F y s l f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y F M W.X.(+~.e.3.b.k.3+M+s.t.z.D.]+R.Y.++%+'+/+<+B+6+6+|+:+9+'+&+++Y.S.J.F.z.t.r.M+3+k.b.3.e.~.(+X.W.M F y s l f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y F M W.X.(+~.e.3.b.k.3+M+n.t.z.F.K.S.Y. +&+0+/+}+7+O+6+p+<+j+'+;+P+Y.Q.I.D.z.u.q.M+3+k.b.3.e.~.(+X.W.M F y s l f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+n.x.z.Q+K.S.Y.{+=+)+/+:+7+6+6+B+8+/+'+;+.+Y.S.I.F.$+v.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+m.v.z.F.H.S.Y.++&+0+/+:+5+O+6+J+:+j+'+g+a+Y.S.J.F.z.w.m.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+o.t.z.D.]+P.Y.>+&+!+/+q+5+O+6+p+8+K+R+%+++Y.S.J.B.$+v.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+n.u.z.C.M.S.Y.++*+'+/+:+B+e+6+i+o+r+'+*+@+L+S.M.F.z.u.n.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+q.t.z.F.M.U.Y.>+*+)+/+q+|+h+6+7+8+/+'+%+@+Y.P.]+F.z.v.m.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+n.t.z.F.I.U.Y. +-+'+/+:+B+6+6+i+}+/+'+S+a+Y.S.N.#+z.`.m.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+o.`.z.F.J.S.Y. +%+0+/+q+5+6+6+p+T+r+'+=+ +Y.S.L.C.z.t.q.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+o.t.z.F.J.U.Y.++&+'+/+:+|+6+6+B+q+j+'+*+ +Y.P.K.#+U+v.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+p.t.z.D.H.C+Y..+&+V+/+:+7+6+6+J+q+/+)+g+a+y+S.L.C.z.t.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+G.t.z.F.I.C+Y.>+S+R+/+:+p+e+6+1+o+r+'+-+ +Y.S.K.F.z.u.m.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+G.w.z.F.J.S.Y.++%+'+/+:+i+u+6+p+8+/+'+g+ +2+S.I.F.z.t.q.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+q.v.z.F.]+U.Y. +&+V+/+:+p+D+6+p+:+r+'+S+@+2+S.]+D.z.t.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+p.t.z.D.K.S.Y.++g+'+/+:+5+u+6+7+o+K+'+&+a+Y.P.J.C.z.x.n.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+r.x.z.F.H.S.Y.++;+'+W+o+|+6+6+B+<+X+'+*+P+Y+P.J.F.z.x.p.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+s.u.z.F.L.U.Y. +=+V+/+q+5+D+6+5+}+/+!+;+a+Y.S.N.D.z.x.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+r.u.Z+F.N.P.Y. +S+'+`+T+5+6+6+i+o+r+V+*+@+Y.P.]+D.z.t.q.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+s.x.z.D.M.S.Y. +=+~+/+:+|+O+6+1+:+r+'+%+{+y+S.H.N+z.v.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+r.t.z.D.N.T.Z.++-+0+/+}+i+6+6+1+G+/+'+-+{+Y.S.L.C.z.t.n.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+p.t.z.F.J.Q.Y. +g+V+/+:+5+6+6+i+8+r+'+*+++Y.U.]+C.V.u.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+r.t.Z+#+H.S.Y.++=+'+/+:+B+6+6+p+8+r+'+;+++Y.C+]+F.z.t.s.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+p.t.z.#+I.T.Y..+=+'+`+<+J+ @6+p+q+X+'+*+.+Y.U.J.D.z.t.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+q.`.z.F.]+P.Y. +*+'+/+}+i+O+6+7+<+/+'+S+.+Y.S.H.N+z.x.r.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+G.t.z.F.M.P.Y.++*+R+/+:+|+O+6+p+}+j+'+*+ +Y.P.L.D.z.u.n.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+m.t..@Q+J.Q.Y.++&+'+/+}+J+h+6+p+q+H+'+g+{+L+S.K.B.z.x.r.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+o.t.z.B.I.S.Y.++-+0+/+q+1+6+6+7+}+r+0+%+>+Y.R.M.D.$+y.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+r.x.z.D.K.R.Y.++g+~+/+q+1+6+6+J+q+/+)+%+ +Y.C+H.E.V.v.q.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+n.t.z.F.H.+@Y..+*+'+/+<+7+O+6+J+}+/+'+*+a+L+R.J.F.z.x.s.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+q.v.z.D.H.S.Y. +&+!+/+:+1+D+6+i+G+/+'+%+>+Y.S.J.C.z.x.m.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+n.t.z.F.K.U.Y. +&+)+/+:+1+6+6+5+}+K+'+;+.+y+S.J.E.z.t.r.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+m.v.z.F.J.U.Y.++%+!+/+:+J+6+6+i+o+/+0+%+a+Y.R.M.F.$+x.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+s.v.z.Q+L.S.Y.++%+!+/+q+5+D+6+p+8+/+'+;+a+Y.R.J.Q+z.u.p.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+r.t.z.C.J.S.Y.++=+V+/+:+J+6+6+7+8+j+'+%+++y+S.M.F.@@t.p.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+s.t.z.B.N.T.Y..+=+)+/+}+B+6+6+J+:+#@'+*+.+y+R.J.B.@@v.q.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+r.t.z.B.H.S.Y.++;+)+/+:+7+ @6+p+8+/+'+-+++Y+S.K.E.$+v.G.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+q.t.z.C.I.S.Y.++S+'+/+q+1+ @6+p+q+j+'+;+ +2+S.]+F.z.t.q.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+o.x.z.F.I.T.Y..+g+0+/+:+J+6+6+J+:+j+'+-+.+Y.P.L.F.z.t.p.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+o.t.z.B.I.P.Y..+S+~+/+}+5+h+6+J+T+r+'+*+@+Y.R.L.B.z.t.m.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+o.v.z.F.M.S.Y.a+*+!+/+:+i+D+6+|+o+r+!+%+a+Y.Q.K.B.z.t.s.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+o.v.z.N+J.P.Y.++S+V+/+:+1+x+6+5+8+r+'+*+@+Y.S.I.C.z.y.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+p.x.z.C.L.R.Y.++&+!+/+<+i+h+6+p+:+/+0+g+.+Y+R.N.Q+z.t.m.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+p.v.z.F.J.T.Y.++S+)+/+o+p+6+6+J+G+/+'+-+@+Y.S.]+B.V.v.m.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+s.u.z.F.N.S.Y.++%+)+/+:+7+6+6+p+q+/+'+-+a+Y.S.L.#+z.t.n.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+n.x.z.D.J.C+Y.++=+~+/+<+|+6+6+i+}+/+'+%+>+Y.S.M.N+z.t.p.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+m.x.z.F.K.P.Y.++=+)+/+<+i+O+6+J+T+/+0+%+++2+S.]+C.z.t.G.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+s.x.z.#+L.S.Y.++S+)+/+:+B+x+6+p+8+H+!+%+@+y+S.K.#+z.t.o.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+n.v.z.E.]+Q.Y.++%+'+/+:+B+x+6+p+q+j+'+&+++Y.P.M.N+z.u.m.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+G.x.z.D.J.S.$@++%+'+/+}+J+u+6+i+}+K+'+%+++Y.R.]+#+z.t.n.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+s.v.z.F.]+R.Y. +*+'+/+:+|+D+6+7+}+/+'+*+.+Y.S.J.B.z.x.n.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+p.x.z.F.L.P.Y..+g+R+/+:+J+6+6+p+<+X+0+-+a+Y.S.J.B.z.x.p.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+o.t.z.B.M.R.Y.@+&+'+/+:+i+6+6+J+<+/+'+&+.+Y.P.]+F.z.t.r.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s y F O W.X.(+~.e.3.b.k.3+M+o.t.z.B.M.Q.Y.a+&+'+/+<+5+6+6+7+q+/+'+*+a+Y.S.M.C.z.t+q.M+3+k.b.3.e.~.(+X.W.O F y s m f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y F M W.X.(+~.e.3.b.k.3+M+m.`.z.F.K.U.Y.++-+V+/+:+|+x+6+i+:+r+'+;+a+L+S.H.B.z.v.o.M+3+k.b.3.e.~.(+X.W.M F y s l f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y F M W.X.(+~.e.3.b.k.3+M+G.u.z.F.H.P.$@++&+!+/+:+7+6+6+1+8+/+'+-+a+Y.S.J.C.z.t.s.M+3+k.b.3.e.~.(+X.W.M F y s l f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y F M W.X.(+~.e.3.b.k.3+M+n.w.z.F.H.S.Y..+-+V+/+q+i+6+6+J+8+r+'+-+.+Y.S.]+B.z.v.G.M+3+k.b.3.e.~.(+X.W.M F y s l f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y E M U X.(+7._.E+a.j.I+F+r.t.z.F.N.S.Y.++&+)+/+:+B+O+6+J+T+/+'+%+{+Y.S.L.F.z.w.m.F+I+j.a.E+_.7.(+X.U M E y s l f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s y E M U X.(+7._.E+a.j.I+F+n.t.z.B.K.U.Y.>+*+R+/+:+7+6+6+B+8+r+'+*+{+Y.C+M.D.z.u.q.F+I+j.a.E+_.7.(+X.U M E y s l f a 6 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 a f l s y E M U X.=.7._.E+a.j.I+F+o.t.z.B.M.R.Y.a+=+!+/+:+1+6+6+J+:+/+'+*+.+Y.P.H.F.z.u.o.F+I+j.a.E+_.7.=.X.U M E y s l f a 5 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s y E M U ..=.7._.E+a.j.[+F+q.v.z.F.H.U.Y.++*+)+/+:+i+6+6+J+o+j+'+*+a+Y.S.]+F.z.t.p.F+[+j.a.E+_.7.=...U M E y s l f 0 5 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s y E M U ..=.7._.E+a.j.[+F+G.u.z.F.I.P.Y.++%+'+/+T+J+6+6+J+<+K+'+*+ +Y.R.J.B.z.u.p.F+[+j.a.E+_.7.=...U M E y s l f 0 5 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l r x E M U ..=.7.8.2.f.z+[+A+o.u.z.F.K.T.Y.++;+)+/+}+i+h+6+i+G+/+'+-+P+Y.U.L.B.z.u.m.A+[+z+f.2.8.7.=...U M E x r l f 0 5 1 < / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / : 1 5 0 f l r x E L U ..=.!.8.2.f.z+[+A+G.v.z.D.M.S.Y.++S+R+/+:+i+ @6+p+G+/+'+&+.+L+P.N.B.z.t.m.A+[+z+f.2.8.!.=...U L E x r l f 0 5 1 : / { ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 f l r x D L T ..*.!.8.2.f.i.v+w+o.x.z.F.M.U.Y.++%+!+/+8+7+x+6+p+}+r+0+;+++Y.U.N.E.z.t.n.w+v+i.f.2.8.!.*...T L D x r l f 0 5 | : / ~ ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 e k r x D L T .*.'.(.9.0.i._+s+s.t.z.C.N.U.Y.++S+V+/+:+p+O+6+i+q+K+'+-+ +y+S.J.F.V.t.s.s+_+i.0.9.(.'.*. .T L D x r k e 0 5 | : / ~ ) > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 5 0 e k q w C K S ` &.'./.|.O.k+l+m+r.t.z.F.K.S.Y.++&+)+/+:+5+D+6+p+}+j+'+-+.+Y.S.J.B.z.t.q.m+l+k+O.|./.'.&.` S K C w q k e 0 5 | : ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 4 9 e k q w C K S ` %.,./.|.6.h.^+f+p.t.z.F.H.U.Y.a+%+)+/+:+1+6+6+1+T+/+'+*+.+y+P.J.Q+z.u.n.f+^+h.6.|./.,.%.` S K C w q k e 9 4 | : ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ : | 4 9 d j q v B J R Z $.>.^.[.5.d.b+c+q.t.z.F.M.P.Y. +;+'+/+}+B+x+6+p+}+/+'+-+P+L+S.H.C.z.t.r.c+b+d.5.[.^.>.$.Z R J B v q j d 9 4 | : ^ ~ ' > - * % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ _ } 4 9 d j p v B N Q Y $.;.].<.,+g.l.3+o.t.z.D.K.S.Y.++;+~+`+:+i+O+6+5+:+9+'+-+++Y.S.H.#+z.x.o.3+l.g.,+<.].;.$.Y Q N B v p j d 9 4 } _ ^ ~ ' > - * % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + @ @ # $ % * - > ' ~ ^ _ } 3 8 c i o V G I W +.#.).1.:.3.b.j.[+s.v.z.F.N.S.Y.++%+~+/+o+5+7+p+p+:+/+'+%+ +Y.S.L.F.z.t.m.[+j.b.3.:.1.).#.+.W I G V o i c 8 3 } _ ^ ~ ' > - * % $ # @ @ + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] _ } 3 8 c i o u A H P X @.(+~._.2.f.i._+m.x.z.F.N.T.Y.{+=+R+/+}+:+:+8+G+T+r+'+*+++2+S.]+D.z.t.q._+i.f.2._.~.(+@.X P H A u o i c 8 3 } _ ] ! ' ; = * % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] ( [ 3 7 b h n t z F O W.X.=.!.(.9.O.h.^+s.t.z.B.]+S.Y.a+;+'+W+K+K+/+/+/+/+r+'+;+{+Y.S.]+B.z.x.n.^+h.O.9.(.!.=.X.W.O F z t n h b 7 3 [ ( ] ! ' ; = * % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! ] ( [ 2 7 b g m s y E L T .&.,.^.[.,+g.k.p.t.z.#+H.P.Y.a+S+0+'+'+0+'+'+'+'+'+'+-+.+L+U.]+F.z.x.n.k.g.,+[.^.,.&. .T L E y s m g b 7 2 [ ( ] ! , ; = & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! { ( < 1 6 a f l r x D K R Z $.;.{.:.3.a.i.G.v.A.D.K.S.Y.++-+g+-+&+;+=+*+%+*+-+=+*+P+L+R.J.F.z.t.G.i.a.3.:.{.;.$.Z R K D x r l f a 6 1 < ( { ! , ; = & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ) { / < 1 5 0 e k q v B N Q +.#.-.7.8.9.O.d.p.t.z.Q+I.S.Y.++.+++ + +++++@+>+ +.+a+@+ +2+S.N.F.z.t.r.d.O.9.8.7.-.#.+.Q N B v q k e 0 5 1 < / { ) , ; = & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ) { / : | 4 9 d j p V G H P W.X.*.'.^.[.4.b.n.x.z.#+K.R.Y.Y.Y.Y.Y.Y.Y.Y.2+Y.2+y+Y.Y.Y.2+S.I.#+z.t.m.b.4.[.^.'.*.X.W.P H G V p j d 9 4 | : / { ) > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # # $ & * - > ' ~ ^ _ } 3 8 c h n t z F M T ` %.;.1.e.2.O.o.u.z.F.J.S.P.S.U.S.S.S.R.U.T.U.U.R.R.R.S.S.S.]+F.z.x.G.O.2.e.1.;.%.` T M F z t n h c 8 3 } _ ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ! ] _ [ 2 7 b g l r x C J Q +.@.=.!./.[.4.G.t.z.D.K.N.H.J.L.L.M.H.L.I.N.H.N.M.M.M.L.J.I.]+E.z.t.p.4.[./.!.=.@.+.Q J C x r l g b 7 2 [ _ ] ! ' > - * & $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! ] ( < 1 6 0 e k q v G I O U .%.;.1._.|.p.t+z.F.N+D.F.F.B.#+F.C.Q+F.Q+C.C.C.F.F.B.B.F.#+C.z.t.G.|._.1.;.%. .U O I G v q k e 0 6 1 < ( ] ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + + @ # $ % & = ; , ) { / < | 4 9 d i o t y E K R Y @.=.'.].:.s.t.z.z.z.z.z.V.z.z.z.z.z.z.z.z.$+z.z.z.z.z.z.$+z.U+t.r.:.].'.=.@.Y R K E y t o i d 9 4 | < / { ) , ; = & % $ # @ + + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # $ % & = - > ) ~ ^ _ } 3 7 b g l r w B I O U ` $.-.!./.n.t.t.t.t.u.v.v.t.x.x.t.u.t.x.u.v.x.t.x.t.`.v.t.t.t.t.s./.!.-.$.` U O I B w r l g b 7 3 } _ ^ ~ ) > - = & % $ # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # # % & * - > ' ! ] ( [ 2 6 0 e j o u z E K Q X ..%.).7.n.n.G.q.G.p.m.o.r.s.o.p.m.m.n.q.s.n.q.o.o.q.p.G.G.s.o.r.7.).%...X Q K E z u o j e 0 6 2 [ ( ] ! ' > - * & % # # @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! { / < | 4 8 c h m r w G H M S Y @.&.;.7.^.e.|.3.6.f.g.h.i.j.k.l.l.l.l.k.j.i.h.g.f.6.3.|.e.^.7.;.&.@.Y S M H G w r m h c 8 4 | < / { ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = ; , ) ~ ^ _ } 2 6 a e j o u y C N P T Z @.*.;.7.].8.<.9.3.5.0.a.b.c.d.d.d.d.c.b.a.0.5.3.9.<.8.].7.;.*.@.Z T P N C y u o j e a 6 2 } _ ^ ~ ) , ; = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ' ! ] ( < 1 4 9 c g l q V z E J P U Z @.&.-.,.1.^._.<.}.2.3.4.5.5.6.6.5.5.4.3.2.}.<._.^.1.,.-.&.@.Z U P J E z V q l g c 9 4 1 < ( ] ! ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # # $ & * = ; , ) { / : } 2 6 0 e i n s v A E J P T Y ..$.=.;.'.~.].(._.:.<.[.}.|.|.}.[.<.:._.(.].~.'.;.=.$...Y T P J E A v s n i e 0 6 2 } : / { ) , ; = * & $ # # @ + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = - > ' ~ ] ( < | 4 8 b f j o s w G E J P S X ` @.%.=.).,.!.~.{.].^././././.^.].{.~.!.,.).=.%.@.` X S P J E G w s o j f b 8 4 | < ( ] ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + + @ # $ % & * - ; , ) { ^ _ [ 2 5 9 c g k o t w A E N M Q U +. .@.$.&.=.-.;.>.,.'.'.'.'.,.>.;.-.=.&.$.@. .+.U Q M N E A w t o k g c 9 5 2 [ _ ^ { ) , ; - * & % $ # @ + + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; > ' ~ ] ( : | 3 6 0 d g k o s v z C H K O R U +.Z ..@.#.$.%.&.*.*.*.*.&.%.$.#.@...Z +.U R O K H C z v s o k g d 0 6 3 | : ( ] ~ ' > ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * - ; , ) ~ ^ ( < | 3 7 0 d g k o s V y G E I K O W S U X Y Z ` ......... .` Z Y X U S W O K I E G y V s o k g d 0 7 3 | < ( ^ ~ ) , ; - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - > ' ! { / _ [ 1 4 7 0 d g j n q t w z B D H N L O P Q R S T T U U T T S R Q P O L N H D B z w t q n j g d 0 7 4 1 [ _ / { ! ' > - = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = ; , ' ~ ] / : [ 1 4 7 0 c f i l o r u w y G C E H I J K L M M M M M M L K J I H E C G y w u r o l i f c 0 7 4 1 [ : / ] ~ ' , ; = * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - ; , ) ~ ] / : [ 1 4 6 9 b e h j m p r t v x y A B C D E E F F F F E E D C B A y x v t r p m j h e b 9 6 4 1 [ : / ] ~ ) , ; - = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = - > , ) ~ ] / : [ | 3 5 8 0 c e h j l o q r t u v w x y y z z z z y y x w v u t r q o l j h e c 0 8 5 3 | [ : / ] ~ ) , > - = * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ % & * = - > , ) ~ ] / _ < } 2 4 6 8 a c e g i j l n o p q r s s s t t s s s r q p o n l j i g e c a 8 6 4 2 } < _ / ] ~ ) , > - = * & % $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ % & * = ; > ' ) ~ ] / ( : [ | 2 4 6 8 0 b d e g h i j k l l m m m m m m l l k j i h g e d b 0 8 6 4 2 | [ : ( / ] ~ ) ' > ; = * & % $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = ; > , ) ~ { ^ ( : < } 1 3 4 6 8 9 0 b c d e f f g g h h h h g g f f e d c b 0 9 8 6 4 3 1 } < : ( ^ { ~ ) , > ; = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - > , ' ! ~ ] ^ ( _ < [ | 1 3 4 5 6 7 8 9 0 0 a a a b b a a a 0 0 9 8 7 6 5 4 3 1 | [ < _ ( ^ ] ~ ! ' , > - = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - ; , ' ) ~ { ] / ( _ < [ } | 1 2 3 4 5 5 6 6 7 7 7 7 7 7 6 6 5 5 4 3 2 1 | } [ < _ ( / ] { ~ ) ' , ; - = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ $ % & * = - ; > , ' ! ~ { ] ^ / _ : < [ [ } | 1 1 2 2 2 2 3 3 2 2 2 2 1 1 | } [ [ < : _ / ^ ] { ~ ! ' , > ; - = * & % $ $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # # $ $ % & * * = - ; > , ' ) ! ~ { ] ^ / ( _ _ : : < < [ [ [ [ [ [ [ [ < < : : _ _ ( / ^ ] { ~ ! ) ' , > ; - = * * & % $ $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # $ $ % & & * = - ; ; > , ' ) ! ~ ~ { ] ] ^ / / / ( ( ( ( ( ( ( ( ( ( / / / ^ ] ] { ~ ~ ! ) ' , > ; ; - = * & & % $ $ # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # # $ $ % & & * = - - ; > , , ' ) ) ! ! ~ ~ { { { { ] ] ] ] ] ] { { { { ~ ~ ! ! ) ) ' , , > ; - - = * & & % $ $ # # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ # # $ $ % % & * * = = - ; ; > > , , ' ' ) ) ) ! ! ! ! ! ! ! ! ! ! ) ) ) ' ' , , > > ; ; - = = * * & % % $ $ # # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ % % & & * * = = - - ; ; > > > , , , , , , , , , , , , , , > > > ; ; - - = = * * & & % % $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ $ % % & & * * * = = = - - - - - ; ; ; ; ; ; ; ; - - - - - = = = * * * & & % % $ $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # $ $ $ % % % & & & & * * * * = = = = = = = = = = = = * * * * & & & & % % % $ $ $ # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # # # $ $ $ % % % % % & & & & & & & & & & & & & & & & % % % % % $ $ $ # # # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + @ @ @ @ # # # # $ $ $ $ $ % % % % % % % % % % % % % % % % % % $ $ $ $ $ # # # # @ @ @ @ + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + @ @ @ @ @ @ # # # # # # # # # # # # # # # # # # # # # # # # @ @ @ @ @ @ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ # # # # # # @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "} +------------------------------------------------------------------------------ +export constant icon = create(GtkImage,xpm_to_pixbuf(i_xpm)) +------------------------------------------------------------------------------ diff --git a/eugtk/examples/examples/icon_P.e b/eugtk/examples/examples/icon_P.e new file mode 100644 index 0000000..15df413 --- /dev/null +++ b/eugtk/examples/examples/icon_P.e @@ -0,0 +1,1041 @@ + +namespace p + +-- exports p:icon + +include GtkEngine.e + +constant p_xpm = { +"184 250 779 2", +" c None", +". c #000000", +"+ c #000100", +"@ c #000200", +"# c #000300", +"$ c #010400", +"% c #010500", +"& c #010600", +"* c #010700", +"= c #020800", +"- c #020900", +"; c #020A00", +"> c #020B00", +", c #030C00", +"' c #030D00", +") c #030E00", +"! c #030F00", +"~ c #041000", +"{ c #041100", +"] c #041200", +"^ c #041300", +"/ c #051400", +"( c #051500", +"_ c #051600", +": c #051700", +"< c #061800", +"[ c #061900", +"} c #061A00", +"| c #061B00", +"1 c #071C00", +"2 c #071D00", +"3 c #071E00", +"4 c #071F00", +"5 c #082000", +"6 c #082100", +"7 c #082200", +"8 c #082300", +"9 c #092400", +"0 c #092500", +"a c #092600", +"b c #092700", +"c c #0A2800", +"d c #0A2900", +"e c #0A2A00", +"f c #0A2B00", +"g c #0B2C00", +"h c #0B2D00", +"i c #0B2E00", +"j c #0B2F00", +"k c #0C3000", +"l c #0C3100", +"m c #0C3200", +"n c #0C3300", +"o c #0D3400", +"p c #0D3500", +"q c #0D3600", +"r c #0D3700", +"s c #0E3800", +"t c #0E3900", +"u c #0E3A00", +"v c #0E3B00", +"w c #0F3C00", +"x c #0F3D00", +"y c #0F3E00", +"z c #0F3F00", +"A c #104000", +"B c #104100", +"C c #104200", +"D c #104300", +"E c #114400", +"F c #114500", +"G c #114600", +"H c #114700", +"I c #124800", +"J c #124900", +"K c #124A00", +"L c #124B00", +"M c #134C00", +"N c #134D00", +"O c #134E00", +"P c #134F00", +"Q c #145000", +"R c #145100", +"S c #145200", +"T c #145300", +"U c #155400", +"V c #155500", +"W c #155600", +"X c #155700", +"Y c #165800", +"Z c #165900", +"` c #165A00", +" . c #165B00", +".. c #175C00", +"+. c #175D00", +"@. c #175E00", +"#. c #175F00", +"$. c #186000", +"%. c #186100", +"&. c #186200", +"*. c #186300", +"=. c #196400", +"-. c #196500", +";. c #196600", +">. c #196700", +",. c #1A6900", +"'. c #1A6A00", +"). c #1A6B00", +"!. c #1B6C00", +"~. c #1B6D00", +"{. c #1B6E00", +"]. c #1B6F00", +"^. c #1C7000", +"/. c #1A6800", +"(. c #1C7100", +"_. c #1C7200", +":. c #1D7400", +"<. c #1D7500", +"[. c #1D7600", +"}. c #1D7700", +"|. c #1E7800", +"1. c #1C7300", +"2. c #1E7A00", +"3. c #1E7B00", +"4. c #1F7C00", +"5. c #1F7D00", +"6. c #1F7E00", +"7. c #1F7F00", +"8. c #208000", +"9. c #208100", +"0. c #1E7900", +"a. c #208200", +"b. c #218400", +"c. c #218500", +"d. c #218600", +"e. c #218700", +"f. c #228800", +"g. c #228900", +"h. c #228A00", +"i. c #208300", +"j. c #228B00", +"k. c #238C00", +"l. c #238D00", +"m. c #238F00", +"n. c #249000", +"o. c #249100", +"p. c #249200", +"q. c #249300", +"r. c #238E00", +"s. c #259500", +"t. c #259600", +"u. c #259700", +"v. c #269800", +"w. c #269900", +"x. c #269A00", +"y. c #269B00", +"z. c #279C00", +"A. c #259400", +"B. c #279E00", +"C. c #279F00", +"D. c #28A000", +"E. c #28A100", +"F. c #28A200", +"G. c #28A300", +"H. c #29A400", +"I. c #279D00", +"J. c #080808", +"K. c #070808", +"L. c #080708", +"M. c #080807", +"N. c #070B06", +"O. c #081007", +"P. c #0A1306", +"Q. c #0B1807", +"R. c #0B1C06", +"S. c #0E2805", +"T. c #103604", +"U. c #134304", +"V. c #165103", +"W. c #195F02", +"X. c #1E7601", +"Y. c #0C0C0C", +"Z. c #0C0C0B", +"`. c #0B0C0C", +" + c #0B0C0B", +".+ c #0B0B0C", +"++ c #0C0B0C", +"@+ c #0B0B0B", +"#+ c #0A0A0A", +"$+ c #090909", +"%+ c #080909", +"&+ c #090F07", +"*+ c #134503", +"=+ c #1B6A01", +"-+ c #100F0F", +";+ c #101010", +">+ c #100F10", +",+ c #0F1010", +"'+ c #0F0F10", +")+ c #0F0F0F", +"!+ c #10100F", +"~+ c #0F100F", +"{+ c #0E0E0E", +"]+ c #0E0E0D", +"^+ c #0D0D0D", +"/+ c #0C1C06", +"(+ c #1E7701", +"_+ c #141413", +":+ c #131414", +"<+ c #141313", +"[+ c #141414", +"}+ c #131413", +"|+ c #141314", +"1+ c #131314", +"2+ c #131313", +"3+ c #131213", +"4+ c #121213", +"5+ c #121212", +"6+ c #121211", +"7+ c #111111", +"8+ c #111010", +"9+ c #0F0E0E", +"0+ c #0E0D0D", +"a+ c #0A0B0A", +"b+ c #090908", +"c+ c #0A1607", +"d+ c #144603", +"e+ c #207F01", +"f+ c #171718", +"g+ c #171817", +"h+ c #181718", +"i+ c #181817", +"j+ c #171818", +"k+ c #181717", +"l+ c #181818", +"m+ c #171717", +"n+ c #161616", +"o+ c #151515", +"p+ c #141415", +"q+ c #0E0F0E", +"r+ c #0C0D0D", +"s+ c #0F2C05", +"t+ c #1C6E01", +"u+ c #259900", +"v+ c #1B1C1C", +"w+ c #1C1B1B", +"x+ c #1B1B1C", +"y+ c #1C1B1C", +"z+ c #1C1C1B", +"A+ c #1B1C1B", +"B+ c #1C1C1C", +"C+ c #1B1B1B", +"D+ c #1B1A1B", +"E+ c #1B1B1A", +"F+ c #1A1A1A", +"G+ c #19191A", +"H+ c #191818", +"I+ c #161617", +"J+ c #101011", +"K+ c #0C0D0C", +"L+ c #0C1F06", +"M+ c #1C6F01", +"N+ c #1F201F", +"O+ c #20201F", +"P+ c #202020", +"Q+ c #201F1F", +"R+ c #1F1F1F", +"S+ c #201F20", +"T+ c #1F1F20", +"U+ c #1F2020", +"V+ c #1E1F1F", +"W+ c #1E1E1E", +"X+ c #1E1D1D", +"Y+ c #1D1C1D", +"Z+ c #1A191A", +"`+ c #191919", +" @ c #111011", +".@ c #0F3104", +"+@ c #218300", +"@@ c #232323", +"#@ c #232423", +"$@ c #232324", +"%@ c #232424", +"&@ c #242423", +"*@ c #242323", +"=@ c #242324", +"-@ c #242424", +";@ c #222223", +">@ c #232222", +",@ c #222222", +"'@ c #212122", +")@ c #222121", +"!@ c #202021", +"~@ c #1E1E1D", +"{@ c #1D1D1D", +"]@ c #181919", +"^@ c #090B07", +"/@ c #175502", +"(@ c #282727", +"_@ c #272827", +":@ c #272728", +"<@ c #272727", +"[@ c #282828", +"}@ c #282827", +"|@ c #272828", +"1@ c #282728", +"2@ c #262726", +"3@ c #262526", +"4@ c #262625", +"5@ c #252525", +"6@ c #232322", +"7@ c #212121", +"8@ c #1C1C1D", +"9@ c #1A1A19", +"0@ c #181918", +"a@ c #171617", +"b@ c #0D0C0D", +"c@ c #0A090A", +"d@ c #103005", +"e@ c #228C00", +"f@ c #2C2B2B", +"g@ c #2B2B2B", +"h@ c #2C2C2B", +"i@ c #2B2B2C", +"j@ c #2C2B2C", +"k@ c #2B2C2C", +"l@ c #2B2C2B", +"m@ c #2C2C2C", +"n@ c #2B2B2A", +"o@ c #2A2A2A", +"p@ c #2A2929", +"q@ c #292929", +"r@ c #292928", +"s@ c #252626", +"t@ c #0D0D0E", +"u@ c #0A1507", +"v@ c #207E00", +"w@ c #302F2F", +"x@ c #2F2F2F", +"y@ c #2F2F30", +"z@ c #2F3030", +"A@ c #2F302F", +"B@ c #2D2C2C", +"C@ c #2D2D2D", +"D@ c #2E2D2D", +"E@ c #2E2E2E", +"F@ c #2F2E2F", +"G@ c #2E2F2E", +"H@ c #2C2D2D", +"I@ c #2A292A", +"J@ c #1E1F1E", +"K@ c #141514", +"L@ c #111212", +"M@ c #0A1107", +"N@ c #333333", +"O@ c #343333", +"P@ c #333334", +"Q@ c #333433", +"R@ c #343433", +"S@ c #282829", +"T@ c #292829", +"U@ c #2A2B2A", +"V@ c #2C2D2C", +"W@ c #303030", +"X@ c #313132", +"Y@ c #313131", +"Z@ c #303130", +"`@ c #2E2F2F", +" # c #2E2E2D", +".# c #2A2A29", +"+# c #262626", +"@# c #252424", +"## c #1A1A1B", +"$# c #151615", +"%# c #090D07", +"&# c #1D6F01", +"*# c #373737", +"=# c #383838", +"-# c #272626", +";# c #292828", +"># c #343434", +",# c #353434", +"'# c #323232", +")# c #313232", +"!# c #313130", +"~# c #2D2D2E", +"{# c #202120", +"]# c #1F1E1E", +"^# c #1D1C1C", +"/# c #1A1919", +"(# c #0A0E08", +"_# c #1F7D01", +":# c #373837", +"<# c #3B3B3B", +"[# c #3C3B3B", +"}# c #3B3B3C", +"|# c #373738", +"1# c #2D2C2D", +"2# c #363736", +"3# c #363536", +"4# c #353435", +"5# c #313031", +"6# c #2D2E2E", +"7# c #2B2A2A", +"8# c #282928", +"9# c #242525", +"0# c #1D1E1D", +"a# c #0C0C0D", +"b# c #0C1708", +"c# c #3F3F3F", +"d# c #3F3E3F", +"e# c #3C3B3C", +"f# c #383737", +"g# c #343334", +"h# c #302F30", +"i# c #1D1E1E", +"j# c #212020", +"k# c #3B3A3B", +"l# c #3A3A3A", +"m# c #383839", +"n# c #373736", +"o# c #363635", +"p# c #353534", +"q# c #2E2E2F", +"r# c #222221", +"s# c #0E2506", +"t# c #3B3C3B", +"u# c #434343", +"v# c #424343", +"w# c #191A1A", +"x# c #1A1B1A", +"y# c #222322", +"z# c #3C3C3C", +"A# c #3C3D3C", +"B# c #3B3C3C", +"C# c #39393A", +"D# c #383837", +"E# c #353536", +"F# c #333332", +"G# c #2A2A2B", +"H# c #262525", +"I# c #161515", +"J# c #0D0E0E", +"K# c #165202", +"L# c #434344", +"M# c #141515", +"N# c #3F4040", +"O# c #3E3F3E", +"P# c #3D3D3D", +"Q# c #363636", +"R# c #303031", +"S# c #202121", +"T# c #1D1D1C", +"U# c #080C07", +"V# c #3E3F3F", +"W# c #403F3F", +"X# c #111110", +"Y# c #101110", +"Z# c #131312", +"`# c #151415", +" $ c #333434", +".$ c #414141", +"+$ c #404040", +"@$ c #3E3D3E", +"#$ c #393838", +"$$ c #343435", +"%$ c #262727", +"&$ c #1F1E1F", +"*$ c #0F0E0F", +"=$ c #0E2B05", +"-$ c #40403F", +";$ c #242425", +">$ c #383738", +",$ c #403F40", +"'$ c #3E3E3E", +")$ c #313030", +"!$ c #242524", +"~$ c #1D7301", +"{$ c #080707", +"]$ c #090808", +"^$ c #0A0A09", +"/$ c #0E0F0F", +"($ c #30302F", +"_$ c #373838", +":$ c #444444", +"<$ c #464545", +"[$ c #444443", +"}$ c #424242", +"|$ c #404140", +"1$ c #333232", +"2$ c #1A1B1B", +"3$ c #0E2A05", +"4$ c #37DD00", +"5$ c #36DB00", +"6$ c #36D800", +"7$ c #35D600", +"8$ c #34D300", +"9$ c #34D100", +"0$ c #33CF00", +"a$ c #33CD00", +"b$ c #32CB00", +"c$ c #32C900", +"d$ c #31C700", +"e$ c #31C600", +"f$ c #31C500", +"g$ c #31C400", +"h$ c #2EBA00", +"i$ c #2BAE00", +"j$ c #259401", +"k$ c #1E7002", +"l$ c #144604", +"m$ c #0C1C07", +"n$ c #0A0B0B", +"o$ c #3C3C3B", +"p$ c #3F3F40", +"q$ c #444343", +"r$ c #484847", +"s$ c #454646", +"t$ c #393938", +"u$ c #1C1D1D", +"v$ c #191819", +"w$ c #1E7801", +"x$ c #36D900", +"y$ c #33CE00", +"z$ c #33CC00", +"A$ c #30C200", +"B$ c #30C100", +"C$ c #30C000", +"D$ c #30C300", +"E$ c #32C800", +"F$ c #29A201", +"G$ c #165004", +"H$ c #0A0D07", +"I$ c #0B0A0A", +"J$ c #484848", +"K$ c #424141", +"L$ c #3D3E3D", +"M$ c #3A3A39", +"N$ c #134203", +"O$ c #34D000", +"P$ c #2FBF00", +"Q$ c #2FBE00", +"R$ c #2FBD00", +"S$ c #2FBC00", +"T$ c #2EBB00", +"U$ c #175203", +"V$ c #444344", +"W$ c #484747", +"X$ c #0A1207", +"Y$ c #35D700", +"Z$ c #35D400", +"`$ c #32CA00", +" % c #2EB900", +".% c #2EB800", +"+% c #2DB700", +"@% c #248D01", +"#% c #0B1708", +"$% c #434443", +"%% c #454444", +"&% c #404041", +"*% c #383939", +"=% c #2D2D2C", +"-% c #252425", +";% c #111112", +">% c #09090A", +",% c #1C6C01", +"'% c #35D500", +")% c #2DB500", +"!% c #2DB400", +"~% c #2CB300", +"{% c #2CB200", +"]% c #2DB600", +"^% c #0D1E07", +"/% c #151514", +"(% c #3D3D3E", +"_% c #3A3939", +":% c #323231", +"<% c #0F0F0E", +"[% c #0A0A0B", +"}% c #134303", +"|% c #34D200", +"1% c #2CB100", +"2% c #2BAF00", +"3% c #2BAD00", +"4% c #2CB000", +"5% c #2BAC00", +"6% c #0A1007", +"7% c #0D0D0C", +"8% c #191918", +"9% c #3F403F", +"0% c #434243", +"a% c #3A3B3A", +"b% c #363637", +"c% c #2B2A2B", +"d% c #0C2005", +"e% c #29A500", +"f% c #2AAB00", +"g% c #2AAA00", +"h% c #2AA900", +"i% c #218102", +"j% c #090A0A", +"k% c #353535", +"l% c #3D3C3C", +"m% c #414140", +"n% c #2AA800", +"o% c #29A700", +"p% c #29A600", +"q% c #32CE00", +"r% c #113205", +"s% c #414041", +"t% c #343535", +"u% c #212021", +"v% c #259101", +"w% c #414040", +"x% c #393939", +"y% c #29292A", +"z% c #151516", +"A% c #175A02", +"B% c #0C0B0B", +"C% c #32CC00", +"D% c #0E0E0F", +"E% c #144703", +"F% c #185304", +"G% c #131212", +"H% c #272726", +"I% c #1F1F1E", +"J% c #121312", +"K% c #103204", +"L% c #218202", +"M% c #0E0D0E", +"N% c #282929", +"O% c #3D3D3C", +"P% c #3F3E3E", +"Q% c #373637", +"R% c #232223", +"S% c #0D2105", +"T% c #29A301", +"U% c #181819", +"V% c #1C1D1C", +"W% c #252524", +"X% c #3F3F3E", +"Y% c #3B3A3A", +"Z% c #363737", +"`% c #0B1B06", +" & c #091307", +".& c #080E07", +"+& c #32CD00", +"@& c #080907", +"#& c #30C600", +"$& c #080E06", +"%& c #3A3A3B", +"&& c #091507", +"*& c #29A101", +"=& c #212120", +"-& c #070807", +";& c #217E02", +">& c #121111", +",& c #383938", +"'& c #3D3C3D", +")& c #161716", +"!& c #0C2204", +"~& c #165003", +"{& c #171616", +"]& c #2E2D2E", +"^& c #363535", +"/& c #393A3A", +"(& c #3E3E3D", +"_& c #323132", +":& c #103304", +"<& c #0B1607", +"[& c #252526", +"}& c #248C01", +"|& c #111211", +"1& c #343534", +"2& c #3C3C3D", +"3& c #303131", +"4& c #185B02", +"5& c #102E06", +"6& c #1C7001", +"7& c #207B02", +"8& c #151616", +"9& c #239000", +"0& c #0A0F08", +"a& c #0D0C0C", +"b& c #414241", +"c& c #0B2004", +"d& c #0C1A07", +"e& c #151414", +"f& c #3C3D3D", +"g& c #134302", +"h& c #238801", +"i& c #0A1508", +"j& c #434444", +"k& c #36DA00", +"l& c #174F04", +"m& c #28A101", +"n& c #174E03", +"o& c #474847", +"p& c #124103", +"q& c #070708", +"r& c #37DF00", +"s& c #37DC00", +"t& c #29A300", +"u& c #259601", +"v& c #1D7102", +"w& c #144804", +"x& c #0B1C07", +"y& c #080908", +"z& c #474748", +"A& c #090809", +"B& c #080809", +"C& c #0D2A03", +"D& c #121313", +"E& c #393839", +"F& c #1D7401", +"G& c #424241", +"H& c #0D2903", +"I& c #434342", +"J& c #3E3D3D", +"K& c #080B07", +"L& c #474747", +"M& c #222122", +"N& c #155101", +"O& c #424342", +"P& c #474647", +"Q& c #393A39", +"R& c #0D2506", +"S& c #4B4B4B", +"T& c #0E1A09", +"U& c #4B4A4B", +"V& c #252625", +"W& c #0C110B", +"X& c #1F7C01", +"Y& c #4A4B4A", +"Z& c #4E4F4E", +"`& c #292A2A", +" * c #0C100B", +".* c #1D6E02", +"+* c #4E4E4F", +"@* c #4F4F4F", +"#* c #2F2F2E", +"$* c #0C130B", +"%* c #1E7502", +"&* c #4C4B4B", +"** c #2A2B2B", +"=* c #0E180B", +"-* c #207D01", +";* c #464747", +">* c #4B4A4A", +",* c #4F4F4E", +"'* c #102E05", +")* c #212221", +"!* c #090A07", +"~* c #175303", +"{* c #102F05", +"]* c #218100", +"^* c #474746", +"/* c #0A0909", +"(* c #0C1D06", +"_* c #121112", +":* c #0F2B06", +"<* c #1B6D01", +"[* c #0A1407", +"}* c #144504", +"|* c #0D0E0D", +"1* c #1D7501", +"2* c #0B0B0A", +"3* c #090E07", +"4* c #0E2606", +"5* c #134403", +"6* c #1B6801", +"7* c #080A07", +"8* c #091207", +"9* c #0A1706", +"0* c #0E2705", +"a* c #113504", +"b* c #134204", +"c* c #1E7501", +"d* c #269E00", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + @ @ @ @ @ @ @ @ @ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + @ @ @ @ @ @ # # # # # # # # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ # # # # # # # # # # @ @ @ @ @ @ @ + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + @ @ @ @ # # # # $ $ $ $ $ % % % % % % % % & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & % % % % % % % % % $ $ $ $ $ $ $ # # # # # @ @ @ @ @ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # # # $ $ $ % % % % % & & & & & & & * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * & & & & & & & & % % % % % % $ $ $ $ # # # # # @ @ @ @ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # $ $ $ % % % & & & * * * * * = = = = = = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = = = = = = = = * * * * * & & & & % % % % $ $ $ # # # # @ @ @ @ + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ $ % % & & * * * = = = - - - - ; ; ; ; ; ; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ; ; ; ; ; ; ; ; - - - - - = = = * * * & & & & % % % $ $ $ # # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ % % & & * * = = - - ; ; > > > , , , ' ' ' ' ' ' ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ' ' ' ' ' ' ' ' , , , , , > > > ; ; ; - - - = = * * * & & % % % $ $ # # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ # # $ $ % % & * * = = - ; ; > > , ' ' ) ) ) ! ! ! ~ ~ ~ ~ ~ ~ { { { { { { { { { { { { { { { { { { { { { { { { { { ~ ~ ~ ~ ~ ~ ~ ~ ! ! ! ! ) ) ) ' ' ' , , > > > ; ; - - = = * * & & % % $ $ $ # # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # # $ $ % & & * = - - ; > , , ' ) ) ! ! ~ ~ { { ] ] ] ^ ^ ^ ^ ^ ^ / / / / / / / / / / / / / / / / / / / / / / / / / ^ ^ ^ ^ ^ ^ ^ ] ] ] ] { { { { ~ ~ ! ! ) ) ' ' , , > > ; ; - = = * * & & % % $ $ # # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # $ $ % & & * = - ; ; > , ' ) ! ~ ~ { ] ^ ^ / / ( ( _ _ _ : : : : : : < < < < < < < < < < < < < < < < < < < < < < < : : : : : : : _ _ _ _ ( ( ( / / ^ ^ ] ] { { ~ ~ ! ) ) ' , , > ; ; - = = * & & % % $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # # $ $ % & * * = - ; > , ' ) ! ~ { ] ^ / ( _ _ : < < [ [ } } } | | | | | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | | | | | | } } } } [ [ [ < < : : _ _ ( ( / ^ ^ ] { ~ ~ ! ) ' , , > ; - - = * * & % % $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ $ % & * = - ; > , ' ! ~ { ] ^ ( _ : < [ } } | 1 2 2 3 3 4 4 4 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 5 5 5 5 5 5 5 4 4 4 3 3 3 2 2 1 1 | | } } [ < : : _ ( / ^ ^ ] { ~ ! ) ' , > > ; - = * * & % % $ $ # # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - ; , ' ) ~ { ] / ( _ < [ } | 2 3 4 5 5 6 7 7 8 8 9 9 0 0 0 0 0 a a a a a a a a a a a a a a a a a a a a 0 0 0 0 0 0 9 9 9 9 8 8 8 7 7 6 6 5 4 4 3 2 1 1 | } [ < : _ ( / ^ ] { ~ ! ) ' , > ; - = * * & % % $ # # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - > , ' ! ~ ] ^ ( _ < } | 1 3 4 5 7 8 9 0 a a b c c d d d e e e e e f f f f f f f f f f f f f f f f f f f f e e e e e e d d d c c c b b a 0 0 9 8 8 7 6 5 4 3 2 1 | } [ : _ ( / ^ { ~ ! ) ' , > ; - = * & & % $ $ # # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = ; > , ) ~ { ^ ( : < } 1 3 4 6 8 9 a b c e f g g h i j j k k k l l l l l m m m m m m m m m m m m m m m m l l l l l l l k k k j j j i i h h g f e e d c b a 0 9 8 7 5 4 3 2 | } [ : _ ( ^ ] { ! ) ' , > ; - = * & % % $ # # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ % & * = ; > ' ) ~ ] / ( : [ | 2 4 6 8 0 b d e g h j k l m n o o p p q q r r r r r s s s s s s s s s s s s s s s s s r r r r r r q q q q p p o o n m m l k j i i g f e d c a 0 9 7 6 4 3 1 | [ < _ ( ^ ] { ! ) ' , ; - = * & & % $ $ # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ % & * = - > , ) ~ ] / _ < } 2 4 6 8 a c e g i k l n o q r s t u v w w x x x y y y y z z z z z z z z z z z z z z z z z y y y y y y x x x w w v v u u t s s r q p o n l k j h g f d b a 9 8 6 4 2 1 } < : ( / ] { ! ) , > ; - = * & % $ $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = - > , ) ~ ] / : [ | 3 5 8 a c f h j m o q s u v x y z A B C D E E F F G G G G G H H H H H H H H H H H H H H G G G G G G G F F F E E D D C C B A z z y x w u t s q p n m k j h f d b a 9 7 5 3 1 } [ : ( ^ ] ~ ! ' , > - = * & % % $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - ; , ) ~ ] / : [ 1 4 6 9 b e h j m p r u w y A C E F H I J K L L M N N N O O O O O O O P P P P O O O O O O O O O O O N N N N M M M L L K K J I H H G F E C B A z x w u s q p n l j h f d b 0 7 5 3 1 } < _ ( ^ { ! ) , > ; - = * & % $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = ; , ' ~ ] / : [ 1 4 7 0 c f i l o r u x A C E H J L M O P Q R S T U U U U V V V V V W W W W W W W W W W W W W V V V V V V U U U U U U T T S R Q Q P O N L K J H G E D B z x v t r p n k i g d b 0 8 5 3 1 } < _ / ] ~ ! ' , ; - = * & % $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - > ' ! { / _ [ 1 4 7 0 d g j n q t x A D G I L N P R T U V X Y Z ` . .....+.+.+.+.+.@.@.@.@.@.@.@.@.@.@.@.@.@.@.+.+.+.+.+.+....... . .` ` Z Y X X W V U T S Q P N M K I G E C A x v t q o l j g e b 0 7 5 2 | [ : ( ^ { ! ) , > - = * & % $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * - ; , ) ~ ^ ( < | 3 7 0 d g k o s v z C G J M P S U W Y ` ..@.#.$.%.&.*.=.=.-.-.;.;.;.;.>.>.>.>.>.>.>.>.>.>.>.>.>.;.;.;.;.;.;.-.-.-.=.=.*.*.&.&.%.$.#.@.+... .Z Y W U U S Q O L J H E C z x u r o m j g d b 9 6 4 1 } < _ ^ ] ~ ) , > - = * & % $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; > ' ~ ] ( : | 3 6 0 d g k o s x B E I M Q T V Y .@.$.&.=.;.>.,.'.).!.~.~.{.{.].].].].].].^.^.^.^.^.^.].].].].].].].].].{.{.{.{.~.~.~.!.).).'.,.,./.>.-.=.*.%.$.@... .Z X U T R O L J G D A x u r o l i g d a 8 5 3 | [ _ / ] ~ ) , > - = * & % $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + + @ # $ % & * - ; , ) { ^ _ [ 2 5 9 c g k o t x B G K O S V Z ..#.&.-./.'.!.{.^.(._.:.<.<.[.}.}.}.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.|.}.}.}.}.[.[.[.<.<.:.:.1._.(.^.].{.~.).'./.>.-.*.%.#...` X V T Q N K H E B y u r o l h e b 9 6 4 1 [ : ( ] ~ ) ' > - = * & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = - > ' ~ ] ( < | 4 8 b f j o s x C G L Q U X .#.*.>.'.~.^._.:.[.|.2.3.4.5.6.7.7.8.8.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.8.8.8.8.7.7.7.6.6.5.5.4.3.2.0.|.}.[.:.1.(.].~.).,.>.-.&.#.+.` X U R O L H E B x u q n j g d 0 7 4 2 } : ( ^ ~ ) ' > - = * & % $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # # $ & * = ; , ) { / : } 2 6 0 e i n s w B G L Q U Z @.&.;.'.{.(.:.}.2.4.7.8.a.b.c.d.e.f.f.g.g.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.h.g.g.g.g.f.f.f.e.e.d.d.c.b.i.a.9.8.7.5.4.2.|.[.:._.].~.'./.-.&.#. .Y V S O L H D A w s o l h e a 8 5 2 } < ( ^ { ) ' > - = * & % $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ' ! ] ( < 1 4 9 c g l q v A G L Q V ` #.=./.~.(.<.0.4.7.a.c.e.g.j.k.l.m.n.n.o.p.p.p.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.p.p.p.p.p.p.o.o.o.n.n.m.m.r.l.l.k.j.h.g.e.d.b.i.9.7.5.2.|.<.1.^.~.'.>.*.$...Y V S O K G C y u q m i f b 9 6 2 } < ( ^ ~ ) , > - = & % $ $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = ; , ) ~ ^ _ } 2 6 a e j o u z E K Q U ` #.-.'.].:.|.4.8.b.e.h.l.m.o.q.s.t.u.v.w.x.x.y.y.z.z.z.z.z.z.z.z.z.z.z.z.z.z.y.y.y.y.y.y.x.x.x.w.w.w.v.v.u.t.s.s.A.q.o.n.m.l.j.g.f.c.i.9.6.3.|.<._.].)./.=.$...Y U R M I E A v r n j f c 9 6 3 | < ( ] ~ ) , ; - * & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! { / < | 4 8 c h m r x C I O U Z #.-.'.^.<.2.6.i.e.j.r.o.A.t.w.y.z.B.C.D.E.F.F.G.G.H.H.H.H.H.H.H.H.H.H.H.H.H.H.H.G.G.G.G.G.F.F.F.F.E.E.D.D.C.C.B.I.z.y.x.v.u.t.A.p.n.r.k.g.e.b.9.6.2.}.1.^.!./.*.#. .X T P K G B x s o k g c 9 6 3 } < ( ] ~ ) , ; - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # # % & * - > ' ! ] ( [ 2 6 0 e j o u A G M S X +.*.'.].J.J.J.J.K.J.J.J.J.J.J.J.J.J.J.K.J.L.J.J.J.J.K.M.J.J.J.K.L.J.J.L.J.K.J.M.K.L.J.J.L.J.J.K.J.J.L.N.O.P.Q.R.S.T.U.V.W.X.l.B.z.x.v.t.A.o.m.k.g.d.i.7.3.}.1.].).>.&.+.Z U Q M H C y t p k g c 9 6 2 } : / ] ! ' > ; = * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # $ % & = - > ) ~ ^ _ } 3 7 b g l r x D J P V .&./.].<.J.Y.Z.Y.Z.Y.Y.`.`.`.Y.`.Y.Y.Y.Y. +`.Y.Y.Y.Y.`.Y.Y.`..+Y.++Y.Z.++`.`.Y.++++Y.Z.Y. +Y.`.Y.Y.Y.Y.++Y.++++@+@+@+@+#+#+$+%+&+S.*+=+l.z.x.u.A.o.r.j.e.i.7.3.}.1.{.,.-.$. .W S N I D y t p k g c 9 5 2 } : / { ! ' > - = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + + @ # $ % & = ; , ) { / < | 4 9 d i o t z G M T Z #.;.~.:.2.J.`.-+;+>+,+'+)+;+>+;+>+,+;+-+;+;+,+!+;+;+,+;+;+,+;+,+,+>+>+;+~+!+>+!+;+;+;+;+,+;+;+~+'+>+;+;+;+-+)+)+'+)+)+{+]+]+^+Y.Y.@+#+$+%+/+*+(+x.w.t.q.m.j.e.i.7.2.[.(.!.>.&...X T O J D y u p k g c 9 5 1 [ _ ^ { ) , ; - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! ] ( < 1 6 0 e k q w C J P V ..*.'.(.|.7.J.Z.;+_+:+<+[+}+|+:+}+}+[+_+<+:+_+<+:+[+:+}+|+[+[+_+:+[+[+|+|+:+|+|+[+[+:+|+|+_+[+[+:+_+|+[+_+_+1+<+<+2+2+3+4+5+6+7+8+'+)+9+0+Y.@+a+b+c+d+e+x.u.q.m.j.d.a.5.|.1.{./.*.@.Y U O J D y t o k f b 8 4 1 < ( ] ~ ) , ; = * % $ # # @ + + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ! ] _ [ 2 7 b g l r y E L S Y #.;.{.<.4.i.L.Y.;+[+f+g+h+h+i+i+j+h+i+k+h+h+f+k+j+l+g+i+h+k+g+h+h+g+l+j+l+l+j+m+k+f+h+l+f+l+l+i+h+l+l+h+g+m+i+f+m+f+m+m+n+n+o+o+p+:+3+5+7+;+)+q+r+Y.#+b+s+t+u+u.p.r.g.b.7.2.<.].'.=.@.Z U O J D y t o j e a 7 3 | : / ] ! ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # # $ & * - > ' ~ ^ _ } 3 8 c h n t A H O U .*.'._.0.8.e.J.`.;+[+l+v+w+x+x+y+z+x+A+z+B+y+B+C+v+C+w+x+y+C+z+y+B+v+A+z+C+w+v+B+z+y+C+z+z+v+w+A+v+v+x+B+C+z+x+w+A+C+D+E+F+F+G+H+l+f+I+n+o+[+2+5+J+;+{+K+@+$+L+M+x.s.n.j.d.9.4.[.^.'.=.#.Z U O I D x s n i d 0 6 2 } _ ^ { ) , ; = * & $ $ # @ + + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ) { / : | 4 9 d j p v C I Q W @.-.~.:.4.i.j.M.Y.;+[+k+z+N+O+P+O+P+Q+R+P+Q+O+S+S+N+N+O+O+T+U+N+N+Q+N+S+U+S+U+S+R+T+Q+R+Q+P+S+S+U+Q+N+R+N+U+R+U+R+R+R+V+W+W+W+X+Y+B+v+C+Z+`+l+m+n+o+|+4+ @)+^+++$+.@+@v.q.l.f.a.5.}.(.).-.#.Y T N H C w r m h c 9 5 1 < ( ] ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ) { / < 1 5 0 e k q w D K S Y $./.].}.7.e.r.K.++-+[+k+C+O+@@#@$@%@$@&@$@%@#@*@=@@@*@@@&@*@*@=@=@*@@@&@#@*@@@$@=@*@*@%@=@$@=@%@#@-@%@*@&@@@#@@@*@@@@@;@>@,@'@)@!@P+R+V+~@{@B+x+F+]@l+n+o+5+7+;+^+@+^@/@u.A.m.g.i.5.}.(.).=.@.Y S M G A v p k f b 7 3 } : / { ! , ; - * & $ $ # @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! { ( < 1 6 a f l r y F M T ` &.'._.2.a.h.o.J.Y.>+_+l+z+U+#@(@(@_@:@<@(@<@:@<@[@:@<@}@_@<@}@}@|@[@:@|@<@<@<@(@|@_@_@1@}@1@:@<@(@(@_@:@1@[@<@(@<@<@<@2@2@3@4@5@-@-@@@6@,@7@U+R+~@8@B+9@0@a@o+_+7+)+b@c@d@e@s.n.h.b.5.}.(.'.*.+.W R L F z t o i d 0 6 2 [ _ ^ ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! ] ( [ 2 7 b g m s z G N U ..=.!.:.4.c.k.A.J.++>+[+f+C+U+%@<@f@g@f@g@h@g@f@f@g@i@f@g@j@k@i@g@f@g@g@g@g@i@g@g@k@f@i@g@g@l@m@l@l@f@g@g@l@g@j@g@g@n@g@g@o@o@p@q@r@[@_@2@s@5@&@@@,@P+P+W+8@F+`+l+o+4+ @t@`.u@v@t.n.h.i.5.[.^.,.&. .V P J D x r m g c 8 4 | : / { ! , ; = * & $ # # @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] ( [ 3 7 b h n t A H P W @.;.{.[.7.e.m.u.J.Y.,+[+k+B+N+&@_@i@w@x@y@x@x@x@w@x@w@z@A@w@z@A@y@w@y@x@l@l@l@l@f@f@h@m@g@g@l@l@g@g@f@i@h@m@B@C@D@E@F@x@G@E@E@C@C@H@i@g@o@I@q@[@2@s@5@=@,@!@J@{@A+`+I+K@L@;+b@M@X.t.n.g.i.4.<.{.>.%.` U N H B v p j e a 6 2 [ _ ^ ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] _ } 3 8 c i o u B I Q X #.>.^.|.8.g.o.w.J.Y.!+}+g+x+U+$@<@j@x@N@O@N@N@O@P@N@Q@R@N@N@Q@R@O@N@A@f@<@_@<@[@_@<@(@:@:@[@_@|@(@}@<@[@[@[@S@T@q@U@g@V@E@W@X@X@Y@Z@W@x@`@ #B@l@n@.#T@[@+#@#@@7@P+{@##l+$#1+J+Y.%#&#t.m.g.a.3.:.~.-.@.X S L E y s m h c 8 4 | : / { ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + @ @ # $ % * - > ' ~ ^ _ } 3 8 c i o v C J R Y $.,.(.2.a.j.q.y.J.Y.;+[+k+A+N+@@|@i@y@N@*#=#*#*#*#*#*#*#*#*#*#*#P@z@g@[@&@=@*@@@*@@@*@#@$@$@@@=@@@#@#@#@-@-@-@5@5@-#<@;#o@h@E@Y@>#,#>#N@'#)#!#y@`@~#B@k@I@[@2@5@*@{#]#^#/#m+[+7+^+(#_#s.r.e.8.0.(.'.*...V P I C v p k f a 6 2 [ _ ] ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ _ } 4 9 d j p w D K S Z &.'.1.3.b.k.s.I.K.Y.-+<+k+B+U+$@|@h@A@N@:#<#[#<#}#<#<#<#<#<#|#Q@x@f@<@&@Q+P+N+Q+O+T+Q+O+N+O+S+S+S+S+U+T+P+P+P+7@'@,@$@5@+#[@I@1#W@>#|#*#2#3#4#P@N@'#5#z@6#m@7#8#|@9#;@P+0#B+l+[+J+a#b#g.q.k.c.6.[.]./.$.Z T M F z s n h c 8 4 | : / { ) , ; = & % $ # @ @ + + . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ : | 4 9 d j q w D L T ` &.).:.4.c.r.t.B.J.`.-+[+h+C+S+*@|@l@x@N@*#<#c#c#c#c#d#c#e#f#g#h#k@:@*@S+v+w+B+v+z+A+A+A+v+C+z+y+x+y+A+z+B+8@Y+8@i#]#Q+j#,@-@+#q@m@W@>#=#k#l#m#f#n#o#p#P@Y@W@q#m@h@q@+#-@r#Q+z+j+:+!+Y.s#s.o.h.i.3.:.!.=.+.W P I C v p k e 0 6 1 < ( ] ! ' ; - * % $ # @ @ + + . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 4 9 e k q x E M U .*.!.<.6.d.m.u.D.J.Y.;+|+j+w+P+&@1@g@w@P@*#t#c#u#u#v#c#t#*#O@y@k@<@*@U+B+l+f+j+i+i+l+g+i+i+f+g+g+i+k+h+l+l+l+]@`+w#x#w+^#W+P+y#5@[@m@W@>#=#z#A#B#<#C#=#D#E#>#F#Z@A@V@G#[@H#,@i#F+I#6+J##+K#t.m.e.8.|.^.,.%.Z T M F y s m g b 7 3 } _ ^ ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 5 0 e k q x E M U .=.~.<.6.e.n.v.D.J.Y.>+[+j+z+O+-@:@k@w@R@*#<#c#u#L#c#[#|#R@y@k@(@$@S+w+l+<+_+[+<+[+|+2+:+[+1+}+[+[+[+[+}+[+p+K@M#I#I+m+]@F+B+]#7@-@[@m@W@Q@D#z#N#O#P#z#<#l#=#Q#,#Q@R#E@m@S@-@S#T#H+K@;+b@U#9.q.k.b.4.:.~.-.+.V P I B v o j d 9 5 | < / { ) , ; = & % $ # @ + + + . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 e k r y F N U ..-.~.[.7.f.o.w.F.M.Y.;+[+j+z+T+-@_@j@A@N@:#<#V#u#W#t#*#N@x@j@1@=@R+B+l+[+>+,+;+>+;+;+,+~+!+;+;+;+;+;+;+;+;+J+X#Y#L@Z#2+`#I+l+x#{@!@-@[@m@W@ $D#e#N#.$+$c#@$e#l##$*#$$'#x@G#%$,@&$C+a@2+*$@+=$u.n.f.8.|.^./.$.Z S L E x r l f a 6 2 [ ( ] ! ' ; = * % $ # @ @ + + . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 f l r y F N U +.-.{.}.8.g.o.x.F.J.Y.;+1+k+x+N+@@1@g@w@Q@f#<#c#-$<#*# $w@m@[@=@R+z+j+[+;+`.Y.Y.`.`.Y.Y.++`.Z.Y.Z.Y.@+Y.Y.Y.b@a#^+J#*$-+7+4+[+n+`+B+P+;$[@m@h#>#>$e#,$u#u#.$c#'$z#<##$$$)$H@8#!$7@Y+`+o+7+^+$+~$A.k.b.4.:.!.=...U O H A t n h c 8 3 } _ ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / : 1 5 0 f l r y G N V +.;.{.}.8.g.p.y.G.J.Y.;+[+h+z+O+@@<@g@w@N@*#<#c#<#*#g#w@m@|@%@Q+B+i+|+>+Y.M.J.M.L.K.J.J.J.J.J.J.J.J.J.{$J.J.J.]$$+^$#+.+a#/$;+5+o+l+B+j#-@[@m@($>#_$B#N#:$<$[$}$|$'$l#n#1$E@n@2@,@J@2$m+2+q+@+3$u.n.f.8.}.].>.#.X R J C v p j d 9 5 | : / { ) , - = & % $ # @ + + . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l r y G O V +.;.].}.8.g.p.y.G.K..+;+[+k+v+N+-@}@f@x@N@f#<#<#*#O@x@g@_@%@U+B+l+[+;+++J.4$5$6$7$8$9$0$a$b$c$d$e$f$g$g$g$h$i$F.j$k$l$m$$+n$Y./$7+[+H+B+!@-@[@m@W@g#_$o$p$q$r$s$:$+$z#t$>#W@H@8#-@P+u$v$M#7+r+%+w$q.j.i.3._.'.&.` T M E x r l f a 6 1 < ( ] ! , ; = & % $ # @ + + . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s z G O V +.;.].|.9.h.q.y.H.J.++;+:+i+C+T+=@_@g@W@P@*#<#}#|#g#x@h@:@@@Q+A+h+[+>+Y.M.5$x$7$8$9$y$z$c$d$f$g$A$B$C$C$C$C$B$A$D$g$e$E$F$G$H$I$^+J+[+l+B+P+-@[@f@z@P@f#o$-$[$J$<$K$L$M$o#'#E@o@+#,@W+##I+5+{+I$N$t.r.d.6.<.~.-...V O G z t m h b 7 2 [ _ ] ! ' ; = * % $ # @ @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s z G O V +.;.].|.9.h.q.y.H.{$Z.;+:+l+C+T+$@_@h@A@N@*#<#<#f#R@W@k@|@-@R+z+i+[+,+Y.J.x$7$8$O$a$b$E$f$D$B$P$Q$R$S$T$T$S$S$R$Q$C$A$g$e$c$S$U$$+^+J+[+0@B+{#-@}@h@W@O@|#t#p$V$W$q$p$B#D#O@($g@|@-@S+v+i+[+;+`.X$A.o.g.9.|.^.>.#.X Q J B v o i c 8 4 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 a f l s z G O V @.;.].|.9.h.q.z.H.J.`.,+_+l+x+T+#@:@f@A@P@|#<#<#*#Q@y@j@(@%@T+B+l+|+;+Y.M.Y$Z$9$y$`$d$g$A$P$R$T$ %.%+%+%+%+%.% %h$S$Q$C$D$f$E$b$@%#%^+;+K@H+B+P+-@[@m@W@>#|#t#,$$%%%&%P#*%4#Y@=%q@-%!@{@`+o+;%0+>%,%A.k.i.3._.'.%.Z S L D w q j e 9 5 | : / { ) > - * & % # # @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s z G O V @.>.].|.9.h.q.z.H.J.Y.~+:+i+w+S+-@:@j@h#N@*#<#[#:#P@z@h@_@*@U+v+h+[+,+Y.L.'%9$y$b$d$g$B$Q$T$ %+%)%!%~%{%{%{%~%!%]%+%h$S$P$A$f$E$b${%^%^+;+/%H+B+P+-@}@h@W@ $D#[#+$q$K$(%_%3#:%6#o@+#,@W+F+n+4+<%[%}%t.r.d.5.:.!.*. .U M F y r l f 0 6 1 < / { ) , ; = & % $ # @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s z G O V @.>.].|.9.h.q.z.H.{$Y.!+[+l+A+N+#@:@k@w@N@*#<#o$f# $h#f@|@*@R+B+h+[+'+Z.J.|%0$b$E$g$B$R$h$+%)%{%1%2%i$i$3%i$2%4%1%~%]%.%T$Q$A$f$c$z$5%6%7%7+/%8%8@P+-@[@m@W@g#=#o$9%0%V#a%b%N@`@c%<@@@R+C+m+2+)+.+d%w.n.f.7.}.{.-.+.V O G z s m g a 6 2 [ ( ] ! , ; = & % $ # @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s z H O W @.>.^.0.a.j.A.I.e%L.++!+:+j+x+O+$@1@i@A@N@*#<#<#*#P@y@f@(@$@Q+B+l+[+;+@+J.9$a$c$f$B$Q$h$+%!%1%2%3%f%g%h%h%h%g%f%3%2%{%!%+%T$Q$A$e$c$a$i%j%{+7+$#`+{@7@9#q@C@!#k%t$l%m%9%z#D# $y@h@|@-@P+B+l+[+8+Y.M.m.p.h.9.|.^.>.#.W P I A u n h b 7 3 [ ( ] ! , ; = * % $ # @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s z H O W @.>.^.0.a.j.A.I.e%J.Y.,+<+j+y+Q+@@:@g@($N@|#<#<#>$P@x@k@<@@@P+B+l+|+~+Y.J.y$`$e$A$Q$h$+%~%4%3%g%n%n%o%p%p%p%o%n%h%f%i$1%!%+%T$P$D$d$b$q%r%Y.;+2+g+v+O+-@|@j@w@Q@*#[#c#s%l%#$t%!#H@q@9#u%{@`+o+7+^+$+M+A.k.i.2.(.,.$.Y R J C v o i c 8 3 } _ ^ ! ' ; = * % $ # @ @ + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s z H O W @.>.^.0.a.j.A.I.e%J.Y.>+:+h+z+T+#@<@l@A@N@:#<#[#|#N@y@g@_@@@N+v+l+|+;+Z.J.z$E$g$C$S$+%!%4%5%h%n%p%H.G.F.F.F.G.H.p%n%g%3%1%!%.%S$C$f$c$a$v%>%^+7+o+`+{@u%-@;#=%5#>#=#z#w%P#x%k%Y@C@y%s@7@~@/#z%L@0+c@A%t.l.b.4.1.'.&.Z S K D w p j d 9 4 } _ ^ ~ ' > - * % $ # @ @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Z.,+:+f+x+T+@@<@i@A@N@*#[#[#:# $h#k@:@&@U+v+l+_+,+B%J.`$e$A$R$ %)%1%3%h%o%H.F.D.C.B.B.B.C.E.G.e%n%g%i${%]%h$Q$A$d$b$C%Q.Y.!+}+l+v+T+&@1@k@w@ $*#<#c#P#M$E#'#E@o@3@,@W+F+n+5+D%#+E%u.m.d.5.:.).*.` T L E w q j e 9 4 | : ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.++;+[+j+C+N+@@:@i@x@ $*#<#<#>$Q@x@f@}@@@O+y+i+[+'+Y.J.c$f$C$T$+%~%i$g%n%e%F.C.I.z.y.y.y.z.B.D.F.e%n%f%2%~%.%S$B$f$`$y$F%a+9+G%n+F+W+,@3@.#D@:%3#l#(%'$l#Q#1$q#o@H%,@I%x#a@J%)+@+K%v.n.e.6.<.!.=. .U M E x q k e 0 5 | : / ~ ) > - * & $ # @ @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.;+:+i+z+Q+-@}@g@x@O@*#<#}#*#R@x@h@[@*@S+B+l+|+,+Y.K.d$D$Q$ %)%4%5%n%e%F.C.z.y.w.v.v.w.x.y.I.D.G.p%h%3%1%]%h$P$g$E$a$L%j%M%7+$#`+X+7@5@N%C@Y@p#t$O%P%a%Q%N@q#g@2@R%R+2$m+2+~+B%S%w.o.f.7.[.~.-...U N F y r k f 0 5 1 : / { ) > - * & $ # @ @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.,+[+k+w+Q+@@(@f@w@Q@*#<#[#|#P@x@m@_@$@S+B+l+[+,+Y.J.e$A$R$.%~%2%g%o%G.D.I.x.w.u.t.t.t.u.w.y.B.E.H.n%f%4%!% %Q$A$d$z$T%$+^+8+[+U%V%P+W%[@B@W@>#=#z#X%Y%Z%N@x@g@<@@@R+C+f+2+)+++`%x.o.g.8.}.{.-.+.U N G y r l f 0 5 1 < / { ) > - * & % # # @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%L.`.)+:+i+x+U+#@:@f@x@N@*#<#<#*#N@z@h@1@=@P+w+m+[+!+Y.J.e$B$S$+%{%i$h%p%F.C.z.w.u.t.s.s.s.t.u.x.z.C.G.o%g%i$~%.%R$A$e$b$T$b+Y.;+[+l+B+P+-@|@j@w@P@f#[#c#k#*#N@A@g@<@$@R+B+i+1+!+++ &y.p.g.8.}.{.;.+.V O G z s l f a 6 1 < / { ) , - * & % # # @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.>+[+l+y+U+@@_@i@A@N@*#<#<#*#>#x@g@|@=@P+v+i+[+,+Y.M.f$C$T$]%{%3%n%e%E.B.y.v.t.s.A.q.A.s.t.w.y.B.F.p%h%i${%+%S$B$e$`$d$J.Y.;+<+j+B+P+#@:@m@w@P@*#[#c#}#|#P@x@l@:@#@O+C+f+[+'+Y..&y.p.g.9.|.].;.+.V O G z s l f a 6 1 < / { ) , - = & % # # @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.++'+_+j+w+Q+#@<@h@y@Q@*#<#t#_$O@x@f@(@#@U+w+i+[+;+ +J.f$C$T$]%1%3%n%e%E.I.x.v.t.A.A.q.A.s.t.v.y.B.F.p%h%3%{%+%S$B$e$`$+&J.Z.;+[+k+B+S+%@|@l@x@R@*#B#c#<#*#O@A@g@}@@@T+B+h+<+!+.+@&y.p.h.9.|.].;.+.V O G z s l f a 6 1 < / { ) , - = & % # # @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%M.Y.-+|+g+y+P+#@|@f@w@N@*#<#}#|#P@h#i@_@$@T+x+j+_+;+`.J.f$C$T$]%{%3%n%e%E.B.y.v.t.s.A.q.A.s.t.w.y.B.F.p%h%i${%+%S$B$e$`$#&J.Y.;+[+l+v+T+-@:@i@h#g#_$}#d#<#Z%N@x@i@<@@@T+A+m+2+;+ +$&y.p.g.9.|.].;.+.V O G z s l f a 6 1 < / { ) , - = & % # # @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.;+_+j+A+R+@@:@l@x@N@*#<#<#|#N@x@g@}@*@O+x+m+|+~+Y.J.e$B$S$+%{%i$h%p%F.C.z.w.u.t.s.s.s.t.u.x.z.C.G.o%g%i$~%.%R$A$e$b$ %$+Y.J+[+l+B+P+&@1@m@($R@=#[#c#%&Z%N@x@g@<@@@R+C+h+<+)+.+&&y.p.g.8.}.{.;.+.V O G z s l f a 6 1 < / { ) , - * & % # # @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.++>+<+l+x+P+=@(@f@y@N@*#<#[#|#>#z@g@:@-@P+A+l+:+;+.+J.e$A$R$.%~%2%g%o%G.D.I.x.w.u.t.t.t.u.w.y.B.E.H.n%f%4%!% %Q$A$d$z$*&$+^+7+K@`+^#=&;$[@H@W@>#=#z#d#Y%2#N@F@g@<@@@I%C+m+2+)+@+`%x.o.g.8.}.{.-.+.U N G y r l f 0 5 1 < / { ) > - * & % # # @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Z.>+[+l+C+S+&@|@j@A@P@*#<#<#_$Q@W@f@<@*@S+w+l+[+;+Y.-&d$D$Q$ %)%4%5%n%e%F.C.z.y.w.v.v.w.w.y.I.D.G.p%h%3%1%]%h$P$g$E$a$;&j%0+>&$#/#{@7@5@q@1#!#t%,&'&'$l#Q#'#E@o@+#,@V+F+)&3+)+I$!&w.o.f.7.[.~.-...U N F y r k f 0 5 1 : / { ) > - * & $ # @ @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%K.`.;+1+j+w+O+%@}@i@($O@:#<#<#*#P@A@j@:@#@Q+C+i+[+!+Y.J.c$f$C$T$+%~%i$g%n%e%F.C.I.z.y.y.z.z.B.D.F.e%n%f%2%~%.%S$B$f$`$y$~&@+D%5+{&2$W+,@+#o@]&'#^&/&(&(%M$o#_&D@o@4@,@W+w#n+5+{+#+:&v.n.e.6.<.!.=. .U M E x q k e 0 5 | : / ~ ) > - * & $ # @ @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%K. +~+<+j+B+S+@@_@l@h#P@*#<#}#*#P@x@k@(@-@R+A+l+[+,+`.J.`$e$A$R$ %)%1%3%h%o%H.F.D.C.B.B.B.C.E.G.e%n%g%i${%]%h$Q$A$d$b$b$<&`.-+_+l+B+T+=@[@h@W@N@=#t#9%P#x%k%Y@D@q@[&r#~@G+n+L@J#j%E%u.m.d.5.:.).*.` T L E w q j e 9 4 | : ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%L.Y.>+[+j+B+S+#@_@i@w@P@*#t#<#f#N@h#l@<@#@T+B+k+_+!+++L.z$E$g$C$S$+%!%4%5%h%n%p%H.G.F.F.F.G.H.p%n%g%3%1%!%.%S$C$f$c$a$}&j%^+|&o+`+{@7@5@q@C@W@1&#$A#&%2&m#,#3&B@;#5@=&Y+8%o+7+^+$+4&t.l.b.4.1.'.&.Z S K D w p j d 9 4 } _ ^ ~ ' > - * % $ # @ @ + + . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%M.`.,+[+f+w+P+#@(@f@x@P@*#<#<#*#O@A@k@|@*@T+B+j+1+;+Y.-&y$`$e$A$Q$h$+%~%4%3%g%n%n%o%p%p%p%o%n%h%f%i$1%!%.%T$P$D$d$b$+&5&++;+[+i+B+N+%@<@h@y@N@|#t#,$9%<#:#N@y@m@[@-@P+B+l+[+;+Y.J.6&A.k.i.2.(.,.$.Y R J C v o i c 8 3 } _ ^ ! ' ; = * % $ # @ @ + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%K.Y.;+:+h+w+T+%@[@j@x@Q@*#<#}#:#P@y@g@:@=@Q+v+j+}+~+Y.J.9$a$c$f$B$Q$h$+%!%1%2%3%f%g%h%h%h%g%f%3%2%{%!%+%T$Q$A$e$c$a$7&$+t@7+8&`+0#7@5@q@C@5#k%#$O%.$,$}#D#g#A@j@|@%@P+v+l+K@Y#K+@&9&p.h.9.|.^.>.#.W P I A u n h b 7 3 [ ( ] ! , ; = * % $ # @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.++>+|+m+v+U+=@}@g@x@N@*#<#t#f#R@W@l@}@$@O+v+j+}+;+Y.J.8$0$z$E$f$B$Q$T$.%)%~%1%2%i$i$i$i$2%4%1%~%]%.%T$Q$A$f$c$z$n%0&a&;+`#l+8@P+-%[@m@W@>#=#z#+$b&@$l#Q#)#6#I@3@,@W+F+)&G%{+I$c&w.n.f.7.}.{.-.+.V O G z s m g a 6 2 [ ( ] ! , ; = & % $ # @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.;+|+i+y+R+@@:@g@A@O@*#<#t#=#N@x@l@:@#@T+B+l+:+;+Y.K.'%|%0$b$E$g$B$Q$S$ %+%)%!%~%{%{%{%~%!%]%.%h$S$P$A$f$E$b$2%d&7% @e&l+B+!@-@[@h@W@>#f#z#c#u#m%f&t$4#Y@B@r@5@7@Y+`+o+7+t@$+g&t.r.d.5.:.!.*. .U M F y r l f 0 5 1 < / { ) , ; = & % $ # @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.`.,+2+j+y+P+#@(@f@($Q@|#<#B#:#R@x@l@<@@@U+v+i+|+!+Y.J.6$'%9$y$b$E$f$A$C$R$T$h$.%+%+%+%+%.% %h$S$Q$C$D$f$E$b$h&i&b@;+e&v$B+P+-@[@m@W@R@*#[#c#j&u#p$}#*#Q@($m@<@%@O+B+l+[+;+Y.J.,%A.k.i.3._.'.%.Z S L D w q j e 9 5 | : / { ) > - * & % # # @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%L.`.;+:+k+z+T+#@:@l@y@O@*#<#<#*#P@($g@<@*@P+v+h+_+;+Z.J.k&Y$Z$9$y$z$c$e$g$A$C$Q$R$S$S$S$S$S$R$P$C$A$g$d$c$h$l&>%Y.J+K@U%B+{#-@[@m@W@ $_$z#W#[$W$u#c#<#:#P@W@m@[@%@P+B+l+[+;+`.X$s.o.g.9.|.^.>.#.X Q J B v o i c 8 4 } _ ^ ~ ' > - * & $ # @ @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.++,+:+k+x+O+@@_@f@x@N@*#<#<#D#N@w@g@1@%@P+y+f+:+>+Y.J.4$k&Y$Z$|%0$z$`$E$e$g$D$A$B$C$C$C$B$A$D$g$e$E$m&n&%##+0+J+p+8%B+P+-@[@m@w@>#D#e#+$[$o&:$+$z#=#t%W@B@N%@#S#V%U%o+;+^+%+p&t.r.d.6.<.~.-...V O G z t m h b 7 2 [ _ ] ! ' ; = * % $ # @ @ + + . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%q&Z.,+<+j+A+P+$@<@i@w@N@*#<#<#D#Q@A@h@:@@@S+B+j+[+;+Z.J.r&s&k&Y$'%|%O$y$z$`$E$d$e$f$f$f$T$2%t&u&v&w&x&y&n$Y.D%L@p+H+B+j#-@[@k@W@>#_$o$p$j&z&W$:$c#z#m#,#)$H@[@-@!@T#`+o+ @b@A&w$q.j.i.3._.'.&.` T M E x r l f a 6 1 < ( { ! , ; = & % $ # @ + + . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.B%!+[+f+x+O+-@<@k@x@N@*#<#c#<#f#P@z@l@_@@@P+A+l+_+>+`.L.J.M.J.K.L.J.J.J.-&J.J.J.J.M.J.J.B&A&A&#+I$`.K+<%;+J%o+l+B+P+-@[@m@W@ $=#t#9%q$<$:$u#.$t#m#>#)$=%r@-%u%T#8%p+ @r+$+C&u.n.f.8.}.].>.#.X Q J C v p j d 9 4 | : / { ) , - = & % $ # @ + + . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%q&Y.;+_+l+y+Q+$@_@g@A@P@|#<#c#c#}#*#O@x@g@<@$@T+y+l+[+;+Z.Y.Y.Y.Y.Z.`..+Y.Y.Y.++Z.Y.Y.Z.Y.a&Y.b@{+/$)+Y#D&[+n+`+B+P+-@[@m@W@>#>$e#-$$%q$L#+$,$f&}#E&p#W@m@[@-@P+^#]@[+7+K+%+F&A.k.b.4.:.!.=...U O H A t n h c 8 3 } _ ^ ~ ' > - * & $ # # @ + + . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J. +;+<+l+A+P+#@:@l@y@P@*#<#c#u#N#}#f# $h#k@_@@@R+y+k+}+>+>+;+!+;+,+~+,+;+;+;+!+;+!+!+;+;+Y#8+ @5+4+2+K@n+i+F+{@P+-@[@m@W@>#D#<#+$G&+$c#W#z#<#*%*#|#N@m@S@@#S#B+U%`#Y#7%$+H&u.n.f.8.|.^./.$.Z S L E x r l f a 6 2 [ ( ] ! ' ; = * % $ # @ @ + + . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.;+}+l+z+P+*@:@l@A@N@:#<#c#I&u#p$}#*#O@x@k@(@$@S+z+l+1+1+_+:+[+_+<+:+<+|+[+[+[+}+|+[+[+[+[+p+I#n+m+v$F+B+W+7@-@[@m@W@>#=#o$+$W#J&A#<#<#m#*#t%O@O@h#H@S@&@S+v+j+[+;+Y.K&8.q.k.b.4.:.!.-.+.V P I B v o j d 9 5 | < / { ) , ; = & % $ # @ + + + . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Z.;+:+l+y+T+=@<@g@A@N@*#<#c#u#L&u#9%<#*#Q@h#f@:@%@P+z+l+l+k+h+i+j+g+i+f+k+j+j+h+k+j+l+h+l+H+`+G+F+C+Y+W+P+M&-%[@m@W@ $=#}#O%z#[#M$,&D#*#$$N@!#A@x@m@T@1@O+y+h+[+>+Y.J.N&t.m.e.8.|.^.,.%.Z T M F y s m g b 7 3 } _ ^ ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.++;+_+l+A+U+&@<@g@w@N@*#<#c#O&P&L&u#c#<#*#O@x@g@1@@@S+w+C+B+z+B+y+C+y+A+v+v+y+w+C+y+x+B+B+B+B+{@]#R+P+,@-@+#N%m@W@>#D#l#Q&=#>$>$o#>#Q@N@Z@h#C@g@k@}@-%=@O+A+l+[+;+Y.R&s.o.h.i.3.:.!.=.+.W P I C v p k e 0 6 1 < ( ] ! ' ; - * % $ # @ @ + + . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.,+[+l+y+P+=@:@m@w@O@|#<#c#0%L&S&L&u#W#<#*#Q@w@i@[@@@O+Q+Q+O+R+T+Q+U+O+P+R+T+Q+U+N+R+O+P+{#!@7@,@@@@#3@|@I@1#W@>#_$>$:#o#p#>#N@'#Y@A@x@=%f@r@}@(@-@P+U+z+B+f+_+,+T&f.q.k.c.6.[.]./.$.Z T M F z s n h c 8 4 | : / { ) , ; = & % $ # @ @ + + . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.>+:+j+v+Q+@@<@h@w@N@*#<#c#u#P&U&S&L&u#c#<#*#O@A@h@<@$@@@@@@@@@#@%@-@%@*@&@@@=@#@@@%@=@-@!$!$V&+#<@[@o@m@6#!#>#k%R@g#Q@'#!#W@y@E@1#g@l@S@<@W%%@@@N+V%B+l+l+[+;+W&X&s.r.e.8.0._.'.*...V P I C v p k f a 6 2 [ _ ] ~ ' > - * & % $ # @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.>+<+i+B+N+%@<@l@W@Q@:#<#c#u#L&Y&Z&S&L&u#p$<#*#P@A@i@:@:@_@<@(@<@_@<@|@}@_@|@(@|@_@|@[@[@[@;#q@o@g@m@E@($)#_&X@Y@W@A@y@]&C@m@f@`&q@}@:@-@#@7@U+P+y+H+j+[+[+~+ *.*t.m.g.a.3.:.~.-.@.X S L E y s m h c 8 4 | : / { ) , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.>+[+l+A+Q+&@}@g@x@N@*#<#c#I&L&S&+*@*S&L&u#c#<#*#O@x@j@k@m@k@f@h@k@j@l@j@l@g@l@l@l@g@g@l@m@1#D@E@x@#*G@G@6#C@C@=%m@m@f@`&q@|@(@+#W%-@&@u%O+{@y+B+g+/%[+>+;+$*%*t.n.g.i.4.<.{.>.%.` U N H B v p j e a 6 2 [ _ ^ ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J..+;+2+l+A+O+*@<@i@x@P@*#<#c#0%L&S&Z&@*&*L&[$W#<#*#P@W@l@j@f@i@h@j@m@i@f@l@l@g@g@h@i@j@j@i@l@h@l@g@g@g@****o@`&q@;#[@_@1@4@5@-@=@,@7@P+R+B+z+`+j+h+}+7+;+Z.=*-*t.n.h.b.5.[.^.,.&...V P J D x r m g c 8 4 | : / { ! , ; = * & $ # # @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%L.Y.;+|+j+C+Q+$@_@i@x@O@|#[#c#u#;*>*,*S&L&u#W#t#*#Q@x@g@(@}@<@(@<@(@<@(@|@_@}@|@|@(@<@}@[@:@|@_@[@<@<@<@H%H%+#+#5@;$-@#@-@,@7@P+P+W+{@B+x+]@l+o+[+[+>+Y.`.'*j.s.n.h.b.5.}.(.'.*.+.W R L F z t o i d 0 6 2 [ _ ^ ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.!+|+m+y+U+@@|@l@w@R@:#<#c#u#L&S&S&L&u#c#o$>$N@y@l@[@=@=@$@$@=@@@-@$@#@%@-@&@&@$@@@=@=@*@=@&@*@@@@@@@6@@@>@)@)*7@P+P+O+W+{@B+A+F+]@j+l+p+[+7+'+;+B%!*~*u.A.m.g.i.5.}.(.).=.@.Y S M G A v p k f b 7 3 } : / { ! , ; - * & % $ # @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%K.Y.;+[+i+A+Q+=@<@g@z@N@*#}#c#u#P&S&z&u#N#<#>$O@h#f@1@=@U+R+T+O+N+N+R+P+T+T+T+Q+N+O+S+P+N+P+S+S+O+R+R+R+V+W+]#W+{@u$T#w+v+F+/#l+l+n+`#[+|+J+,+^+`.++{*]*v.q.l.f.a.5.}.(.).-.#.Y T N H C w r m h c 9 5 1 < ( ] ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.++'+}+i+v+O+%@|@k@w@Q@*#<#c#0%^*L&u#p$<#*#O@x@g@}@@@P+x+v+y+z+A+B+y+B+z+v+A+x+A+z+y+z+A+B+v+v+x+z+w+A+E+x#F+9@/#v$H+g+i+a@o+K@_+Z#7+!+;+Y.Y./*(*.*x.s.n.j.d.9.4.[.^.'.-.#.Z U O I D x s n i d 0 6 2 } _ ^ { ) , ; = * & % $ # @ + + + . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.`.!+[+f+A+S+&@<@g@y@N@f#<#c#0%L&u#W#}#|#N@x@j@1@$@U+v+l+h+l+l+l+l+l+l+l+h+l+g+h+k+j+h+i+i+l+l+m+g+f+f+m+m+{&n+o+o+[+<+:+5+_*;+,+{+7%Y.Y.$+:*<*u+u.p.r.g.b.7.2.<.].'.=.@.Z U O J D y t o j f a 7 3 | : / ] ! ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.;+[+j+w+Q+-@1@g@x@N@*#<#c#u#u#p$t#:#N@A@l@(@%@O+B+j+1+:+[+[+:+[+_+:+1+[+:+[+[+|+[+:+[+|+[+_+[+1+2+2+2+3+G%5+L@7+Y#;+!+D%^+a&B%#+$+[*}*_#y.u.q.m.j.d.a.5.|.1.{./.*.@.Y U O J E y t o k f b 8 4 1 < ( ] ~ ) , ; = * % $ # # @ + + + . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.;+[+l+v+R+*@1@l@x@N@*#<#c#u#c#[#*#Q@y@l@_@*@N+y+l+:+;+;+,+>+-+>+;+;+;+>+!+;+;+!+;+,+,+)+;+>+'+>+)+!+)+D%<%{+|*^+r+Y.Y.@+^$J.d&U.1*x.w.t.q.m.j.e.i.7.2.[.(.!.>.&...X T O J E z u p k g c 9 5 1 [ _ ^ { ) , ; - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.`.,+_+h+y+N+*@}@f@x@P@f#<#c#W#<#D# $W@l@(@-@U+v+l+:+!+Z.Z..+ +Y.Z.Y.Y.`.Y.`.`.Y.Y.Z.Y.Y.Y.Y.`.B%`.++@+@+2*#+#+j%$+b+3*4*5*6*l.z.x.u.A.o.r.j.e.i.7.3.}.1.{.,.-.$. .W S N I D y t p k g c 9 5 2 } : / { ! ' > - = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.++,+<+l+z+N+%@|@l@A@N@*#<#c#t#*#R@($f@[@*@S+A+f+[+;+ +M.J.J.J.J.J.L.J.J.J.J.J.J.J.L.J.J.J.J.7*&+8*9*`%0*a*b*V.W.c*l.d*I.y.w.u.A.p.m.k.g.d.i.7.3.|.:.].).>.&.@.Z U Q M H C y t p k g c 9 6 2 } : / ] ~ ' > ; = * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.B%!+:+l+A+P+*@_@f@z@N@*#<#<#*#>#x@k@_@*@O+v+l+|+>+Y.L.4$k&Y$Z$9$a$`$d$g$B$Q$T$.%)%~%1%i$5%g%n%n%p%H.G.E.D.B.I.y.x.v.t.A.p.n.r.k.g.e.b.9.6.2.}.1.^.!./.*.#. .X T P K G B x s o k g c 9 6 3 } < ( ] ~ ) , ; - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%K.Y.;+_+m+B+O+-@(@i@w@N@|#<#<#f#O@($l@[@#@O+v+i+[+,+Z.J.k&Y$Z$O$a$c$e$A$P$T$.%)%{%2%5%g%n%p%H.F.D.B.I.y.w.v.t.s.q.o.n.r.k.h.f.d.i.9.6.3.|.<._.].)./.=.$...Y U R M I E A v r n j g c 9 6 3 | < ( ^ ~ ) , ; - * & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Z.;+1+h+C+R+$@<@i@x@N@:#<#}#f#Q@($k@}@$@U+B+j+:+>+Z.J.Y$8$O$z$E$f$B$R$ %]%{%2%f%n%p%H.E.C.z.x.v.t.A.q.o.m.r.k.h.g.e.c.i.9.7.5.3.|.[.1.^.~.'.>.*.$...Y V S O K G C y u q m i f b 9 6 2 } < ( ^ ~ ) , > - = & % $ $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.;+<+k+C+R+#@_@g@($P@*#<#<#_$Q@y@j@1@&@T+w+j+|+;+Y.J.Z$O$a$E$g$C$S$.%!%4%5%h%p%G.D.I.x.u.s.p.n.r.k.h.g.e.c.b.a.8.6.5.3.0.}.:._.^.~.)./.-.&.#. .Y V S P L H D A w s p l h e b 8 5 2 } < ( ^ { ! ' > - = * & % $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.!+_+h+C+O+@@:@i@w@N@*#<#<#:#N@w@j@}@=@Q+z+l+[+;+++J.9$a$c$g$C$S$+%~%i$g%o%G.C.z.v.s.p.m.l.h.f.d.b.a.8.6.5.3.0.}.[.:._.^.{.!.'.>.-.&.$.+.` X U S O L I E B x u q n j g d a 7 4 2 } : ( ^ ~ ! ' > - = * & % $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.~+<+l+w+P+$@1@g@w@N@*#<#}#D#R@y@i@(@%@O+v+l+|+;+Y.J.y$`$f$C$S$+%{%i$h%e%E.I.w.s.o.r.j.f.c.a.8.6.3.0.}.[.:._.^.].~.).,.>.-.*.%.#.+.` Y V T Q N K H E B y v r o l i e b 9 6 4 1 [ : ( ] ~ ) ' > ; = * & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.++;+<+h+v+T+*@<@l@x@N@*#<#<#|# $($h@_@-@R+x+l+|+;+`.J.b$e$B$R$.%{%3%n%H.D.y.t.p.r.h.e.i.8.5.2.|.<.1.(.].~.).'./.;.-.*.%.#.+. .Z X V T R O M J G D A y v s p m j g d a 8 5 3 | [ _ / ] ~ ) ' > ; = * & % $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Y.;+}+g+z+U+#@_@g@($N@f#<#t#*#O@w@m@_@*@Q+z+h+<+;+Y.J.E$D$Q$ %~%i$h%H.C.x.s.n.k.e.i.8.4.0.<.1.^.~.).,.>.-.*.%.$.@...` Z X V U S Q O M J H E C z x u r p m j g e b 9 7 4 2 } < _ / ] ~ ) , > - = * & % $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f m s z H P W @.>.^.0.a.j.A.I.e%J.Z.!+[+k+B+R+#@:@l@y@O@*#[#<#*#N@A@g@1@$@O+B+j+[+;+Y.J.f$C$h$)%2%h%e%C.x.A.m.h.c.9.4.|.:.(.{.)./.-.*.%.#.+. .Z X W U T S Q O M K I G E C A y v t q o l j g e b 0 7 5 3 | [ : ( ^ { ! ) , > - = * & % $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s z H O W @.>.^.0.a.j.A.I.e%J.Y.!+:+i+B+T+=@_@g@A@N@*#<#<#f#N@A@g@}@&@O+v+l+:+-+`.J.A$R$+%1%f%p%D.x.s.m.g.b.7.2.[._.{.'.;.*.$.@. .Z X V U S R P N M K I H F D B z x v t r p n k i g e b 0 8 5 3 1 } < _ / ] ~ ! ' , ; - = * & % $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s z H O W @.>.^.0.a.j.A.I.e%J.Y.;+<+f+B+Q+$@_@g@x@P@*#<#<#D#R@y@g@(@#@S+z+l+:+;+`.J.P$ %~%3%n%F.y.s.m.g.i.6.0.:.].'.;.&.#...Z W U S Q O M K J H G E C B z y w u s r p n l j h f d b 0 7 5 3 1 } < _ ( ^ { ~ ) ' > ; - = * & % $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s z H O W @.>.^.0.a.j.A.I.e%J.Z.;+2+k+x+N+&@(@f@A@N@*#<#[#|#Q@x@f@(@-@Q+B+k+[+;+++K.R$+%4%g%H.B.u.o.j.b.6.0.1.{.,.=.$...Y V T Q O L J H F D C A z x w u s r p o m k j h f d c a 9 7 5 3 1 } [ : ( ^ ] ~ ! ' , > - = * & % % $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s z G O V @.>.].|.9.h.q.z.H.L.Y.~+<+h+v+P+*@(@g@x@N@f#<#<#*#O@x@i@:@*@P+v+j+_+;+Y.K. %~%3%o%D.w.q.k.c.7.0.1.~./.*.@.Z V T P M J H E C A y w v t s q p n m l j i g f d b a 9 8 6 4 3 1 } < : ( / ] { ! ) , > ; - = * & % $ $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 6 a f l s z G O V @.>.].|.9.h.q.z.H.L.Y.!+_+f+x+N+#@<@f@h#N@*#[#t#>$ $y@l@}@=@T+A+l+[+;+Z.K.+%4%g%H.I.t.m.f.9.2.:.{./.&.+.Y U Q N J G D A y w u s q o n m k j h g f d c b 0 9 7 6 4 3 1 | [ < _ ( / ] { ! ) ' , ; - = * * & % $ $ # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 a f l s z G O V @.;.].|.9.h.q.z.H.K.Y.;+|+h+x+P+-@<@g@w@N@|#<#[#:#O@z@l@[@=@U+B+k+|+,+Z.J.)%i$n%E.x.q.j.b.5.[.^.,.*.+.Y U P L H D A x u s q o m k j h g e d c b 0 9 8 7 5 4 3 2 | } [ : _ ( ^ ] { ! ) ' , > ; - = * & % % $ # # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s z G O V +.;.].|.9.h.q.y.H.J.B%;+:+l+v+Q+&@1@i@x@O@f#<#t#|#N@A@h@(@%@Q+x+f+[+-+Y.J.{%f%e%I.t.m.e.8.0._.).=.@.Y U P K F B y u r p m k i g f d c a 0 9 8 7 6 4 3 2 1 | } [ : _ ( / ^ ] ~ ! ) ' , > ; - = * & & % $ $ # # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l s z G O V +.;.].|.9.h.q.y.H.M.Y.;+_+g+B+Q+@@_@j@y@P@*#<#[#|#g#W@l@|@&@P+w+l+[+;+Y.J.4%h%G.y.A.k.b.5.<.{.>.%.` U P K F B x t q n k h f d b a 9 8 7 5 4 3 2 1 | } [ < : _ ( / ^ ] { ~ ! ) ' , > ; - = * * & % % $ # # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / < 1 5 0 f l r y G O V +.;.].}.8.g.p.y.G.J.Y.;+1+m+A+R+-@<@g@x@N@*#<#[#|#g#($g@[@-@S+v+h+_+;+Y.J.i$o%D.v.o.g.9.0._.).=.+.W R L G B w s o l i f d a 0 8 6 5 3 2 1 | } [ < : _ ( / / ^ ] { ~ ! ) ' , , > ; - = = * & % % $ $ # # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) { / : 1 5 0 f l r y G N V +.;.{.}.8.g.p.y.G.M.Y.)+|+k+v+R+-@|@g@y@O@f#<#<#:#Q@A@h@[@=@N+B+l+|+;+++J.5%e%B.t.r.d.6.[.].>.$.Z U N H C x s o k h e b 9 7 5 4 2 1 } [ < : _ ( ( / ^ ] { ~ ~ ! ) ' ' , > ; - - = * * & % % $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 f l r y F N U +.-.{.}.8.g.o.x.F.J.Z.,+2+i+y+S+=@}@k@x@N@*#<#o$*#P@x@f@<@%@N+x+f+[+;+Y.L.g%G.z.A.k.b.4.:.!.=.+.W Q K E z t p l h d a 8 6 4 2 | [ < : _ ( / ^ ] { { ~ ! ) ) ' , , > ; ; - = = * & & % % $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ) ~ / : | 5 0 e k r y F N U ..-.~.[.7.f.o.w.E.-&Y.;+[+m+z+P+@@1@g@y@N@|#<#<#>$Q@($j@[@$@N+z+l+_+;+++L.n%E.w.o.g.9.0.(.,.%.` U N H B v q l h d a 8 5 2 | [ < _ ( / ^ ] { ~ ! ! ) ' ' , > > ; ; - = = * * & & % % $ $ # # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 5 0 e k q x E M U .=.~.<.6.e.n.v.D.J.Y.;+|+m+v+P+$@1@f@x@Q@*#<#<#*#Q@z@i@}@-@N+z+l+}+;+B%K.p%C.u.m.e.7.[.{.;.#.X R K E y s n j e a 8 5 2 } < _ ( ^ ] { ~ ! ) ' ' , > > ; ; - - = = * * & & % % $ $ $ # # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ~ ^ : | 4 9 e k q x E M U .*.!.<.6.d.m.u.C.J.++;+<+g+z+R+@@<@g@A@O@:#<#<#f#O@x@l@|@%@O+B+g+_+>+Y.J.e%I.s.l.c.4.:.!.=...V P I B v q l g c 9 5 2 } < _ / ] { ! ) ' ' , > ; ; - - = = * * * & & % % % $ $ # # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ : | 4 9 d j q w D L T ` &.).:.4.c.r.t.B.J.Y.;+_+j+w+P+#@[@g@x@N@*#<#<#>$Q@A@l@:@&@Q+y+j+<+;+Y.-&F.x.q.h.a.2._.,.%.` T M F z t n i d 0 6 2 } < ( ^ { ~ ) ' , > ; ; - - = = * * & & & % % % $ $ $ # # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . + + @ @ # $ % * - > ' ~ ^ _ } 4 9 d j p w D K S Z &.'.1.3.b.k.s.I.J.Y.;+|+l+C+Q+#@_@g@A@g#*#<#[#*#O@x@l@_@=@N+v+j+[+;+Y.J.D.v.n.f.8.|.^.>.#.Y R K D x r l g b 8 4 1 < _ ^ { ! ) ' > ; - - = * * & & & % % % $ $ $ # # # # @ @ @ @ + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + @ @ # $ % * - > ' ~ ^ _ } 3 8 c i o v C J R Y $.,.(.2.a.j.q.y.L. +!+:+j+B+S+$@<@g@x@g#*#D#*#|#O@x@i@1@-@U+B+l+|+!+Y.M.I.t.r.d.6.<.~.-.+.V P I B u o j e 0 6 2 } : / ] ! ) , > ; - = * * & & % % $ $ $ $ # # # # @ @ @ @ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] _ } 3 8 c i o u B I Q X #.>.^.|.8.g.o.w.K.Y.;+:+i+v+T+=@:@g@z@N@Q@O@g#O@R@($k@(@&@R+z+i+|+!+Y.q&y.q.k.b.3.1.).*. .U N G z t n h c 9 4 1 < ( ^ ~ ) , > ; - = * & % % % $ $ # # # # @ @ @ @ @ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % * = ; ' ! ] ( [ 3 7 b h n t A H P W @.;.{.[.7.e.m.u.J. +>+<+f+v+T+$@(@j@y@A@z@z@x@h#y@z@g@|@-@Q+z+h+[+-+Y.J.v.o.g.9.0.(.,.%.Z S L E x r l f a 7 3 } _ / { ! ' > - = * & % % $ $ # # # # @ @ @ @ @ + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! ] ( [ 2 7 b g m s z G N U ..=.!.:.4.b.k.A.M.Y.>+<+j+w+U+%@[@i@j@m@k@k@j@m@f@l@h@<@%@S+A+l+[+,+++J.s.r.d.6.[.{.;.@.X Q J C v p j e 0 5 1 [ ( ] ~ ' , ; = * & % % $ # # # @ @ @ @ + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ! { ( < 1 6 a f l r y F M T ` &.'._.2.a.h.o.J.B%-+:+k+A+R+@@<@_@}@[@(@:@(@[@_@1@|@<@%@R+y+l+<+;+.+K.p.j.i.3.:.!.=...U O H A t n i c 8 4 | : / { ! , > - = & % $ $ # # @ @ @ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & = ; , ) { / < 1 5 0 e k q w D K S Y $./.].}.7.e.r.K.Y.,+[+g+A+S+-@%@%@$@%@$@#@&@#@&@-@@@-@#@S+z+l+1+'+Y.J.m.f.8.0.(.,.%.` T M F y s m g b 7 3 } : ^ { ) , ; = * & % $ # # @ @ @ + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ) { / : | 4 9 d j p v C I Q W @.-.~.:.4.i.j.J.Y.;+}+i+z+P+N+R+U+P+R+P+O+P+P+P+P+U+S+P+Q+x+i+[+;+Z.J.j.b.5.<.{.;.#.X R K D w q k f a 6 2 [ ( ] ~ ' > - = & % $ # # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ # # $ & * - > ' ~ ^ _ } 3 8 c h n t A H O U .*.'.(.0.8.e.J.Y.;+1+g+z+B+B+y+v+A+B+y+B+y+B+x+z+y+B+z+y+z+l+[+>+ +K.f.9.2._.).=...V P I B v p j d 0 5 1 < ( ] ! ' ; - * & % $ # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ & * - > ' ! ] _ [ 2 7 b g l r y E L S Y #.;.{.<.4.i.J.Y.-+:+g+l+h+l+h+h+l+k+m+h+l+j+l+j+k+h+g+i+l+i+[+~+Y.J.i.4.<.{.>.$.Z S M F y s m h b 8 3 } : ^ ~ ) , ; = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! ] ( < 1 6 0 e k q w C J P V ..*.'.(.|.6.L.Y.>+[+[+|+_+[+[+|+}+<+_+<+[+<+[+|+|+[+:+|+[+[+_+;+Y.J.7.|._.).=.+.W Q J D w q l f a 7 2 [ _ ^ ~ ' > - = & % $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . + + + @ # $ % & = ; , ) { / < | 4 9 d i o t z G M T Z #.;.~.1.2.J.Y.;+;+'+;+;+;+;+-+~+;+;+!+,+!+'+;+;+!+;+-+;+;+;+!+Y.J.2.:.~.>.$.Z U N G A u o j e 0 5 1 < ( ] ! ' > - * & % $ # @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # $ % & = - > ) ~ ^ _ } 3 7 b g l r x D J P V .&./.{.<.J.Y.Z.Y.`.Y.Y.Y.Y.Y.Y.`.Z.++Z.Y.Y.Y.Y.Y.`.++Z.Y.Y.B%Y.M.<.{./.&. .V P J D x r l g b 7 3 } _ ^ ~ ) > - = & % $ # @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ # # % & * - > ' ! ] ( [ 2 6 0 e j o u A G M S X +.*.,.].M.J.J.J.J.{$J.J.J.J.J.J.J.J.M.J.J.L.L.M.J.J.M.J.J.J.J.J.].,.*.+.X S M G A u o j e 0 6 2 [ ( ] ! ' > - * & % # # @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; , ! { / < | 4 8 c h m r x C I O U Z #.=.'.].:.0.6.a.d.g.k.m.o.q.A.s.s.s.s.A.q.o.m.k.g.d.a.6.0.:.].'.=.#.Z U O I C x r m h c 8 4 | < / { ! , ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = ; , ) ~ ^ _ } 2 6 a e j o u z E K Q U ` #.-.'.].1.}.3.7.a.c.f.h.j.l.r.r.r.r.l.j.h.f.c.a.7.3.}.1.].'.-.#.` U Q K E z u o j e a 6 2 } _ ^ ~ ) , ; = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # $ % & * - > ' ! ] ( < 1 4 9 c g l q v A G L Q V ` #.=./.!.(.:.|.3.5.8.a.i.c.c.d.d.c.c.i.a.8.5.3.|.:.(.!./.=.#.` V Q L G A v q l g c 9 4 1 < ( ] ! ' > - * & % $ # @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ # # $ & * = ; , ) { / : } 2 6 0 e i n s w B G L Q U Z +.&.;.'.~.^.1.[.|.2.3.4.5.6.6.5.4.3.2.|.[.1.^.~.'.;.&.+.Z U Q L G B w s n i e 0 6 2 } : / { ) , ; = * & $ # # @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & = - > ' ~ ] ( < | 4 8 b f j o s x C G L Q U X .#.*.;.,.!.{.^._.1.:.<.<.<.<.:.1._.^.{.!.,.;.*.#. .X U Q L G C x s o j f b 8 4 | < ( ] ~ ' > - = & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . + + + @ # $ % & * - ; , ) { ^ _ [ 2 5 9 c g k o t x B G K O S V Y ..#.&.=.;./.'.).!.~.~.~.~.!.).'./.;.=.&.#...Y V S O K G B x t o k g c 9 5 2 [ _ ^ { ) , ; - * & % $ # @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % * = ; > ' ~ ] ( : | 3 6 0 d g k o s w A E I M P T V Y ` +.#.$.&.*.=.-.-.-.-.=.*.&.$.#.+.` Y V T P M I E A w s o k g d 0 6 3 | : ( ] ~ ' > ; = * % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * - ; , ) ~ ^ ( < | 3 7 0 d g k o s v z C G J M P R U V X Z ` ...+.+.+.+... .` Z X V U R P M J G C z v s o k g d 0 7 3 | < ( ^ ~ ) , ; - * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - > ' ! { / _ [ 1 4 7 0 d g j n q t x A D F I K N P Q S T U U U V V U U U T S Q P N K I F D A x t q n j g d 0 7 4 1 [ _ / { ! ' > - = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = ; , ' ~ ] / : [ 1 4 7 0 c f i l o r u x z C E G I J L M N O O O O O O N M L J I G E C z x u r o l i f c 0 7 4 1 [ : / ] ~ ' , ; = * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . + + + @ # # $ % & = - ; , ) ~ ] / : [ 1 4 6 9 b e h j m p r t w y z B D E F G G H H H H G G F E D B z y w t r p m j h e b 9 6 4 1 [ : / ] ~ ) , ; - = & % $ # # @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # $ % & * = - > , ) ~ ] / : [ | 3 5 8 0 c e h j l o q r t u w x y z z A A A A z z y x w u t r q o l j h e c 0 8 5 3 | [ : / ] ~ ) , > - = * & % $ # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ % & * = - > , ) ~ ] / _ < } 2 4 6 8 a c e g i j l n o p q r s s s t t s s s r q p o n l j i g e c a 8 6 4 2 } < _ / ] ~ ) , > - = * & % $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ % & * = ; > ' ) ~ ] / ( : [ | 2 4 6 8 0 b d e g h i j k l l m m m m m m l l k j i h g e d b 0 8 6 4 2 | [ : ( / ] ~ ) ' > ; = * & % $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = ; > , ) ~ { ^ ( : < } 1 3 4 6 8 9 0 b c d e f f g g h h h h g g f f e d c b 0 9 8 6 4 3 1 } < : ( ^ { ~ ) , > ; = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - > , ' ! ~ ] ^ ( _ < [ | 1 3 4 5 6 7 8 9 0 0 a a a b b a a a 0 0 9 8 7 6 5 4 3 1 | [ < _ ( ^ ] ~ ! ' , > - = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # $ $ % & * = - ; , ' ) ~ { ] / ( _ < [ } | 1 2 3 4 5 5 6 6 7 7 7 7 7 7 6 6 5 5 4 3 2 1 | } [ < _ ( / ] { ~ ) ' , ; - = * & % $ $ # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + @ @ # # $ $ % & * = - ; > , ' ! ~ { ] ^ / _ : < [ [ } | 1 1 2 2 2 2 3 3 2 2 2 2 1 1 | } [ [ < : _ / ^ ] { ~ ! ' , > ; - = * & % $ $ # # @ @ + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ # # $ $ % & * * = - ; > , ' ) ! ~ { ] ^ / ( _ _ : : < < [ [ [ [ [ [ [ [ < < : : _ _ ( / ^ ] { ~ ! ) ' , > ; - = * * & % $ $ # # @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # $ $ % & & * = - ; ; > , ' ) ! ~ ~ { ] ] ^ / / / ( ( ( ( ( ( ( ( ( ( / / / ^ ] ] { ~ ~ ! ) ' , > ; ; - = * & & % $ $ # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + @ @ @ # # $ $ % & & * = - - ; > , , ' ) ) ! ! ~ ~ { { { { ] ] ] ] ] ] { { { { ~ ~ ! ! ) ) ' , , > ; - - = * & & % $ $ # # @ @ @ + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ # # $ $ % % & * * = = - ; ; > > , , ' ' ) ) ) ! ! ! ! ! ! ! ! ! ! ) ) ) ' ' , , > > ; ; - = = * * & % % $ $ # # @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ % % & & * * = = - - ; ; > > > , , , , , , , , , , , , , , > > > ; ; - - = = * * & & % % $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ # # $ $ $ % % & & * * * = = = - - - - - ; ; ; ; ; ; ; ; - - - - - = = = * * * & & % % $ $ $ # # @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # $ $ $ % % % & & & & * * * * = = = = = = = = = = = = * * * * & & & & % % % $ $ $ # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ # # # # $ $ $ % % % % % & & & & & & & & & & & & & & & & % % % % % $ $ $ # # # # @ @ @ @ + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + @ @ @ @ # # # # $ $ $ $ $ % % % % % % % % % % % % % % % % % % $ $ $ $ $ # # # # @ @ @ @ + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + @ @ @ @ @ @ # # # # # # # # # # # # # # # # # # # # # # # # @ @ @ @ @ @ + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ # # # # # # @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + @ @ @ @ @ @ @ @ @ @ @ @ + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "} +------------------------------------------------------------------------------ +export constant icon = create(GtkImage,xpm_to_pixbuf(p_xpm)) +------------------------------------------------------------------------------ diff --git a/eugtk/examples/examples/icons.ex b/eugtk/examples/examples/icons.ex new file mode 100644 index 0000000..7d0fd77 --- /dev/null +++ b/eugtk/examples/examples/icons.ex @@ -0,0 +1,224 @@ + +--------------------------------------------------------------- +--# Categorize, search, and display available icons. +-- tooltip for each icon displays the actual file path to that icon. +--------------------------------------------------------------- + +include GtkEngine.e +include std/sort.e +include std/wildcard.e +include std/datetime.e + +constant docs = { +`Themed Icons + +Select an icon category below, then click OK, +or enter a search string in the box at bottom, +and click Find or hit enter. +`, + +`Enter a search string here, + hit enter or click the find button`, + +` +--------------------------------------------------------- +-- NOTE: this file will be regenerated when you -- +-- run icons.ex, and will probably show different -- +-- icons from the ones I've listed here, since they -- +-- vary depending upon the window theme in use. -- +--------------------------------------------------------- + +`} + +-- load current icons in default theme; +atom theme = create(GtkIconTheme) +object contexts = get(theme,"list contexts") + +-- write icon names to a text file for later reference; +atom fn = open(locate_file("resources/themeicons.txt"),"w") +puts(fn,docs[3]) +puts(fn,datetime:format(datetime:now(),"Generated %A %B %d, %Y ")) +printf(fn,"by %s on %s\n\n",{user_name,host_name}) +object icons = repeat(0,length(contexts)) +for i = 1 to length(contexts) do + contexts[i] &= 0 + icons[i] = sort(get(theme,"list icons",contexts[i])) + contexts[i] = {contexts[i],length(icons[i])} + printf(fn,"Context: %s\n\t%d Icons:\n",contexts[i]) + for n = 1 to length(icons[i]) do + printf(fn,"\t\t %s\n",{icons[i][n]}) + end for + puts(fn,"\n") +end for +close(fn) + +constant iconwin = create(GtkWindow,{ -- window for display of icons; + {"default size", 640,600}, + {"deletable",FALSE}, + {"type hint",GDK_WINDOW_TYPE_HINT_MENU}, + {"position",GTK_WIN_POS_CENTER}, + {"icon","emblem-system"}}) + +constant iconpanel = create(GtkBox,VERTICAL) + gtk:add(iconwin,iconpanel) + +constant iscroller = create(GtkScrolledWindow) + pack(iconpanel,iscroller,TRUE,TRUE) + +constant iv = create(GtkIconView,{ + {"text column",1}, + {"pixbuf column",2}, + {"item width",90}, + {"columns",4}, + {"tooltip column",3}}) + gtk:add(iscroller,iv) + +constant istore = create(GtkListStore,{gSTR,gPIX,gSTR}) -- icon list; + set(iv,"model",istore) + +constant mainwin = create(GtkWindow,{ -- main window; + {"title","System Icons"}, + {"default size",300,400}, + {"border width",10}, + {"move",0,0}, + {"icon","emblem-system"}, + {"connect","destroy",_("Bail")}}) + +constant panel = create(GtkBox,VERTICAL) + gtk:add(mainwin,panel) + +constant lbl = create(GtkLabel) + set(lbl,"markup",docs[1]) + gtk:add(panel,lbl) + +object catstore = create(GtkListStore,{gSTR,gINT}) -- category list; + set(catstore,"data",contexts) + +constant tv = create(GtkTreeView,{ + {"model",catstore}, + {"margin bottom",5}, + {"tooltip text","Select a category, then click the OK button"}}) + pack(panel,tv,TRUE,TRUE) + +constant selection = get(tv,"selection") + set(selection,"mode",GTK_SELECTION_SINGLE) + +constant rend1 = create(GtkCellRendererText), + col1 = create(GtkTreeViewColumn,{ + {"pack start",rend1}, + {"add attribute",rend1,"text",1}, + {"title","Category"}}) + +constant rend2 = create(GtkCellRendererText), + col2 = create(GtkTreeViewColumn,{ + {"pack start",rend2}, + {"add attribute",rend2,"text",2}, + {"title","# of icons"}}) + set(tv,"append columns",{col1,col2}) + +constant btn1 = create(GtkButton,"gtk-quit",_("Bail")), + btn2 = create(GtkButton,"stock_search#_Search"), + btn3 = create(GtkButton,"gtk-ok"), + btnbox = create(GtkButtonBox) + + connect(btn2,"button-press-event",_("on_btn_down")) + connect(btn2,"clicked",_("Search")) + + connect(btn3,"button-press-event",_("on_btn_down")) + connect(btn3,"clicked",_("DisplayIcons")) + + gtk:pack(panel,-btnbox) + gtk:add(btnbox,{btn1,btn2,btn3}) + set(btn1,"tooltip markup","Click to quit") + set(btn2,"tooltip markup","Click to find all icons containing search string") + set(btn3,"tooltip markup","Click to display all icons in selected category") + +constant srch = create(GtkEntry,{ -- search entry; + {"tooltip text",docs[2]}, + {"margin bottom",10}, + {"placeholder text","Enter search string here, click find button"}}) + connect(srch,"activate",_("Search")) + pack(panel,-srch) + +show_all(mainwin) +main() + +function on_btn_down() + set(mainwin,"cursor",GDK_WATCH) +return 0 +end function + +-------------------------------- +function DisplayIcons() +-------------------------------- +atom img +atom iter = create(GtkTreeIter) +object n = get(selection,"selected row") +object cat = contexts[n][1] +object list, name, info + + set(iconwin,"title",cat) + set(istore,"clear") + list = repeat({0,0,0},length(icons[n])) + for i = 1 to length(icons[n]) do + name = icons[n][i] + info = icon_info(name) + list[i][1] = name + list[i][2] = get(theme,"load icon",name,48,13,0) + if string(info[3]) then list[i][3] = info[3] else list[i][3] = name end if -- tooltip + end for + set(istore,"data",list) + show_all(iconwin) + +set(mainwin,"cursor","default") + +return 1 +end function + +---------------------------------- +function Search() +---------------------------------- +object x = get(srch,"text") +atom img +integer ct = 0 +object list = {}, name, info + + if length(x) > 0 then + set(istore,"clear") + x = "*" & lower(x) & "*" + set(srch,"text",x) + + for i = 1 to length(contexts) do + for j = 1 to length(icons[i]) do + name = icons[i][j] + if is_match(x,name) then + info = icon_info(name) + img = get(theme,"load icon",name,48,GTK_ICON_LOOKUP_FORCE_SIZE,0) + if string(info[3]) then + list = append(list,{name,img,info[3]}) -- tooltip + end if + ct += 1 + end if + end for + end for + + set(istore,"data",list) + show_all(iconwin) + set(iconwin,"title",sprintf("Search results for %s: %d found",{x,ct})) + + end if + +set(mainwin,"cursor","default") + +return 1 +end function + +------------------------ +function Bail() +------------------------ +Info(mainwin,, + "The icon names for this theme\nhave been written to:", + "~/demos/resources/themeicons.txt") +Quit() +return 1 +end function diff --git a/eugtk/examples/examples/leak.ex b/eugtk/examples/examples/leak.ex new file mode 100644 index 0000000..e580c8b --- /dev/null +++ b/eugtk/examples/examples/leak.ex @@ -0,0 +1,56 @@ + +-------------------------------------------------------------------------------- +--# Test for memory leaks in get and set routines; +-- Run System Monitor and watch memory usage while this runs for a long time. +-- Memory usage should not change, since no new widgets are created in the loop. +-------------------------------------------------------------------------------- + +include GtkEngine.e + + +if system_exec("which gnome-system-monitor",0) = 0 then + system("gnome-system-monitor &",0) +elsif system_exec("which mate-system-monitor",0) then + system("mate-system-monitor",0) +end if + +constant docs = `Leak Test +This runs mate-system-monitor and then reads and +writes to a label, accessing it via widget name +(label2). Watch the memory usage, it should not +change even after running for a long time. +` +constant win = create(GtkWindow,"size=300x300,border=10,sig.destroy=Quit") +constant panel = create(GtkBox,"orientation=1,spacing=10") +constant lbl1 = create(GtkLabel) set(lbl1,"markup",docs) +constant lbl2 = create(GtkLabel,"text=`Hello World!`,name=Label2") +constant lbl3 = create(GtkLabel) + +integer ct = 0 + +add(win,panel) +add(panel,{lbl1,lbl2,lbl3}) + +constant tick = create(GIdle,_("T1")) -- as fast as possible! +constant tock = create(GTimeout,1000,_("T2")) -- one second intervals + +show_all(win) +set(win,"move",10,10) +main() + +---------------- +function T1() -- tests for leaks in set and get; +---------------- + ct += 1 + get("Label2","text") -- access count (discarded) + set("Label2","text",sprintf("Hello World! %d",ct)) -- update count + return 1 +end function + +--------------- +function T2()-- show max count achieved in 1 sec. +--------------- + set(lbl3,"text",sprintf("%d lookups per second",ct)) + ct = 0 -- reset count + return 1 +end function diff --git a/eugtk/examples/examples/passwords.ex b/eugtk/examples/examples/passwords.ex new file mode 100644 index 0000000..e56a933 --- /dev/null +++ b/eugtk/examples/examples/passwords.ex @@ -0,0 +1,68 @@ + +------------------------------------------------------------------------ +--# Password generator, requires apg +------------------------------------------------------------------------ + +include GtkEngine.e + +constant docs = `Password Generator +Generates 6 random passwords with pronunciation. +Hit the Generate (alt-G) button to generate a new list.` + +constant win = create(GtkWindow,{ + {"default size",300,100}, + {"border width",10}, + {"position",GTK_WIN_POS_CENTER}, + {"icon","thumbnails/passred.png"}, + {"connect","destroy","Quit"}}) + +constant panel = create(GtkBox,1) + add(win,panel) + +constant lbl = create(GtkLabel) + set(lbl,"markup",docs) + add(panel,lbl) + +constant bkgnd = create(GtkEventBox,{ + {"border width",10}, + {"background",0}}) + add(panel,bkgnd) + +constant list = create(GtkLabel) + set(list,"foreground","#18F424") + add(bkgnd,list) + +constant + btn1 = create(GtkButton,"gtk-quit","Quit"), + btn2 = create(GtkButton,"stock_repeat#_Generate","GeneratePW"), + box = create(GtkButtonBox) + pack(panel,-box) + add(box,{btn1,btn2}) + +show_all(win) + + if system_exec("which apg",0) != 0 then + Warn(win,"Error","Cannot find apg program","Please install one!") + abort(1) + else + GeneratePW() + end if + +main() + +------------------------------ +global function GeneratePW() -- call apg, format and display results; +------------------------------ +system("apg > pw.list -a 0 -M Ncl -t",0) +object results = read_lines("pw.list") +object words = " Password Pronunciation \n\n" + for i = 1 to length(results) do + words &= format(" [1] [2] \n",split(results[i],' ')) + end for + set(list,"markup",words) + set(list,"selectable",TRUE) + delete_file("pw.list") +return 1 +end function + + diff --git a/eugtk/examples/examples/talk.ex b/eugtk/examples/examples/talk.ex new file mode 100644 index 0000000..9f65e8a --- /dev/null +++ b/eugtk/examples/examples/talk.ex @@ -0,0 +1,143 @@ + +------------------------------------------------------------------------ +--# Talk, requires spd-say +------------------------------------------------------------------------ + +include GtkEngine.e + +object lang = "en", speaker = "male1", speed = 0, pitch = 0 + +constant win = create(GtkWindow,{ + {"border width",10}, + {"default size",550,300}, + {"position",GTK_WIN_POS_CENTER}}) + connect(win,"destroy","Quit") + +constant panel = create(GtkBox,VERTICAL) + add(win,panel) + +constant input = create(GtkEntry) + set(input,"text","Type some text here, or select a language below.") + add(panel,input) + + add(panel,create(GtkLabel,"- Languages - ")) + +constant box1 = create(GtkButtonBox), + a1 = create(GtkRadioButton,0,"English","Language",1), + a2 = create(GtkRadioButton,a1,"French","Language",2), + a3 = create(GtkRadioButton,a2,"Russian","Language",3), + a4 = create(GtkRadioButton,a3,"Afrikaans","Language",4) + add(box1,{a1,a2,a3,a4}) + add(panel,box1) + +constant languages = {"en","fr","ru","af","sr","fi","pt","es","it","ur", + "ko","de","is","ms","sk","sv","tr","pl","hi","oc","nn","fa","mk","ka"} + +constant language = create(GtkComboBoxText) + for i = 1 to length(languages) do + set(language,"append text",languages[i]) + end for + set(language,"active",1) + connect(language,"changed","Language") + add(panel,language) + + add(panel,create(GtkSeparator)) + add(panel,create(GtkLabel,"- Voices -")) + +constant box3 = create(GtkButtonBox), + box4 = create(GtkButtonBox), + box5 = create(GtkButtonBox), + m1 = create(GtkRadioButton,0,"Male 1","Voice","male1"), + m2 = create(GtkRadioButton,m1,"Male 2","Voice","male2"), + m3 = create(GtkRadioButton,m2,"Male 3","Voice","male3"), + f1 = create(GtkRadioButton,m3,"Female 1","Voice","female1"), + f2 = create(GtkRadioButton,f1,"Female 2","Voice","female2"), + f3 = create(GtkRadioButton,f2,"Female 3","Voice","female3"), + c1 = create(GtkRadioButton,f3,"Male Child","Voice","child_male"), + c2 = create(GtkRadioButton,c1,"Female Child","Voice","child_female") + set(box3,"homogeneous",TRUE) + set(box4,"homogeneous",TRUE) + add(box3,{m1,m2,m3}) + add(box4,{f1,f2,f3}) + add(box5,{c1,c2}) + add(panel,{box3,box4,box5}) + + add(panel,create(GtkSeparator)) + +constant lbl1 = create(GtkLabel,"- Speed -") + add(panel,lbl1) + +constant Speed = create(GtkScale,HORIZONTAL,-100,100,1) + set(Speed,"value",0) + connect(Speed,"value-changed","SetSpeed") + add(panel,Speed) + +constant lbl2 = create(GtkLabel,"- Pitch -") + add(panel,lbl2) + +constant Pitch = create(GtkScale,HORIZONTAL,-100,100,1) + set(Pitch,"value",0) + connect(Pitch,"value-changed","SetPitch") + add(panel,Pitch) + +constant box6 = create(GtkButtonBox), + btn1 = create(GtkButton,"gtk-quit","Quit"), + btn2 = create(GtkButton,"gtk-ok","Say") + add(box6,{btn1,btn2}) + pack(panel,-box6) + +show_all(win) + + if system_exec("which spd-say",0) != 0 then + Warn(win,"Error","Cannot find spd-say", + "Use apt-get or your package manager\n to install spd-say!") + abort(1) + end if + +main() + +---------------------------------------- +global function Voice(atom ctl, atom v) +---------------------------------------- + if get(ctl,"active") then speaker = unpack(v) + display(speaker) + end if +return 1 +end function + +-------------------------------------------- +global function Language(atom ctl, object l) +-------------------------------------------- + if ctl = language then + l = get(ctl,"active") + else + set(language,"active",l) + end if + atom x = create(PangoLanguage,languages[l]) + object ls = get(x,"to string") + object txt = get(x,"sample string") + set(input,"text",txt) +return 1 +end function + +----------------------------------- +global function SetSpeed(atom ctl) +----------------------------------- + speed = get(ctl,"value") +return 1 +end function + +----------------------------------- +global function SetPitch(atom ctl) +----------------------------------- + pitch = get(ctl,"value") +return 1 +end function + +--------------------- +global function Say() +--------------------- +object txt = get(input,"text") + system(sprintf(`spd-say -w -mnone -r%d -p%d -l%s -t%s "%s"`,{speed,pitch,lang,speaker,txt}),0) +return 1 +end function diff --git a/eugtk/examples/examples/task.ex b/eugtk/examples/examples/task.ex new file mode 100644 index 0000000..fcfb827 --- /dev/null +++ b/eugtk/examples/examples/task.ex @@ -0,0 +1,100 @@ +------------------------------------------------------------------------ +--# Multi-Tasking; +-- +-- This shows how to use the GtkSpinner to indicate progress while loading +-- a large file, or while doing some other lengthy process... +-- If you do not multi-task, the spinner will stop while Euphoria +-- is loading the file, which is exactly what you do NOT want to happen! +------------------------------------------------------------------------ +-- Spinner seems to be broken in Gtk3.6.4, but works fine in Gtk3.4.1 and +-- Gtk3.8.4, and later versions. + +include GtkEngine.e +include GtkEvents.e +include GtkFileSelector.e + +include std/filesys.e + +constant docs = `Spinner & Tasks +This uses Euphoria's multi-tasking functions. +If you run this from an x-term, you will see the lines +as they are read. Click the OK button to begin.` + +constant msg1 = "Reading GtkEnums.e line: %d" +constant msg2 = "Done! %d lines read." + +integer lc = 0 -- count lines read; + +atom t1 +t1 = task_create(routine_id("task1"),{}) +task_schedule(t1,{0.002,1}) +boolean t1_running = TRUE + +label "OPEN_FILE" +integer fn = open(locate_file("GtkEnums.e"),"r") -- file to read; +if fn = -1 then + fn = fileselector:Open() + if fn < 3 then + if Question(,,"Quit?") = MB_YES then Quit() else goto "OPEN_FILE" end if + end if +end if + +constant win = create(GtkWindow,"border_width=10,position=1,$destroy=Quit") + +constant panel = create(GtkBox,1) + add(win,panel) + +constant lbl1 = create(GtkLabel) + set(lbl1,"markup",docs) + +constant lbl2 = create(GtkLabel) +constant lbl3 = create(GtkLabel) + +constant spin = create(GtkSpinner) + set(spin,"size request",30,30) + + add(panel,{lbl1,lbl2,spin,lbl3}) + +constant + btn1 = create(GtkButton,"gtk-quit","Quit"), + btn2 = create(GtkButton,"gtk-ok","StartTask"), + box = create(GtkButtonBox) + add(box,{btn1,btn2}) + set(box,"margin top",15) + pack(panel,-box) + +show_all(win) +main() + +-------------------------------------------------------- +procedure task1() -- this reads and displays the file; +-------------------------------------------------------- +object line = {} +while not atom(line) do + lc += 1 -- increment line count + line = gets(fn) -- read the line + puts(1,line) -- display the line on terminal + task_yield() +end while +t1_running = FALSE +end procedure + +----------------------------------------------------------------- +global function StartTask() -- starts spin and yields to task1; +----------------------------------------------------------------- + set(spin,"start") + + while t1_running do + main_iteration_do(1) -- VITAL! (give GTK a chance to tick the clock) + set(lbl2,"markup",sprintf(msg1,lc)) -- update # of lines read + task_yield() + end while + + set(spin,"stop") + set(btn2,"sensitive",FALSE) + set(lbl2,"markup",sprintf(msg2,lc)) -- done! + +return 0 +end function + + diff --git a/eugtk/examples/examples/test_all.ex b/eugtk/examples/examples/test_all.ex new file mode 100644 index 0000000..5585e01 --- /dev/null +++ b/eugtk/examples/examples/test_all.ex @@ -0,0 +1,104 @@ + +---------------------------------------------------------------------------- +--# Test all programs in ~/demos +-- Run this with an x-term so that you can see messages re: missing files; +-- It runs 5 tests at at time, starting with the number in the box. +-- After these are run, you can click the ok button to run the next 5. + +-- You might be able to run as many as 40 or 50 programs at the same time, +-- depending upon memory and processor(s), but I can't recommend it, +-- since too many can 'freeze' the windows & mouse, leaving you no way +-- out but to hit the power switch! +---------------------------------------------------------------------------- + +include GtkEngine.e + +integer i = 0, ct = 0, step = 10 +atom tick + +chdir(canonical_path("~demos")) + +constant docs = `Testall + +Runs several tests at a time, beginning with the number +in the box below. Be sure to run this program from +an x-term, so you can see any error messages. + +If you are using a slow computer with low memory, +you may change the 'step' variable from 10 to a lower +number. +` +constant win = create(GtkWindow,"border=10,icon=thumbnails/mongoose.png,$destroy=Quit") + +constant panel = create(GtkBox,VERTICAL) + add(win,panel) + +constant lbl1 = create(GtkLabel) + set(lbl1,"markup",docs) + add(panel,lbl1) + +constant lbl2 = create(GtkLabel,{ + {"font","8"}, + {"markup"," Start # Step"}}) + add(panel,lbl2) + +constant + box = create(GtkButtonBox), + btn1 = create(GtkButton,"gtk-quit","Quit"), + btn2 = create(GtkSpinButton,0,210,1), + btn3 = create(GtkSpinButton,1,10,1), + btn4 = create(GtkButton,"gtk-ok","Start") + set(btn3,"value",10) + + pack(box,{btn1,btn2,btn3,btn4}) + pack(panel,-box) + set(btn2,"tooltip markup","Start Set the starting file number here") + set(btn3,"tooltip markup","Step Number of programs to start at each pass") + set(btn4,"tooltip markup","Click here to start the next set of tests") + +show_all(win) +main() + + +------------------------------------------------------------------------ +global function Start() +------------------------------------------------------------------------ + i = get(btn2,"value as int") + step = get(btn3,"value as int") + tick = create(GTimeout,500,call_back(routine_id("Foo"))) + puts(1,"\n") +return 1 +end function + +-------------------------- +global function Foo() +-------------------------- +object fn + fn = sprintf("test%d.ex",i) + set(lbl2,"text",filename(fn)) + if not file_exists(fn) then + printf(1,"%s not found!\n",{filename(fn)}) + set(lbl1,"text",get(lbl1,"text") & "\n" & filename(fn) & " missing!") + set(win,"background","#F8E521") + else + system_exec(sprintf("eui %s &\n",{fn})) + printf(1,"%s\n",{fn}) + end if + + i += 1 + if i > length(dir("test*.ex")) then + Info(,,"That's all, Folks!") + abort(0) + end if + + set(btn2,"value",i) + ct += 1 + if ct = step then + ct = 0 + return 0 + else + return 1 + end if +end function + + diff --git a/eugtk/examples/examples/test_missing.ex b/eugtk/examples/examples/test_missing.ex new file mode 100644 index 0000000..0a374c9 --- /dev/null +++ b/eugtk/examples/examples/test_missing.ex @@ -0,0 +1,39 @@ + +------------------------------------------------------------------------ +--# finds unused test[n].ex program names +------------------------------------------------------------------------ + +include GtkEngine.e + +constant win = create(GtkWindow,"title=Missing Tests,size=250x-1,border=10,position=1,$destroy=Quit") + +constant panel = create(GtkBox,VERTICAL) + add(win,panel) + +constant listbox = create(GtkListBox,"margin-top=10,margin bottom=10") + add(panel,listbox) + +constant box = create(GtkButtonBox) + add(box,create(GtkButton,"gtk-quit","Quit")) + pack(panel,-box) + +chdir(canonical_path("~demos")) + +boolean missing = FALSE + +for i = 0 to 211 do + if file_exists(sprintf("test%d.ex",i)) then -- skip + else printf(1,"missing test%d.ex\n",i) + add(listbox,create(GtkLabel,sprintf("test%d.ex",i))) + missing = TRUE + end if +end for + +if not missing then Info(,,"Congrats","No missing demos",,"face-cool") + +else + + show_all(win) + main() + +end if diff --git a/eugtk/examples/examples/webkit.ex b/eugtk/examples/examples/webkit.ex new file mode 100644 index 0000000..966a4ca --- /dev/null +++ b/eugtk/examples/examples/webkit.ex @@ -0,0 +1,153 @@ + +----------------------------------------------------------- +--# GtkWebKit demo, views web pages (and runs Eu program) +----------------------------------------------------------- + +include GtkEngine.e +include GtkEvents.e +include std/net/url.e +include GtkWebKit.plugin + +constant docs = """ + +Adds a web browser +to your EuGTK program! + +This demo can display source code +as well as running *.ex programs, +just click on a link! +""" + +object uri = 0 +if networked() then + uri = format("http://[]:8080",{get_net_address()}) +else + uri = "FILE:///"& canonical_path("~/demos/documentation/README.html") +end if + +constant fmt = +`Default font [] + Monospace font [] + Serif font [] + Sans font [] + Fantasy font [] + ` +constant win = create(GtkWindow,"size=1000x800,position=1,border=10,background=grey90") + connect(win,"destroy","Quit") + +constant panel = create(GtkBox,VERTICAL) + add(win,panel) + +constant view = create(WebkitWebView) + pack(panel,view,TRUE,TRUE) + +constant settings = get(view,"settings") + set(settings,{ + {"enable tabs to links",TRUE}, + {"zoom text only",TRUE}, + {"enable developer extras",TRUE}, + {"enable smooth scrolling",TRUE}, + {"enable_caret_browsing",TRUE}, + {"draw_compositing_indicators",TRUE}, + {"enable fullscreen",TRUE}, -- try these; + {"enable_resizable_text_areas",TRUE}, + {"enable_spatial_navigation",TRUE}, + $}) + +constant box = create(GtkButtonBox), + url = create(GtkEntry), + btn1 = create(GtkButton,"gtk-about",_("About")), + btn2 = create(GtkButton,"back#",_("Backward")), + btn3 = create(GtkButton,"forward#",_("Forward")), + btn4 = create(GtkButton,"gtk-quit","Quit"), + slider1 = create(GtkScale,{ + {"orientation",HORIZONTAL}, + {"range",50,200}, + {"value",100}, + {"digits",0}, + {"tooltip text","Zoom Text"}, + {"connect","change value",_("ScaleView")}}) + pack(panel,slider1) + add(box,{btn4,url,btn2,btn3,btn1}) + set(box,{ + {"layout",GTK_BUTTONBOX_END}, + {"child secondary",btn4,TRUE}}) + pack(panel,-box) + + set(url,"tooltip text","Enter URL here, hit enter.") + set(url,"width chars",80) + set(url,"text",uri) + connect(url,"activate",_("LoadURI")) + +show_all(win) + +constant img2 = get(btn2,"image") +constant img3 = get(btn3,"image") + +set(btn2,"tooltip markup","Go to previous page\n(if available)") +set(btn3,"tooltip markup","Go to next page\n(if available)") + +connect(view,"load-changed",_("UpdateState")) +set(view,"load uri",uri) + +main() + +-------------------------- +function About() +-------------------------- +object p = floor((get(win,"size")/2) + get(win,"position")) -- keep near center +return Info(,,"Webkit Plugin",docs,,,,,,p[1],p[2]) +end function + +-------------------------- +function Backward() +-------------------------- + set(view,"go back") + UpdateState(view,0) +return 1 +end function + +------------------------- +function Forward() +------------------------- + set(view,"go forward") + UpdateState(view,0) +return 1 +end function + +------------------------ +function LoadURI(atom x) +------------------------- +object uri = url:decode(get(x,"text")) + set(view,"load uri",uri) + UpdateState(view,WEBKIT_LOAD_FINISHED) + return 1 +end function + +----------------------------------------------------- +function UpdateState(atom view, integer event) +----------------------------------------------------- + set(img2,"visible",get(view,"can go back")) + set(img3,"visible",get(view,"can go forward")) + object uri + if event = WEBKIT_LOAD_FINISHED then + uri = get(view,"uri") + set(win,"title",get(view,"title")) + uri = locate_file(url:decode(uri)) + uri = uri[9..$] -- get rid of file:/// + set(url,"text",uri) + if match("ex",fileext(uri)) then + system(sprintf("eui %s & ",{uri}),2) -- run in bkgnd; + end if + end if +return 1 +end function + +----------------------------------- +function ScaleView(atom ctl) +----------------------------------- + set(view,"zoom level", get(ctl,"value") / 100) +return 0 +end function + + diff --git a/eugtk/examples/examples/webserver.ex b/eugtk/examples/examples/webserver.ex new file mode 100644 index 0000000..82248a7 --- /dev/null +++ b/eugtk/examples/examples/webserver.ex @@ -0,0 +1,165 @@ + +--# Webserver - GUI for httpd.ex + +include GtkEngine.e +include std/datetime.e +include std/net/dns.e + +export constant version = "1.0" + +------------------------------------------------------------------------ +-- I use this to serve music or other files to my Google Nexus tablet +-- or smart phone, so I can listen, look at photos, read documentation, +-- etc. while I work (or not :p) + +-- You'll need the server connected to a router, of course, +-- otherwise, you can only serve to localhost. +------------------------------------------------------------------------ + +-- try to find a working terminal to use for displaying requests; +object term = 0, +terms = {"mate-terminal","gnome-terminal","xterm",getenv("TERM")} +for i = 1 to length(terms) do + terms[i] = locate_file(terms[i]) + if file_exists(terms[i]) then + term = terms[i] + exit + end if +end for + +display(term) + +constant win = create(GtkWindow,{ + {"border width",20}, + {"default size",300,200}, + {"position",GTK_WIN_POS_CENTER}, + {"title"," EuGTK Web Server"}, + {"icon","~/demos/thumbnails/mongoose.png"}}) + connect(win,"destroy","Quit") + +constant panel = create(GtkBox,VERTICAL) +gtk:add(win,panel) + +constant addrbox = create(GtkGrid) + set(addrbox,"column spacing",5) + set(addrbox,"row spacing",5) + gtk:add(panel,addrbox) + +constant + lbl1 = create(GtkLabel,"IP:"), + ip = create(GtkEntry), + port = create(GtkSpinButton,8080,8090,1), + lbl3 = create(GtkLabel,"Root"), + root = create(GtkFileChooserButton), + lbl4 = create(GtkLabel,"Log file:"), + logf = create(GtkEntry), + sortf = create(GtkCheckButton,"_Sort"), + showreq = create(GtkCheckButton,"Show _Full Request"), + hidden = create(GtkCheckButton,"Show _Hidden Files"), + tailf = create(GtkCheckButton,"Tail -f") + + set(ip,"text",get_net_address()) + set(port,"text","8080") + set(root,"current folder",canonical_path("~/demos/documentation")) + set(root,"action",GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) + set(logf,"text",".server.log")--or blank. I prefer to hide my server log file + set(sortf,"active",TRUE) + set(tailf,"active",TRUE) + + set(root,"tooltip markup","Choose the base folder.\nEvery subfolder below this will be served") + set(sortf,"tooltip markup","Sort the directory listings") + set(showreq,"tooltip markup","Show full request string in logs") + set(hidden,"tooltip markup","Include hidden files in those being served") + set(tailf,"tooltip markup","Pop up a window to show active connections") + + set(addrbox,"attach",lbl1,1,1,1,1) + set(addrbox,"attach",ip,2,1,1,1) + set(addrbox,"attach",port,3,1,1,1) + set(addrbox,"attach",create(GtkSeparator),1,2,4,1) + set(addrbox,"attach",lbl3,1,3,1,1) + set(addrbox,"attach",root,2,3,2,1) + set(addrbox,"attach",create(GtkSeparator),1,4,4,1) + set(addrbox,"attach",lbl4,1,5,1,1) + set(addrbox,"attach",logf,2,5,1,1) + if not atom(term) then + set(addrbox,"attach",tailf,3,5,1,1) + end if + set(addrbox,"attach",create(GtkSeparator),1,6,4,1) + set(addrbox,"attach",sortf,1,7,1,1) + set(addrbox,"attach",showreq,2,7,1,1) + set(addrbox,"attach",hidden,3,7,1,1) + +constant box = create(GtkButtonBox), + btn1 = create(GtkButton,"gtk-quit","Quit"), + btn2 = create(GtkButton,"gtk-help","Help"), + btn3 = create(GtkButton,"gtk-ok","StartServer") + set(btn2,"tooltip markup","Click here for html help") + set(btn3,"tooltip markup","Click here to start the server") + set(box,"margin top",10) + gtk:add(box,{btn1,btn2,btn3}) + pack(panel,-box) + +show_all(win) +main() + +------------------------------ +global function StartServer() +------------------------------ +object server = canonical_path("~/demos/examples/httpd.ex") +object params = sprintf("eui %s -bind %s:%s ", + {server, + remove_all(' ',get(ip,"text")), + remove_all(' ',get(port,"text")) + }) +object log = get(logf,"text") +object path = get(root,"filename") +chdir(canonical_path(path)) + +object exe = "" + + if length(path) > 0 then + params &= sprintf("-root '%s' ",{current_dir()}) + log = path & "/" & log + end if + + if length(log) > 0 then + params &= sprintf("-log %s ",{log}) + end if + + if get(sortf,"active") then + params &= " -s " + end if + + if get(hidden,"active") then + params &=" -h " + end if + + if get(showreq,"active") then + params &= " -r " + end if + + -- the following only tested on mate-terminal, others may need different params; + if get(tailf,"active") then + exe = sprintf(`%s -e "tail -f %s" --profile logview -t "Eu Server Log" & %s -e "%s" --tab --profile logview -t "Eu Server Status" --geometry=132x30 &`, + {term,log,term,params}) + else + exe = sprintf(`%s -e "%s" &`,{term,params}) + end if + + display(exe) + system(exe) + +return 1 +end function + +----------------------------- +global function Help() +----------------------------- + show_uri(sprintf("file:///%s", + {canonical_path("~/demos/documentation/ServerHelp.html")})) +return 1 +end function + +------------------------ +--© 2014 by Irv Mullins +------------------------ diff --git a/eugtk/examples/examples/worldflags.ex b/eugtk/examples/examples/worldflags.ex new file mode 100644 index 0000000..49b7338 --- /dev/null +++ b/eugtk/examples/examples/worldflags.ex @@ -0,0 +1,239 @@ + +------------------------------------------------------------------------ +--# Worldflags - match the flags and name the country +------------------------------------------------------------------------ + +include GtkEngine.e +include std/filesys.e +include std/sequence.e + +integer prev = 0, guesses = 0, correct = 0, misses = 0 +atom score = 0 +constant flagdir = canonical_path("~/demos/resources/flags/") + +---------------------------- +-- get list of flag names +---------------------------- +object flaglist = dir(flagdir & "flags-*.png") + + if atom(flaglist) then + Error(0,"Worldflags Error","Cannot find flags",flagdir,,GTK_BUTTONS_CLOSE) + abort(1) + end if + + flaglist = vslice(flaglist,D_NAME) + +-------------------------------- +-- select 8 at random, no dupes +-------------------------------- +object flagarray = {} +while length(flagarray) < 8 do + flagarray = add_item(flaglist[rand(length(flaglist))],flagarray) +end while + +--------------------------------------------- +-- shuffle the 8 and add them to list again +-- so every flag has a twin somewhere +--------------------------------------------- +flagarray &= shuffle(flagarray) + +enum HANDLE, FLAG, TUX, NAME, CAPTION, SIGID, HASH, MATCHED + +------------------------------------------- +-- create buttons from the selected flags +------------------------------------------- +object btn = {HANDLE,FLAG,TUX,NAME,CAPTION,SIGID,HASH,MATCHED} +object btns = repeat(btn,16) +object ctl, name, flag, tux, box, lbl, sigid, id +for i = 1 to 16 do + -- get rid of the file extension, and change country name to nice format; + name = proper(join(split(flagarray[i][7..$-4],'_'),' ')) + -- match flag with its twin by means of a hash on the file name; + id = hash(name,0) + -- make a button to hold the flag; + ctl = create(GtkToolButton) + flag = create(GtkImage,flagdir & flagarray[i]) + tux = create(GtkImage,"~/demos/thumbnails/BabyTux.png") + sigid = connect(ctl,"clicked",call_back(routine_id("onClick")),i) + box = create(GtkBox,1) + lbl = create(GtkLabel,{ + {"text",name}, + {"font","8"}, + {"max width chars",10}, + {"ellipsize",PANGO_ELLIPSIZE_END}}) + add(box,{tux,flag,lbl}) + set(ctl,{ + {"label widget",box}, + {"size request",80,80}}) + show({ctl,box,flag,lbl}) + btns[i] = {ctl,flag,tux,name,lbl,sigid,id,FALSE} + ifdef CHEAT then + set(ctl,"tooltip text",name) + end ifdef +end for + +---------------------- +-- make a main window +---------------------- +constant win = create(GtkWindow,{ + {"border width",10}, + {"default size",120,120}, + {"position",GTK_WIN_POS_CENTER}, + {"icon","thumbnails/preferences-desktop-locale.svg"}}) + connect(win,"destroy","Quit") + show(win) + +constant panel = create(GtkBox,1) + add(win,panel) + show(panel) + +--------------------- +-- make a grid +--------------------- +constant grid = create(GtkGrid,{ + {"row homogeneous",TRUE}, + {"column homogeneous",TRUE}}) + add(panel,grid) + show(grid) + +------------------------------- +-- attach flag buttons to grid +------------------------------- +integer i = 1 +for x = 1 to 4 do + for y = 1 to 4 do + set(grid,"attach",btns[i][HANDLE],x,y,1,1) + i += 1 + end for +end for + +constant helptxt = create(GtkLabel,{ + {"markup","Perfect score is 100"}, + {"font","8"}, + {"foreground","red"}}) + add(panel,helptxt) + show(helptxt) + +------------------------------------------ +-- show flags for 5 seconds, then hide 'em +------------------------------------------ +constant delay = create(GTimeout,5000,call_back(routine_id("hide_flags"))) + +main() + +------------------------------------------------------------------------ +function hide_flags() -- called once at start of pgm. after a delay +------------------------------------------------------------------------ + for x = 1 to 16 do + set(btns[x][FLAG],"hide") + set(btns[x][CAPTION],"hide") + set(btns[x][TUX],"show") + btns[x][MATCHED] = FALSE + end for +return 0 -- 0 kills the timer, otherwise it would fire again every 5 sec. +end function + +--------------------------------------------------------------- +function onClick(atom ctl, integer this) +--------------------------------------------------------------- + set(btns[this][TUX],"hide") + set(btns[this][FLAG],"show") + + if btns[this][MATCHED] then return 1 end if + + if prev > 0 then + if this = prev then return 1 end if -- same one clicked again, forgettaboutit! + if btns[this][HASH] != btns[prev][HASH] then -- not a match + set(btns[prev][FLAG],"hide") + set(btns[prev][CAPTION],"hide") + set(btns[prev][TUX],"show") + misses += 1 + prev = this + guesses += 1 + score -= 1 + else -- matched! + btns[prev][MATCHED] = TRUE + btns[this][MATCHED] = TRUE + guesses += 1 + correct += 1 + prev = 0 + popup_extra_credit(this) + end if + else + prev = this + end if + + set(win,"title", -- update score; + sprintf("Score: %2.1f",score)) + return 1 +end function + +------------------------------------------------------------- +function popup_extra_credit(integer x) +------------------------------------------------------------- +object dlg = create(GtkDialog,{ + {"default size",200,200}, + {"border width",10}, + {"add button","gtk-ok",1}}) + +object ca = get(dlg,"content area") +display(flagarray[x]) +object img = create(GtkImage,sprintf("~/demos/resources/flags/%s",{flagarray[x]})) +object lbl = create(GtkLabel,{ + {"font","8"}, + {"markup", + "You get 5 points for correctly matching the flags.\n" & + "For more points, please identify the country that\nflies this flag."}}) + +object sep = create(GtkSeparator) + add(ca,{img,lbl,sep}) + +object choices = {btns[x][NAME]} + while length(choices) < 3 do + choices = add_item(btns[rand(16)][NAME],choices) + end while + choices = shuffle(choices) + +object btn = repeat(0,3) + btn[1] = create(GtkRadioButton,0,choices[1]) + btn[2] = create(GtkRadioButton,btn[1],choices[2]) + btn[3] = create(GtkRadioButton,btn[2],choices[3]) + add(ca,btn) + show_all(ca) + +object choice +integer i = get(dlg,"run") + + for j = 1 to 3 do + if get(btn[j],"active") then choice = choices[j] end if + end for + + if equal(choice,btns[x][NAME]) then + score += 100/8 + show_matched_captions(0) + else + score += 5 + show_matched_captions(x) + set(helptxt,"text","Incorrect guesses are shown in red") + end if + + set(dlg,"destroy") + show_matched_captions(0) + +return 1 +end function + +------------------------------------------------------------------------ +procedure show_matched_captions(integer x) +------------------------------------------------------------------------ +for i = 1 to 16 do + if btns[i][MATCHED] then show(btns[i][CAPTION]) end if + if x > 0 then -- set miss-identified captions to red + if equal(btns[i][NAME],btns[x][NAME]) then + set(btns[i][CAPTION],"color","red") + end if + end if +end for +end procedure + + diff --git a/eugtk/examples/examples/xpm_include_test.ex b/eugtk/examples/examples/xpm_include_test.ex new file mode 100644 index 0000000..6b7d17f --- /dev/null +++ b/eugtk/examples/examples/xpm_include_test.ex @@ -0,0 +1,23 @@ + +---------------------------------------------------------------- +--# This demo includes xpm images as regular Eu sequences. + +-- If this program is bound, shrouded, or compiled, the images +-- will be bound along with it, so neither the images nor the +-- include need to be available at run-time. +----------------------------------------------------------------- + +include GtkEngine.e + +include icon_P.e -- the converted xpm images; +include icon_I.e +include icon_E.e + +constant win = create(GtkWindow,"title=XPM includes,size=100x100,position=1,border=30,$destroy=Quit") + +constant panel = create(GtkBox,HORIZONTAL) + add(win,panel) + add(panel,{p:icon,i:icon,e:icon}) + +show_all(win) +main() diff --git a/eugtk/examples/examples/xpm_to_eu_include.ex b/eugtk/examples/examples/xpm_to_eu_include.ex new file mode 100644 index 0000000..58abe38 --- /dev/null +++ b/eugtk/examples/examples/xpm_to_eu_include.ex @@ -0,0 +1,141 @@ + +-------------------------------------------------------------- +--# Utility converts xpm image file to euphoria sequence +-- which is then converted and exported as a GdkPixbuf. +-------------------------------------------------------------- + +include GtkEngine.e + +integer n +object inputfile, outputfile +object xpm_name +object work = {"include GtkEngine.e\n"} + +constant win = create(GtkWindow,"title=XPM to .e,border=10,size=200x200,position=1,sig.destroy=Quit") + +constant panel = create(GtkBox,"orientation=VERTICAL,spacing=10") + add(win,panel) + +constant lbl1 = create(GtkLabel,"Enter name of xpm file") + add(panel,lbl1) + +constant fcb = create(GtkFileChooserButton,{ + {"title","Select a file"}, + {"action",GTK_FILE_CHOOSER_ACTION_OPEN}, + {"current folder",canonical_path("~/demos/thumbnails")}, + {"tooltip text","Click to open a file chooser dialog"}, + {"signal","file-set","show_output_name"}}) + add(panel,fcb) + +constant filter = create(GtkFileFilter,{{"add pattern","*.xpm"}}) + set(fcb,"filter",filter) + +constant lbl2 = create(GtkLabel,"Output .e file or leave blank") + add(panel,lbl2) + +constant out = create(GtkEntry) + add(panel,out) + +constant img = create(GtkImage) + add(panel,img) + +constant box = create(GtkButtonBox) + pack_end(panel,box) + + add(box,create(GtkButton,"gtk-quit","Quit")) + add(box,create(GtkButton,"gtk-ok","xpm_convert")) + +show_all(win) +main() + +--------------------------------------------------------- +function ProcessXPM(object line, integer ln, object data) +--------------------------------------------------------- +integer i + + if ln = 1 then -- retain name in comment; + i = match("/*",line) + if i > 0 then + line = line[i..$] + end if + end if + + if ln = 2 then -- convert to eu constant declaration; + i = match("static char *",line) + if i > 0 then + xpm_name = line[i+14..$] + line = line[1..i-1] & "constant " & xpm_name + end if + i = match("[]",line) -- remove the brackets; + if i > 0 then + line = line[1..i-1] & line[i+2..$] + end if + end if + + line = transmute(line,{{},'\t'},{' '}) -- convert tabs to spaces; + work = append(work,line) + +return 0 +end function + +--------------------------------------------- +global function show_output_name(object ctl) +--------------------------------------------- + set(out,"text",filebase(get(ctl,"filename")) & ".e") +return 1 +end function + +----------------------------------------------------- +global function xpm_convert() +----------------------------------------------------- + + inputfile = get(fcb,"filename") + if not file_exists(inputfile) then + Error(,,inputfile,"does not exist",GTK_BUTTONS_CANCEL) + return 0 + end if + + set(img,"from file",inputfile) -- preview; + + outputfile = get(out,"text") + if length(outputfile) = 0 then + outputfile = filebase(inputfile) & ".e" + set(out,"text",outputfile) + end if + + process_lines(inputfile,routine_id("ProcessXPM")) + integer x = length(work) + + xpm_name = split(xpm_name,"[") xpm_name = xpm_name[1] + + work[$] = work[$][1..$-1] -- get rid of trailing semi-colon; + + object n = filebase(get(out,"text")) + work = prepend(work, + sprintf( +`namespace %s + +-- exports %s:icon as a GdkPixbuf +`, + {filebase(outputfile),n,n})) + + work = append(work,"------------------------------------------------------------------------------") + work = append(work,sprintf("export constant icon = xpm_to_pixbuf(%s)",{xpm_name})) + work = append(work,"------------------------------------------------------------------------------") + + write_lines(outputfile,work) + + Info(,, + sprintf("include %s",{get(out,"text")}), + sprintf("reference with namespace:\n\t%s:icon",{filebase(get(out,"text"))})) + +return 1 +end function + + + + + + + + diff --git a/eugtk/examples/glade/.httpd.css b/eugtk/examples/glade/.httpd.css new file mode 100644 index 0000000..c8424d0 --- /dev/null +++ b/eugtk/examples/glade/.httpd.css @@ -0,0 +1,10 @@ +/* +-- ==================================================================== +-- Styling for the remote display is set here; +-- ==================================================================== +*/ + th {color:yellow; background-color: blue;} + button {width: 100%;} + td {outline-style: solid; outline-width: 1px; outline-color: black; padding:2px; width: 25%;} + body {background-image: linear-gradient(180deg, orange, green); background-repeat: no-repeat;) + diff --git a/eugtk/examples/glade/Jessica-Alba.jpg b/eugtk/examples/glade/Jessica-Alba.jpg new file mode 100644 index 0000000..7aec901 Binary files /dev/null and b/eugtk/examples/glade/Jessica-Alba.jpg differ diff --git a/eugtk/examples/glade/README.html b/eugtk/examples/glade/README.html new file mode 100644 index 0000000..d745078 --- /dev/null +++ b/eugtk/examples/glade/README.html @@ -0,0 +1,85 @@ + + + + + README + + + + + +
+ GTK Logo + Glade Logo +

EuGTK 4.11.10

+
+ +

Glade Demos

+

+You can use Glade to design and adjust your user interface. +You still must write some Euphoria functions to respond to user interactions with the GUI. This is no different than VisualBasic, Delphi, or other programming environments, except that EuGTK code is generally less confusing. +

+ +

+For writing that Euphoria code, either Geany or Pete Eberlein's new WEE editor (written in Euphoria and using EuGTK) +works for me. If you test-run your program from an x-term, EuGTK will generate +function prototypes for missing functions and display them on the terminal. +You can then copy and paste the prototype code into your program, and add +the necessary details. +

+ +

+Please start by reading Glade docs, +Starting Glade, and +Starting Glade II. +

+ + +widgets.ex + + +

+Some of the programs in this folder are duplicates of other demos elsewhere, but have been re-written using Glade to design the user-interface. These are provided as examples f.y.i. +

+ +

+

    +
  • main.ex +
    along with include files:
    +
    +
    • file.e
    • prefs.e
    • help.e
    +
    + +
  • calendar.ex +
    Fancy calendar with About dialog
  • + +
  • calculator.ex +
    Uses Shian Lee's math evaluator
  • + +
  • widgets.ex +
    Demos all numeric widgets

    + +
+

+

+ +

+ +
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

+ Updated for EuGTK version 4.11.11 Sept 1, 2016
+ All code © 2016 by Irv Mullins +

+
+
+ + + + diff --git a/eugtk/examples/glade/about.e b/eugtk/examples/glade/about.e new file mode 100644 index 0000000..239147d --- /dev/null +++ b/eugtk/examples/glade/about.e @@ -0,0 +1,15 @@ +namespace about + +include GtkEngine.e + +add(builder,canonical_path("~/demos/glade/about.glade")) + +constant dlg = pointer("about:aboutdialog1") + +----------------------------------------------------------------------- +global function on_help_about_activate() +----------------------------------------------------------------------- + if get(dlg,"run") then end if + set(dlg,"hide") +return 1 +end function diff --git a/eugtk/examples/glade/about.glade b/eugtk/examples/glade/about.glade new file mode 100644 index 0000000..7b2cb59 --- /dev/null +++ b/eugtk/examples/glade/about.glade @@ -0,0 +1,36 @@ + + + + + + False + dialog + About Hello + Test of <b>Eu/Glade</b> + February 2015 + apport + lgpl-3-0 + + + False + vertical + 2 + + + False + end + + + False + True + end + 0 + + + + + + + + + diff --git a/eugtk/examples/glade/accessories-calculator.png b/eugtk/examples/glade/accessories-calculator.png new file mode 100644 index 0000000..f2e903f Binary files /dev/null and b/eugtk/examples/glade/accessories-calculator.png differ diff --git a/eugtk/examples/glade/au.e b/eugtk/examples/glade/au.e new file mode 100644 index 0000000..1d71b2b --- /dev/null +++ b/eugtk/examples/glade/au.e @@ -0,0 +1,14 @@ +namespace au + +include GtkEngine.e + +constant flag = canonical_path("~/demos/resources/flags/flags-australia.png") + set("image4","from pixbuf",create(GdkPixbuf,flag,-1,15,1)) + +export function hello(atom ctl, Label data) + set(data,"markup","G'Day, Mate!") +return 1 +end function + + + diff --git a/eugtk/examples/glade/browser.ex b/eugtk/examples/glade/browser.ex new file mode 100644 index 0000000..25a740e --- /dev/null +++ b/eugtk/examples/glade/browser.ex @@ -0,0 +1,118 @@ + +---------------------------------------------------------------------------------- +--# A simple file browser/runner; +---------------------------------------------------------------------------------- + +include GtkEngine.e +include std/sort.e +include std/datetime.e -- using this requires us to namespace gtk: functions + +chdir(login) + +constant win = create(GtkWindow,"size=750x550,border=10,$destroy=Quit") + gtk:set(win,"title","EuGTK Browser - " & login) + +constant panel = create(GtkBox,"orientation=VERTICAL") + gtk:add(win,panel) + +constant lbl = create(GtkLabel, + "markup='Use alt-f to search, <enter> or double-click to run!'") + gtk:add(panel,lbl) + +constant store = create(GtkListStore,{gSTR,gSTR,gINT,gSTR,gINT,gSTR}) + +constant tv = create(GtkTreeView,{ + {"model",store}, + {"reorderable",TRUE}, + {"headers clickable",TRUE}, + {"set grid lines",GTK_TREE_VIEW_GRID_LINES_BOTH}, + {"rules hint",TRUE}}) + +constant cols = { -- below is a new way to define cols and renderers in 1 line; + create(GtkColumn,"title=Name,type=text,text=1,sort_column_id=2"), --[1] + create(GtkColumn,"title=Size,type=text,text=3,sort_column_id=3"), + create(GtkColumn,"title=Date,type=text,text=4,sort_column_id=5"), --[2] + create(GtkColumn,"title=Description,type=text,markup=6,sort_column_id=6") +} +--[1] filename in col[1] is sorted by number in col[2] +--[2] date shown in col[4] is sorted on unix date in col[5] + +gtk:add(tv,cols) + +constant selection = gtk:get(tv,"selection") + set(selection,"mode",GTK_SELECTION_MULTIPLE) + +constant scroller = create(GtkScrolledWindow) + pack(panel,scroller,TRUE,TRUE,10) + gtk:add(scroller,tv) + +constant box = create(GtkButtonBox) + pack_end(panel,box) + +constant btn = create(GtkButton,"gtk-quit","Quit") + gtk:add(box,btn) + +-- load file list; +object files = dir("*.ex") + +-- convert dates to usable format; +files = apply(files,routine_id("convert_date")) +files = apply(files,routine_id("convert_filename")) + +-- load files into listview; +gtk:set(store,"data",files) + +-- set up handlers; +gtk:set(tv,"rules hint",TRUE) +gtk:set(tv,"columns autosize") +gtk:set(tv,"search column",6) +gtk:set(tv,"search equal func",_("search_func")) +connect(tv,"row-activated","show_choice") +gtk:set(store,"sort column id",2,GTK_SORT_ASCENDING) -- default startup sort; + +-- run the program! +show_all(win) +main() + +------------------------------------------------ +function convert_filename(object f, object junk) -- allow 'natural' sort order; +------------------------------------------------ +object tmp = io:read_lines(f[1]) +for i = 1 to length(tmp) do + if match("--#",tmp[i]) =1 then + f[6] = tmp[i][5..$] + end if + end for +f[1] = filebase(f[1]) -- drop extension, build index of #s; +object x = filter(f[1],"out",{'0','9'},"[]") +object n = filter(f[1],"in",{'0','9'},"[]") +f[2] = x & pad_head(n,10,'0') +return f +end function + +----------------------------------------- +function convert_date(object a, object b) -- convert dates to unix for sorting; +----------------------------------------- +object dt = datetime:new(a[4],a[5],a[6]) -- convert eu dir() date to datetime; + a[5] = to_unix(dt) -- store as UNIX timestamp for sorting purposes; + a[4] = datetime:format(dt,"%b %d %Y") -- store human-readable date for display; + a[6] = "?" +return a +end function + +------------------------------------------------------------------------------- +function search_func(atom mdl, integer col, object key, atom iter, object data) +------------------------------------------------------------------------------- +key = lower(peek_string(key)) -- key is passed as pointer to string +data = get(mdl,"value",iter,6) -- value from col 6 of liststore (description) +return not match(key,lower(data)) -- find word anywhere in description, 0 = found +end function + +----------------------- +global function show_choice() +----------------------- +integer row = gtk:get(selection,"selected row") +object f = gtk:get(store,"col data",row,1) +system("eui " & f,0) -- run it; +return 1 +end function diff --git a/eugtk/examples/glade/ca.e b/eugtk/examples/glade/ca.e new file mode 100644 index 0000000..9a3c8da --- /dev/null +++ b/eugtk/examples/glade/ca.e @@ -0,0 +1,14 @@ +namespace ca + +include GtkEngine.e + +constant flag = canonical_path("~/demos/resources/flags/flags-canada.png") + set("image5","from pixbuf",create(GdkPixbuf,flag,-1,15,1)) + +export function hello(atom ctl, atom data) + set(data,"markup","Nice day, eh?") +return 1 +end function + + + diff --git a/eugtk/examples/glade/calculator.ex b/eugtk/examples/glade/calculator.ex new file mode 100644 index 0000000..df4a505 --- /dev/null +++ b/eugtk/examples/glade/calculator.ex @@ -0,0 +1,122 @@ + +--# Calculator - uses math_eval.e by Shian Lee + +include GtkEngine.e +include GtkEvents.e + +include math_eval.e -- AUTHOR: Shian Lee + +add(builder,canonical_path("~/demos/glade/calculator.glade")) + +object accumulator = "" + +boolean has_decimal = FALSE +integer parens = -0 + +atom disp = pointer("label1") + set(disp,"color",#FADA12) + set("eventbox1","background","black") + set("window1","icon","calc") + +main() + +----------------------------------------------------------------------- +global function on_button_clicked(Button btn) +----------------------------------------------------------------------- +object key = get(btn,"name") +switch key do + case "clr" then clear_display() + case "=" then adjust_parens() do_calc() + case else update_display(key) +end switch +return 0 +end function + +----------------------------------------------------------------------- +global function on_window1_key_press_event(Window w, atom event) +----------------------------------------------------------------------- +object key = events:key(event) +switch key do + case 8 then do_backspace() + case 13 then update_display(key) do_calc() -- enter key + case 27 then clear_display() -- esc key clears accumulator + case 174 then update_display(".") -- keypad '.' = 174 + case else if key > 0 then update_display(key) end if +end switch + return 0 +end function + +------------------------------------- +procedure do_backspace() +------------------------------------- +if length(accumulator) then + accumulator = accumulator[1..$-1] + set(disp,"text",accumulator) +end if +end procedure + +------------------------------------- +procedure clear_display() +------------------------------------- + accumulator = "" + set(disp,"text",accumulator) + parens = 0 + has_decimal = FALSE +end procedure + +------------------------------------- +procedure update_display(object key) +------------------------------------- + switch key do + case 40 then parens += 1 + case 41 then if parens > 0 then parens -= 1 end if + case 13 then adjust_parens() return + case "|" then + adjust_parens() + set(disp,"text",accumulator) + return + case "." then + if has_decimal then return end if + has_decimal = TRUE + end switch + accumulator &= key + set(disp,"text",accumulator) +end procedure + +------------------------------------------------ +procedure adjust_parens() +------------------------------------------------ + while parens > 0 do + accumulator &= ')' + parens -= 1 + end while +end procedure + +------------------------------------------------ +procedure do_calc() -- send text to math_eval() +------------------------------------------------ +object txt = accumulator + if parens then txt &= ")" end if +object results = math_eval(txt) + if atom(results) then -- valid result + results = sprintf("%g",results) + set(disp,"text",accumulator & " = " & results) + accumulator = results + else -- display the error message + Warn(,,accumulator,results,,"calc",64) + end if + +end procedure + +----------------------------------------------------------------------- +global function on_fn_clicked(Button b) +----------------------------------------------------------------------- +object name = get(b,"name") + if find('(',name) then parens += 1 end if + accumulator &= name + set(disp,"text",accumulator) +return 1 +end function + + + diff --git a/eugtk/examples/glade/calculator.glade b/eugtk/examples/glade/calculator.glade new file mode 100644 index 0000000..0a2a31e --- /dev/null +++ b/eugtk/examples/glade/calculator.glade @@ -0,0 +1,1027 @@ + + + + + True + False + 0.46000000834465027 + gtk-clear + + + 200 + True + False + True + 5 + Calc + center + accessories-calculator.png + + + + + True + False + + + 1 + 1 + True + False + False + half + True + False + 0.51999998092651367 + 0.46000000834465027 + + + + 0 + 1 + 1 + 1 + + + + + 2 + 2 + True + False + False + True + False + + + + 1 + 1 + 1 + 1 + + + + + 3 + 3 + True + False + False + True + False + + + + 2 + 1 + 1 + 1 + + + + + _4 + 4 + True + False + False + True + False + + + + 0 + 2 + 1 + 1 + + + + + _5 + 5 + True + False + False + True + False + + + + 1 + 2 + 1 + 1 + + + + + _6 + 6 + True + False + False + True + False + + + + 2 + 2 + 1 + 1 + + + + + _7 + 7 + True + False + False + True + False + + + + 0 + 3 + 1 + 1 + + + + + _8 + 8 + True + False + False + True + False + + + + 1 + 3 + 1 + 1 + + + + + _9 + 9 + True + False + False + True + False + + + + 2 + 3 + 1 + 1 + + + + + _0 + 0 + True + False + False + True + False + + + + 0 + 4 + 1 + 1 + + + + + _. + . + True + False + False + Decimal + True + False + + + + 1 + 4 + 1 + 1 + + + + + + + + + True + False + False + Plus + False + True + + + + 3 + 1 + 1 + 1 + + + + + - + - + True + False + False + Minus + True + False + + + + 3 + 2 + 1 + 1 + + + + + * + * + True + False + False + Multiply + False + + + + 3 + 3 + 1 + 1 + + + + + ÷ + / + True + False + False + Divide + False + + + + 3 + 4 + 1 + 1 + + + + + clr + True + False + False + <span color='red'>Clear</span> the display. +<span color='yellow'> ESC</span> button also works. + image1 + none + False + True + + + + 3 + 0 + 1 + 1 + + + + + True + False + 2 + 2 + + + 0 + 6 + 4 + 1 + + + + + True + False + + + True + False + 0 + 4 + 0 + + + + + 0 + 0 + 3 + 1 + + + + + mod + mod( + True + False + False + + + + 0 + 13 + 1 + 1 + + + + + frac + frac( + True + False + False + + + + 1 + 13 + 1 + 1 + + + + + floor + floor( + True + False + False + + + + 0 + 12 + 1 + 1 + + + + + ceil + ceil( + True + False + False + + + + 1 + 12 + 1 + 1 + + + + + round + round( + True + False + False + + + + 2 + 12 + 1 + 1 + + + + + intdiv + intdiv( + True + False + False + + + + 3 + 12 + 1 + 1 + + + + + True + False + 5 + 5 + + + 0 + 11 + 4 + 1 + + + + + π + PI + True + False + False + False + + + + 2 + 7 + 1 + 1 + + + + + comma + , + True + False + False + + + + 0 + 5 + 1 + 1 + + + + + = + = + True + False + False + Calculate Result + half + + + + 2 + 4 + 1 + 1 + + + + + remainder + remainder( + True + False + False + + + + 0 + 14 + 2 + 1 + + + + + () + | + True + False + False + Open/Close parens + half + True + False + + + + 3 + 5 + 1 + 1 + + + + + √ + sqrt( + True + False + False + Root + True + + + + 1 + 7 + 1 + 1 + + + + + _sin + sin( + True + False + False + Sine + True + + + + 0 + 8 + 1 + 1 + + + + + cos + cos( + True + False + False + Cosine + + + + 0 + 9 + 1 + 1 + + + + + |x| + abs( + True + False + False + Absolute value + True + False + + + + 0 + 7 + 1 + 1 + + + + + _tan + tan( + True + False + False + Tangent + True + + + + 0 + 10 + 1 + 1 + + + + + pwr + power( + True + False + False + + + + 3 + 7 + 1 + 1 + + + + + log + log( + True + False + False + Logarithm + 0.98999999999999999 + immediate + + + + 3 + 14 + 1 + 1 + + + + + sinh + sinh( + True + False + False + Hyperbolic sine + + + + 1 + 8 + 1 + 1 + + + + + cosh + cosh( + True + False + False + Hyperbolic cosine + + + + 1 + 9 + 1 + 1 + + + + + tanh + tanh( + True + False + False + Hyperbolic tangent + + + + 1 + 10 + 1 + 1 + + + + + arcsin + arcsin( + True + False + False + + + + 2 + 8 + 1 + 1 + + + + + arccos + arccos( + True + False + False + + + + 2 + 9 + 1 + 1 + + + + + arctan + arctan( + True + False + False + + + + 2 + 10 + 1 + 1 + + + + + arcsinh + arcsinh( + True + False + False + + + + 3 + 8 + 1 + 1 + + + + + arccosh + arccosh( + True + False + False + + + + 3 + 9 + 1 + 1 + + + + + arctanh + arctanh( + True + False + False + + + + 3 + 10 + 1 + 1 + + + + + fib + fib( + True + False + False + + + + 2 + 14 + 1 + 1 + + + + + True + False + 5 + 5 + + + 0 + 15 + 4 + 1 + + + + + rad2deg + rad2deg( + True + False + False + + + + 0 + 16 + 1 + 1 + + + + + deg2rad + deg2rad( + True + False + False + + + + 1 + 16 + 1 + 1 + + + + + rand + rand( + True + False + False + Random number + True + + + + 0 + 17 + 1 + 1 + + + + + rand_r + rand_range( + True + False + False + + + + 1 + 17 + 1 + 1 + + + + + trunc + trunc( + True + False + False + + + + 2 + 13 + 1 + 1 + + + + + gcd + gcd( + True + False + False + + + + 3 + 13 + 1 + 1 + + + + + shftbits + shift_bits( + True + False + False + + + + 2 + 16 + 1 + 1 + + + + + rotbits + rotate_bits( + True + False + False + + + + 3 + 16 + 1 + 1 + + + + + approx + approx( + True + False + False + + + + 3 + 17 + 1 + 1 + + + + + rnd_1 + rnd_1( + True + False + False + + + + 2 + 17 + 1 + 1 + + + + + + + + + + + + diff --git a/eugtk/examples/glade/calendar.ex b/eugtk/examples/glade/calendar.ex new file mode 100644 index 0000000..76ad8af --- /dev/null +++ b/eugtk/examples/glade/calendar.ex @@ -0,0 +1,58 @@ + +----------------------------------------------------------------------- +--# Display a nice calendar using EuGTK and Glade +----------------------------------------------------------------------- + +include GtkEngine.e + +add(builder,"~/demos/glade/calendar.glade") + +-- PATCH: Gtk 3.14 forgets to add a quit button to the about.dialog! + if minor_version = 14 then + set("aboutdialog1","add button","gtk-quit",0) + end if + +main() + +--------------------------------------------------------------------- +global function on_calendar1_day_selected_double_click() +--------------------------------------------------------------------- +return Info("window1",,"Calendar Clicked", + get("calendar1","date"),, + "~/demos/thumbnails/cal.png","x-office-calendar") +end function + +--------------------------------------------------------------------- +global function on_OK_button_clicked() +--------------------------------------------------------------------- +return Info("window1",,"Button Clicked", + sprintf("Date is %s",{get("calendar1","date")}),, + "~/demos/thumbnails/cal.png","x-office-calendar") +end function + +--------------------------------------------------------------------- +global function on_About_button_clicked() +--------------------------------------------------------------------- + set("aboutdialog1","run") + set("aboutdialog1","hide") +return 1 +end function + +--------------------------------------------------------------------- +global function check_link() +--------------------------------------------------------------------- + if networked() and inet_connected() then + return 0 -- go ahead and try the link; + else + Warn(,,"Network Error","No connection to Web!",,"~/demos/thumbnails/net0.png") + return 1 -- don't try to connect the link; +end if +end function + +--------------------------------------------------------------------- +global function on_aboutdialog1_response() +--------------------------------------------------------------------- + set("aboutdialog1","hide") +return 1 +end function + diff --git a/eugtk/examples/glade/calendar.glade b/eugtk/examples/glade/calendar.glade new file mode 100644 index 0000000..0f56f52 --- /dev/null +++ b/eugtk/examples/glade/calendar.glade @@ -0,0 +1,205 @@ + + + + + True + False + x-office-calendar + True + + + True + True + Jessica Alba + False + center + x-office-calendar + True + + + + cal1 + True + False + vertical + + + True + False + Jessica-Alba.jpg + + + True + True + 0 + + + + + calendar + True + True + False + + + + False + True + 6 + 1 + + + + + True + False + 10 + 10 + 5 + 4 + True + bottom + spread + + + gtk-quit + True + True + True + Click to <b>Quit</b> + 7 + True + True + + + + False + True + end + 0 + True + + + + + gtk-about + about_button + True + True + True + Click to show <b><i>About...</i></b> box. + 7 + True + True + + + + False + True + end + 1 + True + + + + + _OK + True + True + True + Click to pop up an <b><i>Info</i></b> dialog +with the currently selected date. + 7 + image2 + True + True + + + + False + False + end + 2 + True + + + + + False + True + end + 2 + + + + + + + About! + True + Jessica Alba + False + center-always + True + x-office-calendar + dialog + True + True + False + window1 + window1 + False + Glade Calendar Demo + vers 1.0 + © 2016 by Irv Mullins + Powered by + http://openeuphoria.org + OpenEuphoria + LGPL ~ GNU Lesser General Public License version 3.0 + +This library is free software; you can redistribute it +and/or modify it under the terms of the GNU Lesser General +Public License as published by the Free Software Foundation; +either version 2 of the License, or (at your option) any later +version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Pl, Suite 330, Boston, MA 02111-1307 USA + Irv Mullins + Donald Doc + Kay Pasa + Vince van Goo + eugtk.png + True + custom + + + + + False + False + queue + vertical + 2 + + + True + end + + + False + True + end + 0 + + + + + + diff --git a/eugtk/examples/glade/clock.ex b/eugtk/examples/glade/clock.ex new file mode 100644 index 0000000..7ba4781 --- /dev/null +++ b/eugtk/examples/glade/clock.ex @@ -0,0 +1,32 @@ + +--# Clock built with Glade + +include GtkEngine.e + +include std/datetime.e + +gtk:add(builder,"~/demos/glade/clock.glade") + +constant ticker = gtk:create(GTimeout,250,_("TickTock")) -- every 1/4 sec. + +create(GtkCssProvider,"""#clock { + font: Purisa, Comic Sans bold 30; + color: red; + text-shadow: 1px 1px 0px blue, -2px -2px yellow; + }""") + +main() + +---------------------- +function TickTock() -- update time display +---------------------- + gtk:set("display","markup",datetime:format(now(),"%a %l:%M:%S %P")) +return 1 -- return 1 to keep clock ticking! +end function + +---------------------- +global function Bail() +---------------------- +return Quit() +end function + diff --git a/eugtk/examples/glade/clock.glade b/eugtk/examples/glade/clock.glade new file mode 100644 index 0000000..d1bca97 --- /dev/null +++ b/eugtk/examples/glade/clock.glade @@ -0,0 +1,90 @@ + + + + + True + False + 0.99999999977648257 + 5 + center + clock + + + + True + False + vertical + + + True + False + + + True + False + False + <u><b>Timeout/Idle</b></u> + +Two kinds of timers are provided: the timeout, which calls a routine +you supply once each x/thousands of a second, and the idle, which +calls your routine as often as possible whenever GTK isn't attending +to other things, like user clicks, window movements, etc. + +This clock uses timeout, updating 4x per second to minimize +visible 'jitter' in the time, but using less than 10% cpu time. + +Changing the source to use idle instead will use 80-95% cpu + True + + + + + clock + True + False + 0.75 + baseline + True + False + + + + + False + True + 0 + + + + + True + False + spread + + + gtk-quit + True + True + True + True + 0.43000000715255737 + + + + False + True + 0 + + + + + True + True + end + 2 + + + + + + diff --git a/eugtk/examples/glade/colors.ex b/eugtk/examples/glade/colors.ex new file mode 100644 index 0000000..1e9287f --- /dev/null +++ b/eugtk/examples/glade/colors.ex @@ -0,0 +1,18 @@ + +--# XColors program built with Glade + +include GtkEngine.e + +add(builder,canonical_path("~/demos/glade/colors.glade")) + +constant xcolors = canonical_path("~/demos/resources/xcolors.txt") + +TreeView tv = pointer("treeview1") +ListStore st = pointer("liststore1") + +sequence names = read_lines(xcolors) +set(st,"data",names) + +main() + + diff --git a/eugtk/examples/glade/colors.glade b/eugtk/examples/glade/colors.glade new file mode 100644 index 0000000..1b3068e --- /dev/null +++ b/eugtk/examples/glade/colors.glade @@ -0,0 +1,111 @@ + + + + + + + + + + + 350 + 600 + True + False + 5 + False + center + + + + True + False + vertical + + + True + True + in + + + True + True + True + liststore1 + False + both + + + + + + 160 + Color name + True + True + True + 0 + + + + 0 + 0 + + + + + + + Color + + + + 0 + + + + + + + + + False + True + 0 + + + + + True + False + start + + + gtk-quit + True + True + True + True + True + + + + False + True + 0 + + + + + + + + False + True + 1 + + + + + + diff --git a/eugtk/examples/glade/coweat2.png b/eugtk/examples/glade/coweat2.png new file mode 100644 index 0000000..a3f0c8d Binary files /dev/null and b/eugtk/examples/glade/coweat2.png differ diff --git a/eugtk/examples/glade/en.e b/eugtk/examples/glade/en.e new file mode 100644 index 0000000..cee9497 --- /dev/null +++ b/eugtk/examples/glade/en.e @@ -0,0 +1,14 @@ +namespace en + +include GtkEngine.e + +constant flag = canonical_path("~/demos/resources/flags/flags-united_kingdom.png") + set("image1","from pixbuf",create(GdkPixbuf,flag,-1,15,1)) + +export function hello(atom ctl, Label data) + set(data,"markup","How do you do?") +return 1 +end function + + + diff --git a/eugtk/examples/glade/es.e b/eugtk/examples/glade/es.e new file mode 100644 index 0000000..f23deee --- /dev/null +++ b/eugtk/examples/glade/es.e @@ -0,0 +1,14 @@ +namespace es + +include GtkEngine.e + +constant flag = canonical_path("~/demos/resources/flags/flags-spain.png") + set("image2","from pixbuf",create(GdkPixbuf,flag,-1,15,1)) + +export function hello(atom ctl, Label data) + set(data,"markup","Hola!") +return 1 +end function + + + diff --git a/eugtk/examples/glade/eu.cfg b/eugtk/examples/glade/eu.cfg new file mode 100644 index 0000000..dd8d0cf --- /dev/null +++ b/eugtk/examples/glade/eu.cfg @@ -0,0 +1,4 @@ +~/demos + + + diff --git a/eugtk/examples/glade/eugtk.png b/eugtk/examples/glade/eugtk.png new file mode 100644 index 0000000..ceb921a Binary files /dev/null and b/eugtk/examples/glade/eugtk.png differ diff --git a/eugtk/examples/glade/euphoria.gif b/eugtk/examples/glade/euphoria.gif new file mode 100644 index 0000000..2864c15 Binary files /dev/null and b/eugtk/examples/glade/euphoria.gif differ diff --git a/eugtk/examples/glade/file.e b/eugtk/examples/glade/file.e new file mode 100644 index 0000000..9451553 --- /dev/null +++ b/eugtk/examples/glade/file.e @@ -0,0 +1,88 @@ + +----------------- +namespace file -- used by main.ex +----------------- + +include GtkEngine.e + +ifdef WINDOWS then + add(builder,"file.glade") +elsedef + add(builder,"~/demos/glade/file.glade") +end ifdef + +set("file:chooser","do overwrite confirmation",TRUE) + +object working_file = canonical_path("~/demos/test0.ex") + +----------------------------------------------------------------------- +export function new(atom ctl, atom data) +----------------------------------------------------------------------- + set("file:chooser",{ + {"action",GTK_FILE_CHOOSER_ACTION_SAVE}, + {"current name","MyNewFile"}, + {"run"}, + {"visible",FALSE}}) +return 0 +end function + +----------------------------------------------------------------------- +export function open(atom ctl, atom data) +----------------------------------------------------------------------- + set("file:chooser",{ + {"action",GTK_FILE_CHOOSER_ACTION_OPEN}, + {"filename",working_file}, + {"run"}, + {"visible",FALSE}}) +return 0 +end function + +----------------------------------------------------------------------- +export function save(atom ctl, atom data) +----------------------------------------------------------------------- + set("file:chooser",{ + {"action",GTK_FILE_CHOOSER_ACTION_SAVE}, + {"filename",working_file}, + {"run"}, + {"visible",FALSE}}) +return 1 +end function + +----------------------------------------------------------------------- +export function saveas(atom ctl, atom data) +----------------------------------------------------------------------- +object newname + set("file:chooser",{ + {"action",GTK_FILE_CHOOSER_ACTION_SAVE}, + {"current name",""}, + {"run"}, + {"visible",FALSE}}) +return 1 +end function + +-- following routines handle file-chooser dialog buttons; +----------------------------------------------------------------------- +export function cancel(atom ctl, atom data) +----------------------------------------------------------------------- + set("file:chooser","visible",FALSE) +return 1 +end function + +----------------------------------------------------------------------- +export function ok(atom ctl, atom data) +----------------------------------------------------------------------- +object fs = get("file:chooser","filename") display(fs) + if atom(fs) then + return 0 -- no filename entered + end if + +integer act = get("file:chooser","action") + switch act do + case GTK_FILE_CHOOSER_ACTION_SAVE then + + case GTK_FILE_CHOOSER_ACTION_OPEN then + end switch + set("file:chooser","visible",FALSE) + +return 1 +end function diff --git a/eugtk/examples/glade/file.glade b/eugtk/examples/glade/file.glade new file mode 100644 index 0000000..eca2453 --- /dev/null +++ b/eugtk/examples/glade/file.glade @@ -0,0 +1,68 @@ + + + + + False + File Operations + mouse + normal + + + False + vertical + 2 + + + False + end + + + gtk-cancel + file:cancel + True + True + True + True + + + + False + True + 0 + + + + + gtk-ok + ok + True + True + True + True + + + + False + True + 1 + + + + + False + True + end + 0 + + + + + + + + + file_cancel_btn + file_ok_btn + + + diff --git a/eugtk/examples/glade/fr.e b/eugtk/examples/glade/fr.e new file mode 100644 index 0000000..8285e15 --- /dev/null +++ b/eugtk/examples/glade/fr.e @@ -0,0 +1,13 @@ +namespace fr + +include GtkEngine.e + +constant flag = canonical_path("~/demos/resources/flags/flags-france.png") + set("image3","from pixbuf",create(GdkPixbuf,flag,-1,15,1)) + +export function hello(atom ctl, Label data) + set(data,"markup","Bonjour!") +return 1 +end function + + diff --git a/eugtk/examples/glade/glade.svg b/eugtk/examples/glade/glade.svg new file mode 100644 index 0000000..969fc73 --- /dev/null +++ b/eugtk/examples/glade/glade.svg @@ -0,0 +1,1272 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + Width: 2pxBlur: 12Opacity: 60 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eugtk/examples/glade/gladetest1.ex b/eugtk/examples/glade/gladetest1.ex new file mode 100644 index 0000000..80ef136 --- /dev/null +++ b/eugtk/examples/glade/gladetest1.ex @@ -0,0 +1,27 @@ + +--# Test a few controls built with Glade + +include GtkEngine.e +include GtkFileSelector.e + +add(builder,canonical_path("~/demos/glade/gladetest1.glade")) + +main() + +----------------------------------------------------------------------- +global function help_me() +----------------------------------------------------------------------- + Info(,,"About","My fine program!") +return 1 +end function + +----------------------------------------------------------------------- +global function open_file() +----------------------------------------------------------------------- + fileselector:filters = {"image"} + object newfile = fileselector:Open("*") + if sequence(newfile) then + set("image1","from file",newfile) + end if +return 1 +end function diff --git a/eugtk/examples/glade/gladetest1.glade b/eugtk/examples/glade/gladetest1.glade new file mode 100644 index 0000000..824d5e8 --- /dev/null +++ b/eugtk/examples/glade/gladetest1.glade @@ -0,0 +1,240 @@ + + + + + True + False + test1.ex + + + True + False + vertical + 5 + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-new + True + False + True + True + + + + + gtk-open + True + False + True + True + + + + + + gtk-save + True + False + True + True + + + + + gtk-save-as + True + False + True + True + + + + + True + False + + + + + gtk-quit + True + False + True + True + + + + + + + + + + True + False + _Edit + True + + + True + False + + + gtk-cut + True + False + True + True + + + + + gtk-copy + True + False + True + True + + + + + gtk-paste + True + False + True + True + + + + + gtk-delete + True + False + True + True + + + + + + + + + True + False + _View + True + + + + + True + False + _Help + True + + + True + False + + + gtk-about + True + False + True + True + True + + + + + + + + + + False + True + 0 + + + + + True + False + + + True + False + coweat2.png + 6 + + + False + True + 0 + + + + + True + False + 0.43999999761581421 + 12 + You have an unusual +<i><b>magnetic personality.</b></i> + +Don't walk too close to +metal objects which are +not fastened down. + True + 1 + + + False + True + 1 + + + + + False + True + 1 + + + + + gtk-quit + True + True + True + none + True + True + + + + False + True + 2 + + + + + + diff --git a/eugtk/examples/glade/green-terminal.png b/eugtk/examples/glade/green-terminal.png new file mode 100644 index 0000000..3c97b51 Binary files /dev/null and b/eugtk/examples/glade/green-terminal.png differ diff --git a/eugtk/examples/glade/gtk-logo-rgb.gif b/eugtk/examples/glade/gtk-logo-rgb.gif new file mode 100644 index 0000000..1c6e6c3 Binary files /dev/null and b/eugtk/examples/glade/gtk-logo-rgb.gif differ diff --git a/eugtk/examples/glade/hello.ex b/eugtk/examples/glade/hello.ex new file mode 100644 index 0000000..71e7cf9 --- /dev/null +++ b/eugtk/examples/glade/hello.ex @@ -0,0 +1,48 @@ + +--# Simple greetings in various languages + +include GtkEngine.e + +chdir(canonical_path("~/demos/glade")) +add(builder,"hello.glade") + +include en.e -- simple greetings in various languages +include es.e -- each include exports a function hello, +include fr.e -- and the correct one is called by using +include au.e -- the namespace en:, de:, fr:, etc... +include ca.e -- flag images are loaded as well. + +include about.e -- handles the about dialog + +constant hello_label = pointer("label1") + +main() + +-- Rather than write a separate handler routine for each menu option, +-- we write a generic one which calls the appropriate function by name; +-- function name (including namespace) is specified in the Glade Widget name +-- property. See hello.glade. This can save a lot of coding in certain instances. + +----------------------------------------------------------------------- +global function on_activate(object ctl) +----------------------------------------------------------------------- +object fname = get(ctl,"name") -- (in this case, a function name) + +display("Calling function []",{fname}) -- run from xterm to see this + +atom fn = routine_id(fname) + if fn = -1 then + Error(,,"cannot link to function",fname) + else + return call_func(fn,{ctl,hello_label}) + end if + +return 1 +end function + + + + + + + diff --git a/eugtk/examples/glade/hello.glade b/eugtk/examples/glade/hello.glade new file mode 100644 index 0000000..283fdad --- /dev/null +++ b/eugtk/examples/glade/hello.glade @@ -0,0 +1,257 @@ + + + + + True + False + + + True + False + gtk-missing-image + + + True + False + gtk-missing-image + + + True + False + gtk-missing-image + + + True + False + gtk-missing-image + + + 250 + 150 + True + False + center + emblem-system + + + + True + False + vertical + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-new + hi:sayhi + True + False + False + True + True + True + + + + + gtk-open + bi:sayhi + True + False + False + True + True + True + + + + + gtk-save + bi:saybye + True + False + False + True + False + True + + + + + gtk-save-as + True + False + False + True + False + True + + + + + True + False + + + + + gtk-quit + Quit + True + False + True + True + True + + + + + + + + + + True + False + _Greetings + True + + + True + False + + + _English + en:hello + True + False + immediate + True + image1 + False + True + + + + + + _Spanish + es:hello + True + False + True + image2 + False + True + + + + + + _French + fr:hello + True + False + True + image3 + False + True + + + + + + _Australian + au:hello + True + False + True + image4 + False + True + + + + + + _Canadian + ca:hello + True + False + True + image5 + False + True + + + + + + + + + + True + False + _Help + True + + + True + False + + + gtk-about + about:rundialog + True + False + True + True + True + + + + + + + + + + False + True + 0 + + + + + True + False + + + + + + True + True + 1 + + + + + + + + + diff --git a/eugtk/examples/glade/help.e b/eugtk/examples/glade/help.e new file mode 100644 index 0000000..4051a84 --- /dev/null +++ b/eugtk/examples/glade/help.e @@ -0,0 +1,29 @@ + +-------------- +namespace help -- used by main.ex +-------------- + +include GtkEngine.e + +ifdef WINDOWS then + add(builder,"help.glade") +elsedef + add(builder,"~/demos/glade/help.glade") +end ifdef + +-- About window1 is designed completely in Glade, all we need to do +-- here is to show or hide it as appropriate; + +----------------------------------------------------------------------- +export function show(atom ctl, atom data) +----------------------------------------------------------------------- + set("help:window1","visible",TRUE) +return 1 +end function + +----------------------------------------------------------------------- +export function close(atom ctl, atom data) +----------------------------------------------------------------------- + set("help:window1","visible",FALSE) +return 1 +end function diff --git a/eugtk/examples/glade/help.glade b/eugtk/examples/glade/help.glade new file mode 100644 index 0000000..ab6aaf6 --- /dev/null +++ b/eugtk/examples/glade/help.glade @@ -0,0 +1,92 @@ + + + + + 200 + 200 + False + About... + mouse + help-about + + + True + False + vertical + + + True + False + + + True + False + eugtk.png + 2 + + + 0 + 0 + 2 + 1 + + + + + True + False + About this program... + + + + + + 0 + 1 + 2 + 1 + + + + + False + True + 0 + + + + + True + False + 5 + 4 + 5 + immediate + end + + + gtk-close + help:close + True + True + True + True + + + + False + True + 2 + + + + + False + True + 2 + + + + + + diff --git a/eugtk/examples/glade/list.ex b/eugtk/examples/glade/list.ex new file mode 100644 index 0000000..78daa13 --- /dev/null +++ b/eugtk/examples/glade/list.ex @@ -0,0 +1,46 @@ + +--# Treeview built with Glade + +include GtkEngine.e + +add(builder,"~/demos/glade/list.glade") + + -- retrieve some objects created by Glade that we'll need; + TreeView tv = pointer("treeview1") + ListStore store = pointer("liststore1") + TreeSelection selection = get(tv,"selection") + +sequence veggies = { + "Broccoli", + "Cabbage", + "Beet greens", + "Swiss Chard", + "Collards", + "Asparagus ", + "Onions", + $} + + set(store,"data",veggies) -- easy to load the list + +main() + +------------------------------------------------------------------------ +global function on_treeview1_row_activated() +------------------------------------------------------------------------ +integer row = get(selection,"selected row") +object mdl = get(tv,"model") +object selected = get(mdl,"col data",row,1) +Info(,,selected) +return 1 +end function + +------------------------------------------------------------------------ +global function on_imagemenuitem10_activate() +------------------------------------------------------------------------ + Info("window1",,"About this program") +return 1 +end function + + + + diff --git a/eugtk/examples/glade/list.glade b/eugtk/examples/glade/list.glade new file mode 100644 index 0000000..95028dd --- /dev/null +++ b/eugtk/examples/glade/list.glade @@ -0,0 +1,281 @@ + + + + + + + + + + + + 200 + True + False + 2 + center + mongoose.png + + + + True + False + vertical + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-new + True + False + False + True + True + + + + + gtk-open + True + False + False + True + True + + + + + gtk-save + True + False + False + True + True + + + + + gtk-save-as + True + False + False + True + True + + + + + True + False + + + + + gtk-quit + True + False + True + True + + + + + + + + + + True + False + _Edit + True + + + True + False + + + gtk-cut + True + False + False + True + True + + + + + gtk-copy + True + False + False + True + True + + + + + gtk-paste + True + False + False + True + True + + + + + gtk-delete + True + False + False + True + True + + + + + + + + + True + False + _View + True + + + + + True + False + _Help + True + + + True + False + + + gtk-about + True + False + True + True + + + + + + + + + + False + True + 0 + + + + + True + True + in + + + True + True + 5 + liststore1 + False + 0 + False + vertical + + + + + + + column + + + + 0 + + + + + + + + + True + True + 1 + + + + + True + False + 5 + True + center + + + gtk-quit + True + True + True + True + True + + + + False + True + 0 + + + + + gtk-ok + True + True + True + True + True + + + + False + True + 2 + + + + + False + False + 5 + end + 2 + + + + + + diff --git a/eugtk/examples/glade/main.ex b/eugtk/examples/glade/main.ex new file mode 100644 index 0000000..9e2303a --- /dev/null +++ b/eugtk/examples/glade/main.ex @@ -0,0 +1,39 @@ + +-------------------------------------------------------------------------- +--# Demo of namespaces and Glade +-------------------------------------------------------------------------- + +include GtkEngine.e +include help.e +include file.e +include pref.e + +ifdef WINDOWS then + add(builder,"main.glade") +elsedef + add(builder,"~/demos/glade/main.glade") +end ifdef + +main() + +----------------------------------------------------------------------- +global function dispatch(atom ctl, atom data) -- handles all signals; +----------------------------------------------------------------------- +atom fn = routine_id(get(ctl,"name")) + if fn != -1 then + return call_func(fn,{ctl,data}) + else + Error(,,"Invalid Function Call", + sprintf("%s=>%s",{class_name(ctl),get(ctl,"name")}),GTK_BUTTONS_OK) + end if +return 1 +end function + +-- function for main window; +function random_color(atom ctl, atom data) + set("window1","background",rand(#FFFFFF)) +return 1 +end function + + + diff --git a/eugtk/examples/glade/main.glade b/eugtk/examples/glade/main.glade new file mode 100644 index 0000000..37e4072 --- /dev/null +++ b/eugtk/examples/glade/main.glade @@ -0,0 +1,294 @@ + + + + + + True + False + preferences-desktop-personal + + + True + False + center + applications-system + + + + True + False + vertical + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-new + file:new + True + False + True + True + + + + + + gtk-open + file:open + True + False + True + True + + + + + + gtk-save + file:save + True + False + True + True + True + + + + + + gtk-save-as + file:saveas + True + False + True + True + + + + + + True + False + + + + + gtk-quit + Quit + True + False + True + True + True + + + + + + + + + + True + False + _Edit + True + + + True + False + + + gtk-cut + True + False + False + True + True + + + + + gtk-copy + True + False + False + True + True + + + + + gtk-paste + True + False + False + True + True + + + + + gtk-delete + True + False + False + True + True + + + + + + + + + True + False + _Preferences + True + + + True + False + + + _Options + pref:show + True + False + True + image2 + False + True + + + + + + + + + + True + False + _Help + True + + + True + False + + + gtk-about + help:show + True + False + True + True + + + + + + + + + + False + True + 0 + + + + + True + False + coweat2.png + + + False + True + 1 + + + + + True + False + 10 + 10 + + + gtk-quit + True + True + True + True + True + + + + False + True + 0 + + + + + gtk-select-color + random_color + True + True + True + True + True + + + + False + True + 1 + + + + + gtk-about + help:show + True + True + True + True + True + + + + False + True + 2 + + + + + False + True + 2 + 2 + + + + + + diff --git a/eugtk/examples/glade/math_eval.e b/eugtk/examples/glade/math_eval.e new file mode 100644 index 0000000..0a6a672 --- /dev/null +++ b/eugtk/examples/glade/math_eval.e @@ -0,0 +1,1258 @@ +-- PROJECT: MATH_EVAL +-- VERSION: 1.1.0 3.12.2014 (created on LinuxMint 17, using Geany editor). +-- AUTHOR: Shian Lee +-- LANGUAGE: Euphoria 4.1.0 +-- LICENSE: Free. Use at your own risk. +-- -------------------------------------------------------------------------- +-- PURPOSE: a function which evaluate Euphoria's math expressions, +-- and returns atom as result, or an error message string. +-- typically used to calculate math expressions entered by the user. +-- math_eval supports functions, operators, variables & constants. +-- read the attached "math_eval.doc" user manual for details. +-- NOTE: * the code checks for errors so your program will not crash. +-- * expressions are evaluated in the same manner as Euphoria 4.1. +-- * sequences are not supported (it's used mainly in spreadsheets). +-- ========================================================================== + + + +-- current version of math_eval, used by demo programs help: +public constant + MATH_EVAL_VERSION = "Expression Calculator 1.1.0, 3.12.2014, Shian Lee." + + + +-- include Euphoria 4.1.0 library files: +include std/types.e -- useful types and constants, e.g. boolean(). +include std/math.e -- math functions and math constants, e.g. abs(). +include std/get.e -- value(). +include std/convert.e -- to_number(), set_decimal_mark(). +include std/text.e -- trim(). +include std/sequence.e -- remove_all(). + + + +-- EUPHORIA OPERATORS & CONSTANT & FUNCTIONS CONSTANTS ====================== + +-- NOTE: functions, constants, operators - are all INDEXED. if you can't +-- implement one of them then you MUST NOT REMOVE IT; it's there +-- to be implemented later. instead you should replace the calculation +-- of functions with: return err_msg(ER_NOT_IMPLEMENTED, "func-name"). +-- - this note is especially important for converting the syntax to +-- Euphoria 3.1.1. +-- - new functions/constants/operators may be appended TO THE END of a +-- list though - this will not break the existing code. + + +constant + -- parse_expr() keeps the index of functions, instead of the identifier + -- name itself, i.e. {FUNC_ID, func_ix}, e.g. "power" --> {'@', 25}; + -- FUNC_ID must be integer, not part of the syntax, e.g. '@', 999, etc: + FUNC_ID = '@', + + + -- Euphoria 4 precedence lists (Euphoria 4.1 manual - 4.1.5 Precedence Chart): + -- all items in precedence list must be of "string" type: + PRECEDENCE_LISTS = { -- [index] description: + {}, -- (place holder) -- [1] parenthesis () (highest) + {}, -- (place holder) -- [2] function calls + {}, -- (place holder) -- [3] unary- unary+ not + {"*", "/"}, -- [4] * / + {"+", "-"}, -- [5] + - + {"<", ">", "<=", ">=", "=", "!="}, -- [6] < > <= >= = != + {"and", "or", "xor"} -- [7] and or xor + }, + + + -- all items in unary operators list must be of "string" type: + UNARY_OP_LIST = {"-", "+", "not"}, + + + -- Euphoria 4 operators list (Euphoria 4.1 manual - 4.1.4 Expressions); + -- all items in op list must be of "string" type: + OP_LIST = { -- [index] description: + "*", -- [1] * PRECEDENCE_LISTS[4] + "/", -- [2] / + "+", -- [3] + PRECEDENCE_LISTS[5] + "-", -- [4] - + "<", -- [5] < PRECEDENCE_LISTS[6] + ">", -- [6] > + "<=", -- [7] <= + ">=", -- [8] >= + "=", -- [9] = + "!=", -- [10] != + "and", -- [11] and PRECEDENCE_LISTS[7] + "or", -- [12] or + "xor", -- [13] xor + "not" -- [14] not PRECEDENCE_LISTS[3] + }, + + + -- Euphoria 4 constants list (Euphoria 4.1 manual - 8.26.1 Math Constants); + -- these are two paralleled lists: constants names & constants values: + + -- all items in const list must be of "string" type: + CONST_LIST = { -- [index] + "PI", -- [1] + "QUARTPI", -- [2] + "HALFPI", -- [3] + "TWOPI", -- [4] + "PISQR", -- [5] + "INVSQ2PI", -- [6] + "PHI", -- [7] + "E", -- [8] + "LN2", -- [9] + "INVLN2", -- [10] + "LN10", -- [11] + "INVLN10", -- [12] + "SQRT2", -- [13] + "HALFSQRT2", -- [14] + "SQRT3", -- [15] + "DEGREES_TO_RADIANS", -- [16] + "RADIANS_TO_DEGREES", -- [17] + "EULER_GAMMA", -- [18] + "SQRTE", -- [19] + "PINF", -- [20] + "MINF", -- [21] + "SQRT5" -- [22] + }, + -- all items in const list values must be of atom type: + CONST_LIST_VALUES = { -- [index] + PI, -- [1] + QUARTPI, -- [2] + HALFPI, -- [3] + TWOPI, -- [4] + PISQR, -- [5] + INVSQ2PI, -- [6] + PHI, -- [7] + E, -- [8] + LN2, -- [9] + INVLN2, -- [10] + LN10, -- [11] + INVLN10, -- [12] + SQRT2, -- [13] + HALFSQRT2, -- [14] + SQRT3, -- [15] + DEGREES_TO_RADIANS, -- [16] + RADIANS_TO_DEGREES, -- [17] + EULER_GAMMA, -- [18] + SQRTE, -- [19] + PINF, -- [20] + MINF, -- [21] + SQRT5 -- [22] + }, + + + -- Euphoria 4 functions list (+ your own documented functions...); + -- all items in functions list must be of "string" type: + FUNC_LIST = { -- [index] description: + "abs", -- [1] Eu 4.1 manual - 8.25.1 Sign and Comparisons: + "sign", -- [2] + "larger_of", -- [3] + "smaller_of", -- [4] + "remainder", -- [5] Eu 4.1 manual - 8.25.2 Roundings and Remainders: + "mod", -- [6] + "trunc", -- [7] + "frac", -- [8] + "intdiv", -- [9] + "floor", -- [10] + "ceil", -- [11] + "round", -- [12] + "arctan", -- [13] Eu 4.1 manual - 8.25.3 Trigonometry: + "tan", -- [14] + "cos", -- [15] + "sin", -- [16] + "arccos", -- [17] + "arcsin", -- [18] + "atan2", -- [19] + "rad2deg", -- [20] + "deg2rad", -- [21] + "log", -- [22] Eu 4.1 manual - 8.25.4 Logarithms and Powers: + "log10", -- [23] + "exp", -- [24] + "power", -- [25] + "sqrt", -- [26] + "fib", -- [27] + "cosh", -- [28] Eu 4.1 manual - 8.25.5 Hyperbolic Trigonometry: + "sinh", -- [29] + "tanh", -- [30] + "arcsinh", -- [31] + "arccosh", -- [32] + "arctanh", -- [33] + "and_bits", -- [34] Eu 4.1 manual - 8.25.7 Bitwise Operations: + "xor_bits", -- [35] + "or_bits", -- [36] + "not_bits", -- [37] + "shift_bits", -- [38] + "rotate_bits", -- [39] + "gcd", -- [40] + "approx", -- [41] + "powof2", -- [42] + "is_even", -- [43] + "rand", -- [44] Eu 4.1 manual - 8.27 Random Numbers: + "rand_range", -- [45] + "rnd", -- [46] + "rnd_1", -- [47] + "chance", -- [48] + "roll", -- [49] + "compare", -- [50] Eu 4.1 manual - 8.15.1 Equality + -- added in version 1.1.0: + "time" -- [51] Eu 4.1 manual - 8.4.5.1 time + } + + + +-- OTHER CONSTANTS ========================================================== + +constant + -- common error messages used by err_msg(): + ER_NOT_IMPLEMENTED = "Sorry, function not implemented yet", + ER_SYNTAX_ERROR = "Syntax error in", + ER_DEV_BY_ZERO = "Division by zero in", + ER_UNDEFINED_RES = "Undefined result in", + ER_ILLEGAL_ARG = "Illegal argument in", + ER_BUG_IN_CODE = "Sorry... BUG in routine", + + -- nul (ASCII-0) can be used as end-of-string marker where needed: + NUL = 0 + + + +-- TYPES & UTILITIES ======================================================== + +-- PURPOSE: test if s is a sequence of strings, e.g. {"xyz", "..."}. +-- NOTE: string is byte-characters from 0 to 255. +type seq_of_strings(sequence s) + for i = 1 to length(s) do + if not string(s[i]) then + return FALSE + end if + end for + return TRUE +end type + + + +-- PURPOSE: test if s is a sequence of atoms and/or strings, e.g. {"4", -1.5}. +type seq_of_values(sequence s) + for i = 1 to length(s) do + if not atom(s[i]) then + if not string(s[i]) then + return FALSE + end if + end if + end for + return TRUE +end type + + + +-- PURPOSE: test if s is a sequence of two sequences of the same length. +type paralleled_seq(sequence s) + if length(s) = 2 then + if sequence(s[1]) and sequence(s[2]) then + if length(s[1]) = length(s[2]) then + return TRUE + end if + end if + end if + return FALSE +end type + + + +-- PURPOSE: identical to std/sequence.e - remove_dups(s, RD_INPLACE); just +-- much shorter, since not using sort(). See help for remove_dups(). +function remove_dups_inplace(sequence source_data) + sequence lResult = {} + + for i = 1 to length(source_data) do + if not find(source_data[i], lResult) then + lResult = append(lResult, source_data[i]) + end if + end for + return lResult +end function + + + +-- PURPOSE: construct a returned error message. +-- DETAILS: msg is the error text. +-- symbol is any element (function, operator, etc) to add. ""=none. +-- pos is position (column) of error. 0=none. +-- OUTPUT: error_occurred +-- RETURN: ascii_string; short error message. +-- EXAMPLE: st = err_msg("Arrays not supported in", "abs", 7) +-- --> st is "[Arrays not supported in 'abs' at position 7]" +-- SEEALSO: math_eval, parse_expr, set_local_variables, ER_ constants above. +constant + -- start and end of error message must be a single char: + ERR_MSG_HEAD = '[', + ERR_MSG_TAIL = ']' +boolean + error_occurred = FALSE -- reset for debug & also by set_local_variables(). +function err_msg(ascii_string msg, ascii_string symbol = "", integer pos = 0) + ascii_string pos_str = "" + + error_occurred = TRUE -- set error flag + + if length(symbol) then + symbol = " '" & symbol & "'" + end if + if pos then + pos_str = sprintf(" at position %d", pos) + end if + + return ERR_MSG_HEAD & msg & symbol & pos_str & ERR_MSG_TAIL +end function + + + +-- PURPOSE: convert a string to number. supports binary, octal, decimal, +-- hexadecimal (0b, 0t, 0d, 0x, #) with decimal marker, and number +-- in scientific notation. +-- * eui supports decimal marker only for decimal, e.g. 1.2; 5.1e+2. +-- DETAILS: s is a *trimmed* string which represents a number. +-- RETURN: object; meaningless sequence on error; result atom on success. +-- NOTE: set_decimal_mark('.') is done by set_local_variables(), for +-- compatibility with 'eui' syntax. +-- EXAMPLE: x = string_to_number("0xFF") -- x is 255 +-- SEEALSO: parse_expr, set_local_variables +function string_to_number(string s) + object r + integer len = length(s) + + -- value() don't support '_'; to_number() don't support 0b_11 case, etc: + s = remove_all('_', s) + + + -- # 16 = Hexadecimal (with lower a-f and decimal marker support): + if len and s[1] = '#' then + r = to_number(s, -1) + + -- 0b/0t/0d/0x Binary/Octal/Decimal/Hexadecimal numbers: + elsif len >= 2 and s[1] = '0' and find(s[2], "btdx") then + switch s[2] do + case 'b' then -- 0b 2 = Binary + s[2] = '!' + case 't' then -- 0t 8 = Octal + s[2] = '@' + case 'd' then -- 0d 10 = Decimal + s[2] = 32 + case 'x' then -- 0x 16 = Hexadecimal + s[2] = '#' + end switch + + r = to_number(tail(s), -1) -- ! Euphoria 3: tail(s) is s[2..len]. + + else -- Decimal or Number in scientific notation: + r = value(s, 1, GET_LONG_ANSWER) + if r[1] = GET_SUCCESS and r[3] = length(s) then + r = r[2] + end if + end if + + return r +end function + + + +-- PURPOSE: set on enter - or - reset on exit local variables. +-- DETAILS: see 'boolean reset constants' below. +-- OUTPUT: error_occurred +-- SEEALSO: math_eval, get_identifiers, string_to_number, err_msg +constant + -- boolean reset constants: + ON_ENTER = FALSE, -- set local variables + ON_EXIT = TRUE -- reset local variables +integer + prev_decimal_mark +procedure set_local_variables(boolean reset) + if reset = ON_EXIT then + -- restore previous decimal mark ('.' or ','): + if prev_decimal_mark != '.' then + if set_decimal_mark(prev_decimal_mark) then + end if + end if + + else -- reset = ON_ENTER: + -- to_number() is using '.' for compatibility with 'eui' syntax: + prev_decimal_mark = set_decimal_mark('.') + + -- error flag *must* be reset *ON_ENTER* (not on exit), since + -- math_eval() is calling itself recursively and checks this flag: + error_occurred = FALSE + end if +end procedure + + + +-- PURPOSE: convert sequence of comma-delimited-arguments to sequence of atoms. +-- DETAILS: e is sequence of comma-delimited-arguments, e.g. {5, ",", 20.1} +-- RETURN: sequence; result sequence or err_msg() string. +-- EXAMPLE: s = arguments_to_sequence({10.4, ",", -3, ",", 401}) +-- --> s is {10.4, -3, 401} +-- SEEALSO: calc_func +function arguments_to_sequence(sequence e) + sequence atoms = {} + integer len = length(e) + + -- check for valid arguments, e.g. {}, {1.3}, {5, ",", 20, ",", 3.1}: + if len = 0 then + return atoms + elsif remainder(len, 2) and atom(e[len]) then + for i = 1 to len - 1 by 2 do + if atom(e[i]) and equal(e[i + 1], ",") then + atoms = append(atoms, e[i]) + else + return err_msg(ER_ILLEGAL_ARG) + end if + end for + + return append(atoms, e[len]) + else + return err_msg(ER_ILLEGAL_ARG) + end if +end function + + + +-- CHUNK CALCULATION ======================================================== + +-- PURPOSE: if use_degrees is FALSE then Radians are passed to trigonometry +-- functions as tan(); if is TRUE then Degrees are passed to these +-- functions (therefor must be converted to Radians before use). +-- SEEALSO: math_eval, calc_func_1 +boolean + use_degrees -- output by math_eval(). + + + +-- FUNCTIONS: calc_func_0, calc_func_1, calc_func_2, calc_func_x. +-- PURPOSE: calculate a function expression with 0 to 2 or 3+ arguments. +-- DETAILS: name is name of function, e.g. "abs". +-- ix is the function index in FUNC_LIST, e.g. 1. +-- a1, a2 are the function's arguments, by standard order; +-- a is sequence of arguments in case of calc_func_x(). +-- RETURN: object; result atom or err_msg() string. +-- NOTE: calc_func_# separated into few routines for easier debugging. +-- EXAMPLE: x = calc_func_0("rnd" , 46) --> x might be 0.3343612548 +-- x = calc_func_1("abs" , 1 , -7) --> x is 7 +-- x = calc_func_2("power" , 25, 11, 3) --> x is 1331 +-- x = calc_func_x("approx", 41, {9, 8, 0.5}) --> x is 1 +-- SEEALSO: calc_func, calc_op, calc_unary_op, calc_expr +function calc_func_0(sequence name, integer ix) + atom r + + switch ix do + case 46 then -- [46] "rnd" + r = rnd() + case 47 then -- [47] "rnd_1" + r = rnd_1() + case 51 then -- [51] "time" + r = time() + case else + return err_msg(ER_ILLEGAL_ARG, name) + end switch + + return r +end function + + + +-- PURPOSE: see calc_func_0(). +-- INPUT: use_degrees +function calc_func_1(sequence name, integer ix, atom a1) + atom r + + -- first convert degrees to radians for trigonometry functions: + -- (see: Euphoria 4.1 Manual 8.25.3 Trigonometry). + if use_degrees then + switch ix do + -- [13] "arctan", [14] "tan", [15] "cos", + -- [16] "sin", [17] "arccos", [18] "arcsin", + case 13, 14, 15, 16, 17, 18 then + a1 = deg2rad(a1) + end switch + end if + + + switch ix do + case 1 then -- [1] "abs" + r = abs(a1) + case 2 then -- [2] "sign" + r = sign(a1) + case 7 then -- [7] "trunc" + r = trunc(a1) + case 8 then -- [8] "frac" + r = frac(a1) + case 10 then -- [10] "floor" + r = floor(a1) + case 11 then -- [11] "ceil" + r = ceil(a1) + case 13 then -- [13] "arctan" + r = arctan(a1) + case 14 then -- [14] "tan" + -- PI is infinite so we don't get Error/Zero result when a1 is 0/ + -- 90/180/270/etc degrees; so convert a1 to degrees and round it: + r = remainder(round(abs(rad2deg(a1)), 1000000000), 180) + -- in case of 90, 270, 450 degrees, etc, then r is infinite: + if r = 90 then + return err_msg(ER_UNDEFINED_RES, name) + -- in case of 0, 180, 360, 540 degrees, etc, then r is 0: + elsif r != 0 then + r = tan(a1) + end if + case 15 then -- [15] "cos" + r = cos(a1) + case 16 then -- [16] "sin" + r = sin(a1) + case 17 then -- [17] "arccos" + if a1 >= -1 and a1 <= 1 then + r = arccos(a1) + else + return err_msg(ER_ILLEGAL_ARG, name) + end if + case 18 then -- [18] "arcsin" + if a1 >= -1 and a1 <= 1 then + r = arcsin(a1) + else + return err_msg(ER_ILLEGAL_ARG, name) + end if + case 20 then -- [20] "rad2deg" + r = rad2deg(a1) + case 21 then -- [21] "deg2rad" + r = deg2rad(a1) + case 22 then -- [22] "log" + if a1 > 0 then + r = log(a1) + else + return err_msg(ER_UNDEFINED_RES, name) + end if + case 23 then -- [23] "log10" + if a1 > 0 then + r = log10(a1) + else + return err_msg(ER_UNDEFINED_RES, name) + end if + case 24 then -- [24] "exp" + r = exp(a1) + case 26 then -- [26] "sqrt" + if a1 >= 0 then + r = sqrt(a1) + else + return err_msg(ER_ILLEGAL_ARG, name) + end if + case 27 then -- [27] "fib" + if integer(a1) then + r = fib(a1) + else + return err_msg(ER_ILLEGAL_ARG, name) + end if + case 28 then -- [28] "cosh" + r = cosh(a1) + case 29 then -- [29] "sinh" + r = sinh(a1) + case 30 then -- [30] "tanh" + r = tanh(a1) + case 31 then -- [31] "arcsinh" + r = arcsinh(a1) + case 32 then -- [32] "arccosh" + if a1 >= 1 then + r = arccosh(a1) + else + return err_msg(ER_ILLEGAL_ARG, name) + end if + case 33 then -- [33] "arctanh" + if a1 > -1 and a1 < 1 then + r = arctanh(a1) + else + return err_msg(ER_ILLEGAL_ARG, name) + end if + case 37 then -- [37] "not_bits" + r = not_bits(a1) + case 42 then -- [42] "powof2" + r = powof2(a1) + case 43 then -- [43] "is_even" + if integer(a1) then + r = is_even(a1) + else + return err_msg(ER_ILLEGAL_ARG, name) + end if + case 44 then -- [44] "rand" + r = rand(a1) + case else + return err_msg(ER_ILLEGAL_ARG, name) + end switch + + return r +end function + + + +-- PURPOSE: see calc_func_0(). +function calc_func_2(sequence name, integer ix, atom a1, atom a2) + atom r + + -- first check for common errors: + switch ix do + -- [5] "remainder", [6] "mod", [9] "intdiv", [12] "round" + case 5, 6, 9, 12 then + if a2 = 0 then + return err_msg(ER_DEV_BY_ZERO, name) + end if + + -- [38] "shift_bits", [39] "rotate_bits", [49] "roll" + case 38, 39, 49 then + if not integer(a2) then + return err_msg(ER_ILLEGAL_ARG, name) + end if + end switch + + + switch ix do + case 3 then -- [3] "larger_of" + r = larger_of(a1, a2) + case 4 then -- [4] "smaller_of" + r = smaller_of(a1, a2) + case 5 then -- [5] "remainder" + r = remainder(a1, a2) + case 6 then -- [6] "mod" + r = mod(a1, a2) + case 9 then -- [9] "intdiv" + r = intdiv(a1, a2) + case 12 then -- [12] "round" + r = round(a1, a2) + case 19 then -- [19] "atan2" + r = atan2(a1, a2) + case 25 then -- [25] "power" + if a1 < 0 and not integer(a2) then + return err_msg(ER_UNDEFINED_RES, name) + elsif a1 = 0 and a2 < 0 then + return err_msg(ER_DEV_BY_ZERO, name) + elsif a1 = 0 and a2 = 0 then + return err_msg(ER_ILLEGAL_ARG, name) + else + r = power(a1, a2) + end if + case 34 then -- [34] "and_bits" + r = and_bits(a1, a2) + case 35 then -- [35] "xor_bits" + r = xor_bits(a1, a2) + case 36 then -- [36] "or_bits" + r = or_bits(a1, a2) + case 38 then -- [38] "shift_bits" + r = shift_bits(a1, a2) + case 39 then -- [39] "rotate_bits" + r = rotate_bits(a1, a2) + case 40 then -- [40] "gcd" + r = gcd(a1, a2) + case 45 then -- [45] "rand_range" + r = rand_range(a1, a2) + case 48 then -- [48] "chance" + r = chance(a1, a2) + case 49 then -- [49] "roll" + r = roll(a1, a2) + case 50 then -- [50] "compare" + r = compare(a1, a2) + case else + return err_msg(ER_ILLEGAL_ARG, name) + end switch + + return r +end function + + + +-- PURPOSE: see calc_func_0(). +function calc_func_x(sequence name, integer ix, sequence a) + atom r + integer len = length(a) + + if ix = 41 and len = 3 then -- [41] "approx" + r = approx(a[1], a[2], a[3]) -- (no error occurs if a[3] is negative) + else + return err_msg(ER_ILLEGAL_ARG, name) + end if + + return r +end function + + + +-- PURPOSE: calculate a function expression and return the result. +-- DETAILS: ix is the function index in FUNC_LIST. +-- 'e' is arguments for function, separated by ",". +-- RETURN: object; result atom or err_msg() string. +-- EXAMPLE: x = calc_func(25, {11, ",", 3}) --> x is 1331 +-- SEEALSO: calc_func_0, calc_op, calc_unary_op, calc_expr +function calc_func(integer ix, sequence e) + sequence name = FUNC_LIST[ix], a = arguments_to_sequence(e) + + if error_occurred then -- arguments_to_sequence() error. + return err_msg(ER_ILLEGAL_ARG, name) + else + switch length(a) do + case 0 then + return calc_func_0(name, ix) + case 1 then + return calc_func_1(name, ix, a[1]) + case 2 then + return calc_func_2(name, ix, a[1], a[2]) + case else -- 3+ arguments: + return calc_func_x(name, ix, a) + end switch + end if +end function + + + +-- PURPOSE: calculate an operator expression and return the result. +-- DETAILS: 'e' is expression with two atoms & one operator, e.g. {5, "*", -1}. +-- RETURN: object; result atom or err_msg() string. +-- EXAMPLE: x = calc_op({5, "*", -1.5}) --> x is -7.5 +-- SEEALSO: calc_func, calc_unary_op, calc_expr +function calc_op(sequence e) + sequence op = e[2] + atom r, a1, a2 + + if atom(e[1]) and atom(e[3]) then + a1 = e[1] + a2 = e[3] + else + return err_msg(ER_SYNTAX_ERROR, op) + end if + + + -- calc operator and two atoms, e.g. {2, "*", 1.5}: + switch find(op, OP_LIST) do -- [index] operator: + case 1 then -- [1] * + r = a1 * a2 + case 2 then -- [2] / + if a2 = 0 then + return err_msg(ER_DEV_BY_ZERO, op) + else + r = a1 / a2 + end if + case 3 then -- [3] + + r = a1 + a2 + case 4 then -- [4] - + r = a1 - a2 + case 5 then -- [5] < + r = (a1 < a2) + case 6 then -- [6] > + r = (a1 > a2) + case 7 then -- [7] <= + r = (a1 <= a2) + case 8 then -- [8] >= + r = (a1 >= a2) + case 9 then -- [9] = + r = (a1 = a2) + case 10 then -- [10] != + r = (a1 != a2) + case 11 then -- [11] and + r = (a1 and a2) + case 12 then -- [12] or + r = (a1 or a2) + case 13 then -- [13] xor + r = (a1 xor a2) + case else + return err_msg(ER_NOT_IMPLEMENTED, op) -- helper for debug. + end switch + + return r +end function + + + +-- PURPOSE: calculate all cases of unary-/+ and "not" in expression, only if +-- the next item is an atom. +-- DETAILS: 'e' is expression, see example below. +-- RETURN: sequence; modified expression. +-- NOTE: cases such as -(...) or -func(...) are handled in calc_expr(); +-- this function calculates atoms, e.g. '* - 15'; '( + 6'; etc. +-- EXAMPLE: s = calc_unary_op({"-", 5, "*", "-", "(", 6, "/", 2, ")"}) +-- --> s is {-5, "*", "-", "(", 6, "/", 2, ")"} +-- SEEALSO: calc_expr, calc_op, calc_func +constant + ST_CHRS = {"(", ","} +function calc_unary_op(sequence e) + integer st, en, + idx = 2, + len = 1 + length(e) + + e = {"+"} & e -- temporarily prepend an operator. + + -- calculate unary-/+/not and one atom each loop, e.g. {"*", "-", 15}: + while idx < len do + if sequence(e[idx]) then + if find(e[idx], UNARY_OP_LIST) then + st = idx - 1 + en = idx + 1 + + if sequence(e[st]) and atom(e[en]) then + if find(e[st], OP_LIST & ST_CHRS) then + switch e[idx] do + case "-" then + e[en] = -e[en] + case "not" then + e[en] = not e[en] + -- case "+" then + -- just remove the sign. + end switch + + -- remove the sign: + e = remove(e, idx) -- ! Euphoria 3: e = e[1..st] & e[en..$] + len -= 1 + end if + end if + end if + end if + + idx += 1 + end while + + -- remove temporarily prepended operator: + return tail(e) -- ! Euphoria 3: return e[2..$]. +end function + + + +-- MAIN ===================================================================== + +-- PURPOSE: calculate a full expression and return the result. +-- DETAILS: 'e' sequence is returned by parse_expr(). +-- RETURN: sequence; result atom, e.g. {-2.5}; or err_msg() string. +-- NOTE: expressions are evaluated from left-to-right, using Euphoria's +-- precedence order (see PRECEDENCE_LISTS constant). +-- EXAMPLE: s = calc_expr({1, "+", 2, "*", {FUNC_ID, 1}, "(", -11, ")"}) +-- --> s is {23} +-- i.e. s is {1 + 2 * abs(-11)} +-- SEEALSO: parse_expr, math_eval, calc_op, calc_unary_op, calc_func +function calc_expr(sequence e) + integer st, en, idx + object obj + + + -- make sure expression enclosed with parenthesis to get final result; + e = {"("} & e & {")"} + + + -- calculate all expressions found within parenthesis (precedence-1): + while TRUE do + + -- find the most inner ")": + en = find(")", e) + if en = 0 then + if find("(", e) then + return err_msg("Missing ')'") + else + exit + end if + end if + + -- find the most inner "(": + st = 0 + for i = en - 1 to 1 by -1 do + if equal(e[i], "(") then + st = i + exit + end if + end for + if st = 0 then + return err_msg("Missing '('") + end if + + + -- calculate chunks of the expression according to precedence order; + -- the idea is to shrink each chunk into atom, e.g. 5 * 10 --> 50: + for precedence = 4 to 7 do + idx = st + 1 + + while idx < en do + if atom(e[idx]) then -- atom can't be operator... + idx += 1 + elsif find(e[idx], PRECEDENCE_LISTS[precedence]) then + obj = calc_op(e[idx - 1..idx + 1]) + + -- remove two atoms and operator; keep only new atom: + if atom(obj) then + -- ! Euphoria 3: e = e[1..idx - 2] & obj & e[idx + 2..$] + e = replace(e, obj, idx - 1, idx + 1) + en -= 2 + else + return obj -- return err_msg() + end if + else + idx += 1 + end if + end while + end for -- precedence + + + -- helper for debug: + if not (equal(e[st], "(") and equal(e[en], ")")) then + return err_msg(ER_BUG_IN_CODE, "calc_expr") + + -- first: calculate a function using the result atom(s), or + -- calculate a function without arguments such as rnd(): + elsif st > 1 and sequence(e[st - 1]) and e[st - 1][1] = FUNC_ID then + obj = calc_func(e[st - 1][2], e[st + 1..en - 1]) + + -- remove the function-id and (); keep only result atom: + if atom(obj) then + -- ! Euphoria 3: e = e[1..st - 2] & obj & e[en + 1..$] + e = replace(e, obj, st - 1, en) + else + return obj -- return err_msg() + end if + + -- then: operator result must be a single atom: + elsif st + 2 = en and atom(e[st + 1]) then + -- remove the () and keep only the result atom: + -- ! Euphoria 3: e = e[1..st - 1] & e[st + 1] & e[en + 1..$] + e = replace(e, e[st + 1], st, en) + + -- when only () remains: + elsif st + 1 = en then + return err_msg("Missing expression inside", "( )") + + -- invalid syntax returned inside ( ), e.g. "1not-2" or "(1not-2)": + else + if st = 1 then -- the first '(' is prefixed to the expression. + return err_msg(ER_SYNTAX_ERROR & " expression") + else + return err_msg(ER_SYNTAX_ERROR, "( )") + end if + end if + + + -- finally, re-calc unary+/-/not for atoms, since the ( ) and + -- function name removed, i.e. for -(1 + 2) or -abs(4), etc: + e = calc_unary_op(e) + + end while -- found expression within parenthesis + + return e +end function + + + +-- PURPOSE: parse string expression into a sequence of initial arguments. +-- DETAILS: expr, var_names, var_values are same as in function math_eval(). +-- get_id = TRUE used by get_identifiers() to keep identifier names. +-- RETURN: sequence; sequence of arguments, or err_msg() string. +-- * if get_id = TRUE then arguments are only identifiers *names*. +-- EXAMPLE: s = parse_expr("( a + 5 * abs(c) )", {"a", "c"}, {11.2, -4}) +-- --> s is {"(", 11.2, "+", 5, "*", {'@', 1}, "(", -4, ")", ")"} +-- SEEALSO: math_eval, get_identifiers, calc_unary_op, calc_expr, +-- string_to_number +function parse_expr(ascii_string expr, sequence var_names, sequence var_values, + boolean get_id = FALSE) + integer idx, chr, st, en, func_ix + sequence str, e = {}, id = {} + object get_value + atom num + + + -- NUL is end-of-string marker and placeholder for 'next-chr': + expr &= NUL + + + -- parse expression into sequence: + idx = 1 + while TRUE do + + chr = expr[idx] + + -- first check for end-of-string marker: + if chr = NUL then + exit + + -- ignore and skip blanks and control characters ('\t', etc): + elsif chr <= 32 or chr = 127 then + idx += 1 + + -- append parenthesis, comma, and symbolic operators: + elsif find(chr, "(),*/+-=<>!") then + if expr[idx + 1] = '=' and find(chr, "<>!") then + -- append ambiguous operators "<=", ">=", "!=": + e = append(e, chr & '=') + idx += 2 + else + e = append(e, {chr}) + idx += 1 + end if + + -- get and append number's value, e.g. 10.5 (# for hexadecimal): + elsif (chr >= '0' and chr <= '9') or chr = '.' or chr = '#' then + st = idx + en = idx + idx += 1 + while TRUE do + chr = expr[idx] + if (chr >= '0' and chr <= '9') or + (chr >= 'a' and chr <= 'z') or + (chr >= 'A' and chr <= 'Z') or chr = '.' or chr = '_' or + ((chr = '-' or chr = '+') and find(expr[idx - 1], "eE")) + then + en = idx + idx += 1 + else + get_value = string_to_number(expr[st..en]) + if atom(get_value) then + e = append(e, get_value) + exit + else + return err_msg("Invalid number", expr[st..en], st) + end if + end if + end while + + -- get and append variable's/constant's value, operator's string, + -- and function's index: + elsif (chr >= 'a' and chr <= 'z') or + (chr >= 'A' and chr <= 'Z') or chr = '_' + then + st = idx + en = idx + idx += 1 + while TRUE do + chr = expr[idx] + if (chr >= 'a' and chr <= 'z') or + (chr >= 'A' and chr <= 'Z') or + (chr >= '0' and chr <= '9') or chr = '_' + then + en = idx + idx += 1 + else + str = expr[st..en] + + -- get_identifiers() keeps identifier name (not value): + if get_id then + id = append(id, str) + + -- append the value of variable: + elsif find(str, var_names) then + num = var_values[find(str, var_names)] + e = append(e, num) + + -- append the value of constant: + elsif find(str, CONST_LIST) then + num = CONST_LIST_VALUES[find(str, CONST_LIST)] + e = append(e, num) + + -- append operator string ("and", "or", "xor", "not"): + elsif find(str, OP_LIST) then + e = append(e, str) + + -- append the index of function, e.g. {'@', 15}: + else + func_ix = find(str, FUNC_LIST) + if func_ix then + e = append(e, {FUNC_ID, func_ix}) + else + return err_msg("Invalid identifier", str, st) + end if + end if + + exit + end if + end while + + -- unsupported character found, such as '&': + else + return err_msg("Invalid character", {chr}, idx) + end if + + end while -- idx + + + -- get_identifiers() needs only the identifiers names: + if get_id then + return id + + -- math_eval() needs the parsed expression: + else + -- do the initial unary+/-/not calculation for atoms, e.g. {"-", 15}; + -- note that -(1 + 2) or -abs(4), etc, is handled in calc_expr(): + e = calc_unary_op(e) + + return e + end if +end function + + + +-- PUBLIC FUNCTIONS ========================================================= + +-- PURPOSE: evaluate a math expression. see "math_eval.doc" user manual. +-- DETAILS: expr is any Euphoria math expression string - see example below. +-- use_deg is FALSE=Radians/TRUE=Degrees for trigonometry functions. +-- var is optional variables sequences {{...}, {...}}: +-- var[1] is var_names, it's the variable names; +-- var[2] is var_values, it's paralleled to var_names, as it is the +-- variable's value, which is an atom or a string-expression +-- representing an atom, e.g.: +-- var = { {"R", "Si" , "tol", "fact"} --> [1] var_names +-- {6 , "-(abs(-1))", 12.5 , ".3"} } --> [2] var_values +-- INPUT: error_occurred +-- OUTPUT: use_degrees +-- RETURN: object; atom as result, or err_msg() string. +-- EXAMPLE: x = math_eval("( a + 5 * abs(c) )", 0, {{"a", "c"}, {11.2, -4}}) +-- --> x is 31.2 +-- i.e. x is (11.2 + 5 * abs(-4)) +-- SEEALSO: get_identifiers, parse_expr, calc_expr, err_msg, set_local_variables +public function math_eval(ascii_string expr, boolean use_deg = FALSE, + paralleled_seq var = {{}, {}}) + object e + seq_of_strings var_names = var[1] + seq_of_values var_values = var[2] + + set_local_variables(ON_ENTER) + + + -- convert strings in 'var_values' to atoms, e.g. "-1.5*2" --> -3: + for i = 1 to length(var_names) do + var_names[i] = trim(var_names[i]) -- ( trim() works per *string* ). + + if find(var_names[i], FUNC_LIST & CONST_LIST & OP_LIST) then + e = err_msg("Illegal variable name", var_names[i]) + exit + + elsif sequence(var_values[i]) then + -- (this supports also previous variables in a string-expression): + e = math_eval(var_values[i], use_deg, { + head(var_names, i - 1), -- ! Euphoria 3: var_names[1..i - 1], + head(var_values, i - 1) -- ! Euphoria 3: var_values[1..i - 1] + }) + + if atom(e) then + var_values[i] = e + else -- e = err_msg(...): + -- ! Euphoria 3: tail(e) is e[2..$] + e = ERR_MSG_HEAD & "'" & var_names[i] & "': " & tail(e) + exit + end if + end if + end for + + + if error_occurred then + -- e = err_msg(...) + + -- parse 'expr' to its initial arguments: + else + e = parse_expr(expr, var_names, var_values) + + if error_occurred then + -- e = err_msg(...) + elsif length(e) = 0 then + e = err_msg("Empty expression") + + -- calculate the expressions: + else + use_degrees = use_deg -- output to local variable + e = calc_expr(e) + + if error_occurred then + -- e = err_msg(...) + elsif length(e) = 1 then + e = e[1] -- the final result must be a single atom + else + e = err_msg(ER_BUG_IN_CODE, "math_eval") -- helper for debug + end if + end if + end if + + + -- return atom as result; or error message string: + set_local_variables(ON_EXIT) + return e +end function + + + +-- PURPOSE: extract alphanumeric identifiers from a string expression. +-- - it can be useful for getting variable names, which is the +-- default behavior, and prompt the user for their values. +-- DETAILS: expr is same as in function math_eval(). +-- list is the identifier-list to return, or all of them. +-- INPUT: error_occurred +-- RETURN: sequence; A sequence of length two consisting of: +-- * an integer, the return status. This is any of: +-- GET_ID_SUCCESS -- expression was read successfully +-- GET_ID_FAIL -- expression is not syntactically correct +-- +-- * - if GET_ID_SUCCESS: a sequence which contains 4 sub-sequences +-- for each type of identifier; or a sequence which contains +-- only one type of identifier. see public indexes below. +-- - if GET_ID_FAIL: err_msg() string. +-- EXAMPLE: s = get_identifiers("( PI / not a + 5 * abs(c) )", GET_ID_ALL) +-- --> s is {GET_ID_SUCCESS, {{"not"}, {"abs"}, {"PI"}, {"a", "c"}}} +-- SEEALSO: math_eval, parse_expr, set_local_variables +public constant + -- return status integers: + GET_ID_SUCCESS = 0, -- expression was read successfully + GET_ID_FAIL = 1 -- expression is not syntactically correct +public constant + -- return sequence indexes (list) - from 1 to 4: + GET_ID_ALL = 0, + GET_ID_OPERATORS = 1, + GET_ID_FUNCTIONS = 2, + GET_ID_CONSTANTS = 3, + GET_ID_VARIABLES = 4 +public function get_identifiers(ascii_string expr, integer list = GET_ID_VARIABLES) + sequence e, id = repeat({}, 4) + object str + integer idx + + set_local_variables(ON_ENTER) + + + -- parse expression and keep the identifier names (not values): + e = parse_expr(expr, {}, {}, TRUE) + + + -- id is err_msg(): + if error_occurred then + id = {GET_ID_FAIL, e} + + -- id is identifiers list(s): + else + e = remove_dups_inplace(e) -- remove duplicate identifiers + + -- store identifier names in 'id': + for i = 1 to length(e) do + str = e[i] + + if find(str, OP_LIST) then -- operator name, e.g. "or" + idx = GET_ID_OPERATORS + elsif find(str, FUNC_LIST) then -- function name, e.g. "abs" + idx = GET_ID_FUNCTIONS + elsif find(str, CONST_LIST) then -- constant name, e.g. "PI" + idx = GET_ID_CONSTANTS + else -- variable name, e.g. "xyz" + idx = GET_ID_VARIABLES + end if + + id[idx] = append(id[idx], str) -- append identifier to list + end for + + -- id is all lists, or just a single list: + if list != GET_ID_ALL then + id = id[list] + end if + + id = {GET_ID_SUCCESS, id} + end if + + + -- return success or fail sequence: + set_local_variables(ON_EXIT) + return id +end function + + + +-- End of file. diff --git a/eugtk/examples/glade/mongoose.png b/eugtk/examples/glade/mongoose.png new file mode 100644 index 0000000..1f65a26 Binary files /dev/null and b/eugtk/examples/glade/mongoose.png differ diff --git a/eugtk/examples/glade/paned.ex b/eugtk/examples/glade/paned.ex new file mode 100644 index 0000000..b16558d --- /dev/null +++ b/eugtk/examples/glade/paned.ex @@ -0,0 +1,24 @@ + +--# Simple paned window + +include GtkEngine.e + +add(builder,"~/demos/glade/paned.glade") + +main() + +------------------------------------------------------------------------ +global function on_button2_clicked() +------------------------------------------------------------------------ + Info("window1","Help","GtkPaned", + "Grab and slide the bar\nbetween Mongoose and license text") +return 1 +end function + + + + + + + + diff --git a/eugtk/examples/glade/paned.glade b/eugtk/examples/glade/paned.glade new file mode 100644 index 0000000..ef5942b --- /dev/null +++ b/eugtk/examples/glade/paned.glade @@ -0,0 +1,132 @@ + + + + + True + False + False + center + + + + True + False + vertical + 5 + + + True + False + euphoria.gif + + + False + True + 0 + + + + + True + True + 5 + 5 + 5 + 5 + 91 + + + True + False + mongoose.png + + + False + True + + + + + True + False + start + 5 + 5 + 5 + 5 + This library is free software; you can redistribute it +and/or modify it under the terms of the GNU Lesser General +Public License as published by the Free Software Foundation; +either version 2 of the License, or (at your option) any later +version. + 12 + False + + + + + + True + True + + + + + False + False + 10 + 1 + + + + + True + False + 5 + spread + + + gtk-quit + True + True + True + True + True + + + + False + True + 0 + + + + + + + + gtk-help + True + True + True + True + True + + + + False + True + 2 + + + + + False + True + 2 + + + + + + diff --git a/eugtk/examples/glade/pref.e b/eugtk/examples/glade/pref.e new file mode 100644 index 0000000..82f231a --- /dev/null +++ b/eugtk/examples/glade/pref.e @@ -0,0 +1,52 @@ + +----------------- +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 + diff --git a/eugtk/examples/glade/pref.glade b/eugtk/examples/glade/pref.glade new file mode 100644 index 0000000..806cd99 --- /dev/null +++ b/eugtk/examples/glade/pref.glade @@ -0,0 +1,188 @@ + + + + + + 65535 + 32767 + 1 + 10 + 1 + + + 300 + 150 + False + 10 + center-always + preferences-system + + + True + False + vertical + + + True + False + View Prefs + + + + + + False + True + 0 + + + + + True + False + 10 + 10 + 10 + 10 + 10 + + + True + False + 27 + vertical + + + Red + pref:set_color + True + True + False + <b><i>Click</i></b> to change label color + 0 + 0.50999999046325684 + True + True + + + + False + True + 0 + + + + + Green + pref:set_color + True + True + False + <b><i>Click</i></b> to change label color + 0 + 0.44999998807907104 + True + True + red + + + + False + True + 1 + + + + + Blue + pref:set_color + True + True + False + <b><i>Click</i></b> to change label color + 0 + True + True + green + + + + False + True + 2 + + + + + False + True + 0 + + + + + True + True + 1 + + + + + pref:value_changed + True + True + <b><i>Slide</i></b> to change background color + adjustment1 + False + 0 + 1 + False + False + + + + False + True + 2 + + + + + True + False + 5 + 5 + 3 + 5 + 5 + end + + + + + + gtk-cancel + pref:cancel + True + True + True + True + + + + False + True + 1 + + + + + False + True + 3 + + + + + + diff --git a/eugtk/examples/glade/prefs.glade b/eugtk/examples/glade/prefs.glade new file mode 100644 index 0000000..5f417a5 --- /dev/null +++ b/eugtk/examples/glade/prefs.glade @@ -0,0 +1,255 @@ + + + + + 65535 + 32767 + 1 + 10 + 1 + + + 300 + 150 + False + 10 + center-always + preferences-system + + + True + False + vertical + + + True + False + <u><b>View Prefs</b></u> Would go here + True + + + False + True + 0 + + + + + True + False + 10 + 10 + 10 + 10 + 10 + + + True + False + vertical + + + A + True + True + False + Inactive + 0 + True + + + False + True + 0 + + + + + B + True + True + False + Inactive + 0 + True + + + False + True + 1 + + + + + C + True + True + False + Inactive + 0 + True + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + 27 + vertical + + + Red + red + True + True + False + <b><i>Click</i></b> to change label color + 0 + 0.51999998092651367 + True + True + + + + False + True + 0 + + + + + Green + green + True + True + False + <b><i>Click</i></b> to change label color + 0 + 0.44999998807907104 + True + True + red_radio_btn + + + + False + True + 1 + + + + + Blue + blue + True + True + False + <b><i>Click</i></b> to change label color + 0 + True + True + green_radio_btn + + + + False + True + 2 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + True + <b><i>Slide</i></b> to change background color + adjustment1 + False + 0 + 1 + False + False + + + + False + True + 2 + + + + + True + False + 5 + 5 + 3 + 5 + 5 + end + + + gtk-cancel + True + True + True + True + + + + False + True + 0 + + + + + gtk-apply + True + True + True + True + + + + False + True + 1 + + + + + False + True + 3 + + + + + + diff --git a/eugtk/examples/glade/test11.ex b/eugtk/examples/glade/test11.ex new file mode 100644 index 0000000..90e3ff5 --- /dev/null +++ b/eugtk/examples/glade/test11.ex @@ -0,0 +1,20 @@ + +--# Glade version of test11.ex + +include GtkEngine.e + +add(builder,"~/demos/glade/test11.glade") + +main() + +----------------------------------------------- +global function on_button_clicked(Button self) +----------------------------------------------- +switch get(self,"name") do + case "left" then set("label1","justify",GTK_JUSTIFY_LEFT) + case "center" then set("label1","justify",GTK_JUSTIFY_CENTER) + case "right" then set("label1","justify",GTK_JUSTIFY_RIGHT) +end switch +return 1 +end function + diff --git a/eugtk/examples/glade/test11.glade b/eugtk/examples/glade/test11.glade new file mode 100644 index 0000000..99b1d9e --- /dev/null +++ b/eugtk/examples/glade/test11.glade @@ -0,0 +1,135 @@ + + + + + + True + False + 400 + 300 + + + + True + False + vertical + + + True + False + 5 + 3 + 5 + 5 + <b>In the space</b> of one hundred and seventy-six years the Mississippi has shortened itself two hundred and forty-two miles. + +<b>Therefore</b> ... in the Old Silurian Period the Mississippi River was upward of one million three hundred thousand miles long ... + +<b>Seven hundred and forty-two years</b> from now the Mississippi will be only a mile and three-quarters long. ... + +<b>There is something fascinating about science.</b> +One gets such wholesome returns of conjecture out of such a trifling investment of fact. + + -- <b><i>Mark Twain</i></b> + True + True + + + True + True + 0 + + + + + True + False + 2 + 2 + 3 + 2 + True + spread + + + gtk-close + True + True + True + half + True + True + + + + False + False + 0 + True + + + + + gtk-justify-left + left + True + True + True + True + True + + + + False + False + 1 + + + + + gtk-justify-center + center + True + True + True + True + True + + + + False + False + 2 + True + + + + + gtk-justify-right + right + True + True + True + True + True + + + + False + False + 3 + True + + + + + False + False + end + 1 + + + + + + diff --git a/eugtk/examples/glade/test116.ex b/eugtk/examples/glade/test116.ex new file mode 100644 index 0000000..db96eee --- /dev/null +++ b/eugtk/examples/glade/test116.ex @@ -0,0 +1,27 @@ + +--# ComboBox demo, compare with demos/test116.ex + +include GtkEngine.e + +add(builder,"~/demos/glade/test116.glade") + +constant items = { + {"Fish",create(GdkPixbuf,"thumbnails/fish.svg",30,30)}, + {"Fox",create(GdkPixbuf,"thumbnails/fox.svg",30,30)}, + {"Mouse",create(GdkPixbuf,"thumbnails/mouse.svg",30,30)} +} + +set("liststore1","data",items) +set("combobox1","active",1) + +main() + +----------------------------------------------------------------------- +global function on_combobox1_changed(atom cb, atom win) +----------------------------------------------------------------------- +integer i = get(cb,"active") + set(win,"title",items[i][1]) + set(win,"icon",items[i][2]) +return 1 +end function + diff --git a/eugtk/examples/glade/test116.glade b/eugtk/examples/glade/test116.glade new file mode 100644 index 0000000..10923cb --- /dev/null +++ b/eugtk/examples/glade/test116.glade @@ -0,0 +1,73 @@ + + + + + + + + + + + + + True + False + 10 + center + -1 + -1 + coweat2.png + + + + True + False + vertical + + + True + False + <b><u>GtkComboBox</u></b> +with a little work, we can add images to a combo. + True + True + 20 + False + + + True + True + 0 + + + + + True + False + liststore1 + True + Critters + + + + + 0 + + + + + + 1 + + + + + False + True + 1 + + + + + + diff --git a/eugtk/examples/glade/test12.ex b/eugtk/examples/glade/test12.ex new file mode 100644 index 0000000..70e118a --- /dev/null +++ b/eugtk/examples/glade/test12.ex @@ -0,0 +1,30 @@ + +--# Glade version of test12.ex + +include GtkEngine.e + +add(builder,"~/demos/glade/test12.glade") + +constant fruit = { + "Apples", + "Bananas", + "Cherries", + "Grapes", + "Peaches", + "Pears" +} + +for i = 1 to length(fruit) do + set("comboboxtext1","append text",fruit[i]) +end for +set("comboboxtext1","active",1) + +main() + +----------------------------------------------------------------------- +global function on_button2_clicked() +----------------------------------------------------------------------- + Info("window1",,"Your favorite is",get("comboboxtext1","active text")) +return 1 +end function + diff --git a/eugtk/examples/glade/test12.glade b/eugtk/examples/glade/test12.glade new file mode 100644 index 0000000..9af6747 --- /dev/null +++ b/eugtk/examples/glade/test12.glade @@ -0,0 +1,90 @@ + + + + + True + False + center + + + + True + False + 10 + vertical + 5 + + + True + False + The <b><u>GtkComboBoxText</u></b> +Pick your favorite fruit + True + center + start + + + False + True + 0 + + + + + True + False + 2 + + + True + True + 1 + + + + + True + False + spread + + + gtk-quit + True + True + True + True + + + + False + True + 0 + + + + + gtk-ok + True + True + True + True + + + + False + True + 1 + + + + + False + False + end + 2 + + + + + + diff --git a/eugtk/examples/glade/test13.ex b/eugtk/examples/glade/test13.ex new file mode 100644 index 0000000..9143ed4 --- /dev/null +++ b/eugtk/examples/glade/test13.ex @@ -0,0 +1,35 @@ + +--# Glade version of test13.ex + +include GtkEngine.e + +add(builder,"~/demos/glade/test13.glade") + +constant bob = create(GdkPixbuf,"~/demos/glade/user_icon.svg") +constant bobby = create(GdkPixbuf,"~/demos/glade/user_icon.svg",24,24,1) +set("image1","from pixbuf",bobby) + +object order = {} + +main() + +----------------------------------------------------------------------- +global function on_button2_clicked(Button self) -- show order +----------------------------------------------------------------------- + Info("window1","Bob's Burgers","Your Order",flatten(order,'\n'),,bob) +return 1 +end function + +----------------------------------------------------------------------- +global function on_checkbutton_toggled(MenuItem self) -- update order +----------------------------------------------------------------------- +object item = get(self,"name") +if get(self,"active") then + order = add_item(item,order,ADD_APPEND) +else + order = remove_item(item,order) +end if +return 1 +end function + + diff --git a/eugtk/examples/glade/test13.glade b/eugtk/examples/glade/test13.glade new file mode 100644 index 0000000..d610303 --- /dev/null +++ b/eugtk/examples/glade/test13.glade @@ -0,0 +1,174 @@ + + + + + + True + False + 6 + + + True + False + 10 + Bob's Burgers + 300 + -1 + coweat2.png + + + + True + False + vertical + + + True + False + <b><u>CheckButtons</u></b> +Select your favorite item(s) + True + center + middle + + + False + True + 0 + + + + + True + False + vertical + + + _Burgers + Burgers + True + True + False + True + 0 + True + + + + False + True + 0 + + + + + _Hotdogs + Hotdogs + True + True + False + True + 0 + True + + + + False + True + 1 + + + + + _Potato chips + Chips + True + True + False + True + 0 + True + + + + False + True + 2 + + + + + _French fries + Fries + True + True + False + True + 0 + True + + + + False + True + 3 + + + + + False + True + 1 + + + + + True + False + spread + + + gtk-quit + True + True + True + half + True + True + + + + False + True + 0 + + + + + _OK + True + True + True + image1 + True + right + True + + + + False + True + 1 + + + + + False + True + 2 + + + + + + diff --git a/eugtk/examples/glade/test142.ex b/eugtk/examples/glade/test142.ex new file mode 100644 index 0000000..7b80532 --- /dev/null +++ b/eugtk/examples/glade/test142.ex @@ -0,0 +1,13 @@ + +--# GtkScale - compare with demos/test142.ex + +include GtkEngine.e + +add(builder,"~/demos/glade/test142.glade") + +for i = 0 to 100 by 10 do -- how to do this in Glade? + set("scale1","add mark",i,GTK_POS_BOTTOM,sprintf("%d",i)) +end for + +main() + diff --git a/eugtk/examples/glade/test142.glade b/eugtk/examples/glade/test142.glade new file mode 100644 index 0000000..19ead2f --- /dev/null +++ b/eugtk/examples/glade/test142.glade @@ -0,0 +1,58 @@ + + + + + 100 + 0.5 + 1 + + + True + False + 5 + mongoose.png + + + + True + False + vertical + + + True + True + 5 + 5 + adjustment1 + True + 66 + 1 + + + False + True + 0 + + + + + True + False + 5 + 6 + <b><u>Fill Level</u></b> +You can set a fill level, which the scale + can or cannot exceed, with or without + a visual indication. + True + + + False + True + 1 + + + + + + diff --git a/eugtk/examples/glade/test157.ex b/eugtk/examples/glade/test157.ex new file mode 100644 index 0000000..2b7eef1 --- /dev/null +++ b/eugtk/examples/glade/test157.ex @@ -0,0 +1,23 @@ + +--# Glade version of test157.ex + +with define BUILDER -- for demo purposes + +include GtkEngine.e + +add(builder,"~/demos/glade/test157.glade") + +constant cssfile = canonical_path("~/demos/resources/mystyle2.css") + +constant css = create(GtkCssProvider,cssfile) + + -- show css on terminal for demo purposes, if run from term + display(read_file(cssfile)) + + -- can't specify multiple fonts in Glade ?, so do it here + set("label2","font","Purisa, Birdland Aeroplane bold 48") + +main() + + + diff --git a/eugtk/examples/glade/test157.glade b/eugtk/examples/glade/test157.glade new file mode 100644 index 0000000..bde093f --- /dev/null +++ b/eugtk/examples/glade/test157.glade @@ -0,0 +1,94 @@ + + + + + window1 + 400 + 400 + True + False + + + + True + False + vertical + + + True + False + 0.85000002384185791 + 0 + 8 + <b><u>Radial Gradient</u></b> +specified in mystyle2.css + True + + + False + True + 0 + + + + + True + False + 0.80000001192092896 + 1 + Moo! + True + True + 23 + False + + + False + True + 1 + + + + + True + False + coweat2.png + + + False + True + 2 + + + + + True + False + center + + + gtk-quit + True + True + True + True + True + + + + False + True + 0 + + + + + False + True + 3 + + + + + + diff --git a/eugtk/examples/glade/test25.ex b/eugtk/examples/glade/test25.ex new file mode 100644 index 0000000..aa0bf1f --- /dev/null +++ b/eugtk/examples/glade/test25.ex @@ -0,0 +1,188 @@ + +--# File Editor, Glade version of test25.ex + +include GtkEngine.e +include GtkPrinter.e + +constant docs = `Demonstrates + menus, + file chooser, + file filters, + recent chooser, + fonts, + exec, etc` + + add(builder,"~/demos/glade/test25.glade") + +object current_font = get("fontchooserdialog1","font") + set("textview1","font",current_font) + set("fontchooserdialog1","font",current_font) + +object current_file = 0 + +-- Can't find a way to add more than one filter directly in Glade, +-- nor any way to set the filter's name, which is what shows in the +-- drop down filter selector... so we do it manually: + +FileFilter f1 = get(builder,"object","filefilter1") + set(f1,"name","Euphoria files") + set("filechooserdialog1","add filter",f1) + +FileFilter f2 = get(builder,"object","filefilter2") + set(f2,"name","All Text Files") + set("filechooserdialog1","add filter",f2) + +-- seems that Glade has no way to directly add a drop-down +-- RecentChooser to main menu so we do this the 'old fashioned' way; + +RecentFilter rcf = pointer("recentfilter1") +RecentChooserMenu rc_menu = create(GtkRecentChooserMenu,{ + {"add filter",rcf}, + {"sort type",GTK_RECENT_SORT_MRU}, + {"show icons",TRUE}, + {"local only",TRUE}, + {"show numbers",TRUE}, + {"show tips",TRUE}}) + set("recent_menu","submenu",rc_menu) + connect(rc_menu,"selection-done","open_recent",rc_menu) + +main() + +------------------------------------------------------------------------------ +global function menu_open_file(Button self, atom dialog) +------------------------------------------------------------------------------ +object fn -- storage for filename +if get(dialog,"run") = 1 -- 'ok' button's Response ID (must set in Glade) + then fn = get(dialog,"filename") -- actually, gets the full path to file + if file_exists(fn) then + LoadText(fn) + end if +end if +set(dialog,"hide") -- don't destroy this dialog, keep it for later use +return 1 +end function + +------------------------------------------------------------------------ +global function open_recent() +------------------------------------------------------------------------ +object fn = get(rc_menu,"current uri") + fn = fn[8..$] -- discard the leading FILE:/// + if file_exists(fn) then + LoadText(fn) + end if +return 1 +end function + +--------------------------------- +procedure LoadText(sequence fn) +--------------------------------- + set("window1","title",fn) + set("textbuffer1","text",read_file(fn)) + set("menu_close","sensitive",TRUE) + set("menu_open","sensitive",FALSE) + set("menu_exec","sensitive",TRUE) + set("menu_print","sensitive",TRUE) + current_file = fn +end procedure + +------------------------------------------------------------------------ +global function menu_close_file(atom self, atom data) +------------------------------------------------------------------------ + set("textbuffer1","text","") -- clear the text + set("menu_close","sensitive",FALSE) + set("menu_open","sensitive",TRUE) + set("menu_exec","sensitive",FALSE) + set("menu_print","sensitive",FALSE) +return 1 +end function + +------------------------------------------------------------------------ +global function on_menu_exec_activate() +------------------------------------------------------------------------ + system("eui " & current_file & " & ",0) -- run the current file; +return 1 +end function + +----------------------------------------------------------------------- +global function on_menu_print_activate() +----------------------------------------------------------------------- + printer:PrintFile(current_file) +return 1 +end function + +------------------------------------------------------------------------ +global function on_menu_colors_activate(atom self, atom view) +------------------------------------------------------------------------ +-- hack: +-- colors are passed in Glade 'name' field as fgnd,bkgnd (no quotes) +object params = split(get(self,"name"),',') + set(view,"foreground",params[1]) + set(view,"background",params[2]) +return 1 +end function + +------------------------------------------------------------------------------- +global function on_menu_font_activate(atom self, atom dialog) +------------------------------------------------------------------------------- + set(dialog,"filter func",call_back(routine_id("FilterFonts"))) + set(dialog,"font",current_font) + if get(dialog,"run") then + current_font = get(dialog,"font") + set("textview1","font",current_font) + set(dialog,"hide") + end if +return 1 +end function + +------------------------------------------------------------------------ +function FilterFonts(atom family) +------------------------------------------------------------------------ +sequence fontlist = { -- faces to show in font selection dialog; + "DejaVu Sans Mono","Courier 10 Pitch","Courier New","FreeSerif", + "Impact","URW Chancery L","Comic","Purisa","Arial","Arial Black", + "Sawasdee","Balmoral D","Ubuntu Mono" + } +object fontname = gtk_str_func("pango_font_family_get_name",{P},{family}) +-- process each font the dialog tries to load; +return find(fontname,fontlist) +-- return 1 if it's on our list, otherwise, return 0 to skip this font; +end function + +------------------------------------------------------------------------ +global function on_menu_normal_activate(atom self, atom view) +------------------------------------------------------------------------ +FontDescription fnt = create(PangoFontDescription,current_font) + set(fnt,"weight",PANGO_WEIGHT_NORMAL) + set(fnt,"style",PANGO_STYLE_NORMAL) + current_font = get(fnt,"to string") + set(view,"font",current_font) +return 1 +end function + +------------------------------------------------------------------------ +global function on_menu_bold_activate(atom self, atom view) +------------------------------------------------------------------------ +FontDescription fnt = create(PangoFontDescription,current_font) + set(fnt,"weight",PANGO_WEIGHT_BOLD) + current_font = get(fnt,"to string") + set(view,"font",current_font) +return 1 +end function + +------------------------------------------------------------------------ +global function on_menu_italic_activate(atom self, atom view) +------------------------------------------------------------------------ +FontDescription fnt = create(PangoFontDescription,current_font) + set(fnt,"style",PANGO_STYLE_ITALIC) + current_font = get(fnt,"to string") + set(view,"font",current_font) +return 1 +end function + +------------------------------------------------------------------------ +global function on_menu_about_activate() +------------------------------------------------------------------------ + return Info("window1"," About ", + "Simple Text\nViewer/Editor",docs,,"accessories-text-editor","gnome-help") +end function + diff --git a/eugtk/examples/glade/test25.glade b/eugtk/examples/glade/test25.glade new file mode 100644 index 0000000..d82baa2 --- /dev/null +++ b/eugtk/examples/glade/test25.glade @@ -0,0 +1,439 @@ + + + + + False + popup + True + mouse + popup-menu + + + False + vertical + 2 + + + False + end + + + gtk-cancel + True + True + True + True + True + + + False + True + 0 + + + + + gtk-ok + True + True + True + True + False + True + True + + + False + True + 1 + + + + + False + True + end + 0 + + + + + + + + + button1 + button2 + + + + True + False + + + + *.ex + *.e + + + + + text/plain + + + + False + dialog + + + + False + vertical + 2 + + + False + end + + + False + True + end + 0 + + + + + + + True + False + 4 + text-x-generic + True + 1 + + + True + False + text-x-script + True + 1 + + + True + False + green-terminal.png + True + 1 + + + True + False + text-x-generic + True + 1 + + + True + False + 20 + + + + *.ex + *.e + + + + + 600 + 500 + True + False + Simple Text Viewer + center + + + + True + False + vertical + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-open + True + False + 8 + True + True + True + + + + + + gtk-close + True + False + False + True + True + True + + + + + + True + False + + + + + gtk-execute + True + False + False + True + True + True + + + + + + gtk-print + True + False + False + 1 + 5 + True + True + True + + + + + + True + False + + + + + gtk-quit + True + False + True + True + True + + + + + + + + + + True + False + Preferences + True + + + True + False + + + gtk-select-font + True + False + True + True + True + + + + + + True + False + + + + + _Normal + black,white + True + False + True + image1 + False + + + + + + _Reverse + white,black + True + False + True + image2 + False + True + + + + + + _Green on Black + #0DF517,black + True + False + True + image3 + False + True + + + + + + True + False + + + + + _Normal + bold + True + False + True + image4 + False + + + + + + + gtk-bold + italic + True + False + True + True + True + + + + + + gtk-italic + bold + True + False + True + True + True + + + + + + + + + + + True + False + _Recent Docs + True + + + + + True + False + _Help + True + + + True + False + + + gtk-about + True + False + True + True + True + + + + + + + + + + False + True + 0 + + + + + True + True + in + + + True + True + 5 + 5 + 5 + 5 + 10 + 9 + 10 + textbuffer1 + + + + + True + True + 1 + + + + + + diff --git a/eugtk/examples/glade/toolbar.ex b/eugtk/examples/glade/toolbar.ex new file mode 100644 index 0000000..2226904 --- /dev/null +++ b/eugtk/examples/glade/toolbar.ex @@ -0,0 +1,37 @@ + +--# Toolbars + +include GtkEngine.e + +add(builder,"~/demos/glade/toolbar.glade") + +constant + fish = create(GdkPixbuf,"thumbnails/fish.png",30,30), + fox = create(GdkPixbuf,"thumbnails/fox.png",30,30), + mouse = create(GdkPixbuf,"thumbnails/mouse.png",30,30), + names = {"Fish","Fox","Mouse"}, + pix = {fish,fox,mouse} + +atom item -- seems to be no way to create a toolbutton in Glade. +for i = 1 to 3 do + item = create(GtkToolButton,create(GtkImage,pix[i]),names[i],"Foo",i) + set("toolbar1","insert",item,-1) + show_all(item) +end for + +main() + +----------------------------------------------------------------------- +global function on_checkbutton1_toggled(ToggleButton self) +----------------------------------------------------------------------- + set("toolbar1","style",get(self,"active")*2) +return 1 +end function + + +-------------------------------------- +global function Foo(atom ctl) +-------------------------------------- +set("label1","text",get(ctl,"label")) +return 1 +end function diff --git a/eugtk/examples/glade/toolbar.glade b/eugtk/examples/glade/toolbar.glade new file mode 100644 index 0000000..611b404 --- /dev/null +++ b/eugtk/examples/glade/toolbar.glade @@ -0,0 +1,292 @@ + + + + + 300 + 200 + True + False + False + False + False + center + + + True + False + False + False + vertical + + + True + False + False + False + + + True + False + _File + True + + + True + False + + + gtk-new + True + False + False + immediate + True + True + True + + + + + gtk-open + True + False + False + True + True + True + + + + + gtk-save + True + False + False + True + True + True + + + + + gtk-save-as + True + False + False + True + True + True + + + + + True + False + + + + + gtk-quit + True + False + True + True + True + + + + + + + + + + True + False + False + _Edit + True + + + True + False + + + gtk-cut + True + False + True + True + True + + + + + gtk-copy + True + False + True + True + True + + + + + gtk-paste + True + False + True + True + True + + + + + gtk-delete + True + False + True + True + True + + + + + + + + + True + True + False + False + _View + True + + + + + True + False + False + _Help + True + + + True + False + + + gtk-about + True + False + True + True + True + + + + + + + + + False + False + 0 + + + + + 280 + 40 + True + False + False + False + icons + 2 + + + False + False + 1 + + + + + 220 + 40 + True + False + start + 10 + 10 + False + False + + + + + + False + True + 2 + + + + + True + False + 5 + 5 + False + False + + + Captions + True + True + False + 10 + 0 + True + + + + False + True + 0 + + + + + gtk-quit + True + True + True + True + 0.46000000834465027 + True + + + + False + False + end + 1 + True + + + + + False + False + end + 3 + + + + + + diff --git a/eugtk/examples/glade/webserver.ex b/eugtk/examples/glade/webserver.ex new file mode 100644 index 0000000..2ffd93f --- /dev/null +++ b/eugtk/examples/glade/webserver.ex @@ -0,0 +1,78 @@ + +--# Web Server built with Glade + +include GtkEngine.e + +-- You may need to change the following line if you use a terminal other +-- than gnome-terminal. This is only necessary if you want to use the +-- tail -f option to display on-going connection requests; + +constant term = "gnome-terminal --title='SERVER LOG' --window-with-profile=logview -e " + + add(builder,"webserver.glade") + set("ip","text",get_net_address()) + +main() + +-------------------------------------- +global function on_help_button_clicked() +-------------------------------------- + show_uri(sprintf("file:///%s", + {canonical_path("~/demos/documentation/ServerHelp.html")})) +return 1 +end function + +----------------------------------------------------------------------- +global function on_log_file_icon_press(atom self) +----------------------------------------------------------------------- + set(self,"text","") +return 1 +end function + +------------------------------------------------------------------------ +global function on_ok_button_clicked(atom ctl, atom data) +------------------------------------------------------------------------ +object server = canonical_path("~/demos/examples/httpd.ex") +object logfilename = get("log_file","text") + +object path = get("filechooserbutton1","filename") + if atom(path) then -- nothing chosen + Warn(,,"Must select a root file path!") + return 1 + end if + +-- build a command string to pass to httpd.ex; +object params = sprintf("eui %s -bind %s:%s ", + {server,get("ip","text"),get("port","text")}) + + if length(path) > 0 then + params &= sprintf("-root '%s' ",{canonical_path(path)}) + end if + + if length(logfilename) > 0 then + params &= sprintf("-log %s ",{logfilename}) + end if + + if get("sort","active") then + params &= " -s " + end if + + if get("show_hidden","active") then + params &=" -h " + end if + + if get("show_full_request","active") then + params &= " -r " + end if + + params &= " & " + + if get("tail_f","active") then -- open a term to tail the log + system_exec(sprintf("%s 'tail -f %s' & ",{term,logfilename}),0) + end if + + system_exec(params) + +return 1 +end function + diff --git a/eugtk/examples/glade/webserver.glade b/eugtk/examples/glade/webserver.glade new file mode 100644 index 0000000..05d2923 --- /dev/null +++ b/eugtk/examples/glade/webserver.glade @@ -0,0 +1,329 @@ + + + + + 8080 + 8090 + 8080 + 1 + 1 + + + True + False + 10 + mongoose.png + + + True + False + 5 + 5 + 17 + 5 + 5 + + + True + False + IP: + + + 0 + 0 + 1 + 1 + + + + + True + False + Root + + + 0 + 2 + 1 + 1 + + + + + True + False + Log file + + + 0 + 4 + 1 + 1 + + + + + Sort + True + True + False + Sort the directory listings + 0 + True + + + 0 + 6 + 1 + 1 + + + + + True + False + end + 5 + True + spread + + + gtk-quit + True + True + True + Click to quit + baseline + True + True + + + + False + True + 0 + + + + + gtk-help + True + True + True + baseline + True + True + + + + False + True + 1 + + + + + gtk-ok + True + True + True + Click to start the server + baseline + True + True + + + + False + True + 2 + + + + + 0 + 8 + 3 + 1 + + + + + Show Full Request + True + True + False + Show <i>full request string</i> +in logs + 0 + True + + + 1 + 6 + 1 + 1 + + + + + Show Hidden Files + True + True + False + Pop-up a terminal window to show active requests. + 0 + True + + + 2 + 6 + 1 + 1 + + + + + True + True + + + 1 + 0 + 1 + 1 + + + + + True + True + File to log requests. +Clear this if no log file is needed. + server.log + 0 + gtk-clear + False + False + + + + 1 + 4 + 1 + 1 + + + + + Tail -f + True + True + False + Pop up a window to show +active connections. + 0 + True + + + 2 + 4 + 1 + 1 + + + + + True + True + adjustment1 + 1 + True + 8080 + + + 2 + 0 + 1 + 1 + + + + + True + False + Choose the <b>base</b> folder. +This and every folder below will be visible to the server. + 6 + select-folder + False + False + False + + + 1 + 2 + 2 + 1 + + + + + True + False + 5 + 5 + + + 0 + 1 + 3 + 1 + + + + + True + False + 5 + 5 + + + 0 + 3 + 3 + 1 + + + + + True + False + 5 + 5 + + + 0 + 5 + 3 + 1 + + + + + True + False + 5 + 10 + + + 0 + 7 + 3 + 1 + + + + + + diff --git a/eugtk/examples/glade/widgets.ex b/eugtk/examples/glade/widgets.ex new file mode 100644 index 0000000..add4138 --- /dev/null +++ b/eugtk/examples/glade/widgets.ex @@ -0,0 +1,102 @@ + +--------------------------------------------------------------------------- +--# Demo of many numeric widgets built with Glade +-- would take hundreds of lines of code +-- if coded 'by hand', but only a few if the interface is designed by Glade. +--------------------------------------------------------------------------- + +include GtkEngine.e + + -- Use the following if you want to load the Glade code at runtime. + -- This will happen even if the program is bound or compiled, which means + -- that changes to the .glade file could improve (or break!) your program: + + -- add(builder,"~/demos/examples/glade/widgets.glade") + + -- Use the 2 lines below instead of the one above + -- if you prefer to load the glade XML as an include: + + include widgets.xml + add(builder,widgets:XML) + + -- If you do this, it will likewise be included each time the program is + -- interpreted, and therefore subject to the xml code being edited. + + -- HOWEVER - when your program is bound or compiled, the glade XML will be + -- bound into the program, and latter changes to the .xml will no longer + -- have any affect on your program. + +connect("window1","destroy","Quit") +main() + +-- All functions which respond to the interface MUST be declared global! +-- Controls can be referenced by string ID, rather than by handle. +-- The string ID is assigned automatically by Glade when object is created, +-- but can be changed on the Glade Properties/General tab (ID:) if you +-- prefer a more meaningful name. +-- DON'T change the Widget name: field under the Properties/Common tab! + +-------------------------------------------------------------------------------------- +global function on_radiobuttons_toggled(atom self, atom scale) +-------------------------------------------------------------------------------------- +-- Two calls to this function are made each time a radio button is clicked, +-- one as the previously-selected button is toggled 'off', and another +-- as the newly-clicked button it toggled 'on'. +-- We use the 'active' property to decide which one to respond to. + +-- Each button's 'name' field is used to pass the percentage to set. +-- There seems to be little use for that field otherwise. + +atom percent = 0 + + if get(self,"active") then + percent = to_number(get(self,"name")) + set(scale,"value",percent) + end if + +return 1 +end function + +-------------------------------------------------------------- +global function on_switch1_active_notify(atom self, atom spin) +-------------------------------------------------------------- + set("spinner1","active",get(self,"active")) -- toggle it +return 1 +end function + +-------------------------------------------------- +global function on_scale1_value_changed(atom self) +-------------------------------------------------- +atom val = get(self,"value") + set("progressbar1","fraction",val * .01) + set("levelbar1","value",val) + set("show_text","active",val != 0) +return 1 +end function + +----------------------------------------------- +global function on_show_text_toggled(atom self) +----------------------------------------------- + set("progressbar1","show text",get(self,"active")) +return 1 +end function + +-------------------------------------------- +global function on_digits_changed(atom self) +-------------------------------------------- +integer decimals = get(self,"active")-1 -- indexes are zero-based + set("value","digits",decimals) + set("scale1","digits",decimals) +return 1 +end function + +---------------------------------------- +global function on_help_about_activate() +---------------------------------------- +return Info("window1","About...","Widgets", + sprintf("This is a demo of several\nGtk numeric controls\n\n" + &"Current value %g",get("levelbar1","value")),, + "~/demos/thumbnails/applications-development.svg") +end function + + diff --git a/eugtk/examples/glade/widgets.glade b/eugtk/examples/glade/widgets.glade new file mode 100644 index 0000000..cc64698 --- /dev/null +++ b/eugtk/examples/glade/widgets.glade @@ -0,0 +1,487 @@ + + + + + 100 + 0.5 + 10 + + + True + False + center + applications-development + + + + True + False + vertical + + + True + False + 10 + 5 + center + + + True + False + <b><u>GtkRadioButtons</u></b> +Sets value in steps + 0 + + + True + False + 12 + + + True + False + <b><u>RadioButtons</u></b> +Click to set adjustment value +0 - 50% - 100% + start + center + vertical + + + Empty + 0 + True + True + False + 0 + True + True + + + + False + True + 0 + + + + + Half + 50 + True + True + False + 0 + True + True + radio_empty + + + + False + True + 1 + + + + + Full + 100 + True + True + False + 0 + True + True + radio_half + + + + False + True + 2 + + + + + + + + + + + + False + False + 0 + True + + + + + poobah + 40 + True + False + <b><u>GtkLevelBar</u></b> +Shows value of shared adjustment + vertical + 100 + True + + + True + True + 1 + + + + + 20 + 20 + True + False + <b><u>GtkSpinner</u></b> +Shows activity in progress + + + False + False + 2 + True + + + + + True + True + <b><u>GtkSwitch</u></b> +Turns spinner on/off + + + + False + True + 3 + True + + + + + gtk-quit + True + True + True + <b><u>Quit button</u></b> +What do you think <i>this</i> does? + True + True + + + + False + True + 4 + + + + + True + True + end + 0 + + + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-new + True + False + False + True + True + True + + + + + gtk-open + True + False + False + True + True + True + + + + + gtk-save + True + False + False + True + True + True + + + + + gtk-save-as + True + False + False + True + True + True + + + + + True + False + + + + + gtk-quit + menu-quit + True + False + True + True + True + + + + + + + + + + True + False + False + _Edit + True + + + True + False + + + gtk-cut + True + False + True + True + + + + + gtk-copy + True + False + True + True + + + + + gtk-paste + True + False + True + True + + + + + gtk-delete + True + False + True + True + + + + + + + + + help-menu-about + True + False + False + _View + True + + + + + True + False + Click for Help/About + True + _Help + True + + + True + False + + + gtk-about + True + False + True + True + True + True + + + + + + + + + + False + True + 1 + + + + + + + + True + False + <b><u>GtkProgressBar</u></b> +Shows value of shared adjustment + 5 + 5 + + + True + True + 3 + + + + + True + False + 10 + 10 + 16 + start + + + Show text + True + True + False + <b><u>GtkCheckButton</u></b> +Show or hide progress text + 0 + True + True + + + + False + True + 0 + + + + + True + False + <b><u>ComboBoxText</u></b> +Adjust number of decimal places used in value displays + 2 + + None + One + Two + Three + + + + + False + True + 1 + True + + + + + True + True + <b><u>GtkSpinButton</u></b> +Set/show adjustment value + etched-out + digits + adjustment1 + 1 + 2 + True + + + False + True + 2 + + + + + True + True + 10 + 4 + + + + + True + True + <b><u>GtkScale</u></b> +Slide to change adustment value + 5 + 5 + adjustment1 + 1 + 2 + + + + False + True + 5 + + + + + + diff --git a/eugtk/examples/glade/widgets.png b/eugtk/examples/glade/widgets.png new file mode 100644 index 0000000..036371f Binary files /dev/null and b/eugtk/examples/glade/widgets.png differ diff --git a/eugtk/examples/glade/widgets.xml b/eugtk/examples/glade/widgets.xml new file mode 100644 index 0000000..31a4662 --- /dev/null +++ b/eugtk/examples/glade/widgets.xml @@ -0,0 +1,498 @@ + +--------------------------------------------------------------------- +-- copy of widgets.glade, exported as a sequence. +-- usage: +-- include widgets.xml +-- add(builder,widgets:XML) +--------------------------------------------------------------------- + +namespace widgets + +export constant XML = """ + + + + + 100 + 0.5 + 10 + + + True + False + center + applications-development + + + True + False + vertical + + + True + False + 10 + 5 + center + + + True + False + <b><u>GtkRadioButtons</u></b> +Sets value in steps + 0 + + + True + False + 12 + + + True + False + <b><u>RadioButtons</u></b> +Click to set adjustment value +0 - 50% - 100% + start + center + vertical + + + Empty + 0 + True + True + False + 0 + True + True + + + + False + True + 0 + + + + + Half + 50 + True + True + False + 0 + True + True + radio_empty + + + + False + True + 1 + + + + + Full + 100 + True + True + False + 0 + True + True + radio_half + + + + False + True + 2 + + + + + + + + + + + + False + False + 0 + True + + + + + poobah + 40 + True + False + <b><u>GtkLevelBar</u></b> +Shows value of shared adjustment + vertical + 100 + True + + + True + True + 1 + + + + + 20 + 20 + True + False + <b><u>GtkSpinner</u></b> +Shows activity in progress + + + False + False + 2 + True + + + + + True + True + <b><u>GtkSwitch</u></b> +Turns spinner on/off + + + + False + True + 3 + True + + + + + gtk-quit + True + True + True + <b><u>Quit button</u></b> +What do you think <i>this</i> does? + True + True + + + + False + True + 4 + + + + + True + True + end + 0 + + + + + True + False + + + True + False + _File + True + + + True + False + + + gtk-new + True + False + False + True + True + True + + + + + gtk-open + True + False + False + True + True + True + + + + + gtk-save + True + False + False + True + True + True + + + + + gtk-save-as + True + False + False + True + True + True + + + + + True + False + + + + + gtk-quit + menu-quit + True + False + True + True + True + + + + + + + + + + True + False + False + _Edit + True + + + True + False + + + gtk-cut + True + False + True + True + + + + + gtk-copy + True + False + True + True + + + + + gtk-paste + True + False + True + True + + + + + gtk-delete + True + False + True + True + + + + + + + + + help-menu-about + True + False + False + _View + True + + + + + True + False + Click for Help/About + True + _Help + True + + + True + False + + + gtk-about + True + False + True + True + True + True + + + + + + + + + + False + True + 1 + + + + + + + + True + False + <b><u>GtkProgressBar</u></b> +Shows value of shared adjustment + 5 + 5 + + + True + True + 3 + + + + + True + False + 10 + 10 + 16 + start + + + Show text + True + True + False + <b><u>GtkCheckButton</u></b> +Show or hide progress text + 0 + True + True + + + + False + True + 0 + + + + + True + False + <b><u>ComboBoxText</u></b> +Adjust number of decimal places used in value displays + 2 + + None + One + Two + Three + + + + + False + True + 1 + True + + + + + True + True + <b><u>GtkSpinButton</u></b> +Set/show adjustment value + etched-out + digits + adjustment1 + 1 + 2 + True + + + False + True + 2 + + + + + True + True + 10 + 4 + + + + + True + True + <b><u>GtkScale</u></b> +Slide to change adustment value + 5 + 5 + adjustment1 + 1 + 2 + + + + False + True + 5 + + + + + + +""" diff --git a/eugtk/examples/glade/x2.png b/eugtk/examples/glade/x2.png new file mode 100644 index 0000000..9e2f704 Binary files /dev/null and b/eugtk/examples/glade/x2.png differ diff --git a/eugtk/examples/plug.ex b/eugtk/examples/plug.ex new file mode 100644 index 0000000..c01709b --- /dev/null +++ b/eugtk/examples/plug.ex @@ -0,0 +1,61 @@ + +--------------------------------------------------------- +--# Plug and Socket Demo Run sock.ex , not this file!! +--------------------------------------------------------- +-- Run eui sock.ex +-- This will open a window and show a Socket ID. +-- sock.ex will then execute plug.ex, passing +-- the Socket ID to it. +-- Plug will open a small window containing a +-- FileChooserButton. Use this to select images. +-- The selected image should be shown in the sock window. +---------------------------------------------------------- + +include GtkEngine.e + +object cmd = command_line() + +integer sock_id = 0 +if length(cmd) > 2 then + sock_id = to_number(cmd[3]) +end if + +constant win1 = create(GtkWindow,{ + {"border width",10}, + {"default size",200,50}, + {"icon","~/demos/thumbnails/applications-development.svg"}, + {"position",GTK_WIN_POS_CENTER}, + {"connect","destroy","Quit"}}) + +constant panel = create(GtkBox,VERTICAL) + add(win1,panel) + +constant filter = create(GtkFileFilter,{ + {"name","Images"}, + {"add mime type","image/*"}}) + +constant btn = create(GtkFileChooserButton,"Open") + pack_end(panel,btn) + set(btn,"add filter",filter) + connect(btn,"file-set","NewPix") + +constant plug = create(GtkPlug,sock_id) + +constant img = create(GtkImage,"~/demos/thumbnails/mongoose.png") + add(plug,img) + show_all(plug) + +show_all(win1) +main() + +------------------------ +global function NewPix() +------------------------ +object fn = get(btn,"filename") +object pb = create(GdkPixbuf,fn,500,500,1) +if file_exists(fn) then + display(fn) + set(img,"from pixbuf",pb) +end if +return 1 +end function diff --git a/eugtk/examples/resources/Jerry.map b/eugtk/examples/resources/Jerry.map new file mode 100644 index 0000000..45c0d2b Binary files /dev/null and b/eugtk/examples/resources/Jerry.map differ diff --git a/eugtk/examples/resources/Justin.map b/eugtk/examples/resources/Justin.map new file mode 100644 index 0000000..2100ee8 --- /dev/null +++ b/eugtk/examples/resources/Justin.map @@ -0,0 +1,7 @@ +\#22name\#22 = \#22Justin Jones\#22 +\#22pix\#22 = \#22thumbnails/Justin.jpg\#22 +\#22bal\#22 = \#2212.99\#22 +\#22phone\#22 = \#22123\-456\-6789\#22 +\#22city\#22 = \#22Reno\#2C NV\#22 +\#22age\#22 = \#2214\#22 +\#22Data\#22 = {\#22Justin Jones\#22\#2C14\#2C12.99\#2C\#22Reno\#2C NV\#22\#2C\#22123\-456\-6789\#22\#2C\#22thumbnails/Justin.jpg\#22} diff --git a/eugtk/examples/resources/README.html b/eugtk/examples/resources/README.html new file mode 100644 index 0000000..7b922e2 --- /dev/null +++ b/eugtk/examples/resources/README.html @@ -0,0 +1,178 @@ + + + + + README + + + + + +
+ GTK Logo + OpenEuphoria Logo +

EuGTK 4.11.10

+

Programmer's Resources

+
+ +

Editors

+ +

WEE

+

+I now use Pete Eberlein's WEE editor frequently, since it is cross-platform and designed for Euphoria source code.
+

    +
  1. Create a folder called "Wee"
  2. +
  3. Download + https://github.com/peberlein/WEE/raw/master/updater.ex
  4. +
  5. Run "eui updater.ex" to download/update the files for your platform.
  6. +
  7. Run "eui wee" to run the editor, or compile/bind/shroud it for convenience.
  8. +
+ +To set up [F1] key pop-up GTK help, follow these directions. + +

+
+

Geany, gedit, pluma, GtkSourceView, etc...

+

+In this folder are files which will add +Euphoria and EuGTK syntax highlighting to editors above, and one-click run or compile capability to +Geany. +

+
+To Install:
+
+For programs using GTK2 -- i.e. Geany, Pluma, etc.
+
+sudo cp euphoria.lang /usr/share/gtksourceview-2.0/language-specs/euphoria.lang
+sudo cp gedit_syntax.xml /usr/share/mime/packages/
+sudo cp classic.xml /usr/share/gtksourceview-2.0/styles/
+
+For programs using GTK3 -- i.e. EuGTK Sourceview
+
+sudo cp euphoria.lang /usr/share/gtksourceview-3.0/language-specs/euphoria.lang
+sudo cp gedit_syntax.xml /usr/share/mime/packages/
+sudo cp classic.xml /usr/share/gtksourceview-3.0/styles/
+
+Actually, it doesn't hurt to do both :)
+
+Optional, if you prefer these styles:
+sudo cp cobalt.xml /usr/share/gtksourceview-2.0/styles/
+sudo cp oblivion.xml /usr/share/gtksourceview-2.0/styles/
+sudo cp build.xml /usr/share/gtksourceview-2.0/styles/
+
+sudo cp cobalt.xml /usr/share/gtksourceview-3.0/styles/
+sudo cp oblivion.xml /usr/share/gtksourceview-3.0/styles/
+sudo cp build.xml /usr/share/gtksourceview-3.0/styles/
+
+
+ +

+For Geany, enter the location of your GTK documentation in Geany's context-action-cmd +accessed from the menu: Edit=>Preferences=>Tools=>Commands +

+ +
+

Example:
+ +context_action_cmd=firefox -new-tab file:///home/irv/gtk3/%s.html + +

+
+ +

+Once that's done, you can pop up docs on GtkWidgets in +your Euphoria source code. Highlight the widget name, e.g. GtkWindow, then right-click and choose context action. +You could also set up a geany keybinding for this, such as alt-i. +In the example above, you may prefer to use -new-window instead of -new-tab, +or perhaps -search in order to use your default on-line search engine. +

+ +
+hint +

+If you are connected to a local network, but not the internet, links in the GTK docs may +try to load images, etc from off-site. This will slow or stop you from getting the help you need. +

+
+ +
+

GtkSourceView

+

+Gtk has its own editor, with syntax highlighting for over 100 programming languages, +which now works as a EuGTK plugin (see test201.ex. With +EuGTK 4.11.3, I'm now using this for most editing tasks. It uses the syntax +highlighting files shown above for GTK3. +

+

The GtkSourceView editor is also used in Bear.ex, +which can edit and test run source code as well as view and edit html pages. +

+
+

Glade

+

+You can use Glade to visually (drag and drop) design your interface. You'll still need to write some +'glue' code to link signals to Euphoria functions, just as you would with VisualBasic™, etc., so a text +editor such as WEE will still be necessary. See Glade.html. +

+
+ +

Other files here

+

+

    +
  • themeicons.txt +
    this is generated by icons.ex, and lists the names of icons +available in the current theme.
    +
  • + +
  • xcolors.txt +
    this is a list of color names generated by xcolors, in case you +don't have xcolors or access to the web.
    +
  • + +
  • papersizes.txt +
    a list of paper size names for possible use when setting up a print process.
    +
  • + +
  • words.txt +
    21,084 english words used by the hangman demo.
    +
  • + +
  • notebook_pages.txt +
    content for test155.ex.
    +
  • + +
  • colorcode folder +
    contains resistor images created by me using Gimp.
    +
  • + +
  • flags folder +
    contains 247 flags, all in the public domain.
    +
  • + +
  • gedit_syntax folder +
    contains Mario Steele's color coding for GEdit, Pluma, and GtkSourceView.
    +
  • + +
  • *.css files +
    various css files to support demos
    +
  • + +
+

+
+
+ hint +

+ This page edited by The Bear, + a web-page and programming editor + written in Euphoria. +

+

+ Updated for EuGTK version 4.11.11 Sept 1, 2016
+ All code © 2016 by Irv Mullins +

+
+
+ + + + diff --git a/eugtk/examples/resources/a.e b/eugtk/examples/resources/a.e new file mode 100644 index 0000000..374c4ce --- /dev/null +++ b/eugtk/examples/resources/a.e @@ -0,0 +1,17 @@ +namespace a + +include GtkEngine.e + +export constant color = "red" + +constant win = create(GtkWindow,{ -- this window is NOT exported + {"name","a:window"}, -- note that this name must include the namespace! + {"move",200,300}, + {"title","Window A"}}) + +show_all(win) + +export function clear() + set(win,"background",#dddddd) +return 1 +end function diff --git a/eugtk/examples/resources/apple-red.png b/eugtk/examples/resources/apple-red.png new file mode 100644 index 0000000..b0a24e9 Binary files /dev/null and b/eugtk/examples/resources/apple-red.png differ diff --git a/eugtk/examples/resources/b.e b/eugtk/examples/resources/b.e new file mode 100644 index 0000000..5fc8483 --- /dev/null +++ b/eugtk/examples/resources/b.e @@ -0,0 +1,17 @@ +namespace b + +include GtkEngine.e + +export constant color = "green" + +constant win = create(GtkWindow,{ -- not this window is NOT exported. + {"name","b:window"}, -- you must include the namespace as part of name + {"move",400,700}, + {"title","Window B"}}) + +show_all(win) + +export function clear() + set(win,"background",#dddddd) +return 1 +end function diff --git a/eugtk/examples/resources/background.jpg b/eugtk/examples/resources/background.jpg new file mode 100644 index 0000000..86c006a Binary files /dev/null and b/eugtk/examples/resources/background.jpg differ diff --git a/eugtk/examples/resources/clown.e b/eugtk/examples/resources/clown.e new file mode 100644 index 0000000..d900e89 --- /dev/null +++ b/eugtk/examples/resources/clown.e @@ -0,0 +1,1050 @@ + + +include GtkEngine.e + +/* XPM */ +export constant clown_xpm = { +"90 90 952 2", +" c None", +". c #FF943D", +"+ c #FF933D", +"@ c #FF943E", +"# c #FF933E", +"$ c #FF953E", +"% c #FF933F", +"& c #FAAB4A", +"* c #F5CC5E", +"= c #F4D262", +"- c #F6C55B", +"; c #FCA548", +"> c #FF963F", +", c #FAAE4D", +"' c #F9B853", +") c #FAB14F", +"! c #FF9740", +"~ c #F7C158", +"{ c #F1E36C", +"] c #F9B551", +"^ c #FCA245", +"/ c #F3DA67", +"( c #F2DC68", +"_ c #FAAA4A", +": c #000000", +"< c #FF943C", +"[ c #FBA84B", +"} c #F1E16B", +"| c #FE9C43", +"1 c #FE953E", +"2 c #F2DF6A", +"3 c #FD9E43", +"4 c #9D5A25", +"5 c #321D0B", +"6 c #231509", +"7 c #523013", +"8 c #573416", +"9 c #6C5125", +"0 c #866F33", +"a c #C49F49", +"b c #F9B14E", +"c c #F5CC5F", +"d c #F6C85C", +"e c #FCA347", +"f c #F8BC55", +"g c #F5CB5E", +"h c #F9B450", +"i c #FF973F", +"j c #FF923E", +"k c #FE9B42", +"l c #FAB24F", +"m c #E2AF50", +"n c #522F14", +"o c #1B1A0C", +"p c #8B803D", +"q c #EBDE69", +"r c #F3D966", +"s c #FD9F44", +"t c #FF953D", +"u c #F7C359", +"v c #F1E16A", +"w c #B8AE53", +"x c #18160A", +"y c #211F0F", +"z c #C3B757", +"A c #F4D363", +"B c #F6C459", +"C c #A39949", +"D c #080703", +"E c #363318", +"F c #817A3A", +"G c #B29042", +"H c #B86A2C", +"I c #4D2C14", +"J c #353B44", +"K c #7A899E", +"L c #7B889E", +"M c #7A889E", +"N c #79889E", +"O c #77869B", +"P c #0B0C0E", +"Q c #090804", +"R c #A29848", +"S c #FD9C42", +"T c #FF923D", +"U c #FE9840", +"V c #F1E26B", +"W c #AFA54E", +"X c #050402", +"Y c #2B2813", +"Z c #B9AE53", +"` c #FE9D43", +" . c #5D6778", +".. c #20252B", +"+. c #040506", +"@. c #596373", +"#. c #515A69", +"$. c #432710", +"%. c #745123", +"&. c #8D853F", +"*. c #8A823E", +"=. c #746D34", +"-. c #3F3C1C", +";. c #040402", +">. c #BDB255", +",. c #FF9840", +"'. c #C1B656", +"). c #0C0C06", +"!. c #6D6631", +"~. c #F0E26C", +"{. c #D2A266", +"]. c #958A8A", +"^. c #4C5563", +"/. c #030304", +"(. c #5E6877", +"_. c #929DAF", +":. c #99A4B5", +"<. c #9DA8B8", +"[. c #9CA6B7", +"}. c #95A0B1", +"|. c #8794A8", +"1. c #1F2228", +"2. c #060708", +"3. c #333942", +"4. c #79879D", +"5. c #B78C71", +"6. c #F4A14C", +"7. c #D4C75F", +"8. c #555026", +"9. c #19170B", +"0. c #E0D364", +"a. c #F7C258", +"b. c #F7BF57", +"c. c #FCA247", +"d. c #FF943F", +"e. c #FE933D", +"f. c #FCA448", +"g. c #FCA749", +"h. c #FBA848", +"i. c #E5D766", +"j. c #1E1C0E", +"k. c #89813D", +"l. c #D3CD78", +"m. c #8E9795", +"n. c #939EB0", +"o. c #B9C0CC", +"p. c #A1A4A9", +"q. c #B1B2B3", +"r. c #FFFFFF", +"s. c #F8F9FA", +"t. c #BABDC1", +"u. c #5F6267", +"v. c #959EAC", +"w. c #7D8AA0", +"x. c #828999", +"y. c #BFB27D", +"z. c #EFE16C", +"A. c #7D7638", +"B. c #6B6530", +"C. c #F7C058", +"D. c #FF933C", +"E. c #FBAA4A", +"F. c #5C5629", +"G. c #EBDE6F", +"H. c #A7AA8B", +"I. c #7B889D", +"J. c #7F8CA1", +"K. c #B0B9C6", +"L. c #E5E8EC", +"M. c #F4F5F7", +"N. c #C3C9D3", +"O. c #8A96AA", +"P. c #909794", +"Q. c #DBD275", +"R. c #605B2B", +"S. c #060503", +"T. c #D0C45D", +"U. c #FAB14E", +"V. c #FE943E", +"W. c #FCA246", +"X. c #DFD264", +"Y. c #1A190C", +"Z. c #544F26", +"`. c #D7CF77", +" + c #899398", +".+ c #7D8BA0", +"++ c #B7BFCB", +"@+ c #FCFDFD", +"#+ c #CED3DB", +"$+ c #8895A8", +"%+ c #7E8A9D", +"&+ c #BDBB82", +"*+ c #E8DB68", +"=+ c #88803D", +"-+ c #0E0D06", +";+ c #22200F", +">+ c #E7D967", +",+ c #CBC57C", +"'+ c #7E8B9C", +")+ c #9AA5B6", +"!+ c #EBEDF0", +"~+ c #EDEDED", +"{+ c #FEFEFE", +"]+ c #F9F9FA", +"^+ c #B6BECA", +"/+ c #7B899F", +"(+ c #A9AC8A", +"_+ c #8B833E", +":+ c #EFE16B", +"<+ c #F2DE69", +"[+ c #D7CA60", +"}+ c #C2B657", +"|+ c #C3C07F", +"1+ c #7B899E", +"2+ c #7C8AA0", +"3+ c #BFC6D1", +"4+ c #FDFEFE", +"5+ c #5E5E5E", +"6+ c #A0A0A0", +"7+ c #F1F1F1", +"8+ c #686868", +"9+ c #DDE1E6", +"0+ c #9FA48E", +"a+ c #C7BC59", +"b+ c #F4D463", +"c+ c #F3D765", +"d+ c #C9C47D", +"e+ c #818FA3", +"f+ c #DDE0E6", +"g+ c #BFBFBF", +"h+ c #6B6B6B", +"i+ c #0B0B0B", +"j+ c #212121", +"k+ c #CECECE", +"l+ c #6E6E6E", +"m+ c #979797", +"n+ c #F6F6F6", +"o+ c #F3F4F6", +"p+ c #A3A78C", +"q+ c #706932", +"r+ c #B1A64F", +"s+ c #E9DC69", +"t+ c #FC923D", +"u+ c #F7C057", +"v+ c #DAD176", +"w+ c #7F8DA2", +"x+ c #DFE2E7", +"y+ c #DBDBDB", +"z+ c #333333", +"A+ c #323232", +"B+ c #444444", +"C+ c #232323", +"D+ c #545454", +"E+ c #F0F0F0", +"F+ c #C7C7C7", +"G+ c #414141", +"H+ c #010101", +"I+ c #696969", +"J+ c #ECECEC", +"K+ c #F7F8F9", +"L+ c #949FB1", +"M+ c #B6B685", +"N+ c #F6C65B", +"O+ c #FE943D", +"P+ c #BD6C2D", +"Q+ c #FE9941", +"R+ c #EADE6F", +"S+ c #8A9497", +"T+ c #D9DDE3", +"U+ c #E0E0E0", +"V+ c #181818", +"W+ c #363636", +"X+ c #D4D4D4", +"Y+ c #B7B7B7", +"Z+ c #1B1B1B", +"`+ c #383838", +" @ c #F8F8F8", +".@ c #A9A9A9", +"+@ c #040404", +"@@ c #424242", +"#@ c #B9B9B9", +"$@ c #EEEEEE", +"%@ c #E6E6E6", +"&@ c #1F1F1F", +"*@ c #E5E5E5", +"=@ c #8E9AAC", +"-@ c #D2CB7A", +";@ c #F4D362", +">@ c #FAA94A", +",@ c #D77D34", +"'@ c #FE9A41", +")@ c #F6C45A", +"!@ c #A6A98B", +"~@ c #C7CDD6", +"{@ c #585858", +"]@ c #202020", +"^@ c #F2F2F2", +"/@ c #7C7C7C", +"(@ c #6C6C6C", +"_@ c #D1D1D1", +":@ c #060606", +"<@ c #919191", +"[@ c #E3E3E3", +"}@ c #616161", +"|@ c #FDFDFD", +"1@ c #C2C2C2", +"2@ c #BBBBBB", +"3@ c #FCFCFC", +"4@ c #E8E8E8", +"5@ c #474747", +"6@ c #828FA4", +"7@ c #86919A", +"8@ c #FA913D", +"9@ c #A56028", +"0@ c #D0CA7A", +"a@ c #A8B2C0", +"b@ c #EAEAEA", +"c@ c #8B8B8B", +"d@ c #909090", +"e@ c #484848", +"f@ c #0E0E0E", +"g@ c #E4E4E4", +"h@ c #595959", +"i@ c #818181", +"j@ c #626262", +"k@ c #A8A8A8", +"l@ c #B0B0B0", +"m@ c #D4D9E0", +"n@ c #FBA548", +"o@ c #E18336", +"p@ c #FBAB4B", +"q@ c #8D9796", +"r@ c #8390A5", +"s@ c #F5F6F7", +"t@ c #BDBDBD", +"u@ c #121212", +"v@ c #EBEBEB", +"w@ c #959595", +"x@ c #858585", +"y@ c #111111", +"z@ c #505050", +"A@ c #464646", +"B@ c #DDDDDD", +"C@ c #EFEFEF", +"D@ c #6F6F6F", +"E@ c #A5AEBD", +"F@ c #DBD276", +"G@ c #B7692B", +"H@ c #C8CED7", +"I@ c #D0D0D0", +"J@ c #A3A3A3", +"K@ c #F4F4F4", +"L@ c #A2A2A2", +"M@ c #242424", +"N@ c #515151", +"O@ c #434343", +"P@ c #CDCDCD", +"Q@ c #AFAFAF", +"R@ c #F0F1F4", +"S@ c #7E8CA1", +"T@ c #A0A68E", +"U@ c #FAA648", +"V@ c #FA913C", +"W@ c #F8B954", +"X@ c #919A94", +"Y@ c #8A96A9", +"Z@ c #FCFCFD", +"`@ c #3E3E3E", +" # c #727272", +".# c #272727", +"+# c #151515", +"@# c #6D6D6D", +"## c #898989", +"$# c #0A0A0A", +"%# c #E7E7E7", +"&# c #A1A1A1", +"*# c #DCDCDC", +"=# c #B2BAC7", +"-# c #E0D673", +";# c #F2DD68", +"># c #F3D865", +",# c #FC9D44", +"'# c #FE933E", +")# c #864C1F", +"!# c #F9B651", +"~# c #C5CBD5", +"{# c #030303", +"]# c #FAFAFA", +"^# c #BABABA", +"/# c #A6A6A6", +"(# c #131313", +"_# c #101010", +":# c #666666", +"<# c #D8D8D8", +"[# c #DFDFDF", +"}# c #191919", +"|# c #525252", +"1# c #FFFAFA", +"2# c #FFE4E3", +"3# c #FFDDDB", +"4# c #FFE3E2", +"5# c #FFF2F2", +"6# c #7C899F", +"7# c #B3B486", +"8# c #FD9C43", +"9# c #E78738", +"0# c #683B19", +"a# c #FBA146", +"b# c #FAAF4D", +"c# c #AFB188", +"d# c #090909", +"e# c #797979", +"f# c #888888", +"g# c #141414", +"h# c #BCBCBC", +"i# c #0C0C0C", +"j# c #343434", +"k# c #D5D5D5", +"l# c #868686", +"m# c #FFE9E8", +"n# c #FFC4C1", +"o# c #FFBFBC", +"p# c #FFD7D5", +"q# c #FFFDFD", +"r# c #9FA9B9", +"s# c #879398", +"t# c #F0E36D", +"u# c #F1E06A", +"v# c #CD7732", +"w# c #EE8939", +"x# c #FE953D", +"y# c #8D9696", +"z# c #A2ABBB", +"A# c #FFF2F1", +"B# c #FFE0DE", +"C# c #FFDEDC", +"D# c #FFE7E6", +"E# c #6A6A6A", +"F# c #080808", +"G# c #838383", +"H# c #FEF6F6", +"I# c #FBC5C5", +"J# c #F9ADAD", +"K# c #F9B0B0", +"L# c #FBCDCD", +"M# c #FFFCFC", +"N# c #7A7A7A", +"O# c #F5F5F5", +"P# c #FFC0BD", +"Q# c #FFDCDA", +"R# c #CED4DC", +"S# c #DCD374", +"T# c #F6C75B", +"U# c #7B5438", +"V# c #AD642A", +"W# c #E4DA71", +"X# c #C6CCD5", +"Y# c #878787", +"Z# c #646464", +"`# c #FCD4D4", +" $ c #F35757", +".$ c #ED0707", +"+$ c #ED0000", +"@$ c #EE0F0F", +"#$ c #F56D6D", +"$$ c #FDE8E8", +"%$ c #5B5B5B", +"&$ c #FFC4C2", +"*$ c #F2F3F5", +"=$ c #FC9A43", +"-$ c #E29252", +";$ c #788498", +">$ c #373F48", +",$ c #F59243", +"'$ c #FBA74A", +")$ c #CCC87B", +"!$ c #E8EAEE", +"~$ c #FFF3F2", +"{$ c #F89C9C", +"]$ c #EE1414", +"^$ c #FBC0C0", +"/$ c #E9E9E9", +"($ c #B2B2B2", +"_$ c #FFDBD9", +":$ c #FFC3C0", +"<$ c #8F9BAE", +"[$ c #A4A88D", +"}$ c #F4D161", +"|$ c #F2DB67", +"1$ c #FE9942", +"2$ c #FA9849", +"3$ c #8D8C93", +"4$ c #77849A", +"5$ c #A68B7E", +"6$ c #FAAA4B", +"7$ c #B9B983", +"8$ c #F9B1B1", +"9$ c #ED0101", +"0$ c #EE0A0A", +"a$ c #FCD9D9", +"b$ c #FFEFEE", +"c$ c #FFD8D6", +"d$ c #A7B0BF", +"e$ c #929A93", +"f$ c #FE9A43", +"g$ c #FFB477", +"h$ c #FFF3E9", +"i$ c #D7DCE2", +"j$ c #6E7B90", +"k$ c #C2A18C", +"l$ c #FF9946", +"m$ c #FCA64A", +"n$ c #FBA94A", +"o$ c #FE9C44", +"p$ c #AE947C", +"q$ c #8E9AAD", +"r$ c #EF2020", +"s$ c #F34E4E", +"t$ c #FFE1E0", +"u$ c #FFCFCD", +"v$ c #FFFBFB", +"w$ c #BBC2CE", +"x$ c #838B98", +"y$ c #FF9641", +"z$ c #FFD5B4", +"A$ c #FFD4B1", +"B$ c #FFD9BB", +"C$ c #FFF2E7", +"D$ c #C1C8D2", +"E$ c #434A56", +"F$ c #FFF7F0", +"G$ c #FFCEA8", +"H$ c #FFB57B", +"I$ c #FFB173", +"J$ c #FFB77D", +"K$ c #A78C7E", +"L$ c #FFD9D7", +"M$ c #FFF0F0", +"N$ c #FBC2C2", +"O$ c #ED0303", +"P$ c #FEF0F0", +"Q$ c #E1E1E1", +"R$ c #FFF5F4", +"S$ c #FFDBDA", +"T$ c #FFD4D2", +"U$ c #FFEAE9", +"V$ c #C6CCD6", +"W$ c #FED5B5", +"X$ c #8B97AA", +"Y$ c #697589", +"Z$ c #A09594", +"`$ c #A0AABA", +" % c #F9A5A5", +".% c #CACACA", +"+% c #9D9C9C", +"@% c #CDD3DB", +"#% c #BAC1CC", +"$% c #79879C", +"%% c #E3E6EB", +"&% c #A0A9B8", +"*% c #FABBBB", +"=% c #FEEBEB", +"-% c #AFAEAE", +";% c #393838", +">% c #F7F7F7", +",% c #D9DDE4", +"'% c #FAFBFC", +")% c #FEF7F7", +"!% c #EE1111", +"~% c #F13A3A", +"{% c #A1A0A0", +"]% c #484747", +"^% c #838282", +"/% c #E6E9ED", +"(% c #3A424C", +"_% c #FEFFFF", +":% c #AFB7C4", +"<% c #333232", +"[% c #F89696", +"}% c #FBC4C4", +"|% c #060404", +"1% c #535151", +"2% c #BCC3CE", +"3% c #E0E3E8", +"4% c #2D333B", +"5% c #F5F6F8", +"6% c #747474", +"7% c #262525", +"8% c #BEBEBE", +"9% c #F56F6F", +"0% c #F89D9D", +"a% c #B4B4B4", +"b% c #301B1A", +"c% c #A34742", +"d% c #171515", +"e% c #D2D2D2", +"f% c #95A0B2", +"g% c #CBD0D9", +"h% c #D7DBE2", +"i% c #D6DAE1", +"j% c #E9EBEF", +"k% c #717171", +"l% c #8F8E8E", +"m% c #F9A8A8", +"n% c #F02626", +"o% c #5C5B5B", +"p% c #3A1C1B", +"q% c #E3645D", +"r% c #FF7068", +"s% c #542523", +"t% c #CCCCCC", +"u% c #FBFBFB", +"v% c #919DAF", +"w% c #A9B2C1", +"x% c #A0AAB9", +"y% c #727F93", +"z% c #F1F3F5", +"A% c #B1B0B0", +"B% c #FBCACA", +"C% c #F79292", +"D% c #F67A7A", +"E% c #F67D7D", +"F% c #F89A9A", +"G% c #FCD8D8", +"H% c #7E7C7C", +"I% c #292424", +"J% c #7A3632", +"K% c #F86D65", +"L% c #A44842", +"M% c #A6A5A5", +"N% c #C5CBD4", +"O% c #E3E6EA", +"P% c #576171", +"Q% c #79889D", +"R% c #E2E5EA", +"S% c #A4AEBD", +"T% c #313030", +"U% c #2C1514", +"V% c #221818", +"W% c #716F6F", +"X% c #BDBCBC", +"Y% c #331F1E", +"Z% c #7C3733", +"`% c #E2635C", +" & c #CE5A54", +".& c #999898", +"+& c #D1D5DD", +"@& c #EEF0F3", +"#& c #B4BCC9", +"$& c #863A36", +"%& c #FB6E66", +"&& c #BF544E", +"*& c #793632", +"=& c #512926", +"-& c #4B3736", +";& c #5F5E5E", +">& c #7F7E7E", +",& c #8E8D8D", +"'& c #9A9999", +")& c #979696", +"!& c #848383", +"~& c #5D5D5D", +"{& c #41302F", +"]& c #542623", +"^& c #873B37", +"/& c #CB5953", +"(& c #DA6059", +"_& c #A09F9F", +":& c #A2ACBB", +"<& c #FDFFFF", +"[& c #F1F2F5", +"}& c #96A1B3", +"|& c #4C5462", +"1& c #DADEE4", +"2& c #E4E7EC", +"3& c #C9CED7", +"4& c #72332F", +"5& c #F66C64", +"6& c #DD615A", +"7& c #D75E58", +"8& c #CC5A53", +"9& c #D45D56", +"0& c #F16A62", +"a& c #CA5952", +"b& c #B7B6B6", +"c& c #D2D6DE", +"d& c #ECEEF1", +"e& c #808EA3", +"f& c #5F6A7B", +"g& c #97A2B3", +"h& c #D0D5DD", +"i& c #C0C7D1", +"j& c #808DA2", +"k& c #8D99AC", +"l& c #783532", +"m& c #AC4B46", +"n& c #7A879E", +"o& c #576170", +"p& c #CCD2DA", +"q& c #81433F", +"r& c #F2F4F6", +"s& c #697487", +"t& c #515B6A", +"u& c #748296", +"v& c #7A879D", +"w& c #6B778A", +"x& c #6D7A8E", +"y& c #6E7B8F", +"z& c #758399", +"A& c #8592A6", +"B& c #222121", +"C& c #AB4B45", +"D& c #79605E", +"E& c #A7B1BF", +"F& c #262B32", +"G& c #2F353D", +"H& c #49515E", +"I& c #545C6B", +"J& c #505968", +"K& c #414A56", +"L& c #3E4550", +"M& c #050404", +"N& c #D55E57", +"O& c #FA6A63", +"P& c #F4645C", +"Q& c #F5655D", +"R& c #FC6C65", +"S& c #E9665F", +"T& c #999797", +"U& c #D5DAE1", +"V& c #4B5461", +"W& c #5B6475", +"X& c #0F0706", +"Y& c #FD6F67", +"Z& c #DA473F", +"`& c #BD271F", +" * c #B01911", +".* c #B72118", +"+* c #D34037", +"@* c #F3635B", +"#* c #97433E", +"$* c #EEF0F2", +"%* c #8390A4", +"&* c #707D92", +"** c #090A0C", +"=* c #210B0D", +"-* c #6E7A8D", +";* c #2F2E2E", +">* c #6C302D", +",* c #FE7068", +"'* c #EF5E56", +")* c #BA241C", +"!* c #B21C13", +"~* c #DC4A41", +"{* c #C0544E", +"]* c #716160", +"^* c #762A31", +"/* c #9C0000", +"(* c #6F0000", +"_* c #0D0000", +":* c #180000", +"<* c #A80000", +"[* c #CE2025", +"}* c #7B859B", +"|* c #4E2320", +"1* c #ED6861", +"2* c #F05F57", +"3* c #B31D14", +"4* c #D9463D", +"5* c #F26A63", +"6* c #733532", +"7* c #908E8E", +"8* c #FAFAFB", +"9* c #9AA4B5", +"0* c #AC4B57", +"a* c #D70000", +"b* c #550000", +"c* c #2E0000", +"d* c #D90000", +"e* c #C52F37", +"f* c #7B879D", +"g* c #636363", +"h* c #180B0A", +"i* c #9E4540", +"j* c #FC6F67", +"k* c #FE6F67", +"l* c #BE2920", +"m* c #B31C14", +"n* c #A52A23", +"o* c #4F3D3C", +"p* c #A15A68", +"q* c #EC0101", +"r* c #7D0000", +"s* c #950000", +"t* c #BA3C46", +"u* c #7E8BA1", +"v* c #BBBABA", +"w* c #2A1311", +"x* c #903F3A", +"y* c #D9544E", +"z* c #B21B13", +"A* c #B32720", +"B* c #872621", +"C* c #513C3A", +"D* c #B2B1B1", +"E* c #976575", +"F* c #EA0405", +"G* c #C50000", +"H* c #A10000", +"I* c #C43138", +"J* c #7E849A", +"K* c #F0F2F4", +"L* c #B8B7B7", +"M* c #0D0C0C", +"N* c #361211", +"O* c #74241F", +"P* c #952B25", +"Q* c #A32C26", +"R* c #A62C26", +"S* c #A02924", +"T* c #982822", +"U* c #872722", +"V* c #5A1A17", +"W* c #2D2020", +"X* c #CFCFCF", +"Y* c #BFC6D0", +"Z* c #A45664", +"`* c #E90404", +" = c #C60000", +".= c #9D0000", +"+= c #D31E23", +"@= c #87798C", +"#= c #9F9E9E", +"$= c #807F7F", +"%= c #676767", +"&= c #ADACAC", +"*= c #D6DBE1", +"== c #7D859B", +"-= c #B93D47", +";= c #C10000", +">= c #970000", +",= c #E40A0C", +"'= c #9D5E6D", +")= c #CCD1DA", +"!= c #8A7689", +"~= c #B80000", +"{= c #870000", +"]= c #C92B32", +"^= c #86778B", +"/= c #9BA6B6", +"(= c #E1E4E9", +"_= c #FBFBFC", +":= c #EBEDF1", +"<= c #7D8499", +"[= c #B34550", +"}= c #E90506", +"|= c #720000", +"1= c #C0343C", +"2= c #7B7183", +"3= c #9BA5B6", +"4= c #A6B0BE", +"5= c #909CAE", +"6= c #827F93", +"7= c #B04753", +"8= c #E20D0F", +"9= c #8A0000", +"0= c #600000", +"a= c #9B1F24", +"b= c #52525F", +"c= c #707D91", +"d= c #7A849A", +"e= c #956271", +"f= c #730000", +"g= c #520000", +"h= c #E00000", +"i= c #6A0101", +"j= c #15171B", +"k= c #A13740", +"l= c #AD4C58", +"m= c #916C7E", +"n= c #8C7385", +"o= c #8A7588", +"p= c #916D7E", +"q= c #986474", +"r= c #5E525F", +"s= c #5A3F4A", +"t= c #BE2228", +"u= c #650000", +"v= c #4A0000", +"w= c #940000", +"x= c #B20000", +"y= c #2B0000", +"z= c #540000", +"A= c #5D0000", +"B= c #430000", +"C= c #820000", +"D= c #E20000", +"E= c #060000", +"F= c #3B0000", +"G= c #280000", +"H= c #EB0000", +"I= c #4C0000", +"J= c #6A0000", +"K= c #780000", +"L= c #CD0000", +"M= c #110000", +"N= c #E80000", +"O= c #090000", +"P= c #E50000", +"Q= c #E90000", +"R= c #690000", +"S= c #640000", +"T= c #D60000", +"U= c #330000", +"V= c #CE0000", +"W= c #140000", +"X= c #8D0000", +"Y= c #CC0000", +"Z= c #340000", +"`= c #030000", +" - c #1C0000", +".- c #0A0000", +"+- c #800000", +"@- c #9A0000", +"#- c #0B0000", +"$- c #AF0000", +"%- c #2A0000", +"&- c #A60000", +"*- c #EC0000", +"=- c #B60000", +"-- c #0E0000", +";- c #530000", +">- c #A20000", +",- c #D30000", +"'- c #E70000", +")- c #B40000", +"!- c #6C0000", +"~- c #130000", +"{- c #240000", +"]- c #7A0000", +"^- c #EA0000", +"/- c #B70000", +"(- c #5E0000", +"_- c #040000", +":- c #070000", +"<- c #100000", +"[- c #160000", +"}- c #480000", +"|- c #590000", +"1- c #5F0000", +"2- c #510000", +"3- c #360000", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . + + + @ ", +" # . $ % @ # + & * = - ; + ", +" @ > , ' ) ! + + ~ { { { { { ] + ", +" $ ^ / { { { ( _ + : : : : : < @ + + . . [ { { { { { { } | + + + + @ < ", +" . 1 $ . < > ( { { { { { 2 3 # 4 5 : : : : : : : : : 6 7 8 9 0 a b $ c { { { { { { { d e f c g h i . ", +" j + k ) l ; + ] { { { { { { { m n : : : : : : : : : : : : : : : : : : : : : : : o p q { { { { { { { { { { { { { r s t ", +" # $ u } { { { r v { { { { { { w x : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : y z { { { { { { { { { { { { { A + ", +" + B { { { { { { { { { { { { C D : : : : : E F G H I : : : : : : : J K L M N O P : : : : : : : : : : : : : : : : Q R { { { { { { { { { { { { { S T ", +" @ U V { { { { { { { { { { { W X : : : : Y Z { { { ` . ...: : : +.@.M M M M M #.: : : : : : $.%.&.*.=.-.;.: : : : D >.{ { { { { { { { { { { } 1 + + . ", +" + + ,.V { { { { { { { { { { '.).: : : : !.q { { { ~.{.].M M M ^./.+.(._.:.<.[.}.|.M 1.: 2.3. .4.5.6.{ { { { 7.8.: : : : 9.0.{ { { { { { { { { { { ~ a.b.c.+ d. ", +" e.@ f.g.h.} { { { { { { { { { i.j.: : : : k.{ { { { l.m.M M M M n.o.p.q.r.r.r.r.r.r.r.s.t.u.v.w.M M M x.y.z.{ { { { A.: : : : B.{ { { { { { { { { { { { { { { C.+ D. ", +" . E.r { { { { { { { { { { { { { F.: : : : A.{ { { G.H.I.M M J.K.L.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.M.N.O.M M M P.Q.{ { { { R.: : : S.T.{ { { { { { { { { { { { { { { U.. ", +" V.W.} { { { { { { { { { { { { { X.Y.: : : Z.~.{ { `. +M M .+++M.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.@+#+$+M M %+&+{ { { *+o : : : !.{ { { { { { { { { { { { { { { A + ", +" + g { { { { { { { { { { { { { { { q =+-+;+>+{ { ,+'+M M )+!+r.~+{+r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.]+^+/+M M (+z.{ { _+: : : o :+{ { { { { { { { { { { { { { <++ ", +" + ( { { { { { { { { { { { { { { { { { [+}+{ { |+1+M 2+3+4+r.r.5+6+r.r.r.r.r.r.r.r.r.r.r.r.r.r.7+8+r.r.r.r.r.r.9+$+M M 0+z.{ 0.S.: : Q a+{ { { { { { { { { { { { { { b++ ", +" + c+{ { { { { { { { { { { { { { { { { { { { d+1+M e+f+r.{+g+h+i+j+k+r.r.r.r.r.r.r.r.r.r.r.r.r.l+: m+n+r.r.r.r.r.o+}.M M p+~.{ B.q+r+s+{ { { { { { { { { { { { { { { ] t+ ", +" + u+{ { { { { { { { { { { { { { { { { { { v+'+M w+x+r.y+z+: A+B+C+: D+E+r.r.r.r.r.r.r.r.r.F+G+H+: : i+I+J+r.r.r.r.K+L+M M M+{ { { { { { { { { { { { { { { { { { { N+O+P+ ", +" # Q+r { { { { { { { { { { { { { { { { { R+S+M w.T+r.U+V+W+X+r.r.r.Y+Z+`+ @r.r.r.r.r.r.r..@+@@@#@$@%@m+Z+&@*@r.r.r.r.M.=@M 1+-@{ { { { { { { { { { { { { { { { ;@>@+ ,@ ", +" @ '@)@} { { { { { { { { { { { { { { { !@M M ~@r.r.{@]@E+r.^@/@(@k+_@:@<@r.r.r.r.r.r.[@i+}@|@1@2@3@r.4@&@5@r.r.r.r.r.!+6@M 7@R+{ { { { { { { { { { { { { { { , 8@9@ ", +" $ + U.{ { { { { { { { { { { { { { 0@M M a@r.b@c@+@d@r.r.e@: : f@g@h@z+r.r.r.r.r.r.i@f@7+j@: : 5@|@r.k@: l@r.r.r.r.r.m@M M (+{ { { { { { { { { { { { { { { n@o@ ", +" @ p@{ { { { { { { { { { { { { ~.q@M r@s@r.t@u@: 2@r.v@: : : : w@x@y@r.r.r.r.r.r.z@A@B@: : : : g+r.C@: : D@r.r.r.r.r.E@M I.F@{ { { { { { { { { { { { { r V.G@ ", +" # U } { { { { { { { { { { { { d+M M H@r.r.r.I@: J@r.K@+@: : : L@h+M@r.r.r.r.r.r.N@O@P@: : : : Q@r.J+: h@{+r.r.r.r.r.R@S@M T@{ { { { { { { { { { { { 2 U@V@ ", +" + W@{ { { { { { { { { { { { X@M Y@Z@r.r.r.r.W+`@{+r. #: : .#%@+#@#r.r.r.r.r.r.##$#%#.#: : +#$@r.&#: *#r.r.r.r.r.r.r.=#M 1+-#{ { { { { { { { ;#>#N+,#'#)# ", +" D.+ !#2 { { { { { { { { { F@M M ~#r.r.r.r.r.g+{#@#]#r.^#/#U+O@(#*@r.r.r.r.r.r.J+_#D+U+@#:#<#r.[#}#|#r.r.1#2#3#4#5#r.R@6#M 7#{ { { { { { { { 8#+ + 9#0# ", +" . '#V.a#b#{ { { { { { { c#M .+s@r.r.r.r.r.r.L@d#.#e#f#l+g#Z+F+r.r.r.r.r.r.r.r.h#i#j#k@B@k#l#(#A+$@r.m#n#o#o#o#o#p#q#r#M s#t#{ { { { { { u#e.v# ", +" w#x#{ { { { { { { y#M z#r.r.r.A#B#C#D#1#[#E#y@F#`+G#E+r.H#I#J#K#L#M#r.r.r.k#N@:@: : u@N#O#r.5#P#o#o#o#o#o#o#Q#R#M M S#{ { { { { { T#+ U# ", +" V#+ = { { { { { W#M M X#r.q#p#o#o#o#o#n#m#r.Y#Z#r.r.`# $.$+$+$+$+$@$#$$$r.r.r.7+%$&@n+r.r.r.Q#o#o#o#o#o#o#o#&$*$L M &+{ { { { { r =$-$;$>$ ", +" ,$'$} { { { { )$M M !$r.Q#o#o#o#o#o#o#P#~$n+*@r.{$.$+$+$+$+$+$+$+$+$]$^$r.r.r./$($r.r.r.r._$o#o#o#o#o#o#o#:$r.<$M [$b+}$<+|$~ 1$2$3$M 4$ ", +" N 5$# 6$/ { { { 7$M .+@+r.&$o#o#o#o#o#o#o#Q#r.r.8$9$+$+$+$+$+$+$+$+$+$+$0$a$r.r.r.r.r.r.r.r.b$o#o#o#o#o#o#o#c$r.d$M e$f$+ + + + g$h$i$2+M j$ ", +" M M k$l$$ m$n$o$p$M q$r.r.n#o#o#o#o#o#o#o#_$r.M#r$+$+$+$+$+$+$+$+$+$+$+$+$s$r.r.r.r.r.r.r.r.r.t$P#o#o#o#o#u$v$r.w$M x$y$z$A$B$C$r.r.r.D$M M E$ ", +" M M e+M.F$G$H$I$J$K$M :.r.r.L$o#o#o#o#o#o#o#M$r.N$+$+$+$+$+$+$+$+$+$+$+$+$+$O$P$r.r.r.r.O#Q$3@r.r.R$S$T$p#U$r.r.r.V$M I.W$r.r.r.r.r.r.r.Z@X$M Y$ ", +" M M o.r.r.r.r.r.r.Z$M `$r.r.v$u$o#o#o#o#P#t$r.r. %+$+$+$+$+$+$+$+$+$+$+$+$+$+$`#r.r.r.3@.%+%5@}@C@r.r.r.r.r.r.r.r.@%M M K+r.r.r.r.r.r.r.r.#%M $% ", +" M M %%r.r.r.r.r.r.&%M `$r.r.r.r.U$p#T$S$R$r.r.r.*%+$+$+$+$+$+$+$+$+$+$+$+$+$+$=%r.r.r.r.r.r.r.-%;%>%r.r.r.r.r.r.r.#+M M K+r.r.r.r.r.r.r.r.,%M M ", +" M M '%r.r.r.r.r.r.d$M :.r.r.r.r.r.r.r.r.r.r.r.r.)%!%+$+$+$+$+$+$+$+$+$+$+$+$~%r.r.r.r.r.r.r.r.{%]%^%r.r.r.r.r.r.r.V$M L {+r.r.r.r.r.r.r.r./%M M (% ", +" M 2+_%r.r.r.r.r.r.:%M <$r.r.r.r.r.r.>%8+<%y+r.r.r.[%+$+$+$+$+$+$+$+$+$+$+$O$}%r.r.r.r.r.r.r.k#|%1%E#3@r.r.r.r.r.r.2%M 6@r.r.r.r.r.r.r.r.r.3%M M 4% ", +" M M 5%r.r.r.r.r.r.D$M w.@+r.r.r.r.r.6%7%8%r.r.r.r.r.9%+$+$+$+$+$+$+$+$+$O$0%r.r.r.r.r.r.r.a%b%c%d%Q$e%r.r.r.r.r.r.d$M f%r.r.r.r.r.r.r.r.r.g%M M ", +" M M h%r.r.r.r.r.r.i%M M j%r.r.r.r.7+N@E+k%l%]#r.r.r.r.m%n%+$+$+$+$+$+$~%I#r.r.r.r.r.r.O#o%p%q%r%s%t%u%r.r.r.r.r.r.v%M w%r.r.r.r.r.r.r.r.r.x%M y% ", +" M M d$r.r.r.r.r.r.z%M M H@r.r.r.r.v@ @r.{+e#7%A%{+r.r.r.q#B%C%D%E%F%G%r.r.r.r.r.r. @H%I%J%K%r%r%L%M%r.r.r.r.r.r.M.L M N%r.r.r.r.r.r.r.r.O%L M P% ", +" Q%M /+R%r.r.r.r.r.r.<$M S%r.r.r.r.r.r.r.r.r.T%U%V%W%Q$r.r.r.r.r.r.r.r.r.r.r.7+X%:#Y%Z%`%r%r%r%r% &.&r.r.r.r.r.r.+&M M !$r.r.r.r.r.r.r.]+<$M 4$ ", +" M M $+@&r.r.r.r.r.#&M S@K+r.r.r.r.r.r.r.r.5+$&%&&&*&=&-&;&>&,&'&)&!& #~&{&]&^&/&r%r%r%r%r%r%r%(&_&r.r.r.r.r.r.:&M 6@<&r.r.r.r.r.r.[&}&M M |& ", +" M M |.1&r.r.r.r.2&M M 3&r.r.r.r.r.r.r.r.Z#4&r%r%r%r%r%5&6&7&8&8&9&q%0&r%r%r%r%r%r%r%r%r%r%r%a&b&r.r.r.r.r.o+w.M M f%c&'%r.r.d&#%e&M M f& ", +" M M M g&3+h&h&i&j&M k&|@r.r.r.r.r.r.r.{@l&r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%m&g@r.r.r.r.r.++M n&M M M M 6@S@M M M N o& ", +" M M M M M M M M M M p&r.r.r.r.r.r.r.A@$&r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%q&r.r.r.r.r.r&j&M s&t&u&M M M M M v&w&4% ", +" x&N M M M y&z&M A&5%r.r.r.r.r.r.B&C&r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%r%D&r.r.r.r.r.E&M M F& G&H&I&J&K& ", +" L&M M w%r.r.r.r.r.K@M&N&r%r%r%r%r%r%r%r%r%r%r%O&P&Q&R&r%r%r%r%r%r%r%r%S&T&r.r.r.r.U&M M V&: : : : ", +" : : : W&M M g%r.r.r.r.g+X&Y&r%r%r%r%r%r%r%r%R&Z&`& * * * *.*+*@*r%r%r%r%r%#*g@r.r.r.$*%*M &***: : : : : ", +" : : : : : =*-*M S@x+r.r.r.E+;*>*,*r%r%r%r%r%r%'*)* * * * * * * * *!*~*r%r%r%{*]*r.r.r.K+_.M v&^*/*(*_*: : : ", +" : : : :*<*+$[*}*M 6@L.r.r.r.*@<%|*1*r%r%r%r%2*3* * * * * * * * * * * *4*5*6*7*{+r.r.8*9*M M 0*+$+$+$a*b*: : ", +" : : c*d*+$+$+$e*f*M j&T+r.r.r.K@g*h*i*j*r%k*l* * * * * * * * * * * *m*n*o*X+r.r.r.[&v%M M p*q*+$+$+$+$+$r*: : ", +" : : s*+$+$+$+$+$t*f*M u*H@_%r.r.r.v*<%w*x*y* * * * * * * * * *z*A*B*C*D*{+r.r.r.2&k&M M E*F*+$+$+$+$+$+$G*: : ", +" : : H*+$+$+$+$+$+$I*J*M M :&K*r.r.r.|@L*N@M*N*O*P*Q*R*S*T*U*V*W*D@X*r.r.r.r.Z@Y*.+M M Z*`*+$+$+$+$+$+$+$ =: : ", +" : : .=+$+$+$+$+$+$+$+=@=M M j&i&s.r.r.r.r. @F+#=$=8+%=k%,&&=*#{+r.r.r.r._%*==@M M ==-=+$+$+$+$+$+$+$+$+$;=: : ", +" : : >=+$+$+$+$+$+$+$+$,='=M M M %*o.$*r.r.r.r.r.r.r.r.r.r.r.r.r.r.r.]+)=v%M M M !=+=+$+$+$+$+$+$+$+$+$+$~=: : ", +" : : {=+$+$+$+$+$+$+$+$+$+$]=^=M M M L /=D$(=_=r.r.r.r.r.r.r.{+:=)=w%e&M M M <=[=}=+$+$+$+$+$+$+$+$+$+$+$H*: : ", +" : : |=+$+$+$+$+$+$+$+$+$+$+$`*1=2=M M M M M L Y@3=:&4=E@<.5=u*M M M M M 6=7=8=+$+$+$+$+$+$+$+$+$+$+$+$+$9=: : ", +" : : 0=+$+$+$+$+$+$+$+$+$+$+$+$+$+$a=b=c=M M M M M M M M M M M M M d=e=e*}=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$f=: : ", +" : : g=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$h=i=j=k=l='=m=n=!=o=p=q=r=s=t=F*+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$u=: : ", +" : : v=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$w=: x=+$+$+$+$+$+$+$+$y=z=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$A=: : ", +" : : B=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$w=: C=+$+$+$+$+$+$+$D=E=z=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$b*: : ", +" : : F=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$w=: G=H=+$+$+$+$+$+$9=: z=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$I=: : ", +" : : c*+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$J=: : K=+$+$+$+$+$L=M=: F=N=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$F=: : ", +" : : O=P=+$+$+$+$+$+$+$+$+$+$+$+$+$Q=R=: : : : S=T=+$Q=.=:*: : : U=V=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$Q=W=: : ", +" : : X=+$+$+$+$+$+$+$+$+$+$+$+$Y=Z=: : : : : : `= -_*: : : : : : .-+-N=+$+$+$+$+$+$+$+$+$+$+$+$+$+$+$@-: : : ", +" : : #-$-+$+$+$+$+$+$+$+$+$P=r*#-: : : : : : : : : : : : : : : : : %-&-*-+$+$+$+$+$+$+$+$+$+$+$+$=---: : ", +" : : `=;->-,-*-+$+$'-)-!-~-: : : : : : : : {-]- =+$+$+$+$+$+$+$^-/-(-_-: : : ", +" : : : : : :-<---: : : : : : : : : : : : [-}-|-1-1-2-3-_*: : : : : ", +" : : : : : : : : : : : : : : : : : : : : : : : : : ", +" : : : : : : : : : : : : : : ", +" : : : : : ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "} +export atom clown = xpm_to_pixbuf(clown_xpm) diff --git a/eugtk/examples/resources/colorcode/README.html b/eugtk/examples/resources/colorcode/README.html new file mode 100644 index 0000000..1631aa9 --- /dev/null +++ b/eugtk/examples/resources/colorcode/README.html @@ -0,0 +1,20 @@ + + +Color Codes + + + +RCC + +
+

Resistor Color Codes

+
+ +

+ The images in this folder were created by me, using Gimp. + No copyright applies... +

+ + + + diff --git a/eugtk/examples/resources/colorcode/bar.jpg b/eugtk/examples/resources/colorcode/bar.jpg new file mode 100644 index 0000000..637f622 Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar0.jpg b/eugtk/examples/resources/colorcode/bar0.jpg new file mode 100644 index 0000000..d086951 Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar0.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar1.jpg b/eugtk/examples/resources/colorcode/bar1.jpg new file mode 100644 index 0000000..02a4f22 Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar1.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar10.jpg b/eugtk/examples/resources/colorcode/bar10.jpg new file mode 100644 index 0000000..d6c0bdf Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar10.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar11.jpg b/eugtk/examples/resources/colorcode/bar11.jpg new file mode 100644 index 0000000..65140db Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar11.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar2.jpg b/eugtk/examples/resources/colorcode/bar2.jpg new file mode 100644 index 0000000..ee21883 Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar2.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar3.jpg b/eugtk/examples/resources/colorcode/bar3.jpg new file mode 100644 index 0000000..6b32659 Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar3.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar4.jpg b/eugtk/examples/resources/colorcode/bar4.jpg new file mode 100644 index 0000000..57715e5 Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar4.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar5.jpg b/eugtk/examples/resources/colorcode/bar5.jpg new file mode 100644 index 0000000..3f5a6e7 Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar5.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar6.jpg b/eugtk/examples/resources/colorcode/bar6.jpg new file mode 100644 index 0000000..5fe768b Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar6.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar7.jpg b/eugtk/examples/resources/colorcode/bar7.jpg new file mode 100644 index 0000000..cf7decb Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar7.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar8.jpg b/eugtk/examples/resources/colorcode/bar8.jpg new file mode 100644 index 0000000..edd4d98 Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar8.jpg differ diff --git a/eugtk/examples/resources/colorcode/bar9.jpg b/eugtk/examples/resources/colorcode/bar9.jpg new file mode 100644 index 0000000..d77ddd1 Binary files /dev/null and b/eugtk/examples/resources/colorcode/bar9.jpg differ diff --git a/eugtk/examples/resources/colorcode/end1.jpg b/eugtk/examples/resources/colorcode/end1.jpg new file mode 100644 index 0000000..c146f7c Binary files /dev/null and b/eugtk/examples/resources/colorcode/end1.jpg differ diff --git a/eugtk/examples/resources/colorcode/end2.jpg b/eugtk/examples/resources/colorcode/end2.jpg new file mode 100644 index 0000000..b173219 Binary files /dev/null and b/eugtk/examples/resources/colorcode/end2.jpg differ diff --git a/eugtk/examples/resources/colorcode/end3.jpg b/eugtk/examples/resources/colorcode/end3.jpg new file mode 100644 index 0000000..41c8258 Binary files /dev/null and b/eugtk/examples/resources/colorcode/end3.jpg differ diff --git a/eugtk/examples/resources/colorcode/leftend.jpg b/eugtk/examples/resources/colorcode/leftend.jpg new file mode 100644 index 0000000..a4546e6 Binary files /dev/null and b/eugtk/examples/resources/colorcode/leftend.jpg differ diff --git a/eugtk/examples/resources/colorcode/rcc.jpg b/eugtk/examples/resources/colorcode/rcc.jpg new file mode 100644 index 0000000..7def803 Binary files /dev/null and b/eugtk/examples/resources/colorcode/rcc.jpg differ diff --git a/eugtk/examples/resources/css_multiplebgs.css b/eugtk/examples/resources/css_multiplebgs.css new file mode 100644 index 0000000..00ab416 --- /dev/null +++ b/eugtk/examples/resources/css_multiplebgs.css @@ -0,0 +1,142 @@ +/* You can edit the text in this window to change the + * appearance of this Window. + * Be careful, if you screw it up, nothing might be visible + * anymore. :) + */ + +/* This CSS resets all properties to their defaults values + * and overrides all user settings and the theme in use */ + +@import url("cssview.css"); + +#canvas { + transition-property: background-color, background-image; + transition-duration: 0.5s; + + background-color: #4870bc; +} + +/* The gradients below are adapted versions of Lea Verou's CSS3 patterns, + * licensed under the MIT license: + * Copyright (c) 2011 Lea Verou, http://lea.verou.me/ + * + * See https://github.com/LeaVerou/CSS3-Patterns-Gallery + */ + +/********** + * Bricks * + **********/ + +@define-color brick_hi #d42; +@define-color brick_lo #b42; +@define-color brick_hi_backdrop #888; +@define-color brick_lo_backdrop #999; + +#bricks { + background-color: #999; + background-image: linear-gradient(205deg, @brick_lo, @brick_lo 23px, transparent 23px), + linear-gradient(25deg, @brick_hi, @brick_hi 23px, transparent 23px), + linear-gradient(205deg, @brick_lo, @brick_lo 23px, transparent 23px), + linear-gradient(25deg, @brick_hi, @brick_hi 23px, transparent 23px); + background-size: 58px 58px; + background-position: 0px 6px, 4px 31px, 29px 35px, 34px 2px; +} + +#bricks:backdrop { + background-color: #444; + background-image: linear-gradient(205deg, @brick_lo_backdrop, @brick_lo_backdrop 23px, transparent 23px), + linear-gradient(25deg, @brick_hi_backdrop, @brick_hi_backdrop 23px, transparent 23px), + linear-gradient(205deg, @brick_lo_backdrop, @brick_lo_backdrop 23px, transparent 23px), + linear-gradient(25deg, @brick_hi_backdrop, @brick_hi_backdrop 23px, transparent 23px); + background-size: 58px 58px; + background-position: 0px 6px, 4px 31px, 29px 35px, 34px 2px; +} + + +/********** + * Tartan * + **********/ + +@define-color tartan_bg #662e2c; +@define-color tartan_bg_backdrop #333; + +#tartan { + background-color: @tartan_bg; + background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, + rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, + rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, + transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, + rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, + rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, + rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px), + repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, + transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, + transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, + rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, + rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, + rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px), + repeating-linear-gradient(-55deg, transparent, transparent 1px, rgba(0,0,0,.2) 1px, rgba(0,0,0,.2) 4px, + transparent 4px, transparent 19px, rgba(0,0,0,.2) 19px, + rgba(0,0,0,.2) 24px, transparent 24px, transparent 51px, rgba(0,0,0,.2) 51px, + rgba(0,0,0,.2) 54px, transparent 54px, transparent 74px); +} + +#tartan:backdrop { + background-color: @tartan_bg_backdrop; +} + +/*********** + * Stripes * + ***********/ + +@define-color base_bg #4870bc; +@define-color backdrop_bg #555; + +#stripes { + background-color: @base_bg; + background-image: linear-gradient(to left, transparent, rgba(255,255,255,.07) 50%, transparent 50%), + linear-gradient(to left, transparent, rgba(255,255,255,.13) 50%, transparent 50%), + linear-gradient(to left, transparent, transparent 50%, rgba(255,255,255,.17) 50%), + linear-gradient(to left, transparent, transparent 50%, rgba(255,255,255,.19) 50%); + background-size: 29px, 59px, 73px, 109px; +} + +#stripes:backdrop { + background-color: @backdrop_bg; +} + +/*************** + * Lined Paper * + ***************/ + +#lined_paper { + background-color: #fff; + background-image: linear-gradient(90deg, transparent 79px, alpha(#f98195, 0.40) 79px, #f98195 80px, alpha(#f98195, 0.40) 81px, transparent 81px), + linear-gradient(alpha(#77c5cf, 0.60), alpha(#77c5cf, 0.60) 1px, transparent 1px); + background-size: 100% 36px; +} + +#lined_paper:backdrop { + background-color: #f1f2f4; + background-image: linear-gradient(90deg, transparent 79px, alpha(#999, 0.40) 79px, #999 80px, alpha(#999, 0.40) 81px, transparent 81px), + linear-gradient(alpha(#bbb, 0.60), alpha(#bbb, 0.60) 1px, transparent 1px); +} + +/************ + * Info Box * + ************/ + +#Info { + background-image: url("background.jpg"); + } + +#Info_label { + color: white; + font: Purisa, Comic Sans 24; + +} + + + + + diff --git a/eugtk/examples/resources/css_pixbufs.css b/eugtk/examples/resources/css_pixbufs.css new file mode 100644 index 0000000..830a5a7 --- /dev/null +++ b/eugtk/examples/resources/css_pixbufs.css @@ -0,0 +1,76 @@ +/* You can edit the text in this window to change the + * appearance of this Window. + * Be careful, if you screw it up, nothing might be visible + * anymore. :) + */ + +/* This CSS resets all properties to their defaults values + * and overrides all user settings and the theme in use */ +@import url("../resources/reset.css"); +@import url("../resources/cssview.css"); + +@keyframes move-the-image { +0% { background-position: 50.00% 75.00%, 67.68% 67.68%, 75.00% 50.00%, 67.68% 32.32%, 50.00% 25.00%, 32.32% 32.32%, 25.00% 50.00%, 32.32% 67.68%, 0% 0%; } +3.125% { background-position: 55.19% 76.11%, 72.14% 64.79%, 76.11% 44.81%, 64.79% 27.86%, 44.81% 23.89%, 27.86% 35.21%, 23.89% 55.19%, 35.21% 72.14%, 0% 0%; } +6.25% { background-position: 60.79% 76.04%, 76.04% 60.79%, 76.04% 39.21%, 60.79% 23.96%, 39.21% 23.96%, 23.96% 39.21%, 23.96% 60.79%, 39.21% 76.04%, 0% 0%; } +9.375% { background-position: 66.46% 74.64%, 79.06% 55.78%, 74.64% 33.54%, 55.78% 20.94%, 33.54% 25.36%, 20.94% 44.22%, 25.36% 66.46%, 44.22% 79.06%, 0% 0%; } +12.5% { background-position: 71.84% 71.84%, 80.89% 50.00%, 71.84% 28.16%, 50.00% 19.11%, 28.16% 28.16%, 19.11% 50.00%, 28.16% 71.84%, 50.00% 80.89%, 0% 0%; } +15.625% { background-position: 76.55% 67.74%, 81.32% 43.77%, 67.74% 23.45%, 43.77% 18.68%, 23.45% 32.26%, 18.68% 56.23%, 32.26% 76.55%, 56.23% 81.32%, 0% 0%; } +18.75% { background-position: 80.21% 62.51%, 80.21% 37.49%, 62.51% 19.79%, 37.49% 19.79%, 19.79% 37.49%, 19.79% 62.51%, 37.49% 80.21%, 62.51% 80.21%, 0% 0%; } +21.875% { background-position: 82.54% 56.47%, 77.58% 31.57%, 56.47% 17.46%, 31.57% 22.42%, 17.46% 43.53%, 22.42% 68.43%, 43.53% 82.54%, 68.43% 77.58%, 0% 0%; } +25% { background-position: 83.33% 50.00%, 73.57% 26.43%, 50.00% 16.67%, 26.43% 26.43%, 16.67% 50.00%, 26.43% 73.57%, 50.00% 83.33%, 73.57% 73.57%, 0% 0%; } +28.125% { background-position: 82.54% 43.53%, 68.43% 22.42%, 43.53% 17.46%, 22.42% 31.57%, 17.46% 56.47%, 31.57% 77.58%, 56.47% 82.54%, 77.58% 68.43%, 0% 0%; } +31.25% { background-position: 80.21% 37.49%, 62.51% 19.79%, 37.49% 19.79%, 19.79% 37.49%, 19.79% 62.51%, 37.49% 80.21%, 62.51% 80.21%, 80.21% 62.51%, 0% 0%; } +34.375% { background-position: 76.55% 32.26%, 56.23% 18.68%, 32.26% 23.45%, 18.68% 43.77%, 23.45% 67.74%, 43.77% 81.32%, 67.74% 76.55%, 81.32% 56.23%, 0% 0%; } +37.5% { background-position: 71.84% 28.16%, 50.00% 19.11%, 28.16% 28.16%, 19.11% 50.00%, 28.16% 71.84%, 50.00% 80.89%, 71.84% 71.84%, 80.89% 50.00%, 0% 0%; } +40.625% { background-position: 66.46% 25.36%, 44.22% 20.94%, 25.36% 33.54%, 20.94% 55.78%, 33.54% 74.64%, 55.78% 79.06%, 74.64% 66.46%, 79.06% 44.22%, 0% 0%; } +43.75% { background-position: 60.79% 23.96%, 39.21% 23.96%, 23.96% 39.21%, 23.96% 60.79%, 39.21% 76.04%, 60.79% 76.04%, 76.04% 60.79%, 76.04% 39.21%, 0% 0%; } +46.875% { background-position: 55.19% 23.89%, 35.21% 27.86%, 23.89% 44.81%, 27.86% 64.79%, 44.81% 76.11%, 64.79% 72.14%, 76.11% 55.19%, 72.14% 35.21%, 0% 0%; } +50% { background-position: 50.00% 25.00%, 32.32% 32.32%, 25.00% 50.00%, 32.32% 67.68%, 50.00% 75.00%, 67.68% 67.68%, 75.00% 50.00%, 67.68% 32.32%, 0% 0%; } +53.125% { background-position: 45.44% 27.07%, 30.57% 37.01%, 27.07% 54.56%, 37.01% 69.43%, 54.56% 72.93%, 69.43% 62.99%, 72.93% 45.44%, 62.99% 30.57%, 0% 0%; } +56.25% { background-position: 41.65% 29.85%, 29.85% 41.65%, 29.85% 58.35%, 41.65% 70.15%, 58.35% 70.15%, 70.15% 58.35%, 70.15% 41.65%, 58.35% 29.85%, 0% 0%; } +59.375% { background-position: 38.68% 33.06%, 30.02% 46.03%, 33.06% 61.32%, 46.03% 69.98%, 61.32% 66.94%, 69.98% 53.97%, 66.94% 38.68%, 53.97% 30.02%, 0% 0%; } +62.5% { background-position: 36.49% 36.49%, 30.89% 50.00%, 36.49% 63.51%, 50.00% 69.11%, 63.51% 63.51%, 69.11% 50.00%, 63.51% 36.49%, 50.00% 30.89%, 0% 0%; } +65.625% { background-position: 34.97% 39.96%, 32.28% 53.53%, 39.96% 65.03%, 53.53% 67.72%, 65.03% 60.04%, 67.72% 46.47%, 60.04% 34.97%, 46.47% 32.28%, 0% 0%; } +68.75% { background-position: 34.02% 43.38%, 34.02% 56.62%, 43.38% 65.98%, 56.62% 65.98%, 65.98% 56.62%, 65.98% 43.38%, 56.62% 34.02%, 43.38% 34.02%, 0% 0%; } +71.875% { background-position: 33.50% 46.72%, 36.01% 59.35%, 46.72% 66.50%, 59.35% 63.99%, 66.50% 53.28%, 63.99% 40.65%, 53.28% 33.50%, 40.65% 36.01%, 0% 0%; } +75% { background-position: 33.33% 50.00%, 38.21% 61.79%, 50.00% 66.67%, 61.79% 61.79%, 66.67% 50.00%, 61.79% 38.21%, 50.00% 33.33%, 38.21% 38.21%, 0% 0%; } +78.125% { background-position: 33.50% 53.28%, 40.65% 63.99%, 53.28% 66.50%, 63.99% 59.35%, 66.50% 46.72%, 59.35% 36.01%, 46.72% 33.50%, 36.01% 40.65%, 0% 0%; } +81.25% { background-position: 34.02% 56.62%, 43.38% 65.98%, 56.62% 65.98%, 65.98% 56.62%, 65.98% 43.38%, 56.62% 34.02%, 43.38% 34.02%, 34.02% 43.38%, 0% 0%; } +84.375% { background-position: 34.97% 60.04%, 46.47% 67.72%, 60.04% 65.03%, 67.72% 53.53%, 65.03% 39.96%, 53.53% 32.28%, 39.96% 34.97%, 32.28% 46.47%, 0% 0%; } +87.5% { background-position: 36.49% 63.51%, 50.00% 69.11%, 63.51% 63.51%, 69.11% 50.00%, 63.51% 36.49%, 50.00% 30.89%, 36.49% 36.49%, 30.89% 50.00%, 0% 0%; } +90.625% { background-position: 38.68% 66.94%, 53.97% 69.98%, 66.94% 61.32%, 69.98% 46.03%, 61.32% 33.06%, 46.03% 30.02%, 33.06% 38.68%, 30.02% 53.97%, 0% 0%; } +93.75% { background-position: 41.65% 70.15%, 58.35% 70.15%, 70.15% 58.35%, 70.15% 41.65%, 58.35% 29.85%, 41.65% 29.85%, 29.85% 41.65%, 29.85% 58.35%, 0% 0%; } +96.875% { background-position: 45.44% 72.93%, 62.99% 69.43%, 72.93% 54.56%, 69.43% 37.01%, 54.56% 27.07%, 37.01% 30.57%, 27.07% 45.44%, 30.57% 62.99%, 0% 0%; } +100% { background-position: 50.00% 75.00%, 67.68% 67.68%, 75.00% 50.00%, 67.68% 32.32%, 50.00% 25.00%, 32.32% 32.32%, 25.00% 50.00%, 32.32% 67.68%, 0% 0%; } +} + +@keyframes size-the-image { + 0% { background-size: 96px, 12px, 96px, 12px, 96px, 12px, 96px, 12px, auto } + 100% { background-size: 12px, 96px, 12px, 96px, 12px, 96px, 12px, 96px, auto } +} + +GtkWindow { + background-image: url("../resources/apple-red.png"), + url("../resources/gnome-applets.png"), + url("../resources/gnome-calendar.png"), + url("../resources/gnome-foot.png"), + url("../resources/gnome-gmush.png"), + url("../resources/gnome-gimp.png"), + url("../resources/gnome-gsame.png"), + url("../resources/gnu-keys.png"), + url("../resources/background.jpg"); + background-position: 50.00% 75.00%, 67.68% 67.68%, 75.00% 50.00%, 67.68% 32.32%, 50.00% 25.00%, 32.32% 32.32%, 25.00% 50.00%, 32.32% 67.68%, 0% 0%; + background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat; + animation: move-the-image infinite linear 3s, size-the-image infinite alternate ease-in-out 0.75s; +} + +/* Make the text editor has a nice style */ +.view, .scrollbar, .pane-separator { + color: black; + background-color: rgba(255,255,255,0.5); +} + +.view:selected { + background-color: rgba(127,127,255,0.5); +} diff --git a/eugtk/examples/resources/cssview.css b/eugtk/examples/resources/cssview.css new file mode 100644 index 0000000..5060c39 --- /dev/null +++ b/eugtk/examples/resources/cssview.css @@ -0,0 +1,41 @@ +/* Make the text editor has a nice style */ +.view { + color: #2e3436; + font: Monospace; + background-color: alpha(white, 0.30); +} + +.view:selected { + color: white; + background-color: #4a90d9; +} + +.scrollbar.trough, +.scrollbars-junction { + background-color: alpha(white, 0.80); +} + +.scrollbar.slider { + border-width: 3px; + border-style: solid; + border-radius: 10px; + border-color: transparent; + background-clip: padding-box; + background-color: #999; +} + +.scrollbar.slider:prelight { + background-color: #555; +} + +.pane-separator { + background-color: alpha(white, 0.80); + background-image: linear-gradient(transparent, transparent 1px, #999 1px, #999 4px, transparent 4px); + background-size: 40px auto; + background-repeat: no-repeat; + background-position: center; +} + +.pane-separator:prelight { + background-image: linear-gradient(transparent, transparent 1px, #555 1px, #555 4px, transparent 4px); +} diff --git a/eugtk/examples/resources/eu.cfg b/eugtk/examples/resources/eu.cfg new file mode 100644 index 0000000..12ac99d --- /dev/null +++ b/eugtk/examples/resources/eu.cfg @@ -0,0 +1 @@ +~/demos diff --git a/eugtk/examples/resources/flags/README.html b/eugtk/examples/resources/flags/README.html new file mode 100644 index 0000000..f5173b5 --- /dev/null +++ b/eugtk/examples/resources/flags/README.html @@ -0,0 +1,19 @@ + + +Flags + + + +US Flag + +
+

World Flags

+
+ +

+ All these flag images are in the public domain. +

+ + + + \ No newline at end of file diff --git a/eugtk/examples/resources/flags/flags-afghanistan.png b/eugtk/examples/resources/flags/flags-afghanistan.png new file mode 100644 index 0000000..1414cde Binary files /dev/null and b/eugtk/examples/resources/flags/flags-afghanistan.png differ diff --git a/eugtk/examples/resources/flags/flags-aland.png b/eugtk/examples/resources/flags/flags-aland.png new file mode 100644 index 0000000..0f40192 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-aland.png differ diff --git a/eugtk/examples/resources/flags/flags-albania.png b/eugtk/examples/resources/flags/flags-albania.png new file mode 100644 index 0000000..619cd6d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-albania.png differ diff --git a/eugtk/examples/resources/flags/flags-alderney.png b/eugtk/examples/resources/flags/flags-alderney.png new file mode 100644 index 0000000..cac0b30 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-alderney.png differ diff --git a/eugtk/examples/resources/flags/flags-algeria.png b/eugtk/examples/resources/flags/flags-algeria.png new file mode 100644 index 0000000..65e3b03 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-algeria.png differ diff --git a/eugtk/examples/resources/flags/flags-american_samoa.png b/eugtk/examples/resources/flags/flags-american_samoa.png new file mode 100644 index 0000000..dde4110 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-american_samoa.png differ diff --git a/eugtk/examples/resources/flags/flags-andorra.png b/eugtk/examples/resources/flags/flags-andorra.png new file mode 100644 index 0000000..f8136c6 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-andorra.png differ diff --git a/eugtk/examples/resources/flags/flags-angola.png b/eugtk/examples/resources/flags/flags-angola.png new file mode 100644 index 0000000..9191ba5 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-angola.png differ diff --git a/eugtk/examples/resources/flags/flags-anguilla.png b/eugtk/examples/resources/flags/flags-anguilla.png new file mode 100644 index 0000000..5fe808e Binary files /dev/null and b/eugtk/examples/resources/flags/flags-anguilla.png differ diff --git a/eugtk/examples/resources/flags/flags-antarctica.png b/eugtk/examples/resources/flags/flags-antarctica.png new file mode 100644 index 0000000..04da3cd Binary files /dev/null and b/eugtk/examples/resources/flags/flags-antarctica.png differ diff --git a/eugtk/examples/resources/flags/flags-antigua_and_barbuda.png b/eugtk/examples/resources/flags/flags-antigua_and_barbuda.png new file mode 100644 index 0000000..254ad99 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-antigua_and_barbuda.png differ diff --git a/eugtk/examples/resources/flags/flags-argentina.png b/eugtk/examples/resources/flags/flags-argentina.png new file mode 100644 index 0000000..22c0094 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-argentina.png differ diff --git a/eugtk/examples/resources/flags/flags-armenia.png b/eugtk/examples/resources/flags/flags-armenia.png new file mode 100644 index 0000000..4d52ac1 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-armenia.png differ diff --git a/eugtk/examples/resources/flags/flags-aruba.png b/eugtk/examples/resources/flags/flags-aruba.png new file mode 100644 index 0000000..0738633 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-aruba.png differ diff --git a/eugtk/examples/resources/flags/flags-australia.png b/eugtk/examples/resources/flags/flags-australia.png new file mode 100644 index 0000000..221022c Binary files /dev/null and b/eugtk/examples/resources/flags/flags-australia.png differ diff --git a/eugtk/examples/resources/flags/flags-austria.png b/eugtk/examples/resources/flags/flags-austria.png new file mode 100644 index 0000000..9cbf18b Binary files /dev/null and b/eugtk/examples/resources/flags/flags-austria.png differ diff --git a/eugtk/examples/resources/flags/flags-azerbaijan.png b/eugtk/examples/resources/flags/flags-azerbaijan.png new file mode 100644 index 0000000..3920575 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-azerbaijan.png differ diff --git a/eugtk/examples/resources/flags/flags-azores.png b/eugtk/examples/resources/flags/flags-azores.png new file mode 100644 index 0000000..6f65f29 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-azores.png differ diff --git a/eugtk/examples/resources/flags/flags-bahamas.png b/eugtk/examples/resources/flags/flags-bahamas.png new file mode 100644 index 0000000..2d03506 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-bahamas.png differ diff --git a/eugtk/examples/resources/flags/flags-bahrain.png b/eugtk/examples/resources/flags/flags-bahrain.png new file mode 100644 index 0000000..c43a9b7 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-bahrain.png differ diff --git a/eugtk/examples/resources/flags/flags-bangladesh.png b/eugtk/examples/resources/flags/flags-bangladesh.png new file mode 100644 index 0000000..3573210 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-bangladesh.png differ diff --git a/eugtk/examples/resources/flags/flags-barbados.png b/eugtk/examples/resources/flags/flags-barbados.png new file mode 100644 index 0000000..91edc6c Binary files /dev/null and b/eugtk/examples/resources/flags/flags-barbados.png differ diff --git a/eugtk/examples/resources/flags/flags-belgium.png b/eugtk/examples/resources/flags/flags-belgium.png new file mode 100644 index 0000000..44e687f Binary files /dev/null and b/eugtk/examples/resources/flags/flags-belgium.png differ diff --git a/eugtk/examples/resources/flags/flags-belize.png b/eugtk/examples/resources/flags/flags-belize.png new file mode 100644 index 0000000..7146a67 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-belize.png differ diff --git a/eugtk/examples/resources/flags/flags-benin.png b/eugtk/examples/resources/flags/flags-benin.png new file mode 100644 index 0000000..961db59 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-benin.png differ diff --git a/eugtk/examples/resources/flags/flags-bermuda.png b/eugtk/examples/resources/flags/flags-bermuda.png new file mode 100644 index 0000000..85ad6e3 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-bermuda.png differ diff --git a/eugtk/examples/resources/flags/flags-bhutan.png b/eugtk/examples/resources/flags/flags-bhutan.png new file mode 100644 index 0000000..5f2dc04 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-bhutan.png differ diff --git a/eugtk/examples/resources/flags/flags-bolivia.png b/eugtk/examples/resources/flags/flags-bolivia.png new file mode 100644 index 0000000..102c0db Binary files /dev/null and b/eugtk/examples/resources/flags/flags-bolivia.png differ diff --git a/eugtk/examples/resources/flags/flags-bonaire.png b/eugtk/examples/resources/flags/flags-bonaire.png new file mode 100644 index 0000000..dba10cf Binary files /dev/null and b/eugtk/examples/resources/flags/flags-bonaire.png differ diff --git a/eugtk/examples/resources/flags/flags-bosnia_and_herzegovina.png b/eugtk/examples/resources/flags/flags-bosnia_and_herzegovina.png new file mode 100644 index 0000000..34699b7 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-bosnia_and_herzegovina.png differ diff --git a/eugtk/examples/resources/flags/flags-botswana.png b/eugtk/examples/resources/flags/flags-botswana.png new file mode 100644 index 0000000..10b8d4e Binary files /dev/null and b/eugtk/examples/resources/flags/flags-botswana.png differ diff --git a/eugtk/examples/resources/flags/flags-brazil.png b/eugtk/examples/resources/flags/flags-brazil.png new file mode 100644 index 0000000..3d720c9 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-brazil.png differ diff --git a/eugtk/examples/resources/flags/flags-british_antarctic_territory.png b/eugtk/examples/resources/flags/flags-british_antarctic_territory.png new file mode 100644 index 0000000..6421ebd Binary files /dev/null and b/eugtk/examples/resources/flags/flags-british_antarctic_territory.png differ diff --git a/eugtk/examples/resources/flags/flags-british_indian_ocean_territory.png b/eugtk/examples/resources/flags/flags-british_indian_ocean_territory.png new file mode 100644 index 0000000..07505b8 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-british_indian_ocean_territory.png differ diff --git a/eugtk/examples/resources/flags/flags-british_virgin_islands.png b/eugtk/examples/resources/flags/flags-british_virgin_islands.png new file mode 100644 index 0000000..01fd168 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-british_virgin_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-brunei.png b/eugtk/examples/resources/flags/flags-brunei.png new file mode 100644 index 0000000..1036884 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-brunei.png differ diff --git a/eugtk/examples/resources/flags/flags-bulgaria.png b/eugtk/examples/resources/flags/flags-bulgaria.png new file mode 100644 index 0000000..a61cba8 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-bulgaria.png differ diff --git a/eugtk/examples/resources/flags/flags-burkina_faso.png b/eugtk/examples/resources/flags/flags-burkina_faso.png new file mode 100644 index 0000000..ad2792d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-burkina_faso.png differ diff --git a/eugtk/examples/resources/flags/flags-burundi.png b/eugtk/examples/resources/flags/flags-burundi.png new file mode 100644 index 0000000..2e11104 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-burundi.png differ diff --git a/eugtk/examples/resources/flags/flags-cambodia.png b/eugtk/examples/resources/flags/flags-cambodia.png new file mode 100644 index 0000000..cdbd0ad Binary files /dev/null and b/eugtk/examples/resources/flags/flags-cambodia.png differ diff --git a/eugtk/examples/resources/flags/flags-cameroon.png b/eugtk/examples/resources/flags/flags-cameroon.png new file mode 100644 index 0000000..aa65511 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-cameroon.png differ diff --git a/eugtk/examples/resources/flags/flags-canada.png b/eugtk/examples/resources/flags/flags-canada.png new file mode 100644 index 0000000..9b4ef57 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-canada.png differ diff --git a/eugtk/examples/resources/flags/flags-cape_verde.png b/eugtk/examples/resources/flags/flags-cape_verde.png new file mode 100644 index 0000000..334ae65 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-cape_verde.png differ diff --git a/eugtk/examples/resources/flags/flags-cayman_islands.png b/eugtk/examples/resources/flags/flags-cayman_islands.png new file mode 100644 index 0000000..73ec6d7 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-cayman_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-central_african_republic.png b/eugtk/examples/resources/flags/flags-central_african_republic.png new file mode 100644 index 0000000..fe01036 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-central_african_republic.png differ diff --git a/eugtk/examples/resources/flags/flags-chad.png b/eugtk/examples/resources/flags/flags-chad.png new file mode 100644 index 0000000..db5d231 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-chad.png differ diff --git a/eugtk/examples/resources/flags/flags-chile.png b/eugtk/examples/resources/flags/flags-chile.png new file mode 100644 index 0000000..35afe4f Binary files /dev/null and b/eugtk/examples/resources/flags/flags-chile.png differ diff --git a/eugtk/examples/resources/flags/flags-christmas_island.png b/eugtk/examples/resources/flags/flags-christmas_island.png new file mode 100644 index 0000000..3bc2523 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-christmas_island.png differ diff --git a/eugtk/examples/resources/flags/flags-cocos_(keeling)_islands.png b/eugtk/examples/resources/flags/flags-cocos_(keeling)_islands.png new file mode 100644 index 0000000..b89a132 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-cocos_(keeling)_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-colombia.png b/eugtk/examples/resources/flags/flags-colombia.png new file mode 100644 index 0000000..ab29a63 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-colombia.png differ diff --git a/eugtk/examples/resources/flags/flags-comoros.png b/eugtk/examples/resources/flags/flags-comoros.png new file mode 100644 index 0000000..ec06d65 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-comoros.png differ diff --git a/eugtk/examples/resources/flags/flags-cook_islands.png b/eugtk/examples/resources/flags/flags-cook_islands.png new file mode 100644 index 0000000..2c2b862 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-cook_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-costa_rica.png b/eugtk/examples/resources/flags/flags-costa_rica.png new file mode 100644 index 0000000..a818ec8 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-costa_rica.png differ diff --git a/eugtk/examples/resources/flags/flags-cote_d'ivoire.png b/eugtk/examples/resources/flags/flags-cote_d'ivoire.png new file mode 100644 index 0000000..b8faecf Binary files /dev/null and b/eugtk/examples/resources/flags/flags-cote_d'ivoire.png differ diff --git a/eugtk/examples/resources/flags/flags-croatia.png b/eugtk/examples/resources/flags/flags-croatia.png new file mode 100644 index 0000000..17454f5 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-croatia.png differ diff --git a/eugtk/examples/resources/flags/flags-cuba.png b/eugtk/examples/resources/flags/flags-cuba.png new file mode 100644 index 0000000..eae56a1 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-cuba.png differ diff --git a/eugtk/examples/resources/flags/flags-cyprus.png b/eugtk/examples/resources/flags/flags-cyprus.png new file mode 100644 index 0000000..d6168cd Binary files /dev/null and b/eugtk/examples/resources/flags/flags-cyprus.png differ diff --git a/eugtk/examples/resources/flags/flags-czech_republic.png b/eugtk/examples/resources/flags/flags-czech_republic.png new file mode 100644 index 0000000..b68045b Binary files /dev/null and b/eugtk/examples/resources/flags/flags-czech_republic.png differ diff --git a/eugtk/examples/resources/flags/flags-democratic_republic_of_the_congo.png b/eugtk/examples/resources/flags/flags-democratic_republic_of_the_congo.png new file mode 100644 index 0000000..739c239 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-democratic_republic_of_the_congo.png differ diff --git a/eugtk/examples/resources/flags/flags-denmark.png b/eugtk/examples/resources/flags/flags-denmark.png new file mode 100644 index 0000000..b0dbee4 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-denmark.png differ diff --git a/eugtk/examples/resources/flags/flags-djibouti.png b/eugtk/examples/resources/flags/flags-djibouti.png new file mode 100644 index 0000000..d0fe548 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-djibouti.png differ diff --git a/eugtk/examples/resources/flags/flags-dominica.png b/eugtk/examples/resources/flags/flags-dominica.png new file mode 100644 index 0000000..0c0f6cc Binary files /dev/null and b/eugtk/examples/resources/flags/flags-dominica.png differ diff --git a/eugtk/examples/resources/flags/flags-dominican_republic.png b/eugtk/examples/resources/flags/flags-dominican_republic.png new file mode 100644 index 0000000..5e47853 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-dominican_republic.png differ diff --git a/eugtk/examples/resources/flags/flags-east_timor.png b/eugtk/examples/resources/flags/flags-east_timor.png new file mode 100644 index 0000000..60dd53c Binary files /dev/null and b/eugtk/examples/resources/flags/flags-east_timor.png differ diff --git a/eugtk/examples/resources/flags/flags-ecuador.png b/eugtk/examples/resources/flags/flags-ecuador.png new file mode 100644 index 0000000..474480d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-ecuador.png differ diff --git a/eugtk/examples/resources/flags/flags-egypt.png b/eugtk/examples/resources/flags/flags-egypt.png new file mode 100644 index 0000000..11b7cf3 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-egypt.png differ diff --git a/eugtk/examples/resources/flags/flags-el_salvador.png b/eugtk/examples/resources/flags/flags-el_salvador.png new file mode 100644 index 0000000..fba8b04 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-el_salvador.png differ diff --git a/eugtk/examples/resources/flags/flags-equatorial_guinea.png b/eugtk/examples/resources/flags/flags-equatorial_guinea.png new file mode 100644 index 0000000..8c211a6 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-equatorial_guinea.png differ diff --git a/eugtk/examples/resources/flags/flags-eritrea.png b/eugtk/examples/resources/flags/flags-eritrea.png new file mode 100644 index 0000000..c317445 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-eritrea.png differ diff --git a/eugtk/examples/resources/flags/flags-estonia.png b/eugtk/examples/resources/flags/flags-estonia.png new file mode 100644 index 0000000..0119241 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-estonia.png differ diff --git a/eugtk/examples/resources/flags/flags-ethiopia.png b/eugtk/examples/resources/flags/flags-ethiopia.png new file mode 100644 index 0000000..22b750c Binary files /dev/null and b/eugtk/examples/resources/flags/flags-ethiopia.png differ diff --git a/eugtk/examples/resources/flags/flags-falkland_islands.png b/eugtk/examples/resources/flags/flags-falkland_islands.png new file mode 100644 index 0000000..cdb9a50 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-falkland_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-faroe_islands.png b/eugtk/examples/resources/flags/flags-faroe_islands.png new file mode 100644 index 0000000..5f12fb9 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-faroe_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-federated_states_of_micronesia.png b/eugtk/examples/resources/flags/flags-federated_states_of_micronesia.png new file mode 100644 index 0000000..d57d748 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-federated_states_of_micronesia.png differ diff --git a/eugtk/examples/resources/flags/flags-fiji.png b/eugtk/examples/resources/flags/flags-fiji.png new file mode 100644 index 0000000..db49555 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-fiji.png differ diff --git a/eugtk/examples/resources/flags/flags-finland.png b/eugtk/examples/resources/flags/flags-finland.png new file mode 100644 index 0000000..5f0089a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-finland.png differ diff --git a/eugtk/examples/resources/flags/flags-france.png b/eugtk/examples/resources/flags/flags-france.png new file mode 100644 index 0000000..f6be71a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-france.png differ diff --git a/eugtk/examples/resources/flags/flags-french_polynesia.png b/eugtk/examples/resources/flags/flags-french_polynesia.png new file mode 100644 index 0000000..d8289e2 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-french_polynesia.png differ diff --git a/eugtk/examples/resources/flags/flags-french_southern_and_antarctic_lands.png b/eugtk/examples/resources/flags/flags-french_southern_and_antarctic_lands.png new file mode 100644 index 0000000..db57945 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-french_southern_and_antarctic_lands.png differ diff --git a/eugtk/examples/resources/flags/flags-gabon.png b/eugtk/examples/resources/flags/flags-gabon.png new file mode 100644 index 0000000..c3cbd94 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-gabon.png differ diff --git a/eugtk/examples/resources/flags/flags-gambia.png b/eugtk/examples/resources/flags/flags-gambia.png new file mode 100644 index 0000000..62b653f Binary files /dev/null and b/eugtk/examples/resources/flags/flags-gambia.png differ diff --git a/eugtk/examples/resources/flags/flags-georgia.png b/eugtk/examples/resources/flags/flags-georgia.png new file mode 100644 index 0000000..92ed768 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-georgia.png differ diff --git a/eugtk/examples/resources/flags/flags-germany.png b/eugtk/examples/resources/flags/flags-germany.png new file mode 100644 index 0000000..11eef53 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-germany.png differ diff --git a/eugtk/examples/resources/flags/flags-ghana.png b/eugtk/examples/resources/flags/flags-ghana.png new file mode 100644 index 0000000..f6f96f0 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-ghana.png differ diff --git a/eugtk/examples/resources/flags/flags-gibraltar.png b/eugtk/examples/resources/flags/flags-gibraltar.png new file mode 100644 index 0000000..1e3f7bb Binary files /dev/null and b/eugtk/examples/resources/flags/flags-gibraltar.png differ diff --git a/eugtk/examples/resources/flags/flags-greece.png b/eugtk/examples/resources/flags/flags-greece.png new file mode 100644 index 0000000..3bcbc45 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-greece.png differ diff --git a/eugtk/examples/resources/flags/flags-greenland.png b/eugtk/examples/resources/flags/flags-greenland.png new file mode 100644 index 0000000..908c3b2 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-greenland.png differ diff --git a/eugtk/examples/resources/flags/flags-grenada.png b/eugtk/examples/resources/flags/flags-grenada.png new file mode 100644 index 0000000..c25402e Binary files /dev/null and b/eugtk/examples/resources/flags/flags-grenada.png differ diff --git a/eugtk/examples/resources/flags/flags-guam.png b/eugtk/examples/resources/flags/flags-guam.png new file mode 100644 index 0000000..91604b4 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-guam.png differ diff --git a/eugtk/examples/resources/flags/flags-guatemala.png b/eugtk/examples/resources/flags/flags-guatemala.png new file mode 100644 index 0000000..96b36ea Binary files /dev/null and b/eugtk/examples/resources/flags/flags-guatemala.png differ diff --git a/eugtk/examples/resources/flags/flags-guernsey.png b/eugtk/examples/resources/flags/flags-guernsey.png new file mode 100644 index 0000000..b38f652 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-guernsey.png differ diff --git a/eugtk/examples/resources/flags/flags-guinea-bissau.png b/eugtk/examples/resources/flags/flags-guinea-bissau.png new file mode 100644 index 0000000..6b13db9 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-guinea-bissau.png differ diff --git a/eugtk/examples/resources/flags/flags-guinea.png b/eugtk/examples/resources/flags/flags-guinea.png new file mode 100644 index 0000000..9276706 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-guinea.png differ diff --git a/eugtk/examples/resources/flags/flags-guyana.png b/eugtk/examples/resources/flags/flags-guyana.png new file mode 100644 index 0000000..59ad9ac Binary files /dev/null and b/eugtk/examples/resources/flags/flags-guyana.png differ diff --git a/eugtk/examples/resources/flags/flags-haiti.png b/eugtk/examples/resources/flags/flags-haiti.png new file mode 100644 index 0000000..4379dfc Binary files /dev/null and b/eugtk/examples/resources/flags/flags-haiti.png differ diff --git a/eugtk/examples/resources/flags/flags-herm.png b/eugtk/examples/resources/flags/flags-herm.png new file mode 100644 index 0000000..7098c98 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-herm.png differ diff --git a/eugtk/examples/resources/flags/flags-honduras.png b/eugtk/examples/resources/flags/flags-honduras.png new file mode 100644 index 0000000..b6ac416 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-honduras.png differ diff --git a/eugtk/examples/resources/flags/flags-hong_kong.png b/eugtk/examples/resources/flags/flags-hong_kong.png new file mode 100644 index 0000000..b77f0c7 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-hong_kong.png differ diff --git a/eugtk/examples/resources/flags/flags-hungary.png b/eugtk/examples/resources/flags/flags-hungary.png new file mode 100644 index 0000000..71df060 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-hungary.png differ diff --git a/eugtk/examples/resources/flags/flags-iceland.png b/eugtk/examples/resources/flags/flags-iceland.png new file mode 100644 index 0000000..806bda7 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-iceland.png differ diff --git a/eugtk/examples/resources/flags/flags-india.png b/eugtk/examples/resources/flags/flags-india.png new file mode 100644 index 0000000..b9c2a0b Binary files /dev/null and b/eugtk/examples/resources/flags/flags-india.png differ diff --git a/eugtk/examples/resources/flags/flags-indonesia.png b/eugtk/examples/resources/flags/flags-indonesia.png new file mode 100644 index 0000000..c651c91 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-indonesia.png differ diff --git a/eugtk/examples/resources/flags/flags-iran.png b/eugtk/examples/resources/flags/flags-iran.png new file mode 100644 index 0000000..54a7074 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-iran.png differ diff --git a/eugtk/examples/resources/flags/flags-iraq.png b/eugtk/examples/resources/flags/flags-iraq.png new file mode 100644 index 0000000..140667b Binary files /dev/null and b/eugtk/examples/resources/flags/flags-iraq.png differ diff --git a/eugtk/examples/resources/flags/flags-ireland.png b/eugtk/examples/resources/flags/flags-ireland.png new file mode 100644 index 0000000..5372185 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-ireland.png differ diff --git a/eugtk/examples/resources/flags/flags-isle_of_man.png b/eugtk/examples/resources/flags/flags-isle_of_man.png new file mode 100644 index 0000000..3415b22 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-isle_of_man.png differ diff --git a/eugtk/examples/resources/flags/flags-israel.png b/eugtk/examples/resources/flags/flags-israel.png new file mode 100644 index 0000000..8f834f3 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-israel.png differ diff --git a/eugtk/examples/resources/flags/flags-italy.png b/eugtk/examples/resources/flags/flags-italy.png new file mode 100644 index 0000000..17c6dc6 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-italy.png differ diff --git a/eugtk/examples/resources/flags/flags-jamaica.png b/eugtk/examples/resources/flags/flags-jamaica.png new file mode 100644 index 0000000..b4c0693 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-jamaica.png differ diff --git a/eugtk/examples/resources/flags/flags-japan.png b/eugtk/examples/resources/flags/flags-japan.png new file mode 100644 index 0000000..4b19821 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-japan.png differ diff --git a/eugtk/examples/resources/flags/flags-jersey.png b/eugtk/examples/resources/flags/flags-jersey.png new file mode 100644 index 0000000..504acae Binary files /dev/null and b/eugtk/examples/resources/flags/flags-jersey.png differ diff --git a/eugtk/examples/resources/flags/flags-jordan.png b/eugtk/examples/resources/flags/flags-jordan.png new file mode 100644 index 0000000..2471210 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-jordan.png differ diff --git a/eugtk/examples/resources/flags/flags-kazakhstan.png b/eugtk/examples/resources/flags/flags-kazakhstan.png new file mode 100644 index 0000000..424d9e7 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-kazakhstan.png differ diff --git a/eugtk/examples/resources/flags/flags-kenya.png b/eugtk/examples/resources/flags/flags-kenya.png new file mode 100644 index 0000000..a5358cc Binary files /dev/null and b/eugtk/examples/resources/flags/flags-kenya.png differ diff --git a/eugtk/examples/resources/flags/flags-kiribati.png b/eugtk/examples/resources/flags/flags-kiribati.png new file mode 100644 index 0000000..0bb318e Binary files /dev/null and b/eugtk/examples/resources/flags/flags-kiribati.png differ diff --git a/eugtk/examples/resources/flags/flags-kosovo.png b/eugtk/examples/resources/flags/flags-kosovo.png new file mode 100644 index 0000000..437491d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-kosovo.png differ diff --git a/eugtk/examples/resources/flags/flags-kuwait.png b/eugtk/examples/resources/flags/flags-kuwait.png new file mode 100644 index 0000000..6701ca3 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-kuwait.png differ diff --git a/eugtk/examples/resources/flags/flags-kyrgyzstan.png b/eugtk/examples/resources/flags/flags-kyrgyzstan.png new file mode 100644 index 0000000..a4be88a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-kyrgyzstan.png differ diff --git a/eugtk/examples/resources/flags/flags-laos.png b/eugtk/examples/resources/flags/flags-laos.png new file mode 100644 index 0000000..1ea228e Binary files /dev/null and b/eugtk/examples/resources/flags/flags-laos.png differ diff --git a/eugtk/examples/resources/flags/flags-latvia.png b/eugtk/examples/resources/flags/flags-latvia.png new file mode 100644 index 0000000..bda76b9 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-latvia.png differ diff --git a/eugtk/examples/resources/flags/flags-lebanon.png b/eugtk/examples/resources/flags/flags-lebanon.png new file mode 100644 index 0000000..fa84564 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-lebanon.png differ diff --git a/eugtk/examples/resources/flags/flags-lesotho.png b/eugtk/examples/resources/flags/flags-lesotho.png new file mode 100644 index 0000000..cda4fd2 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-lesotho.png differ diff --git a/eugtk/examples/resources/flags/flags-liberia.png b/eugtk/examples/resources/flags/flags-liberia.png new file mode 100644 index 0000000..2a861ce Binary files /dev/null and b/eugtk/examples/resources/flags/flags-liberia.png differ diff --git a/eugtk/examples/resources/flags/flags-libya.png b/eugtk/examples/resources/flags/flags-libya.png new file mode 100644 index 0000000..b845579 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-libya.png differ diff --git a/eugtk/examples/resources/flags/flags-liechtenstein.png b/eugtk/examples/resources/flags/flags-liechtenstein.png new file mode 100644 index 0000000..29f831e Binary files /dev/null and b/eugtk/examples/resources/flags/flags-liechtenstein.png differ diff --git a/eugtk/examples/resources/flags/flags-lithuania.png b/eugtk/examples/resources/flags/flags-lithuania.png new file mode 100644 index 0000000..3c6818a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-lithuania.png differ diff --git a/eugtk/examples/resources/flags/flags-luxembourg.png b/eugtk/examples/resources/flags/flags-luxembourg.png new file mode 100644 index 0000000..cf6f054 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-luxembourg.png differ diff --git a/eugtk/examples/resources/flags/flags-macau.png b/eugtk/examples/resources/flags/flags-macau.png new file mode 100644 index 0000000..581907f Binary files /dev/null and b/eugtk/examples/resources/flags/flags-macau.png differ diff --git a/eugtk/examples/resources/flags/flags-macedonia.png b/eugtk/examples/resources/flags/flags-macedonia.png new file mode 100644 index 0000000..18be55f Binary files /dev/null and b/eugtk/examples/resources/flags/flags-macedonia.png differ diff --git a/eugtk/examples/resources/flags/flags-madagascar.png b/eugtk/examples/resources/flags/flags-madagascar.png new file mode 100644 index 0000000..ef7cc31 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-madagascar.png differ diff --git a/eugtk/examples/resources/flags/flags-madeira.png b/eugtk/examples/resources/flags/flags-madeira.png new file mode 100644 index 0000000..82d0ffd Binary files /dev/null and b/eugtk/examples/resources/flags/flags-madeira.png differ diff --git a/eugtk/examples/resources/flags/flags-malawi.png b/eugtk/examples/resources/flags/flags-malawi.png new file mode 100644 index 0000000..bd4bc53 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-malawi.png differ diff --git a/eugtk/examples/resources/flags/flags-malaysia.png b/eugtk/examples/resources/flags/flags-malaysia.png new file mode 100644 index 0000000..c89679c Binary files /dev/null and b/eugtk/examples/resources/flags/flags-malaysia.png differ diff --git a/eugtk/examples/resources/flags/flags-maldives.png b/eugtk/examples/resources/flags/flags-maldives.png new file mode 100644 index 0000000..66e9dc5 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-maldives.png differ diff --git a/eugtk/examples/resources/flags/flags-mali.png b/eugtk/examples/resources/flags/flags-mali.png new file mode 100644 index 0000000..ade3482 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-mali.png differ diff --git a/eugtk/examples/resources/flags/flags-malta.png b/eugtk/examples/resources/flags/flags-malta.png new file mode 100644 index 0000000..ae23c03 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-malta.png differ diff --git a/eugtk/examples/resources/flags/flags-marshall_islands.png b/eugtk/examples/resources/flags/flags-marshall_islands.png new file mode 100644 index 0000000..4c6d97a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-marshall_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-martinique.png b/eugtk/examples/resources/flags/flags-martinique.png new file mode 100644 index 0000000..e93ba92 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-martinique.png differ diff --git a/eugtk/examples/resources/flags/flags-mauritania.png b/eugtk/examples/resources/flags/flags-mauritania.png new file mode 100644 index 0000000..c160f9e Binary files /dev/null and b/eugtk/examples/resources/flags/flags-mauritania.png differ diff --git a/eugtk/examples/resources/flags/flags-mauritius.png b/eugtk/examples/resources/flags/flags-mauritius.png new file mode 100644 index 0000000..4aae116 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-mauritius.png differ diff --git a/eugtk/examples/resources/flags/flags-mexico.png b/eugtk/examples/resources/flags/flags-mexico.png new file mode 100644 index 0000000..4b139d9 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-mexico.png differ diff --git a/eugtk/examples/resources/flags/flags-moldova.png b/eugtk/examples/resources/flags/flags-moldova.png new file mode 100644 index 0000000..6e2d012 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-moldova.png differ diff --git a/eugtk/examples/resources/flags/flags-monaco.png b/eugtk/examples/resources/flags/flags-monaco.png new file mode 100644 index 0000000..0be5952 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-monaco.png differ diff --git a/eugtk/examples/resources/flags/flags-mongolia.png b/eugtk/examples/resources/flags/flags-mongolia.png new file mode 100644 index 0000000..7ee158d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-mongolia.png differ diff --git a/eugtk/examples/resources/flags/flags-montenegro.png b/eugtk/examples/resources/flags/flags-montenegro.png new file mode 100644 index 0000000..5cb2944 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-montenegro.png differ diff --git a/eugtk/examples/resources/flags/flags-montserrat.png b/eugtk/examples/resources/flags/flags-montserrat.png new file mode 100644 index 0000000..6cd0649 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-montserrat.png differ diff --git a/eugtk/examples/resources/flags/flags-morocco.png b/eugtk/examples/resources/flags/flags-morocco.png new file mode 100644 index 0000000..4d1a29d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-morocco.png differ diff --git a/eugtk/examples/resources/flags/flags-mozambique.png b/eugtk/examples/resources/flags/flags-mozambique.png new file mode 100644 index 0000000..b3a467e Binary files /dev/null and b/eugtk/examples/resources/flags/flags-mozambique.png differ diff --git a/eugtk/examples/resources/flags/flags-myanmar.png b/eugtk/examples/resources/flags/flags-myanmar.png new file mode 100644 index 0000000..c19d7d4 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-myanmar.png differ diff --git a/eugtk/examples/resources/flags/flags-namibia.png b/eugtk/examples/resources/flags/flags-namibia.png new file mode 100644 index 0000000..cb95d6c Binary files /dev/null and b/eugtk/examples/resources/flags/flags-namibia.png differ diff --git a/eugtk/examples/resources/flags/flags-nauru.png b/eugtk/examples/resources/flags/flags-nauru.png new file mode 100644 index 0000000..e4d5be1 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-nauru.png differ diff --git a/eugtk/examples/resources/flags/flags-nepal.png b/eugtk/examples/resources/flags/flags-nepal.png new file mode 100644 index 0000000..6cfc702 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-nepal.png differ diff --git a/eugtk/examples/resources/flags/flags-netherlands.png b/eugtk/examples/resources/flags/flags-netherlands.png new file mode 100644 index 0000000..ceb7320 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-netherlands.png differ diff --git a/eugtk/examples/resources/flags/flags-netherlands_antilles.png b/eugtk/examples/resources/flags/flags-netherlands_antilles.png new file mode 100644 index 0000000..3453a66 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-netherlands_antilles.png differ diff --git a/eugtk/examples/resources/flags/flags-new_zealand.png b/eugtk/examples/resources/flags/flags-new_zealand.png new file mode 100644 index 0000000..e0ae80d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-new_zealand.png differ diff --git a/eugtk/examples/resources/flags/flags-nicaragua.png b/eugtk/examples/resources/flags/flags-nicaragua.png new file mode 100644 index 0000000..48e19d1 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-nicaragua.png differ diff --git a/eugtk/examples/resources/flags/flags-niger.png b/eugtk/examples/resources/flags/flags-niger.png new file mode 100644 index 0000000..0c18eed Binary files /dev/null and b/eugtk/examples/resources/flags/flags-niger.png differ diff --git a/eugtk/examples/resources/flags/flags-nigeria.png b/eugtk/examples/resources/flags/flags-nigeria.png new file mode 100644 index 0000000..2fccae3 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-nigeria.png differ diff --git a/eugtk/examples/resources/flags/flags-niue.png b/eugtk/examples/resources/flags/flags-niue.png new file mode 100644 index 0000000..cbd435b Binary files /dev/null and b/eugtk/examples/resources/flags/flags-niue.png differ diff --git a/eugtk/examples/resources/flags/flags-norfolk_island.png b/eugtk/examples/resources/flags/flags-norfolk_island.png new file mode 100644 index 0000000..991019d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-norfolk_island.png differ diff --git a/eugtk/examples/resources/flags/flags-north_korea.png b/eugtk/examples/resources/flags/flags-north_korea.png new file mode 100644 index 0000000..950ca89 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-north_korea.png differ diff --git a/eugtk/examples/resources/flags/flags-northern_mariana_islands.png b/eugtk/examples/resources/flags/flags-northern_mariana_islands.png new file mode 100644 index 0000000..323ebb9 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-northern_mariana_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-norway.png b/eugtk/examples/resources/flags/flags-norway.png new file mode 100644 index 0000000..fb5d31f Binary files /dev/null and b/eugtk/examples/resources/flags/flags-norway.png differ diff --git a/eugtk/examples/resources/flags/flags-oman.png b/eugtk/examples/resources/flags/flags-oman.png new file mode 100644 index 0000000..830f047 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-oman.png differ diff --git a/eugtk/examples/resources/flags/flags-pakistan.png b/eugtk/examples/resources/flags/flags-pakistan.png new file mode 100644 index 0000000..3b46e5b Binary files /dev/null and b/eugtk/examples/resources/flags/flags-pakistan.png differ diff --git a/eugtk/examples/resources/flags/flags-palau.png b/eugtk/examples/resources/flags/flags-palau.png new file mode 100644 index 0000000..c308b90 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-palau.png differ diff --git a/eugtk/examples/resources/flags/flags-palestine.png b/eugtk/examples/resources/flags/flags-palestine.png new file mode 100644 index 0000000..4c2cff2 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-palestine.png differ diff --git a/eugtk/examples/resources/flags/flags-panama.png b/eugtk/examples/resources/flags/flags-panama.png new file mode 100644 index 0000000..e4f70ac Binary files /dev/null and b/eugtk/examples/resources/flags/flags-panama.png differ diff --git a/eugtk/examples/resources/flags/flags-papua_new_guinea.png b/eugtk/examples/resources/flags/flags-papua_new_guinea.png new file mode 100644 index 0000000..2063837 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-papua_new_guinea.png differ diff --git a/eugtk/examples/resources/flags/flags-paraguay.png b/eugtk/examples/resources/flags/flags-paraguay.png new file mode 100644 index 0000000..93b3538 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-paraguay.png differ diff --git a/eugtk/examples/resources/flags/flags-people's_republic_of_china.png b/eugtk/examples/resources/flags/flags-people's_republic_of_china.png new file mode 100644 index 0000000..c0f3e22 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-people's_republic_of_china.png differ diff --git a/eugtk/examples/resources/flags/flags-peru.png b/eugtk/examples/resources/flags/flags-peru.png new file mode 100644 index 0000000..a1ce99d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-peru.png differ diff --git a/eugtk/examples/resources/flags/flags-philippines.png b/eugtk/examples/resources/flags/flags-philippines.png new file mode 100644 index 0000000..41541bd Binary files /dev/null and b/eugtk/examples/resources/flags/flags-philippines.png differ diff --git a/eugtk/examples/resources/flags/flags-pitcairn_islands.png b/eugtk/examples/resources/flags/flags-pitcairn_islands.png new file mode 100644 index 0000000..96796a3 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-pitcairn_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-poland.png b/eugtk/examples/resources/flags/flags-poland.png new file mode 100644 index 0000000..9fb194a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-poland.png differ diff --git a/eugtk/examples/resources/flags/flags-portugal.png b/eugtk/examples/resources/flags/flags-portugal.png new file mode 100644 index 0000000..228ea9a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-portugal.png differ diff --git a/eugtk/examples/resources/flags/flags-puerto_rico.png b/eugtk/examples/resources/flags/flags-puerto_rico.png new file mode 100644 index 0000000..c56f2ea Binary files /dev/null and b/eugtk/examples/resources/flags/flags-puerto_rico.png differ diff --git a/eugtk/examples/resources/flags/flags-qatar.png b/eugtk/examples/resources/flags/flags-qatar.png new file mode 100644 index 0000000..ed05b98 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-qatar.png differ diff --git a/eugtk/examples/resources/flags/flags-republic_of_china.png b/eugtk/examples/resources/flags/flags-republic_of_china.png new file mode 100644 index 0000000..55b1742 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-republic_of_china.png differ diff --git a/eugtk/examples/resources/flags/flags-republic_of_the_congo.png b/eugtk/examples/resources/flags/flags-republic_of_the_congo.png new file mode 100644 index 0000000..d594994 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-republic_of_the_congo.png differ diff --git a/eugtk/examples/resources/flags/flags-romania.png b/eugtk/examples/resources/flags/flags-romania.png new file mode 100644 index 0000000..e72279d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-romania.png differ diff --git a/eugtk/examples/resources/flags/flags-russia.png b/eugtk/examples/resources/flags/flags-russia.png new file mode 100644 index 0000000..78aa43c Binary files /dev/null and b/eugtk/examples/resources/flags/flags-russia.png differ diff --git a/eugtk/examples/resources/flags/flags-rwanda.png b/eugtk/examples/resources/flags/flags-rwanda.png new file mode 100644 index 0000000..9d48ddc Binary files /dev/null and b/eugtk/examples/resources/flags/flags-rwanda.png differ diff --git a/eugtk/examples/resources/flags/flags-saba.png b/eugtk/examples/resources/flags/flags-saba.png new file mode 100644 index 0000000..40cd2d2 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-saba.png differ diff --git a/eugtk/examples/resources/flags/flags-saint-pierre_and_miquelon.png b/eugtk/examples/resources/flags/flags-saint-pierre_and_miquelon.png new file mode 100644 index 0000000..23eecdb Binary files /dev/null and b/eugtk/examples/resources/flags/flags-saint-pierre_and_miquelon.png differ diff --git a/eugtk/examples/resources/flags/flags-saint_barthelemy.png b/eugtk/examples/resources/flags/flags-saint_barthelemy.png new file mode 100644 index 0000000..d74901f Binary files /dev/null and b/eugtk/examples/resources/flags/flags-saint_barthelemy.png differ diff --git a/eugtk/examples/resources/flags/flags-saint_helena.png b/eugtk/examples/resources/flags/flags-saint_helena.png new file mode 100644 index 0000000..b6fc220 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-saint_helena.png differ diff --git a/eugtk/examples/resources/flags/flags-saint_kitts_and_nevis.png b/eugtk/examples/resources/flags/flags-saint_kitts_and_nevis.png new file mode 100644 index 0000000..c683ae9 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-saint_kitts_and_nevis.png differ diff --git a/eugtk/examples/resources/flags/flags-saint_lucia.png b/eugtk/examples/resources/flags/flags-saint_lucia.png new file mode 100644 index 0000000..5d85b83 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-saint_lucia.png differ diff --git a/eugtk/examples/resources/flags/flags-saint_vincent_and_the_grenadines.png b/eugtk/examples/resources/flags/flags-saint_vincent_and_the_grenadines.png new file mode 100644 index 0000000..614deee Binary files /dev/null and b/eugtk/examples/resources/flags/flags-saint_vincent_and_the_grenadines.png differ diff --git a/eugtk/examples/resources/flags/flags-samoa.png b/eugtk/examples/resources/flags/flags-samoa.png new file mode 100644 index 0000000..8fc758e Binary files /dev/null and b/eugtk/examples/resources/flags/flags-samoa.png differ diff --git a/eugtk/examples/resources/flags/flags-san_marino.png b/eugtk/examples/resources/flags/flags-san_marino.png new file mode 100644 index 0000000..6f38ca0 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-san_marino.png differ diff --git a/eugtk/examples/resources/flags/flags-sao_tome_and_principe.png b/eugtk/examples/resources/flags/flags-sao_tome_and_principe.png new file mode 100644 index 0000000..a40ba76 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-sao_tome_and_principe.png differ diff --git a/eugtk/examples/resources/flags/flags-sark.png b/eugtk/examples/resources/flags/flags-sark.png new file mode 100644 index 0000000..fb05536 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-sark.png differ diff --git a/eugtk/examples/resources/flags/flags-saudi_arabia.png b/eugtk/examples/resources/flags/flags-saudi_arabia.png new file mode 100644 index 0000000..fc255c3 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-saudi_arabia.png differ diff --git a/eugtk/examples/resources/flags/flags-senegal.png b/eugtk/examples/resources/flags/flags-senegal.png new file mode 100644 index 0000000..0df310a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-senegal.png differ diff --git a/eugtk/examples/resources/flags/flags-serbia.png b/eugtk/examples/resources/flags/flags-serbia.png new file mode 100644 index 0000000..d58979e Binary files /dev/null and b/eugtk/examples/resources/flags/flags-serbia.png differ diff --git a/eugtk/examples/resources/flags/flags-seychelles.png b/eugtk/examples/resources/flags/flags-seychelles.png new file mode 100644 index 0000000..e5fd6a1 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-seychelles.png differ diff --git a/eugtk/examples/resources/flags/flags-sierra_leone.png b/eugtk/examples/resources/flags/flags-sierra_leone.png new file mode 100644 index 0000000..3ebe04d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-sierra_leone.png differ diff --git a/eugtk/examples/resources/flags/flags-singapore.png b/eugtk/examples/resources/flags/flags-singapore.png new file mode 100644 index 0000000..181b735 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-singapore.png differ diff --git a/eugtk/examples/resources/flags/flags-sint_eustatius.png b/eugtk/examples/resources/flags/flags-sint_eustatius.png new file mode 100644 index 0000000..9d60a04 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-sint_eustatius.png differ diff --git a/eugtk/examples/resources/flags/flags-sint_maarten.png b/eugtk/examples/resources/flags/flags-sint_maarten.png new file mode 100644 index 0000000..2b8928c Binary files /dev/null and b/eugtk/examples/resources/flags/flags-sint_maarten.png differ diff --git a/eugtk/examples/resources/flags/flags-slovakia.png b/eugtk/examples/resources/flags/flags-slovakia.png new file mode 100644 index 0000000..829df60 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-slovakia.png differ diff --git a/eugtk/examples/resources/flags/flags-slovenia.png b/eugtk/examples/resources/flags/flags-slovenia.png new file mode 100644 index 0000000..6743329 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-slovenia.png differ diff --git a/eugtk/examples/resources/flags/flags-solomon_islands.png b/eugtk/examples/resources/flags/flags-solomon_islands.png new file mode 100644 index 0000000..de9bc9a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-solomon_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-somalia.png b/eugtk/examples/resources/flags/flags-somalia.png new file mode 100644 index 0000000..68b017c Binary files /dev/null and b/eugtk/examples/resources/flags/flags-somalia.png differ diff --git a/eugtk/examples/resources/flags/flags-south_africa.png b/eugtk/examples/resources/flags/flags-south_africa.png new file mode 100644 index 0000000..a69d748 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-south_africa.png differ diff --git a/eugtk/examples/resources/flags/flags-south_georgia_and_the_south_sandwich_islands.png b/eugtk/examples/resources/flags/flags-south_georgia_and_the_south_sandwich_islands.png new file mode 100644 index 0000000..fe4d899 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-south_georgia_and_the_south_sandwich_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-south_korea.png b/eugtk/examples/resources/flags/flags-south_korea.png new file mode 100644 index 0000000..4e1e4ef Binary files /dev/null and b/eugtk/examples/resources/flags/flags-south_korea.png differ diff --git a/eugtk/examples/resources/flags/flags-spain.png b/eugtk/examples/resources/flags/flags-spain.png new file mode 100644 index 0000000..b7a5208 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-spain.png differ diff --git a/eugtk/examples/resources/flags/flags-sri_lanka.png b/eugtk/examples/resources/flags/flags-sri_lanka.png new file mode 100644 index 0000000..599a39a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-sri_lanka.png differ diff --git a/eugtk/examples/resources/flags/flags-sudan.png b/eugtk/examples/resources/flags/flags-sudan.png new file mode 100644 index 0000000..ebe69b0 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-sudan.png differ diff --git a/eugtk/examples/resources/flags/flags-suriname.png b/eugtk/examples/resources/flags/flags-suriname.png new file mode 100644 index 0000000..8cfd1c6 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-suriname.png differ diff --git a/eugtk/examples/resources/flags/flags-swaziland.png b/eugtk/examples/resources/flags/flags-swaziland.png new file mode 100644 index 0000000..7f374d9 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-swaziland.png differ diff --git a/eugtk/examples/resources/flags/flags-sweden.png b/eugtk/examples/resources/flags/flags-sweden.png new file mode 100644 index 0000000..58b87f2 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-sweden.png differ diff --git a/eugtk/examples/resources/flags/flags-switzerland.png b/eugtk/examples/resources/flags/flags-switzerland.png new file mode 100644 index 0000000..3effb79 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-switzerland.png differ diff --git a/eugtk/examples/resources/flags/flags-syria.png b/eugtk/examples/resources/flags/flags-syria.png new file mode 100644 index 0000000..d1d72c7 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-syria.png differ diff --git a/eugtk/examples/resources/flags/flags-tajikistan.png b/eugtk/examples/resources/flags/flags-tajikistan.png new file mode 100644 index 0000000..f7df790 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-tajikistan.png differ diff --git a/eugtk/examples/resources/flags/flags-tanzania.png b/eugtk/examples/resources/flags/flags-tanzania.png new file mode 100644 index 0000000..47d9774 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-tanzania.png differ diff --git a/eugtk/examples/resources/flags/flags-thailand.png b/eugtk/examples/resources/flags/flags-thailand.png new file mode 100644 index 0000000..b9e221d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-thailand.png differ diff --git a/eugtk/examples/resources/flags/flags-togo.png b/eugtk/examples/resources/flags/flags-togo.png new file mode 100644 index 0000000..c9974da Binary files /dev/null and b/eugtk/examples/resources/flags/flags-togo.png differ diff --git a/eugtk/examples/resources/flags/flags-tokelau.png b/eugtk/examples/resources/flags/flags-tokelau.png new file mode 100644 index 0000000..a2efbe1 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-tokelau.png differ diff --git a/eugtk/examples/resources/flags/flags-tonga.png b/eugtk/examples/resources/flags/flags-tonga.png new file mode 100644 index 0000000..25ed47d Binary files /dev/null and b/eugtk/examples/resources/flags/flags-tonga.png differ diff --git a/eugtk/examples/resources/flags/flags-trinidad_and_tobago.png b/eugtk/examples/resources/flags/flags-trinidad_and_tobago.png new file mode 100644 index 0000000..39f3f60 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-trinidad_and_tobago.png differ diff --git a/eugtk/examples/resources/flags/flags-tristan_da_cunha.png b/eugtk/examples/resources/flags/flags-tristan_da_cunha.png new file mode 100644 index 0000000..2aca060 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-tristan_da_cunha.png differ diff --git a/eugtk/examples/resources/flags/flags-tunisia.png b/eugtk/examples/resources/flags/flags-tunisia.png new file mode 100644 index 0000000..af72438 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-tunisia.png differ diff --git a/eugtk/examples/resources/flags/flags-turkey.png b/eugtk/examples/resources/flags/flags-turkey.png new file mode 100644 index 0000000..9f6cd22 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-turkey.png differ diff --git a/eugtk/examples/resources/flags/flags-turkmenistan.png b/eugtk/examples/resources/flags/flags-turkmenistan.png new file mode 100644 index 0000000..b29c363 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-turkmenistan.png differ diff --git a/eugtk/examples/resources/flags/flags-turks_and_caicos_islands.png b/eugtk/examples/resources/flags/flags-turks_and_caicos_islands.png new file mode 100644 index 0000000..ad8cafe Binary files /dev/null and b/eugtk/examples/resources/flags/flags-turks_and_caicos_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-tuvalu.png b/eugtk/examples/resources/flags/flags-tuvalu.png new file mode 100644 index 0000000..5437904 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-tuvalu.png differ diff --git a/eugtk/examples/resources/flags/flags-uganda.png b/eugtk/examples/resources/flags/flags-uganda.png new file mode 100644 index 0000000..5f041c2 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-uganda.png differ diff --git a/eugtk/examples/resources/flags/flags-ukraine.png b/eugtk/examples/resources/flags/flags-ukraine.png new file mode 100644 index 0000000..2303a09 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-ukraine.png differ diff --git a/eugtk/examples/resources/flags/flags-united_arab_emirates.png b/eugtk/examples/resources/flags/flags-united_arab_emirates.png new file mode 100644 index 0000000..7d81d7a Binary files /dev/null and b/eugtk/examples/resources/flags/flags-united_arab_emirates.png differ diff --git a/eugtk/examples/resources/flags/flags-united_kingdom.png b/eugtk/examples/resources/flags/flags-united_kingdom.png new file mode 100644 index 0000000..f943964 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-united_kingdom.png differ diff --git a/eugtk/examples/resources/flags/flags-united_states.png b/eugtk/examples/resources/flags/flags-united_states.png new file mode 100644 index 0000000..cfa82c1 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-united_states.png differ diff --git a/eugtk/examples/resources/flags/flags-united_states_virgin_islands.png b/eugtk/examples/resources/flags/flags-united_states_virgin_islands.png new file mode 100644 index 0000000..6131497 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-united_states_virgin_islands.png differ diff --git a/eugtk/examples/resources/flags/flags-uruguay.png b/eugtk/examples/resources/flags/flags-uruguay.png new file mode 100644 index 0000000..af0b7ed Binary files /dev/null and b/eugtk/examples/resources/flags/flags-uruguay.png differ diff --git a/eugtk/examples/resources/flags/flags-uzbekistan.png b/eugtk/examples/resources/flags/flags-uzbekistan.png new file mode 100644 index 0000000..9c0b9b5 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-uzbekistan.png differ diff --git a/eugtk/examples/resources/flags/flags-vanuatu.png b/eugtk/examples/resources/flags/flags-vanuatu.png new file mode 100644 index 0000000..df90bef Binary files /dev/null and b/eugtk/examples/resources/flags/flags-vanuatu.png differ diff --git a/eugtk/examples/resources/flags/flags-vatican_city.png b/eugtk/examples/resources/flags/flags-vatican_city.png new file mode 100644 index 0000000..a5f7587 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-vatican_city.png differ diff --git a/eugtk/examples/resources/flags/flags-venezuela.png b/eugtk/examples/resources/flags/flags-venezuela.png new file mode 100644 index 0000000..14f180f Binary files /dev/null and b/eugtk/examples/resources/flags/flags-venezuela.png differ diff --git a/eugtk/examples/resources/flags/flags-vietnam.png b/eugtk/examples/resources/flags/flags-vietnam.png new file mode 100644 index 0000000..e624ad3 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-vietnam.png differ diff --git a/eugtk/examples/resources/flags/flags-wallis_and_futuna.png b/eugtk/examples/resources/flags/flags-wallis_and_futuna.png new file mode 100644 index 0000000..2ec4cb1 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-wallis_and_futuna.png differ diff --git a/eugtk/examples/resources/flags/flags-western_sahara.png b/eugtk/examples/resources/flags/flags-western_sahara.png new file mode 100644 index 0000000..7f4f6ce Binary files /dev/null and b/eugtk/examples/resources/flags/flags-western_sahara.png differ diff --git a/eugtk/examples/resources/flags/flags-yemen.png b/eugtk/examples/resources/flags/flags-yemen.png new file mode 100644 index 0000000..8358e3c Binary files /dev/null and b/eugtk/examples/resources/flags/flags-yemen.png differ diff --git a/eugtk/examples/resources/flags/flags-zambia.png b/eugtk/examples/resources/flags/flags-zambia.png new file mode 100644 index 0000000..8931a4f Binary files /dev/null and b/eugtk/examples/resources/flags/flags-zambia.png differ diff --git a/eugtk/examples/resources/flags/flags-zimbabwe.png b/eugtk/examples/resources/flags/flags-zimbabwe.png new file mode 100644 index 0000000..6377741 Binary files /dev/null and b/eugtk/examples/resources/flags/flags-zimbabwe.png differ diff --git a/eugtk/examples/resources/floppybuddy.gif b/eugtk/examples/resources/floppybuddy.gif new file mode 100644 index 0000000..ac986c8 Binary files /dev/null and b/eugtk/examples/resources/floppybuddy.gif differ diff --git a/eugtk/examples/resources/geany_syntax/README.html b/eugtk/examples/resources/geany_syntax/README.html new file mode 100644 index 0000000..8f974ee --- /dev/null +++ b/eugtk/examples/resources/geany_syntax/README.html @@ -0,0 +1,41 @@ + + +Eu Syntax files + + + + +
+

Euphoria Syntax for Geany

+
+ +Geany + +

+These files allow you to do syntax highlighting for the Euphoria programming language. +

+ +
To Install:
+

+For Geany I have included Kenneth Rhodes' gneui.ex program which allows Geany to jump to the +location of an error. To use it, just set your Geany Build Command in the Execute box to:
+eui gneui.ex ./%f
+and move gneui.ex to your working directory. +

+ +In the ~/demos/resources folder you will find two config files to trick Geany, Pluma, etc. +into thinking your Euphoria files are Lua source code, thus giving you syntax highlighting: +
+Copy filetype_extensions.conf into ~/.config/geany/
+Copy filetypes.lua into ~/.config/geany/filedefs
+
+ +

+ + + + + + + + diff --git a/eugtk/examples/resources/geany_syntax/compileflag.jpg b/eugtk/examples/resources/geany_syntax/compileflag.jpg new file mode 100644 index 0000000..e60b4f5 Binary files /dev/null and b/eugtk/examples/resources/geany_syntax/compileflag.jpg differ diff --git a/eugtk/examples/resources/geany_syntax/filetype_extensions.conf b/eugtk/examples/resources/geany_syntax/filetype_extensions.conf new file mode 100644 index 0000000..216112d --- /dev/null +++ b/eugtk/examples/resources/geany_syntax/filetype_extensions.conf @@ -0,0 +1,69 @@ +# Filetype extension configuration file for Geany +# Insert as many items as you want, seperate them with a ";". +# See Geany's main documentation for details. + +## Copy this file into ~/.config/geany/ + +[Extensions] +Abc=*.abc;*.abp; +ActionScript=*.as; +Ada=*.adb;*.ads; +ASM=*.asm; +CAML=*.ml;*.mli; +C=*.c;*.h; +C++=*.cpp;*.cxx;*.c++;*.cc;*.h;*.hpp;*.hxx;*.h++;*.hh;*.C;*.H; +C#=*.cs; +CMake=CMakeLists.txt;*.cmake;*.ctest; +COBOL=*.cob;*.cpy;*.cbl;*.cobol; +Conf=*.conf;*.ini;config;*rc;*.cfg;*.desktop;control; +CSS=*.css; +Cython=*.pyx;*.pxd;*.pxi; +D=*.d;*.di; +Diff=*.diff;*.patch;*.rej;*.debdiff;*.dpatch; +Docbook=*.docbook; +Erlang=*.erl; +F77=*.f;*.for;*.ftn;*.f77; +Ferite=*.fe; +Forth=*.fs;*.fth; +Fortran=*.f90;*.f95;*.f03; +FreeBasic=*.bas;*.bi; +Genie=*.gs; +GLSL=*.glsl;*.frag;*.vert; +Haskell=*.hs;*.lhs; +Haxe=*.hx; +HTML=*.htm;*.html;*.shtml;*.hta;*.htd;*.htt;*.cfm; +Java=*.java;*.jsp; +Javascript=*.js; +LaTeX=*.tex;*.sty;*.idx;*.ltx;*.latex; +Lisp=*.lisp; +Lua=*.e;*.eu;*.exu;*.exw;*.ex; +Make=*.mak;*.mk;GNUmakefile;makefile;Makefile;makefile.*;Makefile.*; +Markdown=*.mdml;*.markdown;*.md;*.mkd; +Matlab/Octave=*.m; +NSIS=*.nsi;*.nsh; +Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk; +Perl=*.pl;*.perl;*.pm;*.agi;*.pod; +PHP=*.php;*.php3;*.php4;*.php5;*.phtml; +Po=*.po;*.pot; +Python=*.py;*.pyw; +reStructuredText=*.rest;*.reST;*.rst; +R=*.R;*.r; +Ruby=*.rb;*.rhtml;*.ruby; +Scala=*.scl; +Sh=*.sh;configure;configure.in;configure.in.in;configure.ac;*.ksh;*.zsh;*.ash;*.bash;*.m4; +SQL=*.sql; +Tcl=*.tcl;*.tk;*.wish; +Txt2tags=*.t2t; +Vala=*.vala;*.vapi; +Verilog=*.v; +VHDL=*.vhd;*.vhdl; +XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd;*.xhtml; +YAML=*.yaml;*.yml; +None=*; + +# Note: restarting is required after editing groups +[Groups] +Programming= +Markup= +Misc= +None= diff --git a/eugtk/examples/resources/geany_syntax/filetypes.lua b/eugtk/examples/resources/geany_syntax/filetypes.lua new file mode 100644 index 0000000..91e84b4 --- /dev/null +++ b/eugtk/examples/resources/geany_syntax/filetypes.lua @@ -0,0 +1,97 @@ +# For complete documentation of this file, please see Geany's main documentation + +# Geany Color Syntax support for Euphoria 4.1 + +# Make backups of any file that you edit! + +# This is filetypes.lua edited to support the Euphoria Programming Language +# Make a backup copy of the stock filetypes.lua file, to make sure you never +# over write the original. + +# Copy this file into the directory: ~/.config/geany/filedefs/ + +# Edit the filetype_extensions.conf file +# located in ~/.config/geany/ directory as follows: +# substituting euphoria file extensions for those +# assigned to the language, Lua. +# Lua=*.e;*.eu;*.exu;*.exw;*.ex; + +# 0xE6E6FA = white +# 0xE5E5E5 = light grey +# 0x2FCD2F = light green +# 0xD78821 = Brown + +[styling] +# foreground;background;bold;italic +default=0x000000;0xffffff;false;false +comment=0xd00000;0xffffff;false;false +commentline=0xd00000;0xffffff;false;true +commentdoc=0xd00000;0xffffff;true;false +number=0x007f00;0xffffff;false;false +word=0x00007f;0xffffff;true;false +string=0x315139;0xFFFFFF;false;false +character=0x008000;0xffffff;false;false +literalstring=0x008020;0xffffff;false;false +preprocessor=0x007f7f;0xffffff;false;false +operator=0x301010;0xffffff;false;false +identifier=0x000000;0xffffff;false;false +stringeol=0x000000;0xe0c0e0;false;false +function_basic=0x991111;0xffffff;false;false +function_other=0x1126ED;0xffffff;true;true + +[keywords] +# all items must be in one line +keywords=and as break by case constant continue do else elsedef elsif elsifdef end entry equal export fallthru for function global goto if ifdef include label loop namespace not or override procedure public retry return routine switch then to type until while with without xor + +# Basic functions +function_basic=? abort and_bits append arctan atom c_func c_proc call call_func call_proc clear_screen close command_line compare cos date delete delete_routine find floor get_key getc getenv gets hash head include_paths insert integer length log machine_func machine_proc match mem_copy mem_set not_bits object open option_switches or_bits peek peek2s peek2u peek4s peek4u peek_string peeks pixel platform position power prepend print printf puts rand remainder remove repeat replace sequence sin splice sprintf sqrt system system_exec tail tan task_clock_start task_clock_stop task_create task_list task_schedule task_self task_status task_suspend task_yield time trace xor_bits Widget Container Button Label Adjustment Printer PrintContext PaperSize PrintSetup KeyMap StyleContext Signal FontFamily FontFace FontDescr Settings Combo TreeModel TreeSelection TreePath TreeRowReference SelectionData SourceLanguage PixBuf IconSet TreeView TreeStore ListStore Object Window Dialog AboutDialog Assistant Box Grid Revealer ListBox FlowBox Stack StackSwitcher Sidebar ActionBar HeaderBar Overlay ButtonBox Paned Layout Notebook Expander AspectFrame Image Spinner InfoBar ProgressBar LevelBar Statusbar AccelLabel CheckButton ToggleButton RadioButton LinkButton MenuButton Switch ScaleButton VolumeButton LockButton Entry EntryBuffer EntryCompletion Scale SpinButton SearchEntry SearchBar Editable TextMark TextTag TextTagTable TextView TextBuffer TreeViewColumn IconView CellRendererText CellRendererPixbuf CellRendererProgress CellRendererAccel CellRendererCombo CellRendererToggle CellRendererSpin CellRendererSpinner ComboBox ComboBoxText Menu MenuBar MenuItem RadioMenuItem CheckMenuItem SeparatorMenuItem Toolbar ToolItem ToolPalette ToolButton MenuToolButton ToggleToolButton RadioToolButton Popover PopoverMenu ColorChooser ColorButton ColorChooserWidget ColorChooserDialog FileFilter FileChooser FileChooserButton FileChooserDialog FileChooserWidget PlacesSidebar Frame Scrollbar ScrolledWindow Calendar GLArea Tooltip Viewport FontChooser FontButton FontChooserWidget FontChooserDialog Bin Range ListBoxRow FontDescription AppChooser AppChooserDialog TreeModelSort RecentChooser RecentChooserWidget RecentChooserDialog RecentChooserMenu RecentFilter DrawingArea ImageMenuItem EventBox TreeModelFilter Application ApplicationWindow Pixbuf IconTheme + +function_other=add connect create destroy disconnect Error Quit get hide hide_all idle Info key_pressed main pack Question run set show show_all timeout Warn UNIX ADD ADDRESS_LENGTH ADDR_ADDRESS ADDR_FAMILY ADDR_FLAGS ADDR_PROTOCOL ADDR_TYPE ADD_APPEND ADD_PREPEND ADD_SORT_DOWN ADD_SORT_UP ADLER32 AF_APPLETALK AF_BTH AF_INET AF_INET6 AF_UNIX AF_UNSPEC ANCHORED APPEND ASCENDING AS_IS AT_EXPANSION AUTO_CALLOUT AVERAGE_BUCKET Accessing Accessor Accumulation Adding Allocating Answer Automatic BAD_FILE BAD_RECNO BAD_SEEK BGSET BINARY_MODE BK_LEN BK_PIECES BLACK BLINKING BLOCK_CURSOR BLUE BMP_INVALID_MODE BMP_OPEN_FAILED BMP_SUCCESS BMP_UNEXPECTED_EOF BMP_UNSUPPORTED_FORMAT BRIGHT_BLUE BRIGHT_CYAN BRIGHT_GREEN BRIGHT_MAGENTA BRIGHT_RED BRIGHT_WHITE BROWN BSR_ANYCRLF BSR_UNICODE BYTES_PER_CHAR BYTES_PER_SECTOR Background BadSig: Base Basic Bitmap Bitwise Building C CASELESS CHILD CMD_SWITCHES COMBINE_SORTED COMBINE_UNSORTED CONCAT CONNECTION CONNECT_FREE CONNECT_LOCK CONNECT_TABLES CORRECT COUNT_DIRS COUNT_FILES COUNT_SIZE COUNT_TYPES CS_ASCII CS_Alphabetic CS_Alphanumeric CS_Boolean CS_Bytes CS_Consonant CS_Control CS_Digit CS_Displayable CS_FIRST CS_Graphic CS_Hexadecimal CS_Identifier CS_LAST CS_Lowercase CS_Printable CS_Punctuation CS_SpecWord CS_Uppercase CS_Vowel CS_Whitespace CYAN C_BOOL C_BYTE C_CHAR C_DOUBLE C_DWORD C_DWORDLONG C_FLOAT C_HANDLE C_HRESULT C_HWND C_INT C_LONG C_LONGLONG C_LPARAM C_POINTER C_SHORT C_SIZE_T C_UBYTE C_UCHAR C_UINT C_ULONG C_USHORT C_WORD C_WPARAM Calling Changing Client Colors Command Common Compile Configuration Console Constants Core Create Cross Cursor DATE DAY DAYS DB_BAD_NAME DB_EXISTS_ALREADY DB_FATAL_FAIL DB_LOCK_EXCLUSIVE DB_LOCK_FAIL DB_LOCK_NO DB_LOCK_READ_ONLY DB_LOCK_SHARED DB_OK DB_OPEN_FAIL DEFAULT DEGREES_TO_RADIANS DESCENDING DFA_RESTART DFA_SHORTEST DISCONNECT DISPLAY_ASCII DIVIDE DNS DNS_QUERY_ACCEPT_TRUNCATED_RESPONSE DNS_QUERY_BYPASS_CACHE DNS_QUERY_DONT_RESET_TTL_VALUES DNS_QUERY_NO_HOSTS_FILE DNS_QUERY_NO_LOCAL_NAME DNS_QUERY_NO_NETBT DNS_QUERY_NO_RECURSION DNS_QUERY_NO_WIRE_QUERY DNS_QUERY_RESERVED DNS_QUERY_RETURN_MESSAGE DNS_QUERY_STANDARD DNS_QUERY_TREAT_AS_FQDN DNS_QUERY_USE_TCP_ONLY DNS_QUERY_WIRE_ONLY DOLLAR_ENDONLY DOS_TEXT DOTALL DUPNAMES DUP_TABLE D_ALTNAME D_ATTRIBUTES D_DAY D_HOUR D_MILLISECOND D_MINUTE D_MONTH D_NAME D_SECOND D_SIZE D_YEAR Data Database Date Directory Dynamic E EAF_APPLETALK EAF_BTH EAF_INET EAF_INET6 EAF_UNIX EAF_UNSPEC ENCODE_BASE64 ENCODE_NONE EOF EOL EOLSEP ERROR_BADCOUNT ERROR_BADMAGIC ERROR_BADNEWLINE ERROR_BADOPTION ERROR_BADPARTIAL ERROR_BADUTF8 ERROR_BADUTF8_OFFSET ERROR_CALLOUT ERROR_DFA_RECURSE ERROR_DFA_UCOND ERROR_DFA_UITEM ERROR_DFA_UMLIMIT ERROR_DFA_WSSIZE ERROR_INTERNAL ERROR_MATCHLIMIT ERROR_NOMATCH ERROR_NOMEMORY ERROR_NOSUBSTRING ERROR_NULL ERROR_NULLWSLIMIT ERROR_PARTIAL ERROR_RECURSIONLIMIT ERROR_UNKNOWN_NODE ERROR_UNKNOWN_OPCODE ERR_ACCESS ERR_ADDRINUSE ERR_ADDRNOTAVAIL ERR_AFNOSUPPORT ERR_AGAIN ERR_ALREADY ERR_CONNABORTED ERR_CONNECT_FAILED ERR_CONNREFUSED ERR_CONNRESET ERR_DESTADDRREQ ERR_FAULT ERR_HOSTUNREACH ERR_HOST_LOOKUP_FAILED ERR_INPROGRESS ERR_INTR ERR_INVAL ERR_INVALID_DATA ERR_INVALID_DATA_ENCODING ERR_INVALID_PROTOCOL ERR_IO ERR_ISCONN ERR_ISDIR ERR_LOOP ERR_MALFORMED_URL ERR_MFILE ERR_MSGSIZE ERR_NAMETOOLONG ERR_NETDOWN ERR_NETRESET ERR_NETUNREACH ERR_NFILE ERR_NOBUFS ERR_NOENT ERR_NOTCONN ERR_NOTDIR ERR_NOTINITIALISED ERR_NOTSOCK ERR_OPNOTSUPP ERR_PROTONOSUPPORT ERR_PROTOTYPE ERR_RECEIVE_FAILED ERR_ROFS ERR_SEND_FAILED ERR_SHUTDOWN ERR_SOCKTNOSUPPORT ERR_TIMEDOUT ERR_WOULDBLOCK ESOCK_DGRAM ESOCK_RAW ESOCK_RDM ESOCK_SEQPACKET ESOCK_STREAM ESOCK_TYPE_AF ESOCK_TYPE_OPTION ESOCK_TYPE_TYPE ESOCK_UNDEFINED_VALUE ESOCK_UNKNOWN_FLAG EULER_GAMMA EXTENDED EXTRA EXTRAS EXT_COUNT EXT_NAME EXT_SIZE E_ATOM E_INTEGER E_OBJECT E_SEQUENCE Environment Equality Errors EuDist Euphoria Executable External Extracting, FALSE FGSET FIFO FILETYPE_DIRECTORY FILETYPE_FILE FILETYPE_NOT_FOUND FILETYPE_UNDEFINED FILO FIRSTLINE FLETCHER32 FORM_URLENCODED FP_FORMAT FREEBSD FREE_BYTES File Finding Flags Floating GET_EOF GET_FAIL GET_LONG_ANSWER GET_NOTHING GET_SHORT_ANSWER GET_SUCCESS GRAY GREEN General Get/Post Graphics HALFPI HALFSQRT2 HALF_BLOCK_CURSOR HAS_CASE HAS_PARAMETER HEADER HELP HELP_RID HOST_ALIASES HOST_IPS HOST_OFFICIAL_NAME HOST_TYPE HOUR HOURS HSIEH30 HSIEH32 HTTP Hashing Hyperbolic I/O IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES INDENT INIT_FREE INIT_TABLES INSERT_FAILED INT_FORMAT INVALID_ROUTINE_ID INVLN10 INVLN2 INVSQ2PI IP Indexes Indirect Information Input Interacting Intervals Introduction KC_LBUTTON Key Keyboard LARGEMAP LARGEST_BUCKET LAST_ERROR_CODE LEAVE LINE_BREAKS LINUX LN10 LN2 LOCK_EXCLUSIVE LOCK_METHOD LOCK_SHARED Locale Localized Lock Logarithms Low MAGENTA MANDATORY MAP_ANONYMOUS MAP_FAILED MAX_ASCII MAX_LINES MB_ABORTRETRYIGNORE MB_APPLMODAL MB_DEFAULT_DESKTOP_ONLY MD5 MINF MINUTE MINUTES MIN_ASCII MISSING_END MONTH MONTHS MSG_CONFIRM MSG_CTRUNC MSG_DONTROUTE MSG_DONTWAIT MSG_EOR MSG_ERRQUEUE MSG_FIN MSG_MORE MSG_NOSIGNAL MSG_OOB MSG_PEEK MSG_PROXY MSG_RST MSG_SYN MSG_TRUNC MSG_TRYHARD MSG_WAITALL MULTILINE MULTIPART_FORM_DATA MULTIPLE MULTIPLY Machine Managing Map Marchine Match Matching Math Memory Message Microsoft Miscellaneous Multi-Tasking NESTED_ALL NESTED_ANY NESTED_BACKWARD NESTED_INDEX NETBSD NEWLINE_ANY NEWLINE_ANYCRLF NEWLINE_CR NEWLINE_CRLF NEWLINE_LF NORMAL_ORDER NOTBOL NOTEMPTY NOTEOL NO_AT_EXPANSION NO_AUTO_CAPTURE NO_CASE NO_CURSOR NO_DATABASE NO_HELP NO_HELP_ON_ERROR NO_PARAMETER NO_ROUTINE_ID NO_TABLE NO_UTF8_CHECK NO_VALIDATION NO_VALIDATION_AFTER_FIRST_EXTRA NS_C_ANY NS_C_IN NS_KT_DH NS_KT_DSA NS_KT_PRIVATE NS_KT_RSA NS_T_A NS_T_A6 NS_T_AAAA NS_T_ANY NS_T_MX NS_T_NS NS_T_PTR NULL NULLDEVICE NUMBER_OF_FREE_CLUSTERS NUM_BUCKETS NUM_ENTRIES NUM_IN_USE Notes OBJ_ATOM OBJ_INTEGER OBJ_SEQUENCE OBJ_UNASSIGNED OK ONCE OPENBSD OPTIONAL OPT_CNT OPT_IDX OPT_REV OPT_VAL OSX Opening Operating Operation Option PAGE_EXECUTE PAGE_EXECUTE_READ PAGE_EXECUTE_READWRITE PAGE_EXECUTE_WRITECOPY PAGE_NOACCESS PAGE_NONE PAGE_READ PAGE_READONLY PAGE_READWRITE PAGE_READ_EXECUTE PAGE_READ_WRITE PAGE_READ_WRITE_EXECUTE PAGE_SIZE PAGE_WRITECOPY PAGE_WRITE_COPY PAGE_WRITE_EXECUTE_COPY PARENT PARTIAL PATHSEP PATH_BASENAME PATH_DIR PATH_DRIVEID PATH_FILEEXT PATH_FILENAME PAUSE_MSG PHI PI PID PINF PISQR PRETTY_DEFAULT PUT Parsing Pipe Predefined Pretty Prime Pseudo QUARTPI RADIANS_TO_DEGREES RD_INPLACE RD_PRESORTED RD_SORT RED REVERSE_ORDER ROTATE_LEFT ROTATE_RIGHT Random Read Reading Regular Replacement Reporting Return Roundings Routines SCM_TIMESTAMP SCM_TIMESTAMPING SCM_TIMESTAMPNS SCREEN SD_BOTH SD_RECEIVE SD_SEND SECOND SECONDS SECTORS_PER_CLUSTER SELECT_IS_ERROR SELECT_IS_READABLE SELECT_IS_WRITABLE SELECT_SOCKET SEQ_NOALT SHA256 SHARED_LIB_EXT SHOW_ONLY_OPTIONS SLASH SLASHES SMALLEST_BUCKET SMALLMAP SM_RAW SM_TEXT SND_ASTERISK SND_DEFAULT SND_EXCLAMATION SND_QUESTION SND_STOP SOCKET_SOCKADDR_IN SOCKET_SOCKET SOCK_DGRAM SOCK_RAW SOCK_RDM SOCK_SEQPACKET SOCK_STREAM SOL_SOCKET SO_ACCEPTCONN SO_ATTACH_FILTER SO_BINDTODEVICE SO_BROADCAST SO_BSDCOMPAT SO_CONNDATA SO_CONNDATALEN SO_CONNOPT SO_CONNOPTLEN SO_DEBUG SO_DETACH_FILTER SO_DISCDATA SO_DISCDATALEN SO_DISCOPT SO_DISCOPTLEN SO_DOMAIN SO_DONTLINGER SO_DONTROUTE SO_ERROR SO_KEEPALIVE SO_LINGER SO_MARK SO_MAXDG SO_MAXPATHDG SO_NO_CHECK SO_OOBINLINE SO_OPENTYPE SO_PASSCRED SO_PASSSEC SO_PEERCRED SO_PEERNAME SO_PEERSEC SO_PRIORITY SO_PROTOCOL SO_RCVBUF SO_RCVBUFFORCE SO_RCVLOWAT SO_RCVTIMEO SO_REUSEADDR SO_REUSEPORT SO_RXQ_OVFL SO_SECURITY_AUTHENTICATION SO_SECURITY_ENCRYPTION_NETWORK SO_SECURITY_ENCRYPTION_TRANSPORT SO_SNDBUF SO_SNDBUFFORCE SO_SNDLOWAT SO_SNDTIMEO SO_SYNCHRONOUS_ALTERT SO_SYNCHRONOUS_NONALERT SO_TIMESTAMP SO_TIMESTAMPING SO_TIMESTAMPNS SO_TYPE SO_USELOOPBACK SQRT2 SQRT3 SQRT5 SQRTE START_COLUMN STDERR STDEV_BUCKET STDFLTR_ALPHA STDIN STDOUT STRING_OFFSETS ST_ALLNUM ST_FULLPOP ST_IGNSTR ST_SAMPLE ST_ZEROSTR SUBTRACT Safe Scientific Searching Select Send Sequence Serialization Server Setup Shutdown Sign Socket Sorting Splitting Stack Standard Statistics Style Support TEST_QUIET TEST_SHOW_ALL TEST_SHOW_FAILED_ONLY TEXT_MODE THICK_UNDERLINE_CURSOR TOTAL_BYTES TOTAL_NUMBER_OF_CLUSTERS TO_LOWER TO_SHORT TRUE TWOPI Tests Text Time Trigonometry Type Types UDP UNDERLINE_CURSOR UNGREEDY UNIX_TEXT URL URL_ENTIRE URL_HOSTNAME URL_HTTP_DOMAIN URL_HTTP_PATH URL_HTTP_QUERY URL_MAIL_ADDRESS URL_MAIL_DOMAIN URL_MAIL_QUERY URL_MAIL_USER URL_PASSWORD URL_PATH URL_PORT URL_PROTOCOL URL_QUERY_STRING URL_USER USED_BYTES UTF8 Unit Using Utilities Utility VALIDATE_ALL VC_COLOR VC_COLUMNS VC_LINES VC_MODE VC_NCOLORS VC_PAGES VC_SCRNCOLS VC_SCRNLINES VC_XPIXELS VC_YPIXELS VERSIONING Variables WEEKS WHITE WIN32 WINDOWS WRAP Warning Wildcard Windows Writing YEAR YEARS YELLOW abbreviate_path abort abs absolute_path accept add_item all_matches allocate allocate_code allocate_data allocate_pointer_array allocate_protect allocate_string allocate_string_pointer_array allocate_wstring allow_break ampm and_bits any_key append append_lines apply approx arccos arccosh arcsin arcsinh arctan arctanh ascii_string assert at atan2 atom atom_to_float32 atom_to_float64 atom_to_float80 attr_to_colors avedev average begins binary_search bind binop_ok bits_to_bytes bits_to_int bk_color boolean breakup build_commandline build_list byte_range bytes_to_bits bytes_to_int c_func c_proc calc_hash calc_primes call call_back call_func call_proc canon2win canonical canonical_path case_flagset_type ceil central_moment chance char_test chdir check_all_blocks check_break check_calls check_free_list checksum clear clear_directory clear_screen close cmd_parse color colors_to_attr columnize combine command_line compare console_colors copy copy_file cos cosh count crash crash_file crash_message crash_routine create_directory create_file cstring curdir current_dir cursor custom_sort date datetime day_abbrs day_names days_in_month days_in_year db_cache_clear db_clear_table db_close db_compress db_connect db_create db_create_table db_current db_current_table db_delete_record db_delete_table db_dump db_fatal_id db_fetch_record db_find_key db_get_errors db_get_recid db_insert db_open db_record_data db_record_key db_record_recid db_rename_table db_replace_data db_replace_recid db_select db_select_table db_set_caching db_table_list db_table_size decanonical decode defaulted_value defaultext define_c_func define_c_proc define_c_var deg2rad delete delete_file delete_routine dequote deserialize diff dir dir_size dirname disk_metrics disk_size display display_text_image driveid dump dup edges_only emovavg encode ends ensure_in_list ensure_in_range error_code error_message error_names error_no error_to_string escape exec exp extract fetch fib file_exists file_length file_number file_position file_timestamp file_type filebase fileext filename filter find find_all find_all_but find_any find_each find_from find_nested find_replace find_replace_callback find_replace_limit flags_to_string flatten float32_to_atom float64_to_atom float80_to_atom floor flush for_each format frac free free_code free_console free_pointer_array from_date from_unix gcd geomean get_bytes get_charsets get_def_lang get_dstring get_encoding_properties get_integer16 get_integer32 get_key get_lang_path get_option get_ovector_size get_pid get_position get_rand get_screen_char get_text getc getenv gets graphics_mode graphics_point harmean has has_console has_match hash head hex_text host_by_addr host_by_name http_get http_post iif info init_curdir insert insertion_sort instance int_to_bits int_to_bytes intdiv integer integer_array is_empty is_even is_even_obj is_in_list is_in_range is_inetaddr is_leap_year is_match is_win_nt join join_path key_codes keys keyvalues kill kurtosis lang_load larger_of largest last length listen load load_map locale_canonical locate_file lock_file lock_type log log10 lookup lower machine_addr machine_func machine_proc malloc map mapping match match_all match_any match_from match_replace matches max maybe_any_key median mem_copy mem_set merge message_box mid min minsize mixture mod mode money month_abbrs month_names movavg move_file my_dir nested_get nested_put new new_extra new_from_kvpairs new_from_string new_time next_prime not_bits now now_gmt number number_array object open open_dll optimize option_spec option_spec_to_string option_switches or_all or_bits pad_head pad_tail pairs parse parse_commandline parse_ip_address parse_querystring parse_url patch pathinfo pathname peek peek2s peek2u peek4s peek4u peek8s peek8u peek_end peek_longs peek_longu peek_string peek_top peek_wstring peeks pivot platform platform_locale poke poke2 poke4 poke8 poke_long poke_string poke_wstring pop position positive_int posix_names power powof2 prepend pretty_print pretty_sprint prime_list print printf process process_lines product project prompt_number prompt_string proper push put put_integer16 put_integer32 put_screen_char puts quote rad2deg ram_space rand rand_range range raw_frequency read read_bitmap read_file read_lines receive receive_from regex register_block rehash remainder remove remove_all remove_directory remove_dups remove_item remove_subseq rename_file repeat repeat_pattern replace retain_all reverse rfind rmatch rnd rnd_1 roll rotate rotate_bits round routine_id safe_address sample save_bitmap save_map save_text_image scientific_to_atom scientific_to_float scroll seek select send send_to sequence sequence_array serialize series service_by_name service_by_port set set_accumulate_summary set_charsets set_decimal_mark set_def_lang set_default_charsets set_encoding_properties set_keycodes set_lang_path set_option set_proxy_server set_rand set_test_abort set_test_verbosity set_wait_on_summary setenv shift_bits show_help shuffle shutdown sign sim_index sin sinh size skewness sleep slice small smaller_of smallest socket sort sort_columns sound splice split split_any split_limit split_path sprint sprintf sqrt stack statistics std_library_address stdev store string subtract sum sum_central_moments swap system system_exec t_alnum t_alpha t_ascii t_boolean t_bytearray t_cntrl t_consonant t_digit t_display t_graph t_identifier t_integer32 t_lower t_print t_punct t_space t_specword t_text t_upper t_vowel t_xdigit tail tan tanh task_clock_start task_clock_stop task_create task_delay task_list task_schedule task_self task_status task_suspend task_yield temp_file test_equal test_fail test_false test_not_equal test_pass test_report test_true text_color text_rows threshold time to_integer to_number to_string to_unix top transform translate transmute trim trim_head trim_tail trsprintf true_bgcolor true_fgcolor trunc type type_of uname unlock_file unregister_block unsetenv upper using valid valid_index valid_memory_protection_constant value values video_config vlookup vslice w32_name_canonical w32_names wait_key walk_dir warning warning_file weeks_day where which_bit wrap write write_file write_lines writef writefln xor_bits years_day gslist_to_sequence unpack register pack_start pack_end NonModalDialog + +[settings] +# default extension used when saving files +extension=ex + +# if only single comment char is supported like # in this file, leave comment_close blank +comment_open=-- +comment_close= +# this is an alternative way, so multiline comments are used +comment_open=/* +comment_close=*/ +# set to false if a comment character/string should start at column 0 of a line, true uses any +# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d + #command_example(); +# setting to false would generate this +# command_example(); +# This setting works only for single line comments +comment_use_indent=FALSE + +# Put the location of your GTK documentation in the context_action_cmd line +# so that you can pop up docs on whatever GtkWidget you highlight in +# your Euphoria source code, then right-click and choose context action. +# You could also set up a geany keybinding for this, such as alt-i. +# You may prefer to use -new-window instead of -new-tab, +# and/or -search in order to use your default search engine; +context_action_cmd=firefox -new-tab file:///home/irv/gtk3/%s.html + +[build_settings] +# %f will be replaced by the complete filename +# %e will be replaced by the filename without extension +# (use only one of it at one time) + +[build-menu] +EX_00_LB=Run Source File with Euphoria Interpreter +EX_00_CM=\seui ~/demos/gneui %f +EX_00_WD= +FT_00_LB=Translate source to C code & Compile +FT_00_CM=euc "%e" +FT_00_WD= +FT_01_LB=Bind source code with interpreter +FT_01_CM=eubind "%e" +FT_01_WD= +FT_02_LB=Gather files into Eudist directory +FT_02_CM=eudist "%f" +FT_02_WD= +EX_01_LB=Execute Compiled or Bound Code File +EX_01_CM=\s./%e +EX_01_WD= diff --git a/eugtk/examples/resources/geany_syntax/gneui.ex b/eugtk/examples/resources/geany_syntax/gneui.ex new file mode 100644 index 0000000..decc196 --- /dev/null +++ b/eugtk/examples/resources/geany_syntax/gneui.ex @@ -0,0 +1,116 @@ +-- gneui.ex 1.0 +-- +-- 2013 2013-03-21 +-- Kenneth Rhodes +-- +-- This file wraps the Euphoria interpreter +-- together with a routine which extracts +-- ex.err file data and passes the name, +-- path, line and column to the Geany editor +-- +-- usage: Geany run_cmd = eui gneui.ex ./%f +-- Set run source code command to this as well, +-- Execute your code from Geany; upon error, +-- Geany will position the cursor at the line +-- and column of the error. + +--* Heavily modified by Irv Mullins +--* to try to handle signal 11 errors from GTK + +include std/io.e +include std/convert.e +include std/error.e +include std/filesys.e +include std/console.e +include std/sequence.e + +object file_name, command, err +integer exit_code = 0 + +sequence cl = command_line() +system("clear",0) + +if length(cl) >= 3 then + + file_name = cl[3] + command = sprintf( "eui -D DEBUG \"%s\"", {file_name} ) + printf(1, +`----------------------------------------------------------------------- +/// Running %s with gneui +------------------------------------------------------------------------ +`,{file_name}) + + -- look for old ex.err in current directory; + err = canonical_path(file_name) + err = pathname(err) & "/" & "ex.err" + + if file_exists(err) then + delete_file(err) -- remove old ex.err if it exists; + end if + + exit_code = system_exec ( command, 0 ) -- call eui with debugging; + if exit_code != 0 then -- on error + ParseErrorFile() + end if + +end if + +-------------------------- +procedure ParseErrorFile() +-------------------------- +object file_lines +object temp_line +object err_line +integer err_col = 0, i = 0 + + if not file_exists("ex.err") then + abort(exit_code) -- can't fine ex.err! + end if + + file_lines = read_lines(err) + if atom(file_lines) then -- ex.err was empty + crash("Cannot find ex.err!\n") + end if + + object x = split(file_lines[1]) + + for n = 1 to length(file_lines) do + if match("^^^ call-back from external source",file_lines[n]) = 1 then + file_lines = file_lines[1..n-1] -- get rid of non-useful part of ex.err listing; + exit + end if + end for + + -- trap & process GTK signal 11 errors; + for n = length(file_lines) to 2 by -1 do + -- start at end of ex.err, to find last (topmost) error line #; + if match("... called from /", file_lines[n]) then + i = find(':', file_lines[n]) + file_name = file_lines[n][17..i-1] + err_line = file_lines[n][i+1..$] + i = find(' ',err_line) + err_line = err_line[1..i-1] + err_line = to_number(err_line) + -- display the file and line #, then call geany to edit it; + printf(1,"\nFile:%s - LINE:%d \n",{file_name,err_line}) + system( sprintf("geany \"%s:%d\"", {file_name,err_line} )) + abort(exit_code) + end if + end for + + -- trap & process euphoria error report; + for n = 1 to length(file_lines) do + -- start at top of ex.err, to find first syntax error; + if find('^', file_lines[n]) then + i = find(':',file_lines[1]) + err_col = match("^",file_lines[n])-1 + file_name = file_lines[1][1..i-1] + err_line = to_number(file_lines[1][i+1..$]) + -- display the file and line #, then call geany to edit it; + printf(1,"\nFILE:%s - LINE:%d COL:%d\n",{file_name,err_line,err_col}) + system( sprintf("geany \"%s:%d:%d\" & ", {file_name, err_line, err_col} )) + abort(exit_code) + end if + end for + +end procedure diff --git a/eugtk/examples/resources/gedit_syntax/README.html b/eugtk/examples/resources/gedit_syntax/README.html new file mode 100644 index 0000000..7bffe3f --- /dev/null +++ b/eugtk/examples/resources/gedit_syntax/README.html @@ -0,0 +1,60 @@ + + +Eu Syntax files + + + + +
+

Euphoria Syntax for text editors

+
+ +color coded syntax + +

+These files allow you to do syntax highlighting for the Euphoria programming language. +

+ +
To Install:
+

+For programs using GTK2 -- i.e. Pluma, gedit, etc.

+sudo cp euphoria.lang /usr/share/gtksourceview-2.0/language-specs/euphoria.lang
+sudo cp gedit_syntax.xml /usr/share/mime/packages/
+sudo cp classic.xml /usr/share/gtksourceview-2.0/styles/
+

+ +

+For programs using GTK3 -- i.e. EuGTK Sourceview

+sudo cp euphoria.lang /usr/share/gtksourceview-3.0/language-specs/euphoria.lang
+sudo cp gedit_syntax.xml /usr/share/mime/packages/
+sudo cp classic.xml /usr/share/gtksourceview-3.0/styles/
+

+ +

+Actually, it doesn't hurt to do both :) +

+ +

+

Optional, if you prefer these styles;
+
+sudo cp cobalt.xml /usr/share/gtksourceview-2.0/styles/
+sudo cp oblivion.xml /usr/share/gtksourceview-2.0/styles/
+
+sudo cp cobalt.xml /usr/share/gtksourceview-3.0/styles/
+sudo cp oblivion.xml /usr/share/gtksourceview-3.0/styles/
+
+ +
You may have to change permissions on the following files:
+
+sudo chmod 777 /usr/share/gtksourceview-2.0/language-specs/euphoria.lang
+sudo chmod 777 /usr/share/gtksourceview-3.0/language-specs/euphoria.lang
+
+

+ + + + + + + + diff --git a/eugtk/examples/resources/gedit_syntax/build.xml b/eugtk/examples/resources/gedit_syntax/build.xml new file mode 100644 index 0000000..f791c79 --- /dev/null +++ b/eugtk/examples/resources/gedit_syntax/build.xml @@ -0,0 +1,106 @@ + + + + + + Joe Collins + Vale Collins + <_description>Emphasis on readability. + + + + + + + + + + + + + + + + + + + + +