00001 00020 #ifndef WERDIT_H 00021 #define WERDIT_H 00022 00023 #include "varable.h" 00024 #include "ocrblock.h" 00025 #include "notdll.h" 00026 00031 class WERDIT 00032 { 00033 public: 00034 WERDIT() { 00035 } //empty contructor 00036 WERDIT( //empty contructor 00037 BLOCK_LIST *blocklist) { //blocks on page 00038 start_page(blocklist); //ready to scan 00039 } 00040 00041 void start_page( //get ready 00042 BLOCK_LIST *blocklist); //blocks on page 00043 00044 WERD *forward(); //get next word 00045 WERD *next_word() { //get next word 00046 return word_it.data (); //already at next 00047 } 00048 ROW *row() { //get current row 00049 return word_it.cycled_list ()? NULL : row_it.data (); 00050 } 00051 ROW *next_row() { //get next row 00052 return row_it.data_relative (1); 00053 } 00054 BLOCK *block() { //get current block 00055 return block_it.data (); 00056 } 00057 00058 private: 00059 BLOCK_IT block_it; //iterators 00060 ROW_IT row_it; 00061 WERD_IT word_it; 00062 }; 00063 00064 //extern BOOL_VAR_H(wordit_linearc,FALSE,"Pass poly of linearc to Tess"); 00065 WERD *make_pseudo_word( //make fake word 00066 BLOCK_LIST *block_list, //blocks to check //block of selection 00067 BOX &selection_box, 00068 BLOCK *&pseudo_block, 00069 ROW *&pseudo_row //row of selection 00070 ); 00071 #endif