summaryrefslogtreecommitdiffstats
path: root/Mac/Lib/lib-scripting/Text_Suite.py
blob: e4e82d9cb313976805c1aeefed18d33704db0205 (plain)
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
"""Suite Text Suite: A set of basic classes for text processing
Level 1, version 1

Generated from flap:System Folder:Extensions:Scripting Additions:Dialects:English Dialect
AETE/AEUT resource version 1/0, language 0, script 0
"""

import aetools
import MacOS

_code = 'TEXT'

class Text_Suite:

	pass


class character(aetools.ComponentItem):
	"""character - A character"""
	want = 'cha '
class best_type(aetools.NProperty):
	"""best type - the best descriptor type"""
	which = 'pbst'
	want = 'type'
class _class(aetools.NProperty):
	"""class - the class"""
	which = 'pcls'
	want = 'type'
class color(aetools.NProperty):
	"""color - the color"""
	which = 'colr'
	want = 'cRGB'
class default_type(aetools.NProperty):
	"""default type - the default descriptor type"""
	which = 'deft'
	want = 'type'
class font(aetools.NProperty):
	"""font - the name of the font"""
	which = 'font'
	want = 'ctxt'
class size(aetools.NProperty):
	"""size - the size in points"""
	which = 'ptsz'
	want = 'fixd'
class writing_code(aetools.NProperty):
	"""writing code - the script system and language"""
	which = 'psct'
	want = 'intl'
class style(aetools.NProperty):
	"""style - the text style"""
	which = 'txst'
	want = 'tsty'
class uniform_styles(aetools.NProperty):
	"""uniform styles - the text style"""
	which = 'ustl'
	want = 'tsty'

class line(aetools.ComponentItem):
	"""line - A line of text"""
	want = 'clin'
class justification(aetools.NProperty):
	"""justification - Justification of the text"""
	which = 'pjst'
	want = 'just'

lines = line

class paragraph(aetools.ComponentItem):
	"""paragraph - A paragraph"""
	want = 'cpar'

paragraphs = paragraph

class text(aetools.ComponentItem):
	"""text - Text"""
	want = 'ctxt'

class text_flow(aetools.ComponentItem):
	"""text flow - A contiguous block of text"""
	want = 'cflo'
class name(aetools.NProperty):
	"""name - the name"""
	which = 'pnam'
	want = 'itxt'

text_flows = text_flow

class word(aetools.ComponentItem):
	"""word - A word"""
	want = 'cwor'

words = word
character._propdict = {
	'best_type' : best_type,
	'_class' : _class,
	'color' : color,
	'default_type' : default_type,
	'font' : font,
	'size' : size,
	'writing_code' : writing_code,
	'style' : style,
	'uniform_styles' : uniform_styles,
}
character._elemdict = {
}
line._propdict = {
	'justification' : justification,
}
line._elemdict = {
}
paragraph._propdict = {
}
paragraph._elemdict = {
}
text._propdict = {
}
text._elemdict = {
}
text_flow._propdict = {
	'name' : name,
}
text_flow._elemdict = {
}
word._propdict = {
}
word._elemdict = {
}
_Enum_just = {
	'left' : 'left',	# Align with left margin
	'right' : 'rght',	# Align with right margin
	'center' : 'cent',	# Align with center
	'full' : 'full',	# Align with both left and right margins
}

_Enum_styl = {
	'plain' : 'plan',	# Plain
	'bold' : 'bold',	# Bold
	'italic' : 'ital',	# Italic
	'outline' : 'outl',	# Outline
	'shadow' : 'shad',	# Shadow
	'underline' : 'undl',	# Underline
	'superscript' : 'spsc',	# Superscript
	'subscript' : 'sbsc',	# Subscript
	'strikethrough' : 'strk',	# Strikethrough
	'small_caps' : 'smcp',	# Small caps
	'all_caps' : 'alcp',	# All capital letters
	'all_lowercase' : 'lowc',	# Lowercase
	'condensed' : 'cond',	# Condensed
	'expanded' : 'pexp',	# Expanded
	'hidden' : 'hidn',	# Hidden
}


#
# Indices of types declared in this module
#
_classdeclarations = {
	'cflo' : text_flow,
	'clin' : line,
	'ctxt' : text,
	'cha ' : character,
	'cwor' : word,
	'cpar' : paragraph,
}

_propdeclarations = {
	'pbst' : best_type,
	'psct' : writing_code,
	'txst' : style,
	'colr' : color,
	'font' : font,
	'pnam' : name,
	'pcls' : _class,
	'deft' : default_type,
	'pjst' : justification,
	'ptsz' : size,
	'ustl' : uniform_styles,
}

_compdeclarations = {
}

_enumdeclarations = {
	'styl' : _Enum_styl,
	'just' : _Enum_just,
}