1wxTextAttr(3)              Erlang Module Definition              wxTextAttr(3)
2
3
4

NAME

6       wxTextAttr - Functions for wxTextAttr class
7

DESCRIPTION

9       wxTextAttr represents the character and paragraph attributes, or style,
10       for a range of text in a wxTextCtrl or wxRichTextCtrl (not  implemented
11       in wx).
12
13       When  setting up a wxTextAttr object, pass a bitlist mask to setFlags/2
14       to indicate which style elements should be changed. As  a  convenience,
15       when you call a setter such as SetFont, the relevant bit will be set.
16
17       See: wxTextCtrl, wxRichTextCtrl (not implemented in wx)
18
19       wxWidgets docs: wxTextAttr
20

DATA TYPES

22       wxTextAttr() = wx:wx_object()
23

EXPORTS

25       new() -> wxTextAttr()
26
27              Constructors.
28
29       new(ColText) -> wxTextAttr()
30
31       new(Attr) -> wxTextAttr()
32
33              Types:
34
35                 Attr = wxTextAttr()
36
37       new(ColText, Options :: [Option]) -> wxTextAttr()
38
39              Types:
40
41                 ColText = wx:wx_colour()
42                 Option =
43                     {colBack, wx:wx_colour()} |
44                     {font, wxFont:wxFont()} |
45                     {alignment, wx:wx_enum()}
46
47       getAlignment(This) -> wx:wx_enum()
48
49              Types:
50
51                 This = wxTextAttr()
52
53              Returns the alignment flags.
54
55              See ?wxTextAttrAlignment for a list of available styles.
56
57       getBackgroundColour(This) -> wx:wx_colour4()
58
59              Types:
60
61                 This = wxTextAttr()
62
63              Returns the background colour.
64
65       getFont(This) -> wxFont:wxFont()
66
67              Types:
68
69                 This = wxTextAttr()
70
71              Creates  and  returns a font specified by the font attributes in
72              the wxTextAttr object.
73
74              Note that wxTextAttr does not store a wxFont object, so this  is
75              only a temporary font.
76
77              For greater efficiency, access the font attributes directly.
78
79       getFontEncoding(This) -> wx:wx_enum()
80
81              Types:
82
83                 This = wxTextAttr()
84
85              Returns the font encoding.
86
87       getFontFaceName(This) -> unicode:charlist()
88
89              Types:
90
91                 This = wxTextAttr()
92
93              Returns the font face name.
94
95       getFontSize(This) -> integer()
96
97              Types:
98
99                 This = wxTextAttr()
100
101              Returns the font size in points.
102
103       getFontStyle(This) -> wx:wx_enum()
104
105              Types:
106
107                 This = wxTextAttr()
108
109              Returns the font style.
110
111       getFontUnderlined(This) -> boolean()
112
113              Types:
114
115                 This = wxTextAttr()
116
117              Returns true if the font is underlined.
118
119       getFontWeight(This) -> wx:wx_enum()
120
121              Types:
122
123                 This = wxTextAttr()
124
125              Returns the font weight.
126
127       getLeftIndent(This) -> integer()
128
129              Types:
130
131                 This = wxTextAttr()
132
133              Returns the left indent in tenths of a millimetre.
134
135       getLeftSubIndent(This) -> integer()
136
137              Types:
138
139                 This = wxTextAttr()
140
141              Returns the left sub-indent in tenths of a millimetre.
142
143       getRightIndent(This) -> integer()
144
145              Types:
146
147                 This = wxTextAttr()
148
149              Returns the right indent in tenths of a millimeter.
150
151       getTabs(This) -> [integer()]
152
153              Types:
154
155                 This = wxTextAttr()
156
157              Returns  an  array  of  tab stops, each expressed in tenths of a
158              millimeter.
159
160              Each stop is measured from the left margin  and  therefore  each
161              value must be larger than the last.
162
163       getTextColour(This) -> wx:wx_colour4()
164
165              Types:
166
167                 This = wxTextAttr()
168
169              Returns the text foreground colour.
170
171       hasBackgroundColour(This) -> boolean()
172
173              Types:
174
175                 This = wxTextAttr()
176
177              Returns  true  if  the  attribute  object specifies a background
178              colour.
179
180       hasFont(This) -> boolean()
181
182              Types:
183
184                 This = wxTextAttr()
185
186              Returns true if the attribute  object  specifies  any  font  at‐
187              tributes.
188
189       hasTextColour(This) -> boolean()
190
191              Types:
192
193                 This = wxTextAttr()
194
195              Returns true if the attribute object specifies a text foreground
196              colour.
197
198       getFlags(This) -> integer()
199
200              Types:
201
202                 This = wxTextAttr()
203
204              Returns flags indicating which attributes are applicable.
205
206              See setFlags/2 for a list of available flags.
207
208       isDefault(This) -> boolean()
209
210              Types:
211
212                 This = wxTextAttr()
213
214              Returns false if we have any attributes set, true otherwise.
215
216       setAlignment(This, Alignment) -> ok
217
218              Types:
219
220                 This = wxTextAttr()
221                 Alignment = wx:wx_enum()
222
223              Sets the paragraph alignment.
224
225              See ?wxTextAttrAlignment enumeration values.
226
227              Of these, wxTEXT_ALIGNMENT_JUSTIFIED is unimplemented. In future
228              justification  may  be  supported  when  printing or previewing,
229              only.
230
231       setBackgroundColour(This, ColBack) -> ok
232
233              Types:
234
235                 This = wxTextAttr()
236                 ColBack = wx:wx_colour()
237
238              Sets the background colour.
239
240       setFlags(This, Flags) -> ok
241
242              Types:
243
244                 This = wxTextAttr()
245                 Flags = integer()
246
247              Sets the flags determining which styles are being specified.
248
249              The ?wxTextAttrFlags values can be passed in a bitlist.
250
251       setFont(This, Font) -> ok
252
253              Types:
254
255                 This = wxTextAttr()
256                 Font = wxFont:wxFont()
257
258       setFont(This, Font, Options :: [Option]) -> ok
259
260              Types:
261
262                 This = wxTextAttr()
263                 Font = wxFont:wxFont()
264                 Option = {flags, integer()}
265
266              Sets the attributes for the given font.
267
268              Note that wxTextAttr does not store an actual wxFont object.
269
270       setFontEncoding(This, Encoding) -> ok
271
272              Types:
273
274                 This = wxTextAttr()
275                 Encoding = wx:wx_enum()
276
277              Sets the font encoding.
278
279       setFontFaceName(This, FaceName) -> ok
280
281              Types:
282
283                 This = wxTextAttr()
284                 FaceName = unicode:chardata()
285
286              Sets the font face name.
287
288       setFontFamily(This, Family) -> ok
289
290              Types:
291
292                 This = wxTextAttr()
293                 Family = wx:wx_enum()
294
295              Sets the font family.
296
297       setFontSize(This, PointSize) -> ok
298
299              Types:
300
301                 This = wxTextAttr()
302                 PointSize = integer()
303
304              Sets the font size in points.
305
306       setFontPointSize(This, PointSize) -> ok
307
308              Types:
309
310                 This = wxTextAttr()
311                 PointSize = integer()
312
313              Sets the font size in points.
314
315       setFontPixelSize(This, PixelSize) -> ok
316
317              Types:
318
319                 This = wxTextAttr()
320                 PixelSize = integer()
321
322              Sets the font size in pixels.
323
324       setFontStyle(This, FontStyle) -> ok
325
326              Types:
327
328                 This = wxTextAttr()
329                 FontStyle = wx:wx_enum()
330
331              Sets the font style (normal, italic or slanted).
332
333       setFontUnderlined(This, Underlined) -> ok
334
335              Types:
336
337                 This = wxTextAttr()
338                 Underlined = boolean()
339
340              Sets the font underlining (solid line, text colour).
341
342       setFontWeight(This, FontWeight) -> ok
343
344              Types:
345
346                 This = wxTextAttr()
347                 FontWeight = wx:wx_enum()
348
349              Sets the font weight.
350
351       setLeftIndent(This, Indent) -> ok
352
353              Types:
354
355                 This = wxTextAttr()
356                 Indent = integer()
357
358       setLeftIndent(This, Indent, Options :: [Option]) -> ok
359
360              Types:
361
362                 This = wxTextAttr()
363                 Indent = integer()
364                 Option = {subIndent, integer()}
365
366              Sets the left indent and left subindent in tenths of a  millime‐
367              tre.
368
369              The  sub-indent is an offset from the left of the paragraph, and
370              is used for all but the first line in a paragraph.
371
372              A positive value will cause the first line to appear to the left
373              of  the  subsequent  lines,  and a negative value will cause the
374              first line to be indented relative to the subsequent lines.
375
376              wxRichTextBuffer (not implemented in  wx)  uses  indentation  to
377              render  a bulleted item. The left indent is the distance between
378              the margin and the bullet. The content of the paragraph, includ‐
379              ing the first line, starts at leftMargin + leftSubIndent. So the
380              distance between the left edge of the bullet and the left of the
381              actual paragraph is leftSubIndent.
382
383       setRightIndent(This, Indent) -> ok
384
385              Types:
386
387                 This = wxTextAttr()
388                 Indent = integer()
389
390              Sets the right indent in tenths of a millimetre.
391
392       setTabs(This, Tabs) -> ok
393
394              Types:
395
396                 This = wxTextAttr()
397                 Tabs = [integer()]
398
399              Sets the tab stops, expressed in tenths of a millimetre.
400
401              Each  stop  is  measured from the left margin and therefore each
402              value must be larger than the last.
403
404       setTextColour(This, ColText) -> ok
405
406              Types:
407
408                 This = wxTextAttr()
409                 ColText = wx:wx_colour()
410
411              Sets the text foreground colour.
412
413       destroy(This :: wxTextAttr()) -> ok
414
415              Destroys the object.
416
417
418
419wxWidgets team.                    wx 2.1.4                      wxTextAttr(3)
Impressum