Redo main board window with generic popup
Some of the improvements in GenericPopUp (committed earlier) were added
especiall for this (menu and box Option types), and the commits that used
them to make a fully functional board, listed below, were collapsed into
this one.
This uses the new box and menu features of the Generic popup.
Make option table shadow board consistent with refactor
Do main menus in shadow board
The board made by GenericPopUp now also has (functional) menus. The Expose
callback now also uses the new format (passing coordinates).
Use BoxEnd callback to decide about smallLayout
The shadow board now dynamically decides whether it should use smallLayout
positioning of the title-in-window widget, using a callback in the BoxEnd
option for the menu bar: If no reasonable amount of space is left behind
the menu bar, the title is forced under the clocks (smallLayout).
Do some mouse handling on shadow board
Only button 1 events for now. We have to keep track if the button is down!
Connect button 3 to shadow board
For now only for piece and PV manipulation: no context menus yet
Symbolic reference in option formatting
choice <-> textValue xboard.c
Improve expose callback shadow board
Implement context menus of shadow board
This uses the new generic PopUp option
TopLevel xboard.c
Make mock-up board available through menu item
Make clocks of shadow board sensitive to clicking
Make button bar of shadow board operational
The back-end Event functions are specified as user callbacks directly;
this is not very clean, as they are parameterless, but called with an int
argument. This should have no bad consequences, though.
Switch to using shadow board as main board
The menu marking and enabling had to b switched off for this, as it
only worked on the old menus. Remove HandleUserMove.
Deleting of unused shell variables, clocks to dialogs.c
Move BoardPopUp to dialogs.c
This required passing on fome front-end vars as parameters, and returning
apointer to the option list, to make the handles available in xboard.c.
Simplify InitDrawingSizes
Now that all widgets of the main window are properly chained, there is
no need to resize them when the board format changes: setting a new width
for the shell suffices.
Cleanup some unused Xt Args