octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Yet another GUI Builder for Octave


From: marcalexandre
Subject: Yet another GUI Builder for Octave
Date: Wed, 13 Jul 2016 07:54:06 -0700 (PDT)

Hi all,

I really like Octave but I think it is short of one thing that seems to me
very important, a GUI Builder like GUIDE for Matlab.
Of course it is possible to manually code the script to generate the GUI but
it is going to be very tedious when the GUI has many elements.

I've got an idea to automatically generate that script, and I have
successfully implemented it.

The idea is, in a first approach, to use a generic GUI Builder, Glade, and
parse the glade file to generate the equivalent m-file, in the same way like
GUIDE.
The parsing of the glade file consists in extracting all the widgets used
and their properties (Style, Tag, Position, Callbacks, etc.) and make a
correspondence with the different GUI objects already available in Octave
(uicontrol, uipanel, axes, etc.). For example :
- Glade : GtkButton / Octave : uicontrol('Style', 'pushbutton')
- Glade : GtkEntry / Octave : uicontrol('Style', 'edit')
- Glade : GtkLabel / Octave : uicontrol('Style', 'text')
- Glade : GtkDrawingArea / Octave : axes(...)

For the callbacks, there are also similarities between available Octave
Callbacks and Glade Callbacks.

I have already successfully convert some simple glade files to m-files. Then
you just have to code the callback functions. You can find below,
screenshots representing the GUI in Glade and its automatically-generated
equivalent Octave GUI as well as the generated code (test3.m for writing
callbacks and test3_gui.m for GUI creation).

What do you think about that ? Is there already something similar ? Is
someone interested in ? I will be happy to share the code and ideas if
needed.

test3.m <http://octave.1599824.n4.nabble.com/file/n4678450/test3.m>  
test3_gui.m <http://octave.1599824.n4.nabble.com/file/n4678450/test3_gui.m>  
Glade_GUI.png
<http://octave.1599824.n4.nabble.com/file/n4678450/Glade_GUI.png>  
Octave_GUI.png
<http://octave.1599824.n4.nabble.com/file/n4678450/Octave_GUI.png>  



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Yet-another-GUI-Builder-for-Octave-tp4678450.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]