---------------------------------------------------------------------------------------
--# EuGTK Info
-- Displays a lot of data gathered by EuGTK about the platform.
-- Don't be concerned that this looks complex. Go on to test1, etc.
-- to see how easy EuGTK can be!
---------------------------------------------------------------------------------------
include GtkEngine.e
get_net_address() -- check current address;
-- don't call this unless you're needing it!
----------------------------------------------------
-- Interface:
-- This uses std/format to allow [{named}]
-- parameters. This makes it easy to move things
-- around, add or delete items. Labels use markup
-- to style the text.
----------------------------------------------------
constant fmt1 = -- stuff for left side;
`EuGTK
Version: [{version}]
Date: [{release}]
[{copyright}]
GTK
Lib version: [{major}].[{minor}].[{micro}]
Euphoria
Version: [{eu_version}]
Revision: [{eu_revision}]
Platform: [{eu_platform}]
Bits: [{eu_arch_bits}]
Date: [{eu_date}]
Platform
OS: [{os_name}]
Distro: [{os_distro}]
Version: [{os_vers}]
Architecture [{os_arch}]`
constant fmt2 = -- stuff for right side;
`
User
User name: [{user_name}]
Full name: [{real_name}]
Home Dir: [{home_dir}]
Terminal: [{os_term}]
Shell: [{os_shell}]
Language: [{def_lang}]
Application
App name: [{app_name}]
Prog name: [{prg_name}]
Process ID: [{os_pid}]
Curr Dir: [{curr_dir}]
Temp Dir: [{temp_dir}]
Data Dir: [{data_dir}]
Config Dir: [{conf_dir}]
`
constant fmt3 = -- for the bottom;
`
Other
Host Name: [{host_name}]
Host Addr: [{host_addr}]
Today: [{today}]
Start Time: [{start_time}]
Runtime Dir: [{runt_dir}]
`
-------------------------------------------------------------------------
-- Main Window
-------------------------------------------------------------------------
constant win = create(GtkWindow,"size=250x-1,border=10,position=1,$destroy=Quit")
constant grid = create(GtkGrid,"column_spacing=10")
add(win,grid)
constant img = create(GtkImage,"thumbnails/eugtk.png")
set(grid,"attach",img,1,1,2,1)
constant lbl_left = create(GtkLabel)
set(lbl_left,"markup",format(fmt1,info))
set(grid,"attach",lbl_left,1,2,1,1)
constant lbl_right = create(GtkLabel)
set(lbl_right,"markup",format(fmt2,info))
set(grid,"attach",lbl_right,2,2,1,1)
constant lbl_bot = create(GtkLabel)
set(lbl_bot,"markup",format(fmt3,info))
set(grid,"attach",lbl_bot,1,3,2,1)
constant box = create(GtkButtonBox),
btn = create(GtkButton,"gtk-close","Quit")
add(box,btn)
set(grid,"attach",box,1,4,2,1)
show_all(win)
ifdef IAB then set(win,"interactive debugging",1) end ifdef
main()