Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 "ocrblock.h"
24 #include "ocrrow.h"
25 #include "werd.h"
26 #include "rect.h"
27 #include "params.h"
28 #include "notdll.h"
29 #include "tesseractclass.h"
30 
31 class ScrollView;
32 class SVMenuNode;
33 struct SVEvent;
34 
35 // A small event handler class to process incoming events to
36 // this window.
38  public:
39  PGEventHandler(tesseract::Tesseract* tess) : tess_(tess) {
40  }
41  void Notify(const SVEvent* sve);
42  private:
43  tesseract::Tesseract* tess_;
44 };
45 
46 extern BLOCK_LIST *current_block_list;
47 extern STRING_VAR_H (editor_image_win_name, "EditorImage",
48 "Editor image window name");
49 extern INT_VAR_H (editor_image_xpos, 590, "Editor image X Pos");
50 extern INT_VAR_H (editor_image_ypos, 10, "Editor image Y Pos");
51 extern INT_VAR_H (editor_image_height, 680, "Editor image height");
52 extern INT_VAR_H (editor_image_width, 655, "Editor image width");
54 "Word bounding box colour");
56 "Blob bounding box colour");
57 extern INT_VAR_H (editor_image_text_color, WHITE, "Correct text colour");
58 extern STRING_VAR_H (editor_dbwin_name, "EditorDBWin",
59 "Editor debug window name");
60 extern INT_VAR_H (editor_dbwin_xpos, 50, "Editor debug window X Pos");
61 extern INT_VAR_H (editor_dbwin_ypos, 500, "Editor debug window Y Pos");
62 extern INT_VAR_H (editor_dbwin_height, 24, "Editor debug window height");
63 extern INT_VAR_H (editor_dbwin_width, 80, "Editor debug window width");
64 extern STRING_VAR_H (editor_word_name, "BlnWords",
65 "BL normalised word window");
66 extern INT_VAR_H (editor_word_xpos, 60, "Word window X Pos");
67 extern INT_VAR_H (editor_word_ypos, 510, "Word window Y Pos");
68 extern INT_VAR_H (editor_word_height, 240, "Word window height");
69 extern INT_VAR_H (editor_word_width, 655, "Word window width");
70 extern double_VAR_H (editor_smd_scale_factor, 1.0, "Scaling for smd image");
71 
72 ScrollView* bln_word_window_handle(); //return handle
73 void build_image_window(int width, int height);
74 void display_bln_lines(ScrollView window,
75  ScrollView::Color colour,
76  float scale_factor,
77  float y_offset,
78  float minx,
79  float maxx);
80  //function to call
81 void pgeditor_msg( //message display
82  const char *msg);
83 void pgeditor_show_point( //display coords
84  SVEvent *event);
85  //put bln word in box
86 void show_point(PAGE_RES* page_res, float x, float y);
87 
88 #endif
int editor_dbwin_height
Definition: pgedit.cpp:145
int editor_word_height
Definition: pgedit.cpp:151
void show_point(PAGE_RES *page_res, float x, float y)
Definition: pgedit.cpp:650
int editor_image_width
int editor_image_text_color
Definition: pgedit.cpp:139
double editor_smd_scale_factor
int editor_image_height
int editor_word_xpos
Definition: pgedit.cpp:149
char * editor_dbwin_name
Definition: pgedit.cpp:142
void pgeditor_msg(const char *msg)
Definition: pgedit.cpp:372
void pgeditor_show_point(SVEvent *event)
Definition: pgedit.cpp:383
int editor_dbwin_ypos
Definition: pgedit.cpp:144
#define double_VAR_H(name, val, comment)
Definition: params.h:245
#define STRING_VAR_H(name, val, comment)
Definition: params.h:242
int editor_image_ypos
Definition: pgedit.cpp:132
PGEventHandler(tesseract::Tesseract *tess)
Definition: pgedit.h:39
int editor_word_ypos
Definition: pgedit.cpp:150
int editor_dbwin_xpos
Definition: pgedit.cpp:143
void display_bln_lines(ScrollView window, ScrollView::Color colour, float scale_factor, float y_offset, float minx, float maxx)
int editor_image_word_bb_color
Definition: pgedit.cpp:135
int editor_dbwin_width
Definition: pgedit.cpp:146
BLOCK_LIST * current_block_list
int editor_image_xpos
Definition: pgedit.cpp:131
void build_image_window(int width, int height)
Definition: pgedit.cpp:192
void Notify(const SVEvent *sve)
Definition: pgedit.cpp:234
#define INT_VAR_H(name, val, comment)
Definition: params.h:236
ScrollView * bln_word_window_handle()
Definition: pgedit.cpp:171
char * editor_word_name
Definition: pgedit.cpp:148
int editor_image_blob_bb_color
Definition: pgedit.cpp:137
char * editor_image_win_name
Definition: pgedit.cpp:130
int editor_word_width
Definition: pgedit.cpp:152