display/pgedit.h

Go to the documentation of this file.
00001 
00019 #ifndef           PGEDIT_H
00020 #define           PGEDIT_H
00021 
00022 #include          "ocrblock.h"
00023 #include          "ocrrow.h"
00024 #include          "werd.h"
00025 #include          "rect.h"
00026 #include          "pagewalk.h"
00027 //#include        "basefile.h"
00028 #include          "evnts.h"
00029 #include          "sbdmenu.h"
00030 #include          "varable.h"
00031 #include          "notdll.h"
00032 
00033 extern WINDOW image_win;
00034 extern COMMAND_WINDOW *command_window;
00035 extern BLOCK_LIST *current_block_list;
00036 extern BOOL8 *current_image_changed;
00039 extern STRING_VAR_H (editor_image_win_name, "EditorImage",
00040 "Editor image window name");
00041 extern INT_VAR_H (editor_image_xpos, 590, "Editor image X Pos");
00042 extern INT_VAR_H (editor_image_ypos, 10, "Editor image Y Pos");
00043 extern INT_VAR_H (editor_image_height, 680, "Editor image height");
00044 extern INT_VAR_H (editor_image_width, 655, "Editor image width");
00045 extern INT_VAR_H (editor_image_word_bb_color, BLUE,
00046 "Word bounding box colour");
00047 extern INT_VAR_H (editor_image_blob_bb_color, YELLOW,
00048 "Blob bounding box colour");
00049 extern INT_VAR_H (editor_image_text_color, WHITE, "Correct text colour");
00050 extern STRING_VAR_H (editor_dbwin_name, "EditorDBWin",
00051 "Editor debug window name");
00052 extern INT_VAR_H (editor_dbwin_xpos, 50, "Editor debug window X Pos");
00053 extern INT_VAR_H (editor_dbwin_ypos, 500, "Editor debug window Y Pos");
00054 extern INT_VAR_H (editor_dbwin_height, 24, "Editor debug window height");
00055 extern INT_VAR_H (editor_dbwin_width, 80, "Editor debug window width");
00056 extern STRING_VAR_H (editor_word_name, "BlnWords",
00057 "BL normalised word window");
00058 extern INT_VAR_H (editor_word_xpos, 60, "Word window X Pos");
00059 extern INT_VAR_H (editor_word_ypos, 510, "Word window Y Pos");
00060 extern INT_VAR_H (editor_word_height, 240, "Word window height");
00061 extern INT_VAR_H (editor_word_width, 655, "Word window width");
00062 extern double_VAR_H (editor_smd_scale_factor, 1.0, "Scaling for smd image");
00065 void add_word(                             //to block list
00066               WERD *word,                  //word to be added
00067               ROW *src_row,                //source row
00068               BLOCK *src_block,            //source block
00069               BLOCK_LIST *dest_block_list  //add to this
00070              );
00071 WINDOW bln_word_window_handle();  //return handle
00072 void build_image_window(BOX page_bounding_box);
00073 MENU_ROOT *build_menu();
00074 void debug_window_handle();  //return handle
00075 void display_bln_lines(WINDOW window,
00076                        COLOUR colour,
00077                        float scale_factor,
00078                        float y_offset,
00079                        float minx,
00080                        float maxx);
00081 void do_new_source(            //serialise
00082                    char *name  //file name
00083                   );
00084                                  //function to call
00085 void do_re_display (BOOL8 word_painter (
00086 BLOCK *, ROW *, WERD *));
00087 const BOX do_tidy_cmd();  //tidy
00088 void do_view_cmd();
00089 void do_write_file(            //serialise
00090                    char *name  //file name
00091                   );
00092 void smd_cmd();
00093 void pgeditor_main(BLOCK_LIST *blocks);
00094 void pgeditor_msg(  //message display
00095                   const char *msg);
00096                                  //of serialised file
00097 void pgeditor_read_file(STRING &name,
00098                         BLOCK_LIST *blocks  //block list to add to
00099                        );
00100 void pgeditor_show_point(  //display coords
00101                          GRAPHICS_EVENT *event);
00102 void pgeditor_write_file(                    //serialise
00103                          char *name,         //file name
00104                          BLOCK_LIST *blocks  //block list to write
00105                         );
00106 BOOL8 process_cmd_win_event(                  //UI command semantics
00107                             INT32 cmd_event,  //which menu item?
00108                             char *new_value   //any prompt data
00109                            );
00110 void process_image_event(  //action in image win
00111                          GRAPHICS_EVENT event);
00112                                  //put bln word in       box
00113 float re_scale_and_move_bln_word(WERD *norm_word,  //BL normalised word
00114                                  const BOX &box    //destination box
00115                                 );
00116 void re_segment_word(                         //break/join words
00117                      BLOCK_LIST *block_list,  //blocks to check
00118                      BOX &selection_box);
00119 void block_space_stat(                         //show space stats
00120                       BLOCK_LIST *block_list,  //blocks to check
00121                       BOX &selection_box);
00122 void row_space_stat(                         //show space stats
00123                     BLOCK_LIST *block_list,  //blocks to check
00124                     BOX &selection_box);
00125 void show_point(                         //display posn of bloba word
00126                 BLOCK_LIST *block_list,  //blocks to check
00127                 float x,
00128                 float y);
00129                                  //display a word
00130 BOOL8 word_blank_and_set_display(BLOCK *block,  //block holding word
00131                                  ROW *row,      //row holding word
00132                                  WERD *word     //word to be processed
00133                                 );
00134 BOOL8 word_bln_display(            //bln & display
00135                        BLOCK *,    //block holding word
00136                        ROW *row,   //row holding word
00137                        WERD *word  //word to be processed
00138                       );
00139 BOOL8 word_change_text(               //change correct text
00140                        BLOCK *block,  //block holding word
00141                        ROW *row,      //row holding word
00142                        WERD *word     //word to be processed
00143                       );
00144 BOOL8 word_copy(               //copy a word
00145                 BLOCK *block,  //block holding word
00146                 ROW *row,      //row holding word
00147                 WERD *word     //word to be processed
00148                );
00149 BOOL8 word_delete(                     //delete a word
00150                   BLOCK *block,        //block holding word
00151                   ROW *row,            //row holding word
00152                   WERD *word,          //word to be processed
00153                   BLOCK_IT &block_it,  //block list iterator
00154                   ROW_IT &row_it,      //row list iterator
00155                   WERD_IT &word_it     //word list iterator
00156                  );
00157 BOOL8 word_display(            // display a word
00158                    BLOCK *,    //block holding word
00159                    ROW *row,   //row holding word
00160                    WERD *word  //word to be processed
00161                   );
00162 BOOL8 word_dumper(               //dump word
00163                   BLOCK *block,  //block holding word
00164                   ROW *row,      //row holding word
00165                   WERD *word     //word to be processed
00166                  );
00167 BOOL8 word_set_display(               //display a word
00168                        BLOCK *block,  //block holding word
00169                        ROW *row,      //row holding word
00170                        WERD *word     //word to be processed
00171                       );
00172 BOOL8 word_toggle_seg(            //toggle seg flag
00173                       BLOCK *,    //block holding word
00174                       ROW *,      //row holding word
00175                       WERD *word  //word to be processed
00176                      );
00177 void do_check_mem(  //do it
00178                   INT32 level);
00179 #endif

Generated on Wed Feb 28 19:49:11 2007 for Tesseract by  doxygen 1.5.1