100 #ifndef GRAPHICS_DISABLED 102 if (terminator ==
nullptr) {
103 terminator =
new ScrollView(
"XIT", 0, 0, 50, 50, 50, 50,
true);
108 popup_menu->
AddChild(
"Choose class to debug", 0,
"x",
"Class to debug");
112 uint32_t num_features =
sample.num_features();
113 for (uint32_t f = 0; f < num_features; ++f) {
123 PointerVector<ScrollView> windows;
124 if (unichar_id >= 0) {
125 tprintf(
"Debugging class %d = %s\n",
130 tprintf(
"Invalid unichar_id: %d\n", unichar_id);
133 if (unichar_id >= 0) {
134 tprintf(
"Debugged class %d = %s\n",
137 tprintf(
"Right-click in ClassifierDebug window to choose debug class,");
138 tprintf(
" Left-click or close window to quit...\n");
141 old_unichar_id = unichar_id;
152 }
while (unichar_id == old_unichar_id &&
156 #endif // GRAPHICS_DISABLED
virtual const UNICHARSET & GetUnicharset() const
UNICHAR_ID unichar_to_id(const char *const unichar_repr) const
SVEvent * AwaitEvent(SVEventType type)
bool contains_unichar(const char *const unichar_repr) const
SVMenuNode * AddChild(const char *txt)
void RenderIntFeature(ScrollView *window, const INT_FEATURE_STRUCT *Feature, ScrollView::Color color)
DLLSYM void tprintf(const char *format,...)
virtual int DisplayClassifyAs(const TrainingSample &sample, Pix *page_pix, UNICHAR_ID unichar_id, int index, PointerVector< ScrollView > *windows)
virtual int UnicharClassifySample(const TrainingSample &sample, Pix *page_pix, int debug, UNICHAR_ID keep_this, GenericVector< UnicharRating > *results)
ScrollView * CreateFeatureSpaceWindow(const char *name, int xpos, int ypos)
const char * id_to_unichar(UNICHAR_ID id) const
void BuildMenu(ScrollView *sv, bool menu_bar=true)