Kiosk GUI Screens

Now that I have some luck in getting touchscreen working I have a programming question.
Currently I have kiosk with video running in loop.
I want to expand to kiosk with input. Lets say address entry for a mailing list.

So I need GUI forms. I could go with some simple X application like motif or athena for basic buttons.
Option 2 is web form. Use the browser as a front end.

What do you think? I have no idea how to do either but I am willing to learn.
Front end for postgreSQL. Html or tcl/tk?
 
tcl/tk rules
super fast to develop, portable win/nix/mac, no dependency bs, extremly light compared with anything else
speed is not great but for UI to DB rocks
 
Yea I been here before. wxWidgets, Glade, QTbuilder, Anjuta....

Now all the talk recently by sidetone about Athena and I was researching motif.

I started playing with this tool. I want basic low level GUI.

x11-toolkits/xforms and its IDE fdesign.

I don't know about an html approach... Still skirting.
Your UI project is crying for HTML - I hear it so loudly, that it hurts.

You would run a web server on localhost and some sort of backend which processes the user’s input and updates the presentation. You need some sort of CGI or PHP for this. You can write CGI’s in most common languages, and you would simply choose the one which you are most comfortable with.

Nowadays I do CGI’ing in C, however, decades ago I used even Pascal for this. In case you got no language preferences, I suggest to do it in PHP. If you stay on the narrow road with PHP (don’t use fancy extensions), then nothing worse can happen than with any other language as well.
 
Ha how silly. I thought xforms was a basic programming tool for X.. The 'x' here is for xml or xhtml.
I need to checkout Xm now. I want to explore the lowest level even if ugly. I guess no IDE for Motif?
What was "Application Builder"? Only on CDE?

That you all for the suggestions. I am disappointed that nearly 2 years after a similar post I am still ignorant.
I bought 4 or 5 books on TCL/TK. I could really use a professional tutor.
I do enjoy several tk applications including TKdiff, TkDVD and ClamTk.

FLTK is nice and light. How does it handle runtime executables? Can I embedded all needed files for portable app?

As for a web application I really appreciate the pointers. I was grasping with the concept.
I haven't tackled CGI or PHP yet.
 
Use motif, it's the industry standard:
Code:
% pkg search open-motif
open-motif-2.3.8_2             Motif X11 Toolkit (industry standard GUI (IEEE 1295))
 
That is my starting point. Hello_World on open motif.

I don't understand why the paths are wrong for libs and include.
Nevertheless I have a start.
I wanted to use base complier instead of gcc
cc -x c -Wall -DLITTLE_ENDIAN -DINT_64 -O2 -I/usr/local/include -L/usr/local/lib -lm -lMrm -lXm -lXpm -lXext -lXt -lSM -lICE -lX11 hello-motif.c -o hello-motif
 
Nowadays I do CGI’ing in C, however, decades ago I used even Pascal for this. In case you got no language preferences, I suggest to do it in PHP. If you stay on the narrow road with PHP (don’t use fancy extensions), then nothing worse can happen than with any other language as well.

Remember to properly prepare your SQL statements in order to prevent SQL injections.

Always done it in C.

SQL, PHP. No, you don't need two towering inverted pyramids of third party overkillware.
 
I wanted to use base complier instead of gcc
Code:
$ doas pkg install fltk                                             
Updating FreeBSD repository catalogue...
...
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    fftw3-float: 3.3.10 [FreeBSD]
    fltk: 1.3.8 [FreeBSD]
Number of packages to be installed: 2

The process will require 11 MiB more space.
2 MiB to be downloaded.

Proceed with this action? [y/N]: y
...
$ cat <<EOF >hello.cxx
> #include <FL/Fl.H>
> #include <FL/Fl_Window.H>
> #include <FL/Fl_Box.H>
> 
> int main(int argc, char **argv) {
>   Fl_Window *window = new Fl_Window(340,180);
>   Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!");
>   box->box(FL_UP_BOX);
>   box->labelfont(FL_BOLD+FL_ITALIC);
>   box->labelsize(36);
>   box->labeltype(FL_SHADOW_LABEL);
>   window->end();
>   window->show(argc, argv);
>   return Fl::run();
> }
> EOF
$ c++ `fltk-config --cxxflags --ldflags` hello.cxx
$ ./a.out

Even simpler, and shows the full compiler invocation:
Code:
$ fltk-config --compile hello.cxx                                                                                               
c++ -I/usr/local/include -I/usr/local/include -D_THREAD_SAFE -pthread -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fvisibility-inlines-hidden -I/usr/local/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -o 'hello' 'hello.cxx' -fstack-protector-strong -L/usr/local/lib -lm /usr/local/lib/libfltk.a -lXrender -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -lm -L/usr/local/lib -lX11
$ ./hello

Edit: hello.cxx is from here https://www.fltk.org/doc-1.3/basics.html
 
