Fix multi-leg promotions
[xboard.git] / engineoutput.h
1 /*
2  * wengineo.h -- Clipboard routines for WinBoard
3  *
4  * Copyright 2000, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free
5  * Software Foundation, Inc.
6  *
7  * Enhancements Copyright 2005 Alessandro Scotti
8  *
9  * ------------------------------------------------------------------------
10  *
11  * GNU XBoard is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or (at
14  * your option) any later version.
15  *
16  * GNU XBoard is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program. If not, see http://www.gnu.org/licenses/.  *
23  *
24  *------------------------------------------------------------------------
25  ** See the file ChangeLog for a revision history.  */
26
27 // [HGM] define numbers to indicate icons, for referring to them in platform-independent way
28 #define nColorBlack   1
29 #define nColorWhite   2
30 #define nColorUnknown 3
31 #define nClear        4
32 #define nPondering    5
33 #define nThinking     6
34 #define nAnalyzing    7
35
36 // [HGM] same for output fields (note that there are two of each type, one per color)
37 #define nColorIcon 1
38 #define nLabel     2
39 #define nStateIcon 3
40 #define nStateData 4
41 #define nLabelNPS  5
42 #define nMemo      6 /* must match the ranking of the TextBox in following option list! */
43
44 #define STRIDE 7 /* must match the number of option in one pane! */
45 #define MEMO  (nMemo-1)
46
47 /* Module variables */
48 #define H_MARGIN            2
49 #define V_MARGIN            2
50 #define LABEL_V_DISTANCE    1   /* Distance between label and memo */
51 #define SPLITTER_SIZE       4   /* Distance between first memo and second label */
52
53 #define ICON_SIZE           14
54
55 enum ENGINE_STATE { STATE_UNKNOWN, STATE_THINKING, STATE_IDLE, STATE_PONDERING, STATE_ANALYZING };
56
57 extern int  windowMode;
58 extern char exclusionHeader[];
59 extern int highTextStart[2], highTextEnd[2], endPV;
60
61 // back-end called by front-end
62 void SetEngineState( int which, enum ENGINE_STATE state, char * state_data );
63
64 // front-end called by back-end
65 void SetEngineColorIcon( int which );
66 void SetIcon( int which, int field, int nIcon );
67 void DoSetWindowText(int which, int field, char *s_label);
68 void InsertIntoMemo( int which, char * text, int where );
69 void DoClearMemo(int which);
70 void ResizeWindowControls( int mode );
71 int  EngineOutputDialogExists();
72 void SetEngineOutputTitle( char *title );
73 void Collapse P((int colNr));
74 void InitEngineOutput P((Option *opt, Option *memo2)); // XB only
75 void DrawWidgetIcon P((Option *opt, int nIcon)); // XB only