tesseract  5.0.0-alpha-619-ge9db
pgedit.cpp File Reference
#include "pgedit.h"
#include <cctype>
#include <cmath>
#include "blread.h"
#include "control.h"
#include "paramsd.h"
#include "pageres.h"
#include "tordmain.h"
#include "scrollview.h"
#include "svmnode.h"
#include "statistc.h"
#include "tesseractclass.h"
#include "werdit.h"

Go to the source code of this file.

Classes

class  BlnEventHandler
 

Namespaces

 tesseract
 

Macros

#define ASC_HEIGHT   (2 * kBlnBaselineOffset + kBlnXHeight)
 
#define X_HEIGHT   (kBlnBaselineOffset + kBlnXHeight)
 
#define BL_HEIGHT   kBlnBaselineOffset
 
#define DESC_HEIGHT   0
 

Enumerations

enum  CMD_EVENTS {
  NULL_CMD_EVENT, CHANGE_DISP_CMD_EVENT, DUMP_WERD_CMD_EVENT, SHOW_POINT_CMD_EVENT,
  SHOW_BLN_WERD_CMD_EVENT, DEBUG_WERD_CMD_EVENT, BLAMER_CMD_EVENT, BOUNDING_BOX_CMD_EVENT,
  CORRECT_TEXT_CMD_EVENT, POLYGONAL_CMD_EVENT, BL_NORM_CMD_EVENT, BITMAP_CMD_EVENT,
  IMAGE_CMD_EVENT, BLOCKS_CMD_EVENT, BASELINES_CMD_EVENT, UNIFORM_DISP_CMD_EVENT,
  REFRESH_CMD_EVENT, QUIT_CMD_EVENT, RECOG_WERDS, RECOG_PSEUDO,
  SHOW_BLOB_FEATURES, SHOW_SUBSCRIPT_CMD_EVENT, SHOW_SUPERSCRIPT_CMD_EVENT, SHOW_ITALIC_CMD_EVENT,
  SHOW_BOLD_CMD_EVENT, SHOW_UNDERLINE_CMD_EVENT, SHOW_FIXEDPITCH_CMD_EVENT, SHOW_SERIF_CMD_EVENT,
  SHOW_SMALLCAPS_CMD_EVENT, SHOW_DROPCAPS_CMD_EVENT
}
 
enum  ColorationMode {
  CM_RAINBOW, CM_SUBSCRIPT, CM_SUPERSCRIPT, CM_ITALIC,
  CM_BOLD, CM_UNDERLINE, CM_FIXEDPITCH, CM_SERIF,
  CM_SMALLCAPS, CM_DROPCAPS
}
 

Variables

char * editor_image_win_name = "EditorImage"
 
int editor_image_xpos = 590
 
int editor_image_ypos = 10
 
int editor_image_word_bb_color = ScrollView::BLUE
 
int editor_image_blob_bb_color = ScrollView::YELLOW
 
int editor_image_text_color = ScrollView::WHITE
 
char * editor_dbwin_name = "EditorDBWin"
 
int editor_dbwin_xpos = 50
 
int editor_dbwin_ypos = 500
 
int editor_dbwin_height = 24
 
int editor_dbwin_width = 80
 
char * editor_word_name = "BlnWords"
 
int editor_word_xpos = 60
 
int editor_word_ypos = 510
 
int editor_word_height = 240
 
int editor_word_width = 655
 

Macro Definition Documentation

◆ ASC_HEIGHT

#define ASC_HEIGHT   (2 * kBlnBaselineOffset + kBlnXHeight)

Definition at line 41 of file pgedit.cpp.

◆ BL_HEIGHT

#define BL_HEIGHT   kBlnBaselineOffset

Definition at line 43 of file pgedit.cpp.

◆ DESC_HEIGHT

#define DESC_HEIGHT   0

Definition at line 44 of file pgedit.cpp.

◆ X_HEIGHT

