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.
However, 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>
Create a Euphoria program to load and run the .xml you just created:
include GtkEngine.e
add(builder,"~/demos/examples/glade/test1.glade") -- make sure this points to the actual name and location of the glade file you just created
main()
Save this as test1.ex, perhaps.
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
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:
Now your File menu Quit option will, erm... quit.
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).
---------------------------------------------------------------------
-- Undeclared function in /home/irv/demos/examples/glade/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:
-----------------------------------------------------------------------
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.