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
;
36 const static int Italic
= 1<<0;
37 const static int Bold
= 1<<1;
38 const static int NoItalic
= 1<<2;
39 const static int NoBold
= 1<<3;
40 const static int Gray
= 1<<4;
41 const static int Red
= 1<<5;
42 const static int Green
= 1<<6;
43 const static int Blue
= 1<<7;
44 const static int Magenta
= 1<<8;
45 SearchGui(int& argc
, char** argv
);
48 static void apply_flags(QTreeWidgetItem
* w
, int flags
);
50 void new_root_level(int depth
);
51 void notify(Move m
, int ply
, int depth
, int heuval
, int alpha
, int beta
, int flags
);
52 void notify_value(int ply
, int value
, int nodecount
, int newflags
);
53 void notify_eval(int ply
, int value
, int alpha
, int beta
, int flags
);
54 void notify_hash(int ply
, int lower
, int upper
, int depth
, int alpha
, int beta
, Move best
, bool write
, int flags
);
56 void process_events();
59 #define DIFF_NODES (processed_nodes-__nc)
60 #define GUI1(a) {uint64_t __nc = processed_nodes; if(search_gui) search_gui->a; else {}
61 #define GUI2(a) if(search_gui) search_gui->a; else {} }
62 #define GUI(a) if(search_gui) search_gui->a; else {}
70 const static int Italic
= 1<<0;
71 const static int Bold
= 1<<1;
72 const static int NoItalic
= 1<<2;
73 const static int NoBold
= 1<<3;
74 const static int Gray
= 1<<4;
75 const static int Red
= 1<<5;
76 const static int Green
= 1<<6;
77 const static int Blue
= 1<<7;
78 const static int Magenta
= 1<<8;
82 SearchGui(int& argc
, char** argv
){}
86 void new_root_level(int depth
){}
87 void notify(Move m
, int ply
, int depth
, int heuval
, int alpha
, int beta
, int flags
){}
88 void notify_value(int ply
, int value
, int nodecount
, int newflags
){}
89 void notify_eval(int ply
, int value
, int alpha
, int beta
, int flags
){}
90 void notify_hash(int ply
, int lower
, int upper
, int depth
, int alpha
, int beta
, Move best
, bool write
, int flags
){}
92 void process_events(){}
102 #endif //__SEARCH_GUI_H__