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