I'm after some advice about writting GUIs in C. To date I have only
ever written programs for command line, where I would really like to
give GUIs a shot now. C is the programming language I am most
confident at.
Would something like GTK+ do the job? And are there any good
recommended books I can buy for beginners to GUIs in C, embedded linux
that will crosscompile for ARM? I know nothing about GUI programming
and how it works so I'm looking for something from the start.
I've bought a book from Amazon called 'GTK+ Programming in C' but it's
all about Java and Jython. I don't quite understand why the book is
titled '... Programming in C' when the introduction states the book is
about Java with the use of Jython.
Yes. In most cases. I am not an expert, even I am starting to code in
Linux. I have chosen GTK+ as the GUI.
And are there any good
recommended books I can buy for beginners to GUIs in C, embedded linux
that will crosscompile for ARM? I know nothing about GUI programming
and how it works so I'm looking for something from the start.
Personally I use wxwidgets (which has C++ bindings, but no C bindings
if I recall correctly) see. www.wxwidgets.org
If you want to have a web based interface you can also go for Wt: See http://www.webtoolkit.eu/wt
Looks first at the GUI's lib available for beagle board.
As ubuntu and debian has runned on these platform (with gnome env) you
should check that GTK env is available.
wxwidgets is also good but in C++, and may be slower. And it's a
heavy complete framewaork (so I think hard to compile and debug for
beagleboard)
There is also fltk designed for embedded devices : http://www.fltk.org/
I used it on a old ARMv7 300MHz
I have found fox toolkit that is said to be light. I never used it. http://www.fox-toolkit.org/
Tell us about your results
Looks first at the GUI's lib available for beagle board.
As ubuntu and debian has runned on these platform (with gnome env) you
should check that GTK env is available.
wxwidgets is also good but in C++, and may be slower. And it's a
heavy complete framewaork (so I think hard to compile and debug for
beagleboard)
wxwidgets is already available in openembedded. I'm unaware of
robustness tests, so can't comment on the quality though (although
there are some packages that use it.
Rob, the Beableboard running Linux isn't much different than any other
Linux when it comes to general GUI programming. So most anything
you do on the desktop will apply to the Beagleboard/Angstrom system.
That means you can play around with things on the desktop, decide what
feels right to you and then learn there before moving it to the
Beagleboard.
Just check the Angstrom packaging system for the things you look at
on the desktop to make sure all the pieces are already there.
For instance, you know C so you shouldn't have any problem with any of
the
scripting languages such as Python. There Qt, Gtk+, and Wx based GUi
packages for the python language. The scripting languages eliminate
the compile/build process of app development and sometimes the runtime
overhead is minimal.
If you really need lean and mean then going with C and something like
fltk
is there. There is no one best choice for GUI development, it's all
about
what you want to do and what your hardware can support. With Angstrom
on the Beagleboard on an SD card, there's little the hardware can't do
so mess around on the Linux desktop and see what floats your boat.
Personally I do my GTK gui layout using Glade and save them as a
libglade xml file for my C programs to load. It is a very practical
gui development environment. If you have to tweak anything not
handled by glade it can be done in xml. I design industrial embedded
touch screen control interfaces, I don't use a window manager although
if you do you can set gtk windows to not be decorated by the WM. The
devhelp program has great documentation for the intricacies of GTK.
If you are designing for a small screen like 320x240, GTK may not be
the best choice.
Personally I do my GTK gui layout using Glade and save them as a
libglade xml file for my C programs to load. It is a very practical
gui development environment. If you have to tweak anything not
handled by glade it can be done in xml. I design industrial embedded
for GTK and Glade take a look at Anjuta. It works as a quite complete IDE with
good Glade integration and if you install additional plugins its even able to
work as a cross development platform pretty well.