tesseract  3.03
/usr/local/google/home/jbreiden/tesseract-ocr-read-only/ccmain/pgedit.h
Go to the documentation of this file.
00001 
00002 // File:        pgedit.h
00003 // Description: Page structure file editor
00004 // Author:      Joern Wanke
00005 // Created:     Wed Jul 18 10:05:01 PDT 2007
00006 //
00007 // (C) Copyright 2007, Google Inc.
00008 // Licensed under the Apache License, Version 2.0 (the "License");
00009 // you may not use this file except in compliance with the License.
00010 // You may obtain a copy of the License at
00011 // http://www.apache.org/licenses/LICENSE-2.0
00012 // Unless required by applicable law or agreed to in writing, software
00013 // distributed under the License is distributed on an "AS IS" BASIS,
00014 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015 // See the License for the specific language governing permissions and
00016 // limitations under the License.
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          "tesseractclass.h"
00029 
00030 class ScrollView;
00031 class SVMenuNode;
00032 struct SVEvent;
00033 
00034 // A small event handler class to process incoming events to
00035 // this window.
00036 class PGEventHandler : public SVEventHandler {
00037   public:
00038    PGEventHandler(tesseract::Tesseract* tess) : tess_(tess) {
00039    }
00040    void Notify(const SVEvent* sve);
00041   private:
00042     tesseract::Tesseract* tess_;
00043 };
00044 
00045 extern BLOCK_LIST *current_block_list;
00046 extern STRING_VAR_H (editor_image_win_name, "EditorImage",
00047 "Editor image window name");
00048 extern INT_VAR_H (editor_image_xpos, 590, "Editor image X Pos");
00049 extern INT_VAR_H (editor_image_ypos, 10, "Editor image Y Pos");
00050 extern INT_VAR_H (editor_image_height, 680, "Editor image height");
00051 extern INT_VAR_H (editor_image_width, 655, "Editor image width");
00052 extern INT_VAR_H (editor_image_word_bb_color, BLUE,
00053 "Word bounding box colour");
00054 extern INT_VAR_H (editor_image_blob_bb_color, YELLOW,
00055 "Blob bounding box colour");
00056 extern INT_VAR_H (editor_image_text_color, WHITE, "Correct text colour");
00057 extern STRING_VAR_H (editor_dbwin_name, "EditorDBWin",
00058 "Editor debug window name");
00059 extern INT_VAR_H (editor_dbwin_xpos, 50, "Editor debug window X Pos");
00060 extern INT_VAR_H (editor_dbwin_ypos, 500, "Editor debug window Y Pos");
00061 extern INT_VAR_H (editor_dbwin_height, 24, "Editor debug window height");
00062 extern INT_VAR_H (editor_dbwin_width, 80, "Editor debug window width");
00063 extern STRING_VAR_H (editor_word_name, "BlnWords",
00064 "BL normalised word window");
00065 extern INT_VAR_H (editor_word_xpos, 60, "Word window X Pos");
00066 extern INT_VAR_H (editor_word_ypos, 510, "Word window Y Pos");
00067 extern INT_VAR_H (editor_word_height, 240, "Word window height");
00068 extern INT_VAR_H (editor_word_width, 655, "Word window width");
00069 extern double_VAR_H (editor_smd_scale_factor, 1.0, "Scaling for smd image");
00070 
00071 ScrollView* bln_word_window_handle();  //return handle
00072 void build_image_window(int width, int height);
00073 void display_bln_lines(ScrollView window,
00074                        ScrollView::Color colour,
00075                        float scale_factor,
00076                        float y_offset,
00077                        float minx,
00078                        float maxx);
00079                                  //function to call
00080 void pgeditor_msg(  //message display
00081                   const char *msg);
00082 void pgeditor_show_point(  //display coords
00083                          SVEvent *event);
00084                                  //put bln word in       box
00085 void show_point(PAGE_RES* page_res, float x, float y);
00086 
00087 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines