Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits. Anti-spam check. Do not fill this in!=== This page is about Xaw client === ---- First, small part of doc/HACKING: (written so long ago, I think)<br /> <div style="background:#e0eff0;"> <nowiki>=========================================================================</nowiki><br /> Client GUI - Athena<br /> <nowiki>=========================================================================</nowiki><br /> 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. Widgets: ---- When you create new widgets for a dialog, like: <pre> players_form = XtVaCreateManagedWidget("playersform", formWidgetClass, players_dialog_shell, NULL); </pre> 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: <pre> *playersform.background: lightblue *playersform.resizable: true *playersform.top: chainTop *playersform.bottom: chainBottom *playersform.left: chainLeft *playersform.right: chainRight </pre> 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]<br /> <nowiki>=========================================================================</nowiki><br /> </div> Some notes: 1. app-default 'Freeciv' file contains lines like <pre> Freeciv*playersform.background: White </pre> 2. Since Vasco wrote multibyte charset support for Xaw client, it is interesting, can we use an entry <pre> Freeciv*playersformlabel.font: .... </pre> and what we have to write here? (Before, it was 'Freeciv*playersformlabel.font: 6x13') Two things I (evyscr) am trying to do now: <ul> <li>1. Understand the Xaw client code</li> <li>2. Make some standards (like common dialog model)</li> </ul> And, of course, there should be main goal: to make Xaw client better. Summary: Please note that all contributions to the Freeciv are considered to be released under the CC-BY-SA Cancel Editing help (opens in new window) Retrieved from "https://freeciv.fandom.com/wiki/XAW"