00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00019
00020 #ifndef PGEDIT_H
00021 #define PGEDIT_H
00022
00023 #include "ocrblock.h"
00024 #include "ocrrow.h"
00025 #include "werd.h"
00026 #include "rect.h"
00027 #include "params.h"
00028 #include "notdll.h"
00029 #include "tesseractclass.h"
00030
00031 class ScrollView;
00032 class SVMenuNode;
00033 struct SVEvent;
00034
00035
00036
00037 class PGEventHandler : public SVEventHandler {
00038 public:
00039 PGEventHandler(tesseract::Tesseract* tess) : tess_(tess) {
00040 }
00041 void Notify(const SVEvent* sve);
00042 private:
00043 tesseract::Tesseract* tess_;
00044 };
00045
00046 extern BLOCK_LIST *current_block_list;
00047 extern STRING_VAR_H (editor_image_win_name, "EditorImage",
00048 "Editor image window name");
00049 extern INT_VAR_H (editor_image_xpos, 590, "Editor image X Pos");
00050 extern INT_VAR_H (editor_image_ypos, 10, "Editor image Y Pos");
00051 extern INT_VAR_H (editor_image_height, 680, "Editor image height");
00052 extern INT_VAR_H (editor_image_width, 655, "Editor image width");
00053 extern INT_VAR_H (editor_image_word_bb_color, BLUE,
00054 "Word bounding box colour");
00055 extern INT_VAR_H (editor_image_blob_bb_color, YELLOW,
00056 "Blob bounding box colour");
00057 extern INT_VAR_H (editor_image_text_color, WHITE, "Correct text colour");
00058 extern STRING_VAR_H (editor_dbwin_name, "EditorDBWin",
00059 "Editor debug window name");
00060 extern INT_VAR_H (editor_dbwin_xpos, 50, "Editor debug window X Pos");
00061 extern INT_VAR_H (editor_dbwin_ypos, 500, "Editor debug window Y Pos");
00062 extern INT_VAR_H (editor_dbwin_height, 24, "Editor debug window height");
00063 extern INT_VAR_H (editor_dbwin_width, 80, "Editor debug window width");
00064 extern STRING_VAR_H (editor_word_name, "BlnWords",
00065 "BL normalised word window");
00066 extern INT_VAR_H (editor_word_xpos, 60, "Word window X Pos");
00067 extern INT_VAR_H (editor_word_ypos, 510, "Word window Y Pos");
00068 extern INT_VAR_H (editor_word_height, 240, "Word window height");
00069 extern INT_VAR_H (editor_word_width, 655, "Word window width");
00070 extern double_VAR_H (editor_smd_scale_factor, 1.0, "Scaling for smd image");
00071
00072 ScrollView* bln_word_window_handle();
00073 void build_image_window(int width, int height);
00074 void display_bln_lines(ScrollView window,
00075 ScrollView::Color colour,
00076 float scale_factor,
00077 float y_offset,
00078 float minx,
00079 float maxx);
00080
00081 void pgeditor_msg(
00082 const char *msg);
00083 void pgeditor_show_point(
00084 SVEvent *event);
00085
00086 void show_point(PAGE_RES* page_res, float x, float y);
00087
00088 #endif