This page is about Xaw client
First, small part of doc/HACKING: (written so long ago, I think)
Client GUI - Athena
One client GUI is written using athena-widgets. A few comments on this could prove useful for anyone wishing to write new dialogs or improve on the current ones.
When you create new widgets for a dialog, like:
players_form = XtVaCreateManagedWidget("playersform", formWidgetClass, players_dialog_shell, NULL);
then put the widget properties in the app-default file 'Freeciv', instead of hardcoding them. For the widget created above, the following entries in the app-default file applies:
*playersform.background: lightblue *playersform.resizable: true *playersform.top: chainTop *playersform.bottom: chainBottom *playersform.left: chainLeft *playersform.right: chainRight
Pixcomm and Canvas:
The Pixcomm is a subclassed Command-widget, which can displays a Pixmap instead of a string, on top of a button(command). The Pixcomm widget should be used all places where this kind of high-level functionality is required.
The Canvas widget is more low-level. One have to write an expose(redraw) event-handler for each widget. The widget generates events on resize and mousebuttons.
[Reading any Xt documentation, will tell you how powerful widget
subclassing is. So I went trough great troubles subclassing the
command widget. It was not before long I got mails from unhappy Xaw3d
(and derives) users, that the client keeps crashing on them. Turns
out that subclassing from any widgets but Core, chains the new
widgets to libXaw. In hindsight I should just subclassed the Canvas
widget and add more highlevel functionality. -PU]
Two things I (evyscr) am trying to do now:
- 1. Understand the Xaw client code
- 2. Make some standards (like common dialog model)
And, of course, there should be main goal: to make Xaw client better.