<chapter id="menubar">
  
<title>Main Window</title>

<section>
<title>Go Board</title>
<indexterm>
<primary>board</primary>
</indexterm>
<para>
Clicking on an empty field in the Go board plays a move there.
In setup mode, score mode or after certain analyze commands,
clicking on a field has a special meaning (see
<xref linkend="setupmode"/>, <xref linkend="score"/>, and
<xref linkend="analyze"/>).
</para>
<para>
If <guimenuitem>Show Cursor</guimenuitem> is enabled in the
<guimenu>Settings</guimenu> menu, then fields can be selected with
the keyboard by moving the cursor (the red square corners) with the cursor
keys to the target field and pressing <keycap>Enter</keycap>.
Holding <keycap>Shift</keycap> while pressing a cursor key moves the
cursor to the next handicap line in this direction or to the edge
of the board.
</para>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Info Panel</title>
<indexterm>
<primary>info panel</primary>
</indexterm>
<para>
The panel on the right side of the board shows information about the
current position, for example the last move and the variation number.
A text field exists for displaying and editing comment text for the current
position.
If you select text in the comment field, it will automatically parsed for
valid points, which will be marked on the board while the text is selected.
Selected text in the comment is also used as a default text for
<guimenuitem>Find in Comments</guimenuitem>.
</para>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>File Menu</title>
<variablelist>

<varlistentry>
<term><guimenuitem>Open</guimenuitem></term>
<listitem>
<para>
Open a game from a file in
<ulink url="http://www.red-bean.com/sgf/">SGF</ulink>
format.
<note>
<simpara>
Only a subset of the SGF definition is supported.
Most notably game collections and certain kind of setup positions are not
supported.
The current GTP standard does not define a setup command.
Setup stones are always translated to <command>play</command>
commands for the Go program, which is problematic, if the setup stones lead
to a Go position that contains blocks with no liberties.
Currently, no check for this situation is performed, even if it causes the
Go program to capture the blocks and therefore be out-of-sync with the game
tree.
Delete points are sent as <command>play empty</command> commands to
the Go program, which should respond with an error, because
<command>play empty</command> is not valid according to the GTP standard.
Unknown SGF properties are preserved, if the game is saved to a file again.
</simpara>
</note>
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Open Recent</guisubmenu></term>
<listitem>
<para>
Open a game from a list of recently used files.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Save</guimenuitem></term>
<listitem>
<para>
Save the current game to the associated filename.
If the game has no filename, this menu item acts like
<guimenuitem>Save As</guimenuitem>.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Save As</guimenuitem></term>
<listitem>
<para>
Save the current game to a file.
If the file name ending is <filename>sgf</filename>, the game is saved
in SGF format.
If the file name ending is <filename>tex</filename>, the game is exported
to <ulink url="http://www.latex-project.org/">LaTeX</ulink> using
<ulink url="http://www.ctan.org/tex-archive/graphics/pstricks/contrib/psgo/">
PSGO</ulink> style.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Export</guisubmenu> / <guimenuitem>SGF Position</guimenuitem></term>
<listitem>
<para>
Export the current position to a file in SGF format.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Export</guisubmenu> / <guimenuitem>LaTeX Main Variation</guimenuitem></term>
<listitem>
<para>
Export the main variation of the current game to a
<ulink url="http://www.latex-project.org/">LaTeX</ulink> file using
<ulink url="http://www.ctan.org/tex-archive/graphics/pstricks/contrib/psgo/">
PSGO</ulink> style.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Export</guisubmenu> / <guimenuitem>LaTeX Position</guimenuitem></term>
<listitem>
<para>
Export the current position to a
<ulink url="http://www.latex-project.org/">LaTeX</ulink> file using
<ulink url="http://www.ctan.org/tex-archive/graphics/pstricks/contrib/psgo/">
PSGO</ulink> style.
Some board markups are also exported
(string labels, marked and selected points).
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Export</guisubmenu> / <guimenuitem>Text Position</guimenuitem></term>
<listitem>
<para>
Export the current position to a text file.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Print</guimenuitem></term>
<listitem>
<para>
Print a screen shot of the current board position, including all markups from
analyze commands.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Attach Program</guimenuitem></term>
<listitem>
<para>
Attach a Go program to the current game at the current position.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Detach Program</guimenuitem></term>
<listitem>
<para>
Detach currently attached Go program from game and terminate
the Go program.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Quit</guimenuitem></term>
<listitem>
<para>
Quit GoGui.
</para>
</listitem>
</varlistentry>