Use motif, it's the industry standard:
Code:
% pkg search open-motif
open-motif-2.3.8_2             Motif X11 Toolkit (industry standard GUI (IEEE 1295))
That description is obsolete. IEEE 1295 for Modular Toolkit Environment (MTE) was an industry standard on top of X Toolkit Intrinsics (Xt) from 1993 until 2000 that Motif used. (https://ieeexplore.ieee.org/document/7362077)

From looking at x11-toolkits/open-motif, there was an attempted name change to Motif in 2012, but that broke dependencies, so it was reverted back. The file source location was changed from Integrated Computer Solution's (ICS's) page to Sourceforge. Before the date this happened, there's no details of Makefile changes except for summaries. This is the same year that the Hungry Programmers used the clone LessTif to convince ICS to change Motif's license to LGPL. (http://lesstif.sourceforge.net/)

Open Group also contained a sourcecode copy of ICS's Motif called Open Motif, which has been around since 2000. (http://www.opengroup.org/openmotif/faq.html) This part is unclear to me, as my theory is that ICS had a license (perhaps IBM Public License or an Open Group License) for Motif that allowed this since 2000, while at the same time wasn't LGPL. This part needs clarification or confirmation. Open Motif was also restricted for use only on open source operating systems.

LessTif is obsolete. OpenGroup's Open-Motif isn't or is no longer relevant to FreeBSD's ports, except perhaps for clarifications or historical purposes.
 
We did everything in C for nearly 20 years. When people started questioning our sanity versus questioning our performance, I knew it was time to get out. Now I question their sanity as their budgets have more than tripled.
Well, I switched from Pascal-CGI to C-CGI 18 years ago - better late than never :-D
 
I am the guy running the drill-bit backwards for years. I don't even know if a tutor would help.
Looking back this is my third post on gui programming. I do want to learn it. Just not sure what it is.
I want something so simple I can read the code but need a IDE to give me a push.
 
From what I understand it's the programming language of C, C++ or another language, plus a library such as a GUI toolkit.
 
Yes I hope to learn it one day.
I see I was wrong about xforms. There is an xhtml/xml tool with the same name.
What I am crying out for is a Microsoft Access VBA toolkit on FreeBSD for postgresql.
Form would have been designed and query created. Drop boxes, Combo Lists and fireworks.....
My mind is resisting this new training.
 
Any suggestions on computer classes for C ?
For GUI, as much as it pains me to say, C++ does provide more options. For C you have Motif (which is fantastic albeit old) and Gtk (which is typical GNU ever mutating crap).

For Motif, this book is great: https://www.amazon.co.uk/Motif-Programming-Essentials-More-Technologies/dp/1555580890

The author (who also started the "How Things Work" website) makes it quite a fun experience as you cover the library. The style encourages you to have a play and tinker with the UI elements as you go.

With C++, I mainly go for FLTK because it is simple and has barely any dependencies (wxWidgets is a close second!). It is also consistent which is important. Qt has a few potential lifespan issues here, considering non-standard C++ extensions via MOC.

But they are all basically similar enough that your skills transfer across. So I would recommend sitting down with one (might as well be FLTK ;)) and set yourself a small challenge project to start with. Perhaps a clone of Microsoft Notepad or an app launcher.
 
Any suggestions on computer classes for C ?
K&R. Yes, seriously. Read the very first "Hello, World!" program in the book in which it was introduced.

From its preface:
This book is meant to help the reader learn how to program in C. It con-
tains a tutorial introduction to get new users started as soon as possible,
separate chapters on each major feature, and a reference manual. Most of the
treatment is based on reading, writing and revising examples, rather than on
mere statements of rules. For the most part, the examples are complete, real
programs, rather than isolated fragments. All examples have been tested
directly from the text, which is in machine-readable form. Besides showing how
to make effective use of the language, we have also tried where possible to illus-
trate useful algorithms and principles of good style and sound design.
The book is not an introductory programming manual; it assumes some fam-
iliarity with basic programming concepts like variables, assignment statements,
loops, and functions. Nonetheless, a novice programmer should be able to read
along and pick up the language, although access to a more knowledgeable col-
league will help.
 
If you're just trying to create a simple UI over a looping video, you might also consider immediate mode GUI rendering, originally intended for game development.

Libraries that follow this paradigm, like Nuklear and Dear ImGui, sit on top of OpenGL and allow you to keep the creation of the GUI element and event handling together, so your code looks like this:

Code:
ImGui::Text("Do you really want to quit?");
if(ImGui::Button("Yes"))
   ExitProgram();
if(ImGui::Button("No"))
   CloseThisWindow();
 
First I have read of glut(3) So that was an SGI thing?
These days freeglut is the most maintained option. I quite like it; it opens a window, creates an OpenGL rendering context and nothing more. Its simplicity does improve its portability and reduce dependencies.

SDL (1 and 2) are also quite good. With OpenGL you end up using very little of the SDL API anyway.
 
Back
Top