-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathframe_xrc.py
152 lines (115 loc) · 4.13 KB
/
frame_xrc.py
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# This file was automatically generated by pywxrc.
# -*- coding: UTF-8 -*-
import wx
import wx.xrc as xrc
__res = None
def get_resources():
""" This function provides access to the XML resources in this module."""
global __res
if __res == None:
__init_resources()
return __res
class xrcMain(wx.Frame):
#!XRCED:begin-block:xrcMain.PreCreate
def PreCreate(self, pre):
""" This function is called during the class's initialization.
Override it for custom setup before the window is created usually to
set additional window styles using SetWindowStyle() and SetExtraStyle().
"""
pass
#!XRCED:end-block:xrcMain.PreCreate
def __init__(self, parent):
# Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
pre = wx.PreFrame()
self.PreCreate(pre)
get_resources().LoadOnFrame(pre, parent, "Main")
self.PostCreate(pre)
# Define variables for the controls, bind event handlers
class xrcWordList(wx.Frame):
#!XRCED:begin-block:xrcWordList.PreCreate
def PreCreate(self, pre):
""" This function is called during the class's initialization.
Override it for custom setup before the window is created usually to
set additional window styles using SetWindowStyle() and SetExtraStyle().
"""
pass
#!XRCED:end-block:xrcWordList.PreCreate
def __init__(self, parent):
# Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
pre = wx.PreFrame()
self.PreCreate(pre)
get_resources().LoadOnFrame(pre, parent, "WordList")
self.PostCreate(pre)
# Define variables for the controls, bind event handlers
class xrcFeature(wx.Frame):
#!XRCED:begin-block:xrcFeature.PreCreate
def PreCreate(self, pre):
""" This function is called during the class's initialization.
Override it for custom setup before the window is created usually to
set additional window styles using SetWindowStyle() and SetExtraStyle().
"""
pass
#!XRCED:end-block:xrcFeature.PreCreate
def __init__(self, parent):
# Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
pre = wx.PreFrame()
self.PreCreate(pre)
get_resources().LoadOnFrame(pre, parent, "Feature")
self.PostCreate(pre)
# Define variables for the controls, bind event handlers
# ------------------------ Resource data ----------------------
def __init_resources():
global __res
__res = xrc.EmptyXmlResource()
__res.Load('frame.xrc')
# ----------------------- Gettext strings ---------------------
def __gettext_strings():
# This is a dummy function that lists all the strings that are used in
# the XRC file in the _("a string") format to be recognized by GNU
# gettext utilities (specificaly the xgettext utility) and the
# mki18n.py script. For more information see:
# http://wiki.wxpython.org/index.cgi/Internationalization
def _(str): pass
_("File")
_("Load Image")
_("Clear Image")
_("Exit")
_("Edit")
_("Zoom In")
_("Zoom Out")
_("Debug")
_("Undo")
_("Gray Histogram Image")
_("Distribution")
_("OCR\n文字识别")
_("Convert Image\n图像灰度化")
_("Binary Image\n图像二值化")
_("Border\n整体边界处的留白")
_("Image Denoising\n图像去噪")
_("Median Filter\n中值滤波")
_("FCM Normal\nFCM 常规算法")
_("FCM Fast\nFCM 快速算法")
_("FCM Block")
_("K-Means")
_("K-Means Fast")
_("OCR")
_("Tilt Correction\n倾斜处理")
_("Character Segmentation\n字符切割")
_("Word Show")
_("Character Recognition\n文字识别")
_("Proofread\n校对")
_("Help")
_("Documentation\n文档")
_("About\n关于")
_("PyOCR")
_("OCR")
_("Find Side By Outside Borders")
_("Find Side 1")
_("Find Side 2")
_("Normalize")
_("Resize")
_("Thinning")
_("Match")
_("Match By outside And distances")
_("PyOCR")
_("PyOCR Feature Extraction")