</variablelist>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Game Menu</title>
<variablelist>

<varlistentry>
<term><guimenuitem>New Game</guimenuitem></term>
<listitem>
<para>
Start a new game.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Computer Color</guisubmenu></term>
<listitem>
<para>
Choose what side the Go program plays.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Play</guimenuitem></term>
<listitem>
<para>
Change the computer color to the color to move and make the computer
start playing.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Play Single Move</guimenuitem></term>
<listitem>
<para>
Make the computer play a move, but do not change the computer color.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Interrupt</guimenuitem></term>
<listitem>
<para>
Interrupt the command that is currently running.
This menu item is only active if a lengthy command (like move
generation) is running and if the Go program supports interrupting
(see <xref linkend="interrupt"/>).
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Clock</guimenuitem></term>
<listitem>
<para>
Halt or resume the clock.
If time settings were used, the remaining time for the players
is stored in the tree nodes and can be restored with the Restore
item.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Pass</guimenuitem></term>
<listitem>
<para>
Make a pass move.
</para>
</listitem>
</varlistentry>

<varlistentry id="cleanup">
<term><guimenuitem>Cleanup</guimenuitem></term>
<listitem>
<para>
Generate cleanup moves.
<indexterm>
<primary>Cleanup Moves</primary>
</indexterm>
Cleanup moves are moves played after the game has ended with two passes
in a row.
They should not pass before all dead stones are captured.
This item is only enabled, if the program supports the
<command>kgs-genmove_cleanup</command> or <command>genmove_cleanup</command>
command.
It will be automatically set after two pass moves have been played.
</para>
</listitem>
</varlistentry>

<varlistentry id="score">
<term><guimenuitem>Score</guimenuitem></term>
<listitem>
<para>
Score the current game.
A window will be opened containing score information.
First the Go program will be asked what stones are dead with the
<command>final_status_list dead</command> command.
Dead stones are marked with a cross-hair.
If the Go program does not support this command, or you don't agree with it,
you can change the status of stones by clicking on them.
You leave score mode by closing the score window.
</para>
</listitem>
</varlistentry>

</variablelist>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Edit Menu</title>
<variablelist>

<varlistentry>
<term><guimenuitem>Find in Comments</guimenuitem></term>
<listitem>
<para>
Find next game node containing a search pattern.
The search is case insensitive.
The pattern is a regular expression as used by the Java
<ulink url="http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html">java.util.regex.Pattern</ulink>
class, similar to Perl syntax.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Find Next</guimenuitem></term>
<listitem>
<para>
Find next game node containing the last entered search pattern.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Game Info</guimenuitem></term>
<listitem>
<para>
Edit the game information.
Changes to the komi and rules are transmitted to the Go program.
The only supported rules are "Chinese" and "Japanese".
The program is informed about the komi and the rules
with GTP commands, if supported (see <xref linkend="compatibility"/>).
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Size</guisubmenu></term>
<listitem>
<para>
Change the board size and start a new game.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Handicap</guisubmenu></term>
<listitem>
<para>
Set the number of handicap stones.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Make Main Variation</guimenuitem></term>
<listitem>
<para>
Make the current variation to the main variation.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Delete Side Variation</guimenuitem></term>
<listitem>
<para>
Delete all variations except for the main variation.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Keep Only Position</guimenuitem></term>
<listitem>
<para>
Delete all variations and create a new game tree with the current
position as setup stones.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Truncate</guimenuitem></term>
<listitem>
<para>
Truncate the current variation beginning at and including the current node.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Truncate Children</guimenuitem></term>
<listitem>
<para>
Truncate all children variations of the current node.
</para>
</listitem>
</varlistentry>

