Close

X11 GUI Programming Research

A project log for GUI Programming for a Console Hacker

After 30 years of procedural language programming (i.e. console programming), time to look at event driven programming.

agpcooperagp.cooper 12/25/2018 at 01:571 Comment

Programming Directly in X11

Okay I tried out the X11 demo programs.

You certainly can write a procedure here if you need something special.

Played around with loading some file images to screen.

Yes they work but it is clear most people don't code GUIs down here!

XCB

Same here, was not much easier that X11.

Xlib

"Xlib" reminds me of GLUT (yeah I have done some coding here).

Pretty easy to use but then I realised that all those procedures for text input, text windows, radio buttons etc. are missing. I never realised what a "Widget" was, and now I know! So I need an add-on library for the Widgets.

Code:Blocks

Code:Blocks has some GUI options so I thought I would have a look at them. Okay, there is wxSmith (a graphical Widget designer), and there is GTK+ and GLFLW, and no doubt others. I use Code:Blocks for programming in C but have no idea how the rest of it works.

Time to have a bit of a look.

GTK+

It took quite a bit of work to compile my first demo program. I think the library was installed but the trick was to use the following options:

or

Depending on the library version you are using.

It did not give me a warm fuzzy feeling, looking back I think it was the "documentation".

No doubt there is a form designer but I did not find it.

GLFLW

Could not get it to compile, so I moved on.

Time for some research

I was wasting a lot of time now and not getting very far. The issue is that these libraries have steep learning curves and they not feel right for me (more power than what I need).

The Wikipedia for X11 did not help much, but on the Wikipedia for Xlib I found the basic "widget" libraries: 

So okay, I found Xlib and XCB, the client libraries.

Found GTK+, so my options are Qt, FLTK and XForms (ignoring Xaw, Motif and OpenLook for the time being).

A quick look at Qt said no for me (it is a monster) but I fell in love with XForms. Why, the easy to read and follow documentation, the (relatively readable code) and the simple form designer (fdesign).

So (for the time being) my GUI library will be XForms.

To compile an XForm GUI usually all you need is: "-lxforms" and occasionally "-lX11" (for low level functions).

AlanX

Discussions

Abigail Brisbane wrote 12/31/2019 at 14:16 point

Such research is very important for modern education. Students should develop science, not just study existing knowledge. I know that many students attend Edusson's article writing service. You can see it here https://edusson.co.uk/article-writing-servic. This is an excellent educational platform where students can gain the experience of professional writers and scholars.

  Are you sure? yes | no