PageRenderTime 709ms CodeModel.GetById 174ms app.highlight 345ms RepoModel.GetById 180ms app.codeStats 0ms

/Lib/plat-mac/lib-scriptpackages/StdSuites/Text_Suite.py

http://unladen-swallow.googlecode.com/
Python | 224 lines | 168 code | 23 blank | 33 comment | 0 complexity | 163d0620f95f1e83aac2bc3a664960a1 MD5 | raw file
  1"""Suite Text Suite: A set of basic classes for text processing
  2Level 1, version 1
  3
  4Generated from /Volumes/Sap/System Folder/Extensions/AppleScript
  5AETE/AEUT resource version 1/0, language 0, script 0
  6"""
  7
  8import aetools
  9import MacOS
 10
 11_code = 'TEXT'
 12
 13class Text_Suite_Events:
 14
 15    pass
 16
 17
 18class text_flow(aetools.ComponentItem):
 19    """text flow - A contiguous block of text.  Page layout applications call this a \xd4story.\xd5 """
 20    want = 'cflo'
 21class _Prop__3c_inheritance_3e_(aetools.NProperty):
 22    """<inheritance> - inherits some of its properties from this class """
 23    which = 'c@#^'
 24    want = 'ctxt'
 25class _Prop_name(aetools.NProperty):
 26    """name - the name """
 27    which = 'pnam'
 28    want = 'itxt'
 29
 30text_flows = text_flow
 31
 32class character(aetools.ComponentItem):
 33    """character - A character """
 34    want = 'cha '
 35
 36class line(aetools.ComponentItem):
 37    """line - A line of text """
 38    want = 'clin'
 39class _Prop_justification(aetools.NProperty):
 40    """justification - the justification of the text """
 41    which = 'pjst'
 42    want = 'just'
 43
 44lines = line
 45
 46class paragraph(aetools.ComponentItem):
 47    """paragraph - A paragraph """
 48    want = 'cpar'
 49
 50paragraphs = paragraph
 51
 52class text(aetools.ComponentItem):
 53    """text - Text """
 54    want = 'ctxt'
 55class _Prop_color(aetools.NProperty):
 56    """color - the color of the first character """
 57    which = 'colr'
 58    want = 'cRGB'
 59class _Prop_font(aetools.NProperty):
 60    """font - the name of the font of the first character """
 61    which = 'font'
 62    want = 'ctxt'
 63class _Prop_quoted_form(aetools.NProperty):
 64    """quoted form - the text in quoted form """
 65    which = 'strq'
 66    want = 'ctxt'
 67class _Prop_size(aetools.NProperty):
 68    """size - the size in points of the first character """
 69    which = 'ptsz'
 70    want = 'fixd'
 71class _Prop_style(aetools.NProperty):
 72    """style - the text style of the first character of the first character """
 73    which = 'txst'
 74    want = 'tsty'
 75class _Prop_uniform_styles(aetools.NProperty):
 76    """uniform styles - the text styles that are uniform throughout the text """
 77    which = 'ustl'
 78    want = 'tsty'
 79class _Prop_writing_code(aetools.NProperty):
 80    """writing code - the script system and language """
 81    which = 'psct'
 82    want = 'intl'
 83#        element 'cha ' as ['indx']
 84#        element 'clin' as ['indx']
 85#        element 'cpar' as ['indx']
 86#        element 'ctxt' as ['indx']
 87#        element 'cwor' as ['indx']
 88
 89class word(aetools.ComponentItem):
 90    """word - A word """
 91    want = 'cwor'
 92
 93words = word
 94
 95class text_style_info(aetools.ComponentItem):
 96    """text style info - On and Off styles of text run """
 97    want = 'tsty'
 98class _Prop_off_styles(aetools.NProperty):
 99    """off styles - the styles that are off for the text """
100    which = 'ofst'
101    want = 'styl'
102class _Prop_on_styles(aetools.NProperty):
103    """on styles - the styles that are on for the text """
104    which = 'onst'
105    want = 'styl'
106
107text_style_infos = text_style_info
108text_flow._superclassnames = ['text']
109text_flow._privpropdict = {
110    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
111    'name' : _Prop_name,
112}
113text_flow._privelemdict = {
114}
115character._superclassnames = ['text']
116character._privpropdict = {
117    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
118}
119character._privelemdict = {
120}
121line._superclassnames = ['text']
122line._privpropdict = {
123    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
124    'justification' : _Prop_justification,
125}
126line._privelemdict = {
127}
128paragraph._superclassnames = ['text']
129paragraph._privpropdict = {
130    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
131}
132paragraph._privelemdict = {
133}
134text._superclassnames = []
135text._privpropdict = {
136    'color' : _Prop_color,
137    'font' : _Prop_font,
138    'quoted_form' : _Prop_quoted_form,
139    'size' : _Prop_size,
140    'style' : _Prop_style,
141    'uniform_styles' : _Prop_uniform_styles,
142    'writing_code' : _Prop_writing_code,
143}
144text._privelemdict = {
145    'character' : character,
146    'line' : line,
147    'paragraph' : paragraph,
148    'text' : text,
149    'word' : word,
150}
151word._superclassnames = ['text']
152word._privpropdict = {
153    '_3c_inheritance_3e_' : _Prop__3c_inheritance_3e_,
154}
155word._privelemdict = {
156}
157text_style_info._superclassnames = []
158text_style_info._privpropdict = {
159    'off_styles' : _Prop_off_styles,
160    'on_styles' : _Prop_on_styles,
161}
162text_style_info._privelemdict = {
163}
164_Enum_just = {
165    'left' : 'left',    # Align with left margin
166    'right' : 'rght',   # Align with right margin
167    'center' : 'cent',  # Align with center
168    'full' : 'full',    # Align with both left and right margins
169}
170
171_Enum_styl = {
172    'plain' : 'plan',   # Plain
173    'bold' : 'bold',    # Bold
174    'italic' : 'ital',  # Italic
175    'outline' : 'outl', # Outline
176    'shadow' : 'shad',  # Shadow
177    'underline' : 'undl',       # Underline
178    'superscript' : 'spsc',     # Superscript
179    'subscript' : 'sbsc',       # Subscript
180    'strikethrough' : 'strk',   # Strikethrough
181    'small_caps' : 'smcp',      # Small caps
182    'all_caps' : 'alcp',        # All capital letters
183    'all_lowercase' : 'lowc',   # Lowercase
184    'condensed' : 'cond',       # Condensed
185    'expanded' : 'pexp',        # Expanded
186    'hidden' : 'hidn',  # Hidden
187}
188
189
190#
191# Indices of types declared in this module
192#
193_classdeclarations = {
194    'cflo' : text_flow,
195    'cha ' : character,
196    'clin' : line,
197    'cpar' : paragraph,
198    'ctxt' : text,
199    'cwor' : word,
200    'tsty' : text_style_info,
201}
202
203_propdeclarations = {
204    'c@#^' : _Prop__3c_inheritance_3e_,
205    'colr' : _Prop_color,
206    'font' : _Prop_font,
207    'ofst' : _Prop_off_styles,
208    'onst' : _Prop_on_styles,
209    'pjst' : _Prop_justification,
210    'pnam' : _Prop_name,
211    'psct' : _Prop_writing_code,
212    'ptsz' : _Prop_size,
213    'strq' : _Prop_quoted_form,
214    'txst' : _Prop_style,
215    'ustl' : _Prop_uniform_styles,
216}
217
218_compdeclarations = {
219}
220
221_enumdeclarations = {
222    'just' : _Enum_just,
223    'styl' : _Enum_styl,
224}