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