<varlistentry id="setupmode">
<term><guimenuitem>Setup Mode</guimenuitem></term>
<listitem>
<para>
Enter or leave setup mode.
In setup mode you can place or remove stones of the current color.
The current color can be changed with the <guimenuitem>Black</guimenuitem>
and <guimenuitem>White</guimenuitem> menu item from the
<guimenu>Setup</guimenu> menu.
It is also possible to place stones of the other than current color,
without switching the color, by pressing a modifier key while placing a stone
(Ctrl, Alt or Meta) or using the right mouse button.
<note>
<simpara>
Setting up a position is not reversible.
After leaving setup mode, you are in a new game starting with the current
position and the current color to move.
</simpara>
</note>
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Setup Black</guimenuitem></term>
<listitem>
<para>
Set the current color for setting up stones and the color to move
to Black.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Setup White</guimenuitem></term>
<listitem>
<para>
Set the current color for setting up stones and the color to move
to White.
</para>
</listitem>
</varlistentry>

</variablelist>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Go Menu</title>
<variablelist>

<varlistentry>
<term><guimenuitem>Beginning</guimenuitem></term>
<listitem>
<para>
Go to beginning of game.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Backward 10</guimenuitem></term>
<listitem>
<para>
Go backward 10 moves.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Backward</guimenuitem></term>
<listitem>
<para>
Go backward one move.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Forward</guimenuitem></term>
<listitem>
<para>
Go forward one move.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Forward 10</guimenuitem></term>
<listitem>
<para>
Go forward 10 moves.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>End</guimenuitem></term>
<listitem>
<para>
Go to end of the current variation.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Go to Move</guimenuitem></term>
<listitem>
<para>
Go to a certain move number in the current variation.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Next Variation</guimenuitem></term>
<listitem>
<para>
Go to the next variation.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Previous Variation</guimenuitem></term>
<listitem>
<para>
Go to the previous variation.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Next Earlier Variation</guimenuitem></term>
<listitem>
<para>
Go to the next variation earlier in the game tree.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Previous Earlier Variation</guimenuitem></term>
<listitem>
<para>
Go to the previous variation earlier in the game tree.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Back to Main Variation</guimenuitem></term>
<listitem>
<para>
Go back to the main variation.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Go to Variation</guimenuitem></term>
<listitem>
<para>
Go to the start node of a certain variation.
</para>
</listitem>
</varlistentry>

</variablelist>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Shell Menu</title>
<variablelist>

<varlistentry>
<term><guimenuitem>Save Log</guimenuitem></term>
<listitem>
<para>
Save the GTP streams to a log file.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Save Commands</guimenuitem></term>
<listitem>
<para>
Save the sent GTP commands to a file.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Send File</guimenuitem></term>
<listitem>
<para>
Send GTP commands from a file to the engine.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Send Recent</guimenuitem></term>
<listitem>
<para>
Send GTP commands from a recently opened file to the engine.
</para>
</listitem>
</varlistentry>

</variablelist>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Bookmarks Menu</title>
<variablelist>

<varlistentry>
<term><guimenuitem>Add Bookmark</guimenuitem></term>
<listitem>
<para>
Add a new bookmark.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Edit Bookmarks</guimenuitem></term>
<listitem>
<para>
Edit bookmarks.
</para>
</listitem>
</varlistentry>

</variablelist>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Settings Menu</title>
<variablelist>

