LINUX Programming Tutorial


Unix Programming MAN Pages

The following tables give various examples of C++ programs for Linux and XWindows.
To save typing, you may want to download STRIPHTM.EXE (9Kb Zipped). Typing STRIPHTM L_P_WT01.HTML will copy the HTM file into L_P_WT01.CPP and will strip out all the HTM codes. It will also strip out the Include files, but those can easily be retyped.

Text based examples
Programming Example 1 Sample C Program (NOT XWindows) that displays the phrase "Hello, World!" 
XWindows TCL examples
TCL Example 1 TCL buttons for Programmers Tool. 
A brief introduction to TCL/TK - a TCL tutorial from the University of Leeds.
XWindows based examples (NOT using X Toolkit)
X Programming Example 1 Sample XWindows C Program that simply opens a window. 
XWindows based examples using X Toolkit (Simpler)
XT Example 1 Sample X Toolkit Intrinsics C Program that simply creates and opens a window. (only 4 lines !!!) - This provides a core for any XWindows program.
XT Example 2 Addition of Event Handler to allow mouse click to close or resize the main window. Also start to use a Makefile to build the program.
XT Example 3 Add a background color to the window.
XT Example 4 Create a second window called a Popup Window.
XT Example 5 Draw some boxes, lines, circles, arcs, and text
XT Example 6 Add a button widget.

Go here to get some simplified X Window and X Toolkit Intrinsics Documentation

Download TkDesk - an excellent Tcl application. Go to the TkDesk homepage and download.
Also - download the Install file for installation directions
TkDesk Homepage

Download TkMan (tkman-2.0.tar.Z) - a MAN Page viewer written in Tcl
** TkMan page

Download ATHENA widget set
Three-D Athena Widgets (Xaw3d)

  • Xt Creating Widgets