1 /***************************************************************************
2 search_gui.h - Gui to view the search tree
4 begin : Sat Oct 06 2007
5 copyright : (C) 2007 by Maurizio Monge
6 email : monge@linuz.sns.it
7 ***************************************************************************/
9 /***************************************************************************
11 * This program 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 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #ifndef __SEARCH_GUI_H__
19 #define __SEARCH_GUI_H__
26 class QTreeWidgetItem
;
29 class SearchGui
: public QObject
33 QTreeWidget
*tree_widget
;
38 const static int Italic
= 1<<0;
39 const static int Bold
= 1<<1;
40 const static int NoItalic
= 1<<2;
41 const static int NoBold
= 1<<3;
42 const static int Gray
= 1<<4;
43 const static int Red
= 1<<5;
44 const static int Green
= 1<<6;
45 const static int Blue
= 1<<7;
46 const static int Magenta
= 1<<8;
47 SearchGui(int& argc
, char** argv
);
50 static void apply_flags(QTreeWidgetItem
* w
, int flags
);
52 void new_root_level(int depth
);
53 void notify_msg(int ply
, const char*, int flags
);
54 void notify(const Board
*board
, Move m
, int ply
, int depth
, int heuval
, int alpha
, int beta
, int flags
);
55 void notify_value(int ply
, int value
, int nodecount
, int newflags
);
56 void notify_eval(int ply
, int value
, int alpha
, int beta
, int flags
);
57 void notify_hash(int ply
, int lower
, int upper
, int depth
, int alpha
, int beta
, Move best
, bool write
, int flags
);
59 void process_events();
62 #define DIFF_NODES (engine->processed_nodes-__nc)
63 #define GUI1(a) {uint64_t __nc = engine->processed_nodes; if(search_gui) { search_gui->a; } else {}
64 #define GUI2(a) if(search_gui) { search_gui->a; } else {} }
65 #define GUI(a) if(search_gui) search_gui->a; else {}
76 const static int Italic
= 1<<0;
77 const static int Bold
= 1<<1;
78 const static int NoItalic
= 1<<2;
79 const static int NoBold
= 1<<3;
80 const static int Gray
= 1<<4;
81 const static int Red
= 1<<5;
82 const static int Green
= 1<<6;
83 const static int Blue
= 1<<7;
84 const static int Magenta
= 1<<8;
86 SearchGui(int& argc
, char** argv
){}
90 void new_root_level(int depth
){}
91 void notify(Board
*board
, Move m
, int ply
, int depth
, int heuval
, int alpha
, int beta
, int flags
){}
92 void notify_value(int ply
, int value
, int nodecount
, int newflags
){}
93 void notify_eval(int ply
, int value
, int alpha
, int beta
, int flags
){}
94 void notify_hash(int ply
, int lower
, int upper
, int depth
, int alpha
, int beta
, Move best
, bool write
, int flags
){}
96 void process_events(){}
106 #endif //__SEARCH_GUI_H__