<varlistentry>
<term><guimenuitem>Show Toolbar</guimenuitem></term>
<listitem>
<para>
Show toolbar.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Show Info Panel</guimenuitem></term>
<listitem>
<para>
Show panel on the right side of the board containing game information.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Show Tree</guimenuitem></term>
<listitem>
<para>
Show the game tree window.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Show Shell</guimenuitem></term>
<listitem>
<para>
Show the GTP shell window.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>Show Analyze</guimenuitem></term>
<listitem>
<para>
Show the Analyze window.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Board</guisubmenu> / <guimenuitem>Show Cursor</guimenuitem></term>
<listitem>
<para>
Show cursor on board for keyboard navigation.
Fields can be selected on with the <keycap>Enter</keycap> key.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Board</guisubmenu> / <guimenuitem>Show Grid</guimenuitem></term>
<listitem>
<para>
Show grid.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Board</guisubmenu> / <guimenuitem>Show Last Move</guimenuitem></term>
<listitem>
<para>
Mark the last move with a red circle.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Board</guisubmenu> / <guimenuitem>Show Variations</guimenuitem></term>
<listitem>
<para>
Mark the moves of all variations from this position with letters
starting with 'A' ('+' will be used after 'Z').
If multiple variations start with the same move, a '.' is appended.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Board</guisubmenu> / <guimenuitem>Beep After Move</guimenuitem></term>
<listitem>
<para>
Beep after each computer move.
With most versions of Java the PC speaker is used for the beep.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Board</guisubmenu> / <guimenuitem>Fixed Size Comment Font</guimenuitem></term>
<listitem>
<para>
Use fixed-width font for comment.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Tree</guisubmenu> / <guimenuitem>Labels</guimenuitem></term>
<listitem>
<para>
Configure the labels on the tree nodes.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Tree</guisubmenu> / <guimenuitem>Size</guimenuitem></term>
<listitem>
<para>
Configure the size of the tree nodes.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Tree</guisubmenu> / <guimenuitem>Show Subtree Sizes</guimenuitem></term>
<listitem>
<para>
Show the number of nodes in the subtree for nodes that are not expanded.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Shell</guisubmenu> / <guimenuitem>Popup Completions</guimenuitem></term>
<listitem>
<para>
Popup a window with command completions while entering a command.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Shell</guisubmenu> / <guimenuitem>Auto Number</guimenuitem></term>
<listitem>
<para>
<indexterm>
<primary>Auto Number</primary>
</indexterm>
<indexterm>
<primary>Unknown command</primary>
</indexterm>
Automatically number GTP commands.
Note that some Go programs don't comply to the GTP standard by not supporting
GTP commands with a numerical ID.
They will usually answer with "Unknown command", because they try to parse
the ID as a command.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Shell</guisubmenu> / <guimenuitem>Timestamp</guimenuitem></term>
<listitem>
<para>
Prepend each sent or received line with a time stamp.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Analyze</guisubmenu> / <guimenuitem>Only Supported Commands</guimenuitem></term>
<listitem>
<para>
Only show commands supported by the current Go engine.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Analyze</guisubmenu> / <guimenuitem>Sort Alphabetically</guimenuitem></term>
<listitem>
<para>
Sort command labels alphabetically.
Otherwise the analyze command list has the same order as in the configuration
files.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guisubmenu>Configure Analyze</guisubmenu> / <guimenuitem>Reload Configuration</guimenuitem></term>
<listitem>
<para>
Reload configuration files defining the commands after they were edited.
</para>
</listitem>
</varlistentry>

</variablelist>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

<section>
<title>Help Menu</title>
<variablelist>

<varlistentry>
<term><guimenuitem>GoGui Documentation</guimenuitem></term>
<listitem>
<para>
Open a window for browsing the GoGui documentation.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><guimenuitem>About</guimenuitem></term>
<listitem>
<para>
Show the version of GoGui and the Go program (if there is a program attached).
</para>
</listitem>
</varlistentry>

</variablelist>
<para><!-- Empty paragraph to enforce space in JEditorPane --></para>
</section>

</chapter>
