Difference between revisions of "GUI"

From Chessprogramming wiki
Jump to: navigation, search
(20 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
[[File:machackdisplay02.jpg|border|right|thumb| Mac Hack [[Lawrence J. Krakauer#DEC340|display]] <ref>[http://ljkrakauer.com/LJK/60s/resign.htm I resign] by [[Lawrence J. Krakauer]]</ref> <ref>[http://ljkrakauer.com/LJK/60s/chess1.htm Chess stories] by [[Lawrence J. Krakauer]]</ref> <ref>see also [http://projects.csail.mit.edu/video/history/aifilms/63-chess.mp4 63-chess.mp4] hosted by [https://www.csail.mit.edu/ MIT CSAIL]</ref>]]
 
[[File:machackdisplay02.jpg|border|right|thumb| Mac Hack [[Lawrence J. Krakauer#DEC340|display]] <ref>[http://ljkrakauer.com/LJK/60s/resign.htm I resign] by [[Lawrence J. Krakauer]]</ref> <ref>[http://ljkrakauer.com/LJK/60s/chess1.htm Chess stories] by [[Lawrence J. Krakauer]]</ref> <ref>see also [http://projects.csail.mit.edu/video/history/aifilms/63-chess.mp4 63-chess.mp4] hosted by [https://www.csail.mit.edu/ MIT CSAIL]</ref>]]
'''Graphical User Interface''' (GUI),
+
'''Graphical User Interface''' (GUI),<br/>
 
a user interface where [https://en.wikipedia.org/wiki/Interaction interaction] between user and a (chess) program takes place. Opposed to the sequential nature of a pure text based [[CLI|command-line interface]], where a program prints its output and prompts for input, a [https://en.wikipedia.org/wiki/Graphical_user_interface graphical user interface] allows a more sophisticated, graphical presentation of the programs output, as well within its [https://en.wikipedia.org/wiki/Event-driven_architecture event-driven architecture] a more flexible user interaction not only by typing text commands, but using a [https://en.wikipedia.org/wiki/Pointing_device pointingdevice], a [https://en.wikipedia.org/wiki/Mouse_%28computing%29 mouse] or a pen or finger pointing on and touching a [https://en.wikipedia.org/wiki/Graphics_tablet graphics tablet] with its [https://en.wikipedia.org/wiki/Touchscreen touchscreen], for random and [https://en.wikipedia.org/wiki/Direct_manipulation direct manipulation] of graphical elements. A GUI dedicated to play chess typically has a graphical [[Chessboard|board]] and [[Chess Game|game]] representation, where the user may [[Entering Moves|enter moves]] by [https://en.wikipedia.org/wiki/Point-and-click clicking] and [https://en.wikipedia.org/wiki/Drag-and-drop dragging] a piece, quite similar to moving a piece on a "real" chess board.  
 
a user interface where [https://en.wikipedia.org/wiki/Interaction interaction] between user and a (chess) program takes place. Opposed to the sequential nature of a pure text based [[CLI|command-line interface]], where a program prints its output and prompts for input, a [https://en.wikipedia.org/wiki/Graphical_user_interface graphical user interface] allows a more sophisticated, graphical presentation of the programs output, as well within its [https://en.wikipedia.org/wiki/Event-driven_architecture event-driven architecture] a more flexible user interaction not only by typing text commands, but using a [https://en.wikipedia.org/wiki/Pointing_device pointingdevice], a [https://en.wikipedia.org/wiki/Mouse_%28computing%29 mouse] or a pen or finger pointing on and touching a [https://en.wikipedia.org/wiki/Graphics_tablet graphics tablet] with its [https://en.wikipedia.org/wiki/Touchscreen touchscreen], for random and [https://en.wikipedia.org/wiki/Direct_manipulation direct manipulation] of graphical elements. A GUI dedicated to play chess typically has a graphical [[Chessboard|board]] and [[Chess Game|game]] representation, where the user may [[Entering Moves|enter moves]] by [https://en.wikipedia.org/wiki/Point-and-click clicking] and [https://en.wikipedia.org/wiki/Drag-and-drop dragging] a piece, quite similar to moving a piece on a "real" chess board.  
  
Line 25: Line 25:
 
* [[Aquarium]]
 
* [[Aquarium]]
 
* [[Arena]]
 
* [[Arena]]
 +
* [[Banksia GUI]]
 +
* [[Banksia GUI for iOS]]
 +
* [[Caddell Chess]]
 
* [[Chess Academy]]
 
* [[Chess Academy]]
 
* [[Chess Assistant]]
 
* [[Chess Assistant]]
Line 36: Line 39:
 
* [[ChessX]]
 
* [[ChessX]]
 
* [[Cute Chess]]
 
* [[Cute Chess]]
* [[Dreamer#DreamChess|DreamChess]]
+
* [[DreamChess]]
 +
* [[DroidFish]]
 
* [[EBoard]]
 
* [[EBoard]]
 
* [[EchoBoard]]
 
* [[EchoBoard]]
 
* [[Fancy]]
 
* [[Fancy]]
 
* [[Fritz#FritzGUI|Fritz GUI]]
 
* [[Fritz#FritzGUI|Fritz GUI]]
 +
* [[Gavon]]
 
* [[Glaurung#GUI|Glaurung GUI]]
 
* [[Glaurung#GUI|Glaurung GUI]]
 
* [[glChess]]
 
* [[glChess]]
 
* [[GNOME Chess]]
 
* [[GNOME Chess]]
* [[Hiarcs Chess Explorer]]
+
* [[HIARCS Chess Explorer]]
 
* [[Jerry]]
 
* [[Jerry]]
 
* [[jose]]
 
* [[jose]]
Line 55: Line 60:
 
* [[SCID]]
 
* [[SCID]]
 
* [[Scid vs. PC]]
 
* [[Scid vs. PC]]
* [[Scidb]]
 
 
* [[Shredder#GUI|Shredder GUI]]
 
* [[Shredder#GUI|Shredder GUI]]
 
* [[Tarrasch]]
 
* [[Tarrasch]]
Line 95: Line 99:
 
<span id="NotationWindow"></span>
 
<span id="NotationWindow"></span>
 
==Notation Window==  
 
==Notation Window==  
The notation window represents the [[Game Notation|game notation]] or score-sheet of the chess game, the [[Move List|list of moves]] of the game. It works like a multiple line [https://en.wikipedia.org/wiki/Text_box text box] or multiple column [https://en.wikipedia.org/wiki/Grid_view grid view] or [https://en.wikipedia.org/wiki/List_box list box] often scrollable and indicated by a vertical [https://en.wikipedia.org/wiki/Scrollbar scrollbar]. A [https://en.wikipedia.org/wiki/Cursor_%28computers%29 cursor] inside the notation window might be associated with a [[Ply|half-move index]] in the range from zero (before first half-move played, [[Initial Position|initial position]]), to N (after last half-move played, current game position), and determines the position displayed in the board window. If the game window has keyboard [https://en.wikipedia.org/wiki/Focus_%28computing%29 focus], it receives input of moves via move coordinates or [[Algebraic chess notation|algebraic notation]].
+
The notation window represents the [[Game Notation|game notation]] or score-sheet of the chess game, the [[Move List|list of moves]] of the game. It works like a multiple line [https://en.wikipedia.org/wiki/Text_box text box] or multiple column [https://en.wikipedia.org/wiki/Grid_view grid view] or [https://en.wikipedia.org/wiki/List_box list box] often scrollable and indicated by a vertical [https://en.wikipedia.org/wiki/Scrollbar scrollbar]. A [https://en.wikipedia.org/wiki/Cursor_%28computers%29 cursor] inside the notation window might be associated with a [[Ply|half-move index]] in the range from zero (before first half-move played, [[Initial Position|initial position]]), to N (after last half-move played, current game position), and determines the position displayed in the board window. If the game window has keyboard [https://en.wikipedia.org/wiki/Focus_%28computing%29 focus], it receives input of moves via move coordinates or [[Algebraic Chess Notation|algebraic notation]].
  
 
==Information Windows==  
 
==Information Windows==  
Information windows are associated with an engine actually playing or analyzing a game. It displays [[Search|search]] information like [[Principal variation|principal variations]] and associated [[Score|scores]], times and that like. It is often implemented as scrollable logging window, always appending text at top or bottom lines.
+
Information windows are associated with an engine actually playing or analyzing a game. It displays [[Search|search]] information like [[Principal Variation|principal variations]] and associated [[Score|scores]], times and that like. It is often implemented as scrollable logging window, always appending text at top or bottom lines.
  
 
=Mobile GUIs=  
 
=Mobile GUIs=  
 
* [[Chess for Android]]
 
* [[Chess for Android]]
 +
* [[Banksia GUI for iOS]]
 
* [[DroidFish]]
 
* [[DroidFish]]
 
* [[PocketGrandmaster]]
 
* [[PocketGrandmaster]]
Line 108: Line 113:
 
* [[Android]]
 
* [[Android]]
 
* [[Linux]]
 
* [[Linux]]
 +
* [[iOS]]
 
* [[Mac OS]]
 
* [[Mac OS]]
 
* [[MS-DOS]]
 
* [[MS-DOS]]
 
* [[Windows]]
 
* [[Windows]]
 +
 +
=Quotes=
 +
[[Harm Geert Muller]] wrote on a [[Talkchess]] thread <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=58687&hilit=winboard#p653469 Re: Object model for chess GUI?] by [[Steve Maughan]], [[CCC]], December 26, 2015 » [[Protocols]]</ref>
 +
 +
Beware that writing a GUI is between 10 and 100 times more work than writing an engine.
  
 
=See also=  
 
=See also=  
 
* [[Chess Game]]
 
* [[Chess Game]]
 +
* [[Chess Server]]
 
* [[CLI|Command Line Interface]]
 
* [[CLI|Command Line Interface]]
 
* [[CPW-Engine_com]]
 
* [[CPW-Engine_com]]
Line 121: Line 133:
  
 
=Publications=  
 
=Publications=  
 +
* [[Duane Szafron]], Brian Wilkerson ('''1986'''). ''Some Effects of Graphical Interfaces in Programming Environments''.  CIPS/ACI Congress 86, [https://webdocs.cs.ualberta.ca/~duane/publications/pdf/1986cips.pdf pdf]
 
* [[Haiying Wang]] ('''1994'''). ''[https://era.library.ualberta.ca/files/2227mr67d An application-oriented user interface model and development system]''. Ph.D. thesis, [[University of Alberta]], [https://era.library.ualberta.ca/files/2227mr67d/NN11407.pdf pdf] » [[Abyss]]
 
* [[Haiying Wang]] ('''1994'''). ''[https://era.library.ualberta.ca/files/2227mr67d An application-oriented user interface model and development system]''. Ph.D. thesis, [[University of Alberta]], [https://era.library.ualberta.ca/files/2227mr67d/NN11407.pdf pdf] » [[Abyss]]
 
* [[Mikhail Donskoy]] ('''2001'''). ''How the Computer-Chess Methods Help to Build Better User Interfaces.'' [[Advances in Computer Games 9]]
 
* [[Mikhail Donskoy]] ('''2001'''). ''How the Computer-Chess Methods Help to Build Better User Interfaces.'' [[Advances in Computer Games 9]]
 
* [[Paul Fischer]] ('''2005'''). ''An Introduction to Graphical User Interfaces with Java Swing''. [https://en.wikipedia.org/wiki/Pearson_Education Pearson Education], [https://en.wikipedia.org/wiki/Addison-Wesley Addison-Wesley], [http://www.amazon.de/Introduction-Graphical-User-Interfaces-Swing/dp/0321220706 Amazon.de] » [[Java]]
 
* [[Paul Fischer]] ('''2005'''). ''An Introduction to Graphical User Interfaces with Java Swing''. [https://en.wikipedia.org/wiki/Pearson_Education Pearson Education], [https://en.wikipedia.org/wiki/Addison-Wesley Addison-Wesley], [http://www.amazon.de/Introduction-Graphical-User-Interfaces-Swing/dp/0321220706 Amazon.de] » [[Java]]
 
* [[Oliver Vornberger]] ('''2006'''). ''[http://www-lehre.inf.uos.de/%7Ecg/2006/skript/skript.html Computergrafik]''. [http://www-lehre.inf.uos.de/%7Ecg/2006/PDF/skript.pdf pdf] (German)
 
* [[Oliver Vornberger]] ('''2006'''). ''[http://www-lehre.inf.uos.de/%7Ecg/2006/skript/skript.html Computergrafik]''. [http://www-lehre.inf.uos.de/%7Ecg/2006/PDF/skript.pdf pdf] (German)
 +
* [[Timo Haupt|Timo Klaustermeyer]] ('''2006'''). ''Wandel von Interaktion zwischen Menschen und Maschine am Beispiel des Schachspiels''. Diplom thesis, [[Paderborn University]], advisors [https://dblp.uni-trier.de/pers/hd/s/Szwillus:Gerd Gerd Szwillus] and [[Ingo Althöfer]], [http://www.team-oh.de/files/Abstract%20Diplomarbeit.pdf abstract as pdf] (German)
  
 
=Forum Posts=  
 
=Forum Posts=  
Line 150: Line 164:
 
* [http://www.talkchess.com/forum/viewtopic.php?t=65485 Elements of the ULTIMATE Chess GUI?] by [[Brendan J. Norman]], [[CCC]], October 19, 2017
 
* [http://www.talkchess.com/forum/viewtopic.php?t=65485 Elements of the ULTIMATE Chess GUI?] by [[Brendan J. Norman]], [[CCC]], October 19, 2017
 
* [http://www.talkchess.com/forum/viewtopic.php?t=66811 Old chess GUIs] by [[Matthias Gemuh]], [[CCC]], March 12, 2018
 
* [http://www.talkchess.com/forum/viewtopic.php?t=66811 Old chess GUIs] by [[Matthias Gemuh]], [[CCC]], March 12, 2018
 +
==2020 ...==
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75352 Web based GUI for UCI chess engine: YouTube series] by [[Maksim Korzh]], [[CCC]], October 10, 2020 » [[#Tutorial|Web GUI Tutorial]]
 +
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75992 UCI Gui to remote Linux Engine] by [[Joshua Shriver]], [[CCC]], December 05, 2020 » [[UCI]], [[Linux]]
  
 
=External Links=  
 
=External Links=  
Line 163: Line 180:
 
* [https://en.wikipedia.org/wiki/GNOME GNOME from Wikipedia]
 
* [https://en.wikipedia.org/wiki/GNOME GNOME from Wikipedia]
 
* [https://en.wikipedia.org/wiki/KDE KDE from Wikipedia]
 
* [https://en.wikipedia.org/wiki/KDE KDE from Wikipedia]
 
 
==Computer Chess==  
 
==Computer Chess==  
 
* [http://adamsccpages.blogspot.de/p/graphical-user-interfaces-for-computer.html Graphical User Interfaces for Computer Chess] by [[Adam Hair]]
 
* [http://adamsccpages.blogspot.de/p/graphical-user-interfaces-for-computer.html Graphical User Interfaces for Computer Chess] by [[Adam Hair]]
 
* [http://computer-chess.org/doku.php?id=computer_chess:wiki:lists:gui_protocol_support_list GUI Protocol List] from [http://computer-chess.org/doku.php?id=home Computer-Chess Wiki] by [[Ron Murawski]]
 
* [http://computer-chess.org/doku.php?id=computer_chess:wiki:lists:gui_protocol_support_list GUI Protocol List] from [http://computer-chess.org/doku.php?id=home Computer-Chess Wiki] by [[Ron Murawski]]
 
* [http://www.septober.de/chess/index.htm Septober - Computerschach] by [[Herbert Marquardt]] (program list with screenshots)
 
* [http://www.septober.de/chess/index.htm Septober - Computerschach] by [[Herbert Marquardt]] (program list with screenshots)
 
 
==Web Development==  
 
==Web Development==  
 
* [https://en.wikipedia.org/wiki/Ajax_%28programming%29 Ajax from Wikipedia]
 
* [https://en.wikipedia.org/wiki/Ajax_%28programming%29 Ajax from Wikipedia]
Line 175: Line 190:
 
* [https://en.wikipedia.org/wiki/Rich_client_platform Rich client platform from Wikipedia]
 
* [https://en.wikipedia.org/wiki/Rich_client_platform Rich client platform from Wikipedia]
 
* [http://jtiscione.github.io/chessboard3js/play.html chessboard3.js] [[JavaScript]] [[GUI]] by [[Jason Tiscione]]
 
* [http://jtiscione.github.io/chessboard3js/play.html chessboard3.js] [[JavaScript]] [[GUI]] by [[Jason Tiscione]]
 
+
==Tutorial==
 +
* [https://www.youtube.com/watch?v=_0uKZbHWVKM&list=PLmN0neTso3Jz-6--Mj51Hc3jiLhkQm0DB Web based GUI for UCI chess engine] [https://en.wikipedia.org/wiki/YouTube YouTube] Videos by [[Maksim Korzh]] » [[BBC#GUI|BBC GUI]] <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75352 Web based GUI for UCI chess engine: YouTube series] by [[Maksim Korzh]], [[CCC]], October 10, 2020</ref>
 
==Toolkits, Libraries and API==  
 
==Toolkits, Libraries and API==  
 
{{Graphic and Widgets}}
 
{{Graphic and Widgets}}
Line 181: Line 197:
 
=References=  
 
=References=  
 
<references />
 
<references />
 
 
'''[[User Interface|Up one Level]]'''
 
'''[[User Interface|Up one Level]]'''

Revision as of 07:17, 15 April 2021

Home * User Interface * Graphical User Interface

Mac Hack display [1] [2] [3]

Graphical User Interface (GUI),
a user interface where interaction between user and a (chess) program takes place. Opposed to the sequential nature of a pure text based command-line interface, where a program prints its output and prompts for input, a graphical user interface allows a more sophisticated, graphical presentation of the programs output, as well within its event-driven architecture a more flexible user interaction not only by typing text commands, but using a pointingdevice, a mouse or a pen or finger pointing on and touching a graphics tablet with its touchscreen, for random and direct manipulation of graphical elements. A GUI dedicated to play chess typically has a graphical board and game representation, where the user may enter moves by clicking and dragging a piece, quite similar to moving a piece on a "real" chess board.

Historical Chess GUI

IDIIOMGUI.jpg

Chris Daly interacting with Daly CP, 1970 [4] [5] on an IDIIOM [6]

Playing Chess

The sequential nature of the game of chess, along with the both fundamental states of a chess engine while playing a game, that is calculating a move and pondering, should be appropriately indicated by the GUI, for instance to allow the interaction of entering moves only for the opponent side while pondering. There may be other modes than pure game playing, for instance to replay and analyze a game, allowing the user to click and drag the moves of the game notation move list, which needs appropriate indication and ergonomic control.

MVC

The chess program and its user interface can be interpreted as a Model–view–controller (MVC), an architectural pattern that isolates business logic f.i. game administration, time management and searching a move inside a chess program from input and presentation. The game model represents the domain-specific data on which the application operates - Inside a chess program, the information about the initial position and the game record to reproduce the current positions, likely subject of search or pondering during game play. The model and controller implement a finite-state machine which controls the game, its states, state transitions and actions considering various modes. The view displays the game notation, a list of moves, and likely the board with the current position, suitable for interaction inside a user interface. The controller receives input from various sources and devices, such as keyboard, mouse, serial port and internet socket, and initiates a response by making calls on model objects.

Chess GUI Issues

Today, most programmers rely on external event driven GUI applications using standard streams or pipelines to communicate with the GUI via protocols such as the Chess Engine Communication Protocol or the Universal Chess Interface. The external GUI application constitutes the MVC view and controller, and more or less even parts of a (redundant) game model (or even multi-game model), to make the GUI aware of its own game states to even make decisions on behalf of the engine, such as move selection from opening books and endgame tablebases, draw claims and offers and to finally declare the game over. These game interacting features of the external GUI application in conjunction with certain protocols such as UCI by far exceeds what a pure chess user interface was initially designed for - controller and view only, enter legal moves and render the state of the game. Sharing code of external GUIs, with potential game decisive move selection, time allocation and draw claiming, by multiple engines in official tournaments is a heavily discussed topic [7] .

Front End

Beside a pure user versus engine game playing interface, modern general purpose Chess GUIs implement features and modes for multiple engine tournament play, and can be used as front end for chess server and chess database back ends.

Chess GUIs

GUI Shots

Arena320.jpg
CPsshot2.png
Arena under Windows [8] ChessPartner under Windows running Deep Sjeng [9]

GUI Elements

A GUI consists of multiple elements or widgets, based on a visual rectangular area called window. Windows have recursive hierarchical relationships, that is a window may contain several child windows, which are usually restricted and clipped to the area of the parent window. The desktop metaphor as root, and all child and grand child windows of one or more applications can be interpreted as a tree structure, traversed in a depth-first manner if looking up graphical coordinates or visible areas, as already mentioned by Mikhail Donskoy at the Advances in Computer Games 9 conference in 1999 [10] .

A GUI application usually has one main- or frame-window, often sizable and movable, and child of the desktop. The main window further contains various standard child windows at its top and bottom areas, a caption bar, often configurable and dockable menu-, and/or toolbars, and status bar. The look and feel depends on the operating system and its window manager, there are quite common techniques and standardizations, also encouraged by cross platform widget toolkits.

Main Window

Beside its default child windows of the frame, the inner area also referred as workspace, may contain one or more so called document windows, to reduce clutter and make the desktop easier to navigate with multiple applications. A main window applies either a single (SDI), a multiple (MDI) or a tabbed document interface (TDI). Further modeless and often tabbed tool-, output log or miscellaneous windows for various purposes may share the workspace or may be docked on the borders or various areas of the mainframe, also called an IDE-style interface.

Dialog Windows

Another class of windows, dialog boxes apply modal transactions like saving a document to a file. They contain all kinds of child widgets to enter data, and most often buttons to confirm (OK) or cancel the transaction. There are further tabbed dialogs and multi-page wizard or assistants with next, previous and finish buttons to guide users through a sequence of transactions which are dependent on each other or partly optional.

Chess GUI Elements

A document or model usually refers to a game of chess and its game notation as move-list, whether still in progress or loaded from a database.

Game Window

A game window, associated with the game document or model, is usually a frame around a board- and notation window, which represent two views of the same model.

Board Window

A pure 2D board window should be isotropic and quadratic. If the board window has keyboard focus, one may control a square cursor to select two squares to make a move, similar to clicking with the mouse.

Notation Window

The notation window represents the game notation or score-sheet of the chess game, the list of moves of the game. It works like a multiple line text box or multiple column grid view or list box often scrollable and indicated by a vertical scrollbar. A cursor inside the notation window might be associated with a half-move index in the range from zero (before first half-move played, initial position), to N (after last half-move played, current game position), and determines the position displayed in the board window. If the game window has keyboard focus, it receives input of moves via move coordinates or algebraic notation.

Information Windows

Information windows are associated with an engine actually playing or analyzing a game. It displays search information like principal variations and associated scores, times and that like. It is often implemented as scrollable logging window, always appending text at top or bottom lines.

Mobile GUIs

Operating Systems

Quotes

Harm Geert Muller wrote on a Talkchess thread [11]

Beware that writing a GUI is between 10 and 100 times more work than writing an engine.

See also

Publications

Forum Posts

2000 ...

2005 ...

2010 ...

2015 ...

2020 ...

External Links

General

Computer Chess

Web Development

Tutorial

Toolkits, Libraries and API

Direct2D from Wikipedia
Direct3D from Wikipedia
DirectDraw from Wikipedia
DirectDraw Surface from Wikipedia
CDC Class - Device Context, Microsoft Foundation Class Library, MSDN
gtkmm from Wikipedia
Gtk Sharp from Wikipedia
lib-gwt-svg « vectomatic
vectomatic - standard dynamic 2D graphics in web browsers - Google Project Hosting
Graphics Programming - Introduction to OpenGL (pdf)
Comparison of OpenGL and Direct3D from Wikipedia
X11.app (XQuartz) from Wikipedia » OS X

References

Up one Level