tesseract  4.0.0-1-g2a2b
pgedit.h
Go to the documentation of this file.
1 // File: pgedit.h
3 // Description: Page structure file editor
4 // Author: Joern Wanke
5 // Created: Wed Jul 18 10:05:01 PDT 2007
6 //
7 // (C) Copyright 2007, Google Inc.
8 // Licensed under the Apache License, Version 2.0 (the "License");
9 // you may not use this file except in compliance with the License.
10 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17 //
19 
20 #ifndef PGEDIT_H
21 #define PGEDIT_H
22 
23 #include "params.h" // for INT_VAR_H, IntParam, STRING_VAR_H, StringParam
24 #include "scrollview.h" // for SVEvent (ptr only), SVEventHandler, ScrollView
25 
26 class BLOCK_LIST;
27 class PAGE_RES;
28 
29 namespace tesseract {
30  class Tesseract;
31 }
32 
33 // A small event handler class to process incoming events to
34 // this window.
36  public:
37  PGEventHandler(tesseract::Tesseract* tess) : tess_(tess) {
38  }
39  void Notify(const SVEvent* sve);
40  private:
41  tesseract::Tesseract* tess_;
42 };
43 
44 extern BLOCK_LIST *current_block_list;
45 extern STRING_VAR_H (editor_image_win_name, "EditorImage",
46 "Editor image window name");
47 extern INT_VAR_H (editor_image_xpos, 590, "Editor image X Pos");
48 extern INT_VAR_H (editor_image_ypos, 10, "Editor image Y Pos");
49 extern INT_VAR_H (editor_image_height, 680, "Editor image height");
50 extern INT_VAR_H (editor_image_width, 655, "Editor image width");
52 "Word bounding box colour");
54 "Blob bounding box colour");
55 extern INT_VAR_H (editor_image_text_color, WHITE, "Correct text colour");
56 extern STRING_VAR_H (editor_dbwin_name, "EditorDBWin",
57 "Editor debug window name");
58 extern INT_VAR_H (editor_dbwin_xpos, 50, "Editor debug window X Pos");
59 extern INT_VAR_H (editor_dbwin_ypos, 500, "Editor debug window Y Pos");
60 extern INT_VAR_H (editor_dbwin_height, 24, "Editor debug window height");
61 extern INT_VAR_H (editor_dbwin_width, 80, "Editor debug window width");
62 extern STRING_VAR_H (editor_word_name, "BlnWords",
63 "BL normalised word window");
64 extern INT_VAR_H (editor_word_xpos, 60, "Word window X Pos");
65 extern INT_VAR_H (editor_word_ypos, 510, "Word window Y Pos");
66 extern INT_VAR_H (editor_word_height, 240, "Word window height");
67 extern INT_VAR_H (editor_word_width, 655, "Word window width");
68 extern double_VAR_H (editor_smd_scale_factor, 1.0, "Scaling for smd image");
69 
70 ScrollView* bln_word_window_handle(); //return handle
71 void build_image_window(int width, int height);
72 void pgeditor_msg( //message display
73  const char *msg);
74 void pgeditor_show_point( //display coords
75  SVEvent *event);
76  //put bln word in box
77 void show_point(PAGE_RES* page_res, float x, float y);
78 
79 #endif
int editor_word_width
Definition: pgedit.cpp:146
#define INT_VAR_H(name, val, comment)
Definition: params.h:264
ScrollView * bln_word_window_handle()
Definition: pgedit.cpp:165
void show_point(PAGE_RES *page_res, float x, float y)
Definition: pgedit.cpp:653
int editor_image_width
int editor_word_xpos
Definition: pgedit.cpp:143
#define double_VAR_H(name, val, comment)
Definition: params.h:273
BLOCK_LIST * current_block_list
int editor_dbwin_height
Definition: pgedit.cpp:139
#define STRING_VAR_H(name, val, comment)
Definition: params.h:270
char * editor_word_name
Definition: pgedit.cpp:142
int editor_image_word_bb_color
Definition: pgedit.cpp:129
int editor_dbwin_width
Definition: pgedit.cpp:140
void pgeditor_msg(const char *msg)
Definition: pgedit.cpp:363
char * editor_image_win_name
Definition: pgedit.cpp:124
int editor_word_ypos
Definition: pgedit.cpp:144
int editor_image_height
char * editor_dbwin_name
Definition: pgedit.cpp:136
int editor_image_blob_bb_color
Definition: pgedit.cpp:131
int editor_dbwin_xpos
Definition: pgedit.cpp:137
void build_image_window(int width, int height)
Definition: pgedit.cpp:186
void pgeditor_show_point(SVEvent *event)
Definition: pgedit.cpp:374
int editor_image_text_color
Definition: pgedit.cpp:133
int editor_word_height
Definition: pgedit.cpp:145
int editor_dbwin_ypos
Definition: pgedit.cpp:138
int editor_image_ypos
Definition: pgedit.cpp:126
PGEventHandler(tesseract::Tesseract *tess)
Definition: pgedit.h:37
double editor_smd_scale_factor
int editor_image_xpos
Definition: pgedit.cpp:125
void Notify(const SVEvent *sve)
Definition: pgedit.cpp:225