#define X_HEIGHT   (kBlnBaselineOffset + kBlnXHeight)

Definition at line 42 of file pgedit.cpp.

Enumeration Type Documentation

◆ CMD_EVENTS

enum CMD_EVENTS
Enumerator
NULL_CMD_EVENT 
CHANGE_DISP_CMD_EVENT 
DUMP_WERD_CMD_EVENT 
SHOW_POINT_CMD_EVENT 
SHOW_BLN_WERD_CMD_EVENT 
DEBUG_WERD_CMD_EVENT 
BLAMER_CMD_EVENT 
BOUNDING_BOX_CMD_EVENT 
CORRECT_TEXT_CMD_EVENT 
POLYGONAL_CMD_EVENT 
BL_NORM_CMD_EVENT 
BITMAP_CMD_EVENT 
IMAGE_CMD_EVENT 
BLOCKS_CMD_EVENT 
BASELINES_CMD_EVENT 
UNIFORM_DISP_CMD_EVENT 
REFRESH_CMD_EVENT 
QUIT_CMD_EVENT 
RECOG_WERDS 
RECOG_PSEUDO 
SHOW_BLOB_FEATURES 
SHOW_SUBSCRIPT_CMD_EVENT 
SHOW_SUPERSCRIPT_CMD_EVENT 
SHOW_ITALIC_CMD_EVENT 
SHOW_BOLD_CMD_EVENT 
SHOW_UNDERLINE_CMD_EVENT 
SHOW_FIXEDPITCH_CMD_EVENT 
SHOW_SERIF_CMD_EVENT 
SHOW_SMALLCAPS_CMD_EVENT 
SHOW_DROPCAPS_CMD_EVENT 

Definition at line 46 of file pgedit.cpp.

◆ ColorationMode

Enumerator
CM_RAINBOW 
CM_SUBSCRIPT 
CM_SUPERSCRIPT 
CM_ITALIC 
CM_BOLD 
CM_UNDERLINE 
CM_FIXEDPITCH 
CM_SERIF 
CM_SMALLCAPS 
CM_DROPCAPS 

Definition at line 80 of file pgedit.cpp.

80  {
81  CM_RAINBOW,
84  CM_ITALIC,
85  CM_BOLD,
88  CM_SERIF,
91 };

Variable Documentation

◆ editor_dbwin_height

int editor_dbwin_height = 24

"Editor debug window height"

Definition at line 135 of file pgedit.cpp.

◆ editor_dbwin_name

char* editor_dbwin_name = "EditorDBWin"

"Editor debug window name"

Definition at line 132 of file pgedit.cpp.

◆ editor_dbwin_width

int editor_dbwin_width = 80

"Editor debug window width"

Definition at line 136 of file pgedit.cpp.

◆ editor_dbwin_xpos

int editor_dbwin_xpos = 50

"Editor debug window X Pos"

Definition at line 133 of file pgedit.cpp.

◆ editor_dbwin_ypos

int editor_dbwin_ypos = 500

"Editor debug window Y Pos"

Definition at line 134 of file pgedit.cpp.

◆ editor_image_blob_bb_color

int editor_image_blob_bb_color = ScrollView::YELLOW

"Blob bounding box colour"

Definition at line 127 of file pgedit.cpp.

◆ editor_image_text_color

int editor_image_text_color = ScrollView::WHITE

"Correct text colour"

Definition at line 129 of file pgedit.cpp.

◆ editor_image_win_name

char* editor_image_win_name = "EditorImage"

"Editor image window name"

Definition at line 120 of file pgedit.cpp.

◆ editor_image_word_bb_color

int editor_image_word_bb_color = ScrollView::BLUE

"Word bounding box colour"

Definition at line 125 of file pgedit.cpp.

◆ editor_image_xpos

int editor_image_xpos = 590

"Editor image X Pos"

Definition at line 121 of file pgedit.cpp.

◆ editor_image_ypos

int editor_image_ypos = 10

"Editor image Y Pos"

Definition at line 122 of file pgedit.cpp.

◆ editor_word_height

int editor_word_height = 240

"Word window height"

Definition at line 141 of file pgedit.cpp.

◆ editor_word_name

char* editor_word_name = "BlnWords"

"BL normalized word window"

Definition at line 138 of file pgedit.cpp.

◆ editor_word_width

int editor_word_width = 655

"Word window width"

Definition at line 142 of file pgedit.cpp.

◆ editor_word_xpos

int editor_word_xpos = 60

"Word window X Pos"

Definition at line 139 of file pgedit.cpp.

◆ editor_word_ypos

int editor_word_ypos = 510

"Word window Y Pos"

Definition at line 140 of file pgedit.cpp.

CM_ITALIC
Definition: pgedit.cpp:84
BLOCKS_CMD_EVENT
Definition: pgedit.cpp:61
SHOW_BOLD_CMD_EVENT
Definition: pgedit.cpp:72
SHOW_FIXEDPITCH_CMD_EVENT
Definition: pgedit.cpp:74
SHOW_UNDERLINE_CMD_EVENT
Definition: pgedit.cpp:73
SHOW_SMALLCAPS_CMD_EVENT
Definition: pgedit.cpp:76
CM_SERIF
Definition: pgedit.cpp:88
POLYGONAL_CMD_EVENT
Definition: pgedit.cpp:57
RECOG_WERDS
Definition: pgedit.cpp:66
DUMP_WERD_CMD_EVENT
Definition: pgedit.cpp:50
CM_RAINBOW
Definition: pgedit.cpp:81
RECOG_PSEUDO
Definition: pgedit.cpp:67
SHOW_ITALIC_CMD_EVENT
Definition: pgedit.cpp:71
SHOW_BLOB_FEATURES
Definition: pgedit.cpp:68
SHOW_SERIF_CMD_EVENT
Definition: pgedit.cpp:75
SHOW_DROPCAPS_CMD_EVENT
Definition: pgedit.cpp:77
BL_NORM_CMD_EVENT
Definition: pgedit.cpp:58
SHOW_SUBSCRIPT_CMD_EVENT
Definition: pgedit.cpp:69
CM_BOLD
Definition: pgedit.cpp:85
SHOW_POINT_CMD_EVENT
Definition: pgedit.cpp:51
QUIT_CMD_EVENT
Definition: pgedit.cpp:65
CM_SUPERSCRIPT
Definition: pgedit.cpp:83
BLAMER_CMD_EVENT
Definition: pgedit.cpp:54
CHANGE_DISP_CMD_EVENT
Definition: pgedit.cpp:49
BITMAP_CMD_EVENT
Definition: pgedit.cpp:59
CORRECT_TEXT_CMD_EVENT
Definition: pgedit.cpp:56
CM_SMALLCAPS
Definition: pgedit.cpp:89
IMAGE_CMD_EVENT
Definition: pgedit.cpp:60
UNIFORM_DISP_CMD_EVENT
Definition: pgedit.cpp:63
CM_FIXEDPITCH
Definition: pgedit.cpp:87
CM_DROPCAPS
Definition: pgedit.cpp:90
REFRESH_CMD_EVENT
Definition: pgedit.cpp:64
SHOW_SUPERSCRIPT_CMD_EVENT
Definition: pgedit.cpp:70
DEBUG_WERD_CMD_EVENT
Definition: pgedit.cpp:53
SHOW_BLN_WERD_CMD_EVENT
Definition: pgedit.cpp:52
CM_UNDERLINE
Definition: pgedit.cpp:86
BOUNDING_BOX_CMD_EVENT
Definition: pgedit.cpp:55
CM_SUBSCRIPT
Definition: pgedit.cpp:82
NULL_CMD_EVENT
Definition: pgedit.cpp:48
BASELINES_CMD_EVENT
Definition: pgedit.cpp:62