LibGlade port released:Octave-LibGlade
Muthiah Annamalai <[email protected]> Mon, 21 Feb 2005 05:32:31 +0530
| Newsgroups | gmane.comp.gnu.octave.graphics |
|---|---|
| Message-ID | <[email protected]> |
Hello Folks!
Im happy to announce the first port of Octave-GTK that supports libGlade now.
[Significance]:
With this you can just write your GTK programs, by just writing simple
event handlers. The actual GUI itself is created by the libGlade using
GLADE UI description [.glade] files. Now we can use the same idea to make
application development faster: RAD.
[Development Flow]:
Use Glade UI Editor to design the GUI.
Use libGlade to write event handlers.
Use Octave to write application logic.
Write a killer application! ;-)
[Downloads]:
You can get the package from:
https://sourceforge.net/project/showfiles.php?group_id=114848&package_id=124396&release_id=307008
http://sourceforge.net/projects/octave-gtk/
[Examples]:
There is a simple calculator application using Octave-libGlade & Octave-Glade,
along with the source code.
[For Impaitent]:
Sample code:
#! /usr/bin/octave -q
% * This program is free software.
% * This code is a part of Octave-GTK
% * Code may be used or distributed under GPL.
% * (C) Feb 2005 Muthiah Annamalai, Octave-GTK & Octave-libGlade
xml=""
disp('Ohms law example with octave-libglade')
function calculate_cb()
global xml
disp('Hello World')
i=glade_xml_get_widget(xml,"current")
r=glade_xml_get_widget(xml,"resistance")
v=glade_xml_get_widget(xml,"voltage")
amp=str2num(gtk_entry_get_text(i))
ohm=str2num(gtk_entry_get_text(r))
gtk_entry_set_text(v,num2str(amp*ohm))
end
function main()
global xml
gtk()
glade()
gtk_init()
xml=glade_xml_new("ohms.glade","window1","");
win1=glade_xml_get_widget(xml,"window1");
glade_xml_signal_autoconnect(xml);
gtk_widget_show_all(win1);
gtk_main()
end
main()
-----------------------------------------------------------
As usual Id like to hear from you the idea's and problems that you may face
during the installation or, use of the Octave-GTK/Octave-libGlade packages.
Thanks again.
Cheers
Muthu.
Lets Hack Octave-GTK
http://octave-gtk.sf.net
-------------------------------------------------
This mail sent through IMP(http://www.nitt.edu)