1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
/*
* $Id$
*
* (C) 2003-2005 Gabest
*
* This file is part of subresync.
*
* Subresync is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Subresync is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
class CharImg
{
public:
CString m_str;
CSize m_size;
CAutoVectorPtr<BYTE> m_p;
// feature list
int m_topbottom;
CharImg(DWORD* p, int pitch, CRect r, int* left, int* right, int topbottom, CString str = _T(""));
CharImg(FILE* f);
~CharImg();
bool Match(CharImg* img);
bool Write(FILE* f);
bool Read(FILE* f);
};
class CharSegment
{
public:
int* left;
int* right;
int h, srow, erow;
CharSegment(int* left, int* right, int h, int srow, int erow);
~CharSegment();
};
// CSubresyncDlg dialog
class CSubresyncDlg : public CDialog
{
// Construction
public:
CSubresyncDlg(CString fn, CWnd* pParent = NULL); // standard constructor
virtual ~CSubresyncDlg();
bool Open(CString fn, int CharSet = DEFAULT_CHARSET, bool fAppend = false, int timeoff = 0);
bool Save(CString fn, exttype et, CTextFile::enc e, bool fClearImgLetterDb = false, bool fOcrDll = false);
// Dialog Data
enum { IDD = IDD_SUBRESYNC_DIALOG };
CListCtrl m_list;
CButton m_saveasbtn;
CButton m_resetbtn;
CButton m_editbtn;
CButton m_exitbtn;
BOOL m_fRender;
CButton m_previewchk;
BOOL m_fUnlink;
CButton m_unlinkchk;
CComboBox m_vslangs;
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
};
|