added eugtk examples
This commit is contained in:
39
eugtk/examples/test141.ex
Normal file
39
eugtk/examples/test141.ex
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
-----------------------------------------------------------------
|
||||
--# Stock Icons from Theme
|
||||
-----------------------------------------------------------------
|
||||
|
||||
include GtkEngine.e
|
||||
|
||||
constant docs = `<b><u>Stock Icons</u></b>
|
||||
|
||||
Change window manager icon themes
|
||||
to see different icon styles.
|
||||
`
|
||||
constant win = create(GtkWindow,"border_width=10,keep_above=TRUE,position=1,$destroy=Quit")
|
||||
|
||||
constant panel = create(GtkGrid,"row_spacing=10,column_homogeneous=TRUE")
|
||||
add(win,panel)
|
||||
|
||||
enum IMG, CAP
|
||||
constant content = {
|
||||
{"drive-harddisk","Hard disk"},
|
||||
{"dialog-information","Gtk Info"},
|
||||
{"document-save","Gtk Document Save"}
|
||||
}
|
||||
|
||||
for i = 1 to length(content) do
|
||||
set(panel,"attach",create(GtkImage,content[i][IMG],5),0,i,1,1)
|
||||
set(panel,"attach",create(GtkLabel,content[i][CAP]),1,i,1,1)
|
||||
end for
|
||||
|
||||
constant sep = create(GtkSeparator)
|
||||
set(panel,"attach",sep,0,4,2,1)
|
||||
|
||||
constant lbl = create(GtkLabel)
|
||||
set(lbl,"markup",docs)
|
||||
set(panel,"attach",lbl,0,5,2,1)
|
||||
|
||||
show_all(win)
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user