Developing a simple GUI in Beagleboard

Hi,

I would like to develop and run a simple GUI based application on
Beagleboard,
using either C or C++. But I am not sure, what could be the best
feasible solution
for GUI development on BB.

I thought of options like GTK+ and QT. But I am not sure if these
packages are
available on BB. If not what could be other possible solution for GUI
development
or how to get those packages on BB.

If someone has got a GUI working on BB, it would be great it you can
post
a small tutorial on that.

Hi,

I would like to develop and run a simple GUI based application on
Beagleboard,
using either C or C++. But I am not sure, what could be the best
feasible solution
for GUI development on BB.

I thought of options like GTK+ and QT. But I am not sure if these
packages are
available on BB. If not what could be other possible solution for GUI
development
or how to get those packages on BB.

WxWidgets is a different widget set with a nice dialog editor (DialogBlocks).
See www.wxwidgets.org and www.dialogblocks.com
Wt is a web based solution. (webtoolkit.eu)
Both have recipes in OE.
I have no tutorial for either. One way to develop is install
build-essential and develop on the board.
You should then be able to follow the tutorisals that exist for those pacakges.

Frans

Excerpts from amit's message of Mon Jan 25 14:48:11 -0500 2010:

Hi,

I would like to develop and run a simple GUI based application on
Beagleboard, using either C or C++. But I am not sure, what could be
the best feasible solution for GUI development on BB.

I'm not a huge fan of C nor C++ for GUI work. You might want something a
little lighter. Just a thought though.

I thought of options like GTK+ and QT. But I am not sure if these
packages are available on BB. If not what could be other possible
solution for GUI development or how to get those packages on BB.

I am pretty much certain that GTK+ is available in OE. GTK also has an
excellent GUI designer, glade. There is no shortage of documentation
describing how to get started.

Cheers,

- Ben

Not to start a flame fest here, but saying that you don't like C/C++ and then
recommend GTK which is best used with C is a little bit strange. Python & co
which also work with GTK can't be said to be "light" either.

I would recommend C++ and Qt though. :slight_smile:

> Excerpts from amit's message of Mon Jan 25 14:48:11 -0500 2010:
> > Hi,

> > I would like to develop and run a simple GUI based application on
> > Beagleboard, using either C or C++. But I am not sure, what could be
> > the best feasible solution for GUI development on BB.

> I'm not a huge fan of C nor C++ for GUI work. You might want something a
> little lighter. Just a thought though.

> > I thought of options like GTK+ and QT. But I am not sure if these
> > packages are available on BB. If not what could be other possible
> > solution for GUI development or how to get those packages on BB.

> I am pretty much certain that GTK+ is available in OE. GTK also has an
> excellent GUI designer, glade. There is no shortage of documentation
> describing how to get started.

Not to start a flame fest here, but saying that you don't like C/C++ and then
recommend GTK which is best used with C is a little bit strange. Python & co
which also work with GTK can't be said to be "light" either.

I would recommend C++ and Qt though. :slight_smile:

If you do choose Qt, I know there are several others doing it. See
http://labs.trolltech.com/blogs/2009/11/20/building-qt-to-make-use-of-the-beagle-boards-sgx-gpu/.

The ICS guys have a note about Qt training at Resources - BeagleBoard.

GTK works very well on BeagleBoard. Geany is a very good
editor, compile and execute manager IDE. Been there, Done that.
:slight_smile:

Don Lewis

Excerpts from Jan Ekholm's message of Tue Jan 26 02:51:26 -0500 2010:

Not to start a flame fest here, but saying that you don't like C/C++ and then
recommend GTK which is best used with C is a little bit strange. Python & co
which also work with GTK can't be said to be "light" either.

Fair enough. Although to say that GTK is best used with C is also a
little strange; one of the primary reason GTK & co are written in C is
to create a least-common-denominator so that bindings can be easily
written. I find GTK all but unusable in its native form.

I would recommend C++ and Qt though. :slight_smile:

Another excellent choice.

- Ben

If you want GTK + C++, you can look into gtkmm - it’s C++ bindings for GTK. Not everything is there so you might have to delve into the C API a little, but what I used was sufficient. You can also look into cairomm and pangomm.

If you’re ambitious - look into OpenVG :slight_smile: You will probably get some HW Acceleration out of it.

Neel

I have a rather more high-level suggestion.

I'm working on a Beagleboard platform used in a set of manufacturing
test fixtures, complete with GTK graphic UI, and a bank of I2C port
expanders, and ADCs.

I found the neatest, fastest way to develop the GUI was to use Glade 3
on my host machine. This produces an XML file that can be used on the
target. http://glade.gnome.org/

The bindings are all handled by a Python script, using the PYGTK
module. This is available via the package manager within Angstrom.

All of this allows you to make rapid tweaks to the GUI's appearance on
your host machine, and then you copy the glade (XML) file over to the
target. This makes it very easy to re-skin your application, without
touching the Python back-end. Also, because Python is a scripting
language you can obviously make changes on the fly, without
recompiling anything.

If you need to do something low-level, then you can write your own C
modules that plug into Python.

Hope this helps.

I strongly concur with timmins: I have had great success with PyGTK
and Glade. Though
it was primarily on Windows, I regularly tested my application on
Linux (OS X was never well
supported).

Also note that Glade/GTK/PyGTK has been moving over from using the
'external' libglade to the built-in
GtkBuilder. They are similar APIs, but the GtkBuilder is the path
forward. I would try to focus on that one.
It is well supported in recent builds of the Glade GUI builder.

I have also used the PyQt bindings using the dynamic loading of .ui
files that are created with QtDesigner. This
solution is currently much better solution for cross-platform
applications. Also keep an eye on PySide - the open
source Python Qt bindings from Nokia.

Later,
Tyler

Neel Goyal schrieb:

If you want GTK + C++, you can look into gtkmm - it's C++ bindings for
GTK. Not everything is there so you might have to delve into the C API
a little, but what I used was sufficient. You can also look into
cairomm and pangomm.
If you're ambitious - look into OpenVG :slight_smile: You will probably get some HW
Acceleration out of it.

How about using python/wxpython on beagleboard?

Regards

Wow you guys are trying to make things complicated. This is what the
original query was:

"I would like to develop and run a simple GUI based application on
Beagleboard, using either C or C++."

If you want to use C, using gtk+ is the clear choice. It's really
quite easy to use - very mature and stable and very well documented
with lots of examples and a huge community - any of the linux examples
or tutorials will work. Using it from C is the lightest weight
option, if that is a deciding factor (but really the machine is beefy
enough it shouldn't matter). If you're using any linux based system
(angstrom, etc), it will be available as many applications use it.
There's no reason to mess with wxwidgets or python or anything like
that.

If you want to use C++, then qt is also an option I guess (you can
also use gtkmm or the gtk+ c api from C++). It should probably also
be available - and it is easy to check yourself.

"One way to develop is install build-essential and develop on the
board. "

This would be the easiest route if you already have a system running -
the prebuilt images already come with the compilers at least. The
board is more than capable of running a compiler and editor for C
development natively - it is faster and has more memory than any
machine i had on my desk until about 2000, and I certainly didn't have
trouble developing C applications before then. But there's always the
cross-compile route if you desire.

I would just use gtk+ on the board itself. But then again I'm a C/
Unix programmer so I would say that.

Thanks all for your tips and suggestions. It was really useful.
As of now I have decided to work with GTK+ using glade.
I went through some tutorials and was able to get GUI
working on host pc. But has some problems when trying to
build it on BB.
Is GTK+/-2.0 libraries available on BB. When I tried to compile the
program on BB it says not gtk.h library not available.

Can anyone guide me on this. A small example may be very useful.

Once again thanks to everyone for your response.

hi
gtk and glade work well on beagle board. I have tested them. Using clutter toolkit is another gud solution. There are plenty of online tutorials regarding this
Priyanka

Are you using Ubuntu distribution or some other with Glade and GTK+ ?

Are you using Ubuntu distribution or some other with Glade and GTK+ ?

Hi,
I haven tested both and GTK and Clutter successfully with beagle board
and Ubuntu.IF you are looking for animations and etc. Clutter is the
right choice which is based on C.

I am using Angstrom distribution. I build an application using (Gtk+
and Glade) on my host PC.
Now I am trying to compile this application on BB and having some
problems with library files.
It says gtk-2.0/gtk/gtk.h and other libraries are missing.

Now, doing
#opkg install gtk+
says me that this package is already installed on my board. I am not
sure what the issue is.

Has anyone successfully build an GTK+ application on BB (preferably
using Glade).
Can you tell me what all library files are required for Angstrom
distribution and how to
get them or install them on BB.

Thanks,

I am using Angstrom distribution. I build an application using (Gtk+
and Glade) on my host PC.
Now I am trying to compile this application on BB and having some
problems with library files.
It says gtk-2.0/gtk/gtk.h and other libraries are missing.

Now, doing
#opkg install gtk+
says me that this package is already installed on my board. I am not
sure what the issue is.

Just check whether the Include path is proper, sometimes it got
installed at usr/local/..In this case either u have to set the config
path while compiling or copy the header files to usr/include ...

gtk+ is likely just binaries. Try installing gtk+-dev.

Hi,

Thanks all for your suggestions. I figured out how to get glade going
on BB.
Are there any good tutorials or books available for glade gtk
development.

- Amit