]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/mac/richtext.py
daily updates and add wxGrpahicsPath overloads
[wxWidgets.git] / wxPython / src / mac / richtext.py
CommitLineData
06810ecf
RD
1# This file was created automatically by SWIG 1.3.29.
2# Don't modify this file, modify the SWIG interface instead.
3
4import _richtext
5import new
6new_instancemethod = new.instancemethod
7def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
8 if (name == "thisown"): return self.this.own(value)
9 if (name == "this"):
10 if type(value).__name__ == 'PySwigObject':
11 self.__dict__[name] = value
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23def _swig_getattr(self,class_type,name):
24 if (name == "thisown"): return self.this.own()
25 method = class_type.__swig_getmethods__.get(name,None)
26 if method: return method(self)
27 raise AttributeError,name
28
29def _swig_repr(self):
30 try: strthis = "proxy of " + self.this.__repr__()
31 except: strthis = ""
32 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
33
34import types
35try:
36 _object = types.ObjectType
37 _newclass = 1
38except AttributeError:
39 class _object : pass
40 _newclass = 0
41del types
42
43
44def _swig_setattr_nondynamic_method(set):
45 def set_attr(self,name,value):
46 if (name == "thisown"): return self.this.own(value)
47 if hasattr(self,name) or (name == "this"):
48 set(self,name,value)
49 else:
50 raise AttributeError("You cannot add attributes to %s" % self)
51 return set_attr
52
53
54USE_TEXTATTREX = _richtext.USE_TEXTATTREX
55import _windows
56import _core
06810ecf
RD
57wx = _core
58__docfilter__ = wx.__DocFilter(globals())
59RE_READONLY = _richtext.RE_READONLY
60RE_MULTILINE = _richtext.RE_MULTILINE
61RICHTEXT_SHIFT_DOWN = _richtext.RICHTEXT_SHIFT_DOWN
62RICHTEXT_CTRL_DOWN = _richtext.RICHTEXT_CTRL_DOWN
63RICHTEXT_ALT_DOWN = _richtext.RICHTEXT_ALT_DOWN
64RICHTEXT_SELECTED = _richtext.RICHTEXT_SELECTED
65RICHTEXT_TAGGED = _richtext.RICHTEXT_TAGGED
66RICHTEXT_FOCUSSED = _richtext.RICHTEXT_FOCUSSED
67RICHTEXT_IS_FOCUS = _richtext.RICHTEXT_IS_FOCUS
68RICHTEXT_TYPE_ANY = _richtext.RICHTEXT_TYPE_ANY
69RICHTEXT_TYPE_TEXT = _richtext.RICHTEXT_TYPE_TEXT
70RICHTEXT_TYPE_XML = _richtext.RICHTEXT_TYPE_XML
71RICHTEXT_TYPE_HTML = _richtext.RICHTEXT_TYPE_HTML
72RICHTEXT_TYPE_RTF = _richtext.RICHTEXT_TYPE_RTF
73RICHTEXT_TYPE_PDF = _richtext.RICHTEXT_TYPE_PDF
74RICHTEXT_FIXED_WIDTH = _richtext.RICHTEXT_FIXED_WIDTH
75RICHTEXT_FIXED_HEIGHT = _richtext.RICHTEXT_FIXED_HEIGHT
76RICHTEXT_VARIABLE_WIDTH = _richtext.RICHTEXT_VARIABLE_WIDTH
77RICHTEXT_VARIABLE_HEIGHT = _richtext.RICHTEXT_VARIABLE_HEIGHT
78RICHTEXT_HITTEST_NONE = _richtext.RICHTEXT_HITTEST_NONE
79RICHTEXT_HITTEST_BEFORE = _richtext.RICHTEXT_HITTEST_BEFORE
80RICHTEXT_HITTEST_AFTER = _richtext.RICHTEXT_HITTEST_AFTER
81RICHTEXT_HITTEST_ON = _richtext.RICHTEXT_HITTEST_ON
82RICHTEXT_FORMATTED = _richtext.RICHTEXT_FORMATTED
83RICHTEXT_UNFORMATTED = _richtext.RICHTEXT_UNFORMATTED
b39fe951
RD
84RICHTEXT_SETSTYLE_NONE = _richtext.RICHTEXT_SETSTYLE_NONE
85RICHTEXT_SETSTYLE_WITH_UNDO = _richtext.RICHTEXT_SETSTYLE_WITH_UNDO
86RICHTEXT_SETSTYLE_OPTIMIZE = _richtext.RICHTEXT_SETSTYLE_OPTIMIZE
87RICHTEXT_SETSTYLE_PARAGRAPHS_ONLY = _richtext.RICHTEXT_SETSTYLE_PARAGRAPHS_ONLY
88RICHTEXT_SETSTYLE_CHARACTERS_ONLY = _richtext.RICHTEXT_SETSTYLE_CHARACTERS_ONLY
c2829a8f
RD
89RICHTEXT_INSERT_NONE = _richtext.RICHTEXT_INSERT_NONE
90RICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE = _richtext.RICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE
06810ecf
RD
91TEXT_ATTR_TEXT_COLOUR = _richtext.TEXT_ATTR_TEXT_COLOUR
92TEXT_ATTR_BACKGROUND_COLOUR = _richtext.TEXT_ATTR_BACKGROUND_COLOUR
93TEXT_ATTR_FONT_FACE = _richtext.TEXT_ATTR_FONT_FACE
94TEXT_ATTR_FONT_SIZE = _richtext.TEXT_ATTR_FONT_SIZE
95TEXT_ATTR_FONT_WEIGHT = _richtext.TEXT_ATTR_FONT_WEIGHT
96TEXT_ATTR_FONT_ITALIC = _richtext.TEXT_ATTR_FONT_ITALIC
97TEXT_ATTR_FONT_UNDERLINE = _richtext.TEXT_ATTR_FONT_UNDERLINE
98TEXT_ATTR_FONT = _richtext.TEXT_ATTR_FONT
99TEXT_ATTR_ALIGNMENT = _richtext.TEXT_ATTR_ALIGNMENT
100TEXT_ATTR_LEFT_INDENT = _richtext.TEXT_ATTR_LEFT_INDENT
101TEXT_ATTR_RIGHT_INDENT = _richtext.TEXT_ATTR_RIGHT_INDENT
102TEXT_ATTR_TABS = _richtext.TEXT_ATTR_TABS
103TEXT_ATTR_PARA_SPACING_AFTER = _richtext.TEXT_ATTR_PARA_SPACING_AFTER
104TEXT_ATTR_PARA_SPACING_BEFORE = _richtext.TEXT_ATTR_PARA_SPACING_BEFORE
105TEXT_ATTR_LINE_SPACING = _richtext.TEXT_ATTR_LINE_SPACING
106TEXT_ATTR_CHARACTER_STYLE_NAME = _richtext.TEXT_ATTR_CHARACTER_STYLE_NAME
107TEXT_ATTR_PARAGRAPH_STYLE_NAME = _richtext.TEXT_ATTR_PARAGRAPH_STYLE_NAME
108TEXT_ATTR_BULLET_STYLE = _richtext.TEXT_ATTR_BULLET_STYLE
109TEXT_ATTR_BULLET_NUMBER = _richtext.TEXT_ATTR_BULLET_NUMBER
110TEXT_ATTR_BULLET_SYMBOL = _richtext.TEXT_ATTR_BULLET_SYMBOL
111TEXT_ATTR_BULLET_STYLE_NONE = _richtext.TEXT_ATTR_BULLET_STYLE_NONE
112TEXT_ATTR_BULLET_STYLE_ARABIC = _richtext.TEXT_ATTR_BULLET_STYLE_ARABIC
113TEXT_ATTR_BULLET_STYLE_LETTERS_UPPER = _richtext.TEXT_ATTR_BULLET_STYLE_LETTERS_UPPER
114TEXT_ATTR_BULLET_STYLE_LETTERS_LOWER = _richtext.TEXT_ATTR_BULLET_STYLE_LETTERS_LOWER
115TEXT_ATTR_BULLET_STYLE_ROMAN_UPPER = _richtext.TEXT_ATTR_BULLET_STYLE_ROMAN_UPPER
116TEXT_ATTR_BULLET_STYLE_ROMAN_LOWER = _richtext.TEXT_ATTR_BULLET_STYLE_ROMAN_LOWER
117TEXT_ATTR_BULLET_STYLE_SYMBOL = _richtext.TEXT_ATTR_BULLET_STYLE_SYMBOL
118TEXT_ATTR_BULLET_STYLE_BITMAP = _richtext.TEXT_ATTR_BULLET_STYLE_BITMAP
119TEXT_ATTR_BULLET_STYLE_PARENTHESES = _richtext.TEXT_ATTR_BULLET_STYLE_PARENTHESES
120TEXT_ATTR_BULLET_STYLE_PERIOD = _richtext.TEXT_ATTR_BULLET_STYLE_PERIOD
121TEXT_ATTR_LINE_SPACING_NORMAL = _richtext.TEXT_ATTR_LINE_SPACING_NORMAL
122TEXT_ATTR_LINE_SPACING_HALF = _richtext.TEXT_ATTR_LINE_SPACING_HALF
123TEXT_ATTR_LINE_SPACING_TWICE = _richtext.TEXT_ATTR_LINE_SPACING_TWICE
124TEXT_ALIGNMENT_DEFAULT = _richtext.TEXT_ALIGNMENT_DEFAULT
125TEXT_ALIGNMENT_LEFT = _richtext.TEXT_ALIGNMENT_LEFT
126TEXT_ALIGNMENT_CENTRE = _richtext.TEXT_ALIGNMENT_CENTRE
127TEXT_ALIGNMENT_CENTER = _richtext.TEXT_ALIGNMENT_CENTER
128TEXT_ALIGNMENT_RIGHT = _richtext.TEXT_ALIGNMENT_RIGHT
129TEXT_ALIGNMENT_JUSTIFIED = _richtext.TEXT_ALIGNMENT_JUSTIFIED
130class RichTextRange(object):
131 """
132 RichTextRange is a data structure that represents a range of text
133 within a `RichTextCtrl`. It simply contains integer ``start`` and
134 ``end`` properties and a few operations useful for dealing with
135 ranges. In most places in wxPython where a RichTextRange is expected a
136 2-tuple containing (start, end) can be used instead.
137 """
138 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
139 __repr__ = _swig_repr
140 def __init__(self, *args, **kwargs):
141 """
142 __init__(self, long start=0, long end=0) -> RichTextRange
143
144 Creates a new range object.
145 """
146 _richtext.RichTextRange_swiginit(self,_richtext.new_RichTextRange(*args, **kwargs))
147 __swig_destroy__ = _richtext.delete_RichTextRange
148 __del__ = lambda self : None;
149 def __eq__(*args, **kwargs):
150 """
151 __eq__(self, PyObject other) -> bool
152
153 Test for equality of RichTextRange objects.
154 """
155 return _richtext.RichTextRange___eq__(*args, **kwargs)
156
157 def __sub__(*args, **kwargs):
158 """__sub__(self, RichTextRange range) -> RichTextRange"""
159 return _richtext.RichTextRange___sub__(*args, **kwargs)
160
161 def __add__(*args, **kwargs):
162 """__add__(self, RichTextRange range) -> RichTextRange"""
163 return _richtext.RichTextRange___add__(*args, **kwargs)
164
165 def SetRange(*args, **kwargs):
166 """SetRange(self, long start, long end)"""
167 return _richtext.RichTextRange_SetRange(*args, **kwargs)
168
169 def SetStart(*args, **kwargs):
170 """SetStart(self, long start)"""
171 return _richtext.RichTextRange_SetStart(*args, **kwargs)
172
173 def GetStart(*args, **kwargs):
174 """GetStart(self) -> long"""
175 return _richtext.RichTextRange_GetStart(*args, **kwargs)
176
177 start = property(GetStart, SetStart)
178 def SetEnd(*args, **kwargs):
179 """SetEnd(self, long end)"""
180 return _richtext.RichTextRange_SetEnd(*args, **kwargs)
181
182 def GetEnd(*args, **kwargs):
183 """GetEnd(self) -> long"""
184 return _richtext.RichTextRange_GetEnd(*args, **kwargs)
185
186 end = property(GetEnd, SetEnd)
187 def IsOutside(*args, **kwargs):
188 """
189 IsOutside(self, RichTextRange range) -> bool
190
191 Returns true if this range is completely outside 'range'
192 """
193 return _richtext.RichTextRange_IsOutside(*args, **kwargs)
194
195 def IsWithin(*args, **kwargs):
196 """
197 IsWithin(self, RichTextRange range) -> bool
198
199 Returns true if this range is completely within 'range'
200 """
201 return _richtext.RichTextRange_IsWithin(*args, **kwargs)
202
203 def Contains(*args, **kwargs):
204 """
205 Contains(self, long pos) -> bool
206
207 Returns true if the given position is within this range. Allow for the
208 possibility of an empty range - assume the position is within this
209 empty range.
210 """
211 return _richtext.RichTextRange_Contains(*args, **kwargs)
212
213 def LimitTo(*args, **kwargs):
214 """
215 LimitTo(self, RichTextRange range) -> bool
216
217 Limit this range to be within 'range'
218 """
219 return _richtext.RichTextRange_LimitTo(*args, **kwargs)
220
221 def GetLength(*args, **kwargs):
222 """
223 GetLength(self) -> long
224
225 Gets the length of the range
226 """
227 return _richtext.RichTextRange_GetLength(*args, **kwargs)
228
229 def Swap(*args, **kwargs):
230 """
231 Swap(self)
232
233 Swaps the start and end
234 """
235 return _richtext.RichTextRange_Swap(*args, **kwargs)
236
237 def Get(*args, **kwargs):
238 """
239 Get() -> (start,end)
240
241 Returns the start and end properties as a tuple.
242 """
243 return _richtext.RichTextRange_Get(*args, **kwargs)
244
245 def __str__(self): return str(self.Get())
246 def __repr__(self): return 'RichTextRange'+str(self.Get())
247 def __len__(self): return len(self.Get())
248 def __getitem__(self, index): return self.Get()[index]
249 def __setitem__(self, index, val):
250 if index == 0: self.start = val
251 elif index == 1: self.end = val
252 else: raise IndexError
253 def __nonzero__(self): return self.Get() != (0,0)
254 __safe_for_unpickling__ = True
255 def __reduce__(self): return (RichTextRange, self.Get())
256
e70b4d2d
RD
257 End = property(GetEnd,SetEnd,doc="See `GetEnd` and `SetEnd`")
258 Length = property(GetLength,doc="See `GetLength`")
259 Start = property(GetStart,SetStart,doc="See `GetStart` and `SetStart`")
06810ecf
RD
260_richtext.RichTextRange_swigregister(RichTextRange)
261
262class RichTextAttr(object):
263 """
264 The RichTextAttr class stored information about the various attributes
265 for a block of text, including font, colour, indents, alignments, and
266 etc.
267 """
268 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
269 __repr__ = _swig_repr
270 def __init__(self, *args, **kwargs):
271 """
92515dfc 272 __init__(self, Colour colText=wxNullColour, Colour colBack=wxNullColour,
06810ecf
RD
273 int alignment=TEXT_ALIGNMENT_DEFAULT) -> RichTextAttr
274
275 The RichTextAttr class stored information about the various attributes
276 for a block of text, including font, colour, indents, alignments, and
277 etc.
278 """
279 _richtext.RichTextAttr_swiginit(self,_richtext.new_RichTextAttr(*args, **kwargs))
280 __swig_destroy__ = _richtext.delete_RichTextAttr
281 __del__ = lambda self : None;
282 def CreateFont(*args, **kwargs):
283 """CreateFont(self) -> Font"""
284 return _richtext.RichTextAttr_CreateFont(*args, **kwargs)
285
286 def GetFontAttributes(*args, **kwargs):
287 """GetFontAttributes(self, Font font) -> bool"""
288 return _richtext.RichTextAttr_GetFontAttributes(*args, **kwargs)
289
290 def GetFont(self):
291 return self.CreateFont()
292 def SetFont(self, font):
293 return self.GetFontAttributes(font)
294
295 def SetTextColour(*args, **kwargs):
296 """SetTextColour(self, Colour colText)"""
297 return _richtext.RichTextAttr_SetTextColour(*args, **kwargs)
298
299 def SetBackgroundColour(*args, **kwargs):
300 """SetBackgroundColour(self, Colour colBack)"""
301 return _richtext.RichTextAttr_SetBackgroundColour(*args, **kwargs)
302
303 def SetAlignment(*args, **kwargs):
304 """SetAlignment(self, int alignment)"""
305 return _richtext.RichTextAttr_SetAlignment(*args, **kwargs)
306
307 def SetTabs(*args, **kwargs):
308 """SetTabs(self, wxArrayInt tabs)"""
309 return _richtext.RichTextAttr_SetTabs(*args, **kwargs)
310
311 def SetLeftIndent(*args, **kwargs):
312 """SetLeftIndent(self, int indent, int subIndent=0)"""
313 return _richtext.RichTextAttr_SetLeftIndent(*args, **kwargs)
314
315 def SetRightIndent(*args, **kwargs):
316 """SetRightIndent(self, int indent)"""
317 return _richtext.RichTextAttr_SetRightIndent(*args, **kwargs)
318
319 def SetFontSize(*args, **kwargs):
320 """SetFontSize(self, int pointSize)"""
321 return _richtext.RichTextAttr_SetFontSize(*args, **kwargs)
322
323 def SetFontStyle(*args, **kwargs):
324 """SetFontStyle(self, int fontStyle)"""
325 return _richtext.RichTextAttr_SetFontStyle(*args, **kwargs)
326
327 def SetFontWeight(*args, **kwargs):
328 """SetFontWeight(self, int fontWeight)"""
329 return _richtext.RichTextAttr_SetFontWeight(*args, **kwargs)
330
331 def SetFontFaceName(*args, **kwargs):
332 """SetFontFaceName(self, String faceName)"""
333 return _richtext.RichTextAttr_SetFontFaceName(*args, **kwargs)
334
335 def SetFontUnderlined(*args, **kwargs):
336 """SetFontUnderlined(self, bool underlined)"""
337 return _richtext.RichTextAttr_SetFontUnderlined(*args, **kwargs)
338
339 def SetFlags(*args, **kwargs):
340 """SetFlags(self, long flags)"""
341 return _richtext.RichTextAttr_SetFlags(*args, **kwargs)
342
343 def SetCharacterStyleName(*args, **kwargs):
344 """SetCharacterStyleName(self, String name)"""
345 return _richtext.RichTextAttr_SetCharacterStyleName(*args, **kwargs)
346
347 def SetParagraphStyleName(*args, **kwargs):
348 """SetParagraphStyleName(self, String name)"""
349 return _richtext.RichTextAttr_SetParagraphStyleName(*args, **kwargs)
350
351 def SetParagraphSpacingAfter(*args, **kwargs):
352 """SetParagraphSpacingAfter(self, int spacing)"""
353 return _richtext.RichTextAttr_SetParagraphSpacingAfter(*args, **kwargs)
354
355 def SetParagraphSpacingBefore(*args, **kwargs):
356 """SetParagraphSpacingBefore(self, int spacing)"""
357 return _richtext.RichTextAttr_SetParagraphSpacingBefore(*args, **kwargs)
358
359 def SetLineSpacing(*args, **kwargs):
360 """SetLineSpacing(self, int spacing)"""
361 return _richtext.RichTextAttr_SetLineSpacing(*args, **kwargs)
362
363 def SetBulletStyle(*args, **kwargs):
364 """SetBulletStyle(self, int style)"""
365 return _richtext.RichTextAttr_SetBulletStyle(*args, **kwargs)
366
367 def SetBulletNumber(*args, **kwargs):
368 """SetBulletNumber(self, int n)"""
369 return _richtext.RichTextAttr_SetBulletNumber(*args, **kwargs)
370
371 def SetBulletSymbol(*args, **kwargs):
372 """SetBulletSymbol(self, wxChar symbol)"""
373 return _richtext.RichTextAttr_SetBulletSymbol(*args, **kwargs)
374
b39fe951
RD
375 def SetBulletFont(*args, **kwargs):
376 """SetBulletFont(self, String bulletFont)"""
377 return _richtext.RichTextAttr_SetBulletFont(*args, **kwargs)
378
06810ecf
RD
379 def GetTextColour(*args, **kwargs):
380 """GetTextColour(self) -> Colour"""
381 return _richtext.RichTextAttr_GetTextColour(*args, **kwargs)
382
383 def GetBackgroundColour(*args, **kwargs):
384 """GetBackgroundColour(self) -> Colour"""
385 return _richtext.RichTextAttr_GetBackgroundColour(*args, **kwargs)
386
387 def GetAlignment(*args, **kwargs):
388 """GetAlignment(self) -> int"""
389 return _richtext.RichTextAttr_GetAlignment(*args, **kwargs)
390
391 def GetTabs(*args, **kwargs):
392 """GetTabs(self) -> wxArrayInt"""
393 return _richtext.RichTextAttr_GetTabs(*args, **kwargs)
394
395 def GetLeftIndent(*args, **kwargs):
396 """GetLeftIndent(self) -> long"""
397 return _richtext.RichTextAttr_GetLeftIndent(*args, **kwargs)
398
399 def GetLeftSubIndent(*args, **kwargs):
400 """GetLeftSubIndent(self) -> long"""
401 return _richtext.RichTextAttr_GetLeftSubIndent(*args, **kwargs)
402
403 def GetRightIndent(*args, **kwargs):
404 """GetRightIndent(self) -> long"""
405 return _richtext.RichTextAttr_GetRightIndent(*args, **kwargs)
406
407 def GetFlags(*args, **kwargs):
408 """GetFlags(self) -> long"""
409 return _richtext.RichTextAttr_GetFlags(*args, **kwargs)
410
411 def GetFontSize(*args, **kwargs):
412 """GetFontSize(self) -> int"""
413 return _richtext.RichTextAttr_GetFontSize(*args, **kwargs)
414
415 def GetFontStyle(*args, **kwargs):
416 """GetFontStyle(self) -> int"""
417 return _richtext.RichTextAttr_GetFontStyle(*args, **kwargs)
418
419 def GetFontWeight(*args, **kwargs):
420 """GetFontWeight(self) -> int"""
421 return _richtext.RichTextAttr_GetFontWeight(*args, **kwargs)
422
423 def GetFontUnderlined(*args, **kwargs):
424 """GetFontUnderlined(self) -> bool"""
425 return _richtext.RichTextAttr_GetFontUnderlined(*args, **kwargs)
426
427 def GetFontFaceName(*args, **kwargs):
428 """GetFontFaceName(self) -> String"""
429 return _richtext.RichTextAttr_GetFontFaceName(*args, **kwargs)
430
431 def GetCharacterStyleName(*args, **kwargs):
432 """GetCharacterStyleName(self) -> String"""
433 return _richtext.RichTextAttr_GetCharacterStyleName(*args, **kwargs)
434
435 def GetParagraphStyleName(*args, **kwargs):
436 """GetParagraphStyleName(self) -> String"""
437 return _richtext.RichTextAttr_GetParagraphStyleName(*args, **kwargs)
438
439 def GetParagraphSpacingAfter(*args, **kwargs):
440 """GetParagraphSpacingAfter(self) -> int"""
441 return _richtext.RichTextAttr_GetParagraphSpacingAfter(*args, **kwargs)
442
443 def GetParagraphSpacingBefore(*args, **kwargs):
444 """GetParagraphSpacingBefore(self) -> int"""
445 return _richtext.RichTextAttr_GetParagraphSpacingBefore(*args, **kwargs)
446
447 def GetLineSpacing(*args, **kwargs):
448 """GetLineSpacing(self) -> int"""
449 return _richtext.RichTextAttr_GetLineSpacing(*args, **kwargs)
450
451 def GetBulletStyle(*args, **kwargs):
452 """GetBulletStyle(self) -> int"""
453 return _richtext.RichTextAttr_GetBulletStyle(*args, **kwargs)
454
455 def GetBulletNumber(*args, **kwargs):
456 """GetBulletNumber(self) -> int"""
457 return _richtext.RichTextAttr_GetBulletNumber(*args, **kwargs)
458
459 def GetBulletSymbol(*args, **kwargs):
460 """GetBulletSymbol(self) -> wxChar"""
461 return _richtext.RichTextAttr_GetBulletSymbol(*args, **kwargs)
462
b39fe951
RD
463 def GetBulletFont(*args, **kwargs):
464 """GetBulletFont(self) -> String"""
465 return _richtext.RichTextAttr_GetBulletFont(*args, **kwargs)
466
06810ecf
RD
467 def HasTextColour(*args, **kwargs):
468 """HasTextColour(self) -> bool"""
469 return _richtext.RichTextAttr_HasTextColour(*args, **kwargs)
470
471 def HasBackgroundColour(*args, **kwargs):
472 """HasBackgroundColour(self) -> bool"""
473 return _richtext.RichTextAttr_HasBackgroundColour(*args, **kwargs)
474
475 def HasAlignment(*args, **kwargs):
476 """HasAlignment(self) -> bool"""
477 return _richtext.RichTextAttr_HasAlignment(*args, **kwargs)
478
479 def HasTabs(*args, **kwargs):
480 """HasTabs(self) -> bool"""
481 return _richtext.RichTextAttr_HasTabs(*args, **kwargs)
482
483 def HasLeftIndent(*args, **kwargs):
484 """HasLeftIndent(self) -> bool"""
485 return _richtext.RichTextAttr_HasLeftIndent(*args, **kwargs)
486
487 def HasRightIndent(*args, **kwargs):
488 """HasRightIndent(self) -> bool"""
489 return _richtext.RichTextAttr_HasRightIndent(*args, **kwargs)
490
491 def HasWeight(*args, **kwargs):
492 """HasWeight(self) -> bool"""
493 return _richtext.RichTextAttr_HasWeight(*args, **kwargs)
494
495 def HasSize(*args, **kwargs):
496 """HasSize(self) -> bool"""
497 return _richtext.RichTextAttr_HasSize(*args, **kwargs)
498
499 def HasItalic(*args, **kwargs):
500 """HasItalic(self) -> bool"""
501 return _richtext.RichTextAttr_HasItalic(*args, **kwargs)
502
503 def HasUnderlined(*args, **kwargs):
504 """HasUnderlined(self) -> bool"""
505 return _richtext.RichTextAttr_HasUnderlined(*args, **kwargs)
506
507 def HasFaceName(*args, **kwargs):
508 """HasFaceName(self) -> bool"""
509 return _richtext.RichTextAttr_HasFaceName(*args, **kwargs)
510
511 def HasFont(*args, **kwargs):
512 """HasFont(self) -> bool"""
513 return _richtext.RichTextAttr_HasFont(*args, **kwargs)
514
515 def HasParagraphSpacingAfter(*args, **kwargs):
516 """HasParagraphSpacingAfter(self) -> bool"""
517 return _richtext.RichTextAttr_HasParagraphSpacingAfter(*args, **kwargs)
518
519 def HasParagraphSpacingBefore(*args, **kwargs):
520 """HasParagraphSpacingBefore(self) -> bool"""
521 return _richtext.RichTextAttr_HasParagraphSpacingBefore(*args, **kwargs)
522
523 def HasLineSpacing(*args, **kwargs):
524 """HasLineSpacing(self) -> bool"""
525 return _richtext.RichTextAttr_HasLineSpacing(*args, **kwargs)
526
527 def HasCharacterStyleName(*args, **kwargs):
528 """HasCharacterStyleName(self) -> bool"""
529 return _richtext.RichTextAttr_HasCharacterStyleName(*args, **kwargs)
530
531 def HasParagraphStyleName(*args, **kwargs):
532 """HasParagraphStyleName(self) -> bool"""
533 return _richtext.RichTextAttr_HasParagraphStyleName(*args, **kwargs)
534
535 def HasBulletStyle(*args, **kwargs):
536 """HasBulletStyle(self) -> bool"""
537 return _richtext.RichTextAttr_HasBulletStyle(*args, **kwargs)
538
539 def HasBulletNumber(*args, **kwargs):
540 """HasBulletNumber(self) -> bool"""
541 return _richtext.RichTextAttr_HasBulletNumber(*args, **kwargs)
542
543 def HasBulletSymbol(*args, **kwargs):
544 """HasBulletSymbol(self) -> bool"""
545 return _richtext.RichTextAttr_HasBulletSymbol(*args, **kwargs)
546
547 def HasFlag(*args, **kwargs):
548 """HasFlag(self, long flag) -> bool"""
549 return _richtext.RichTextAttr_HasFlag(*args, **kwargs)
550
551 def IsCharacterStyle(*args, **kwargs):
552 """IsCharacterStyle(self) -> bool"""
553 return _richtext.RichTextAttr_IsCharacterStyle(*args, **kwargs)
554
555 def IsParagraphStyle(*args, **kwargs):
556 """IsParagraphStyle(self) -> bool"""
557 return _richtext.RichTextAttr_IsParagraphStyle(*args, **kwargs)
558
559 def IsDefault(*args, **kwargs):
560 """IsDefault(self) -> bool"""
561 return _richtext.RichTextAttr_IsDefault(*args, **kwargs)
562
e70b4d2d
RD
563 Alignment = property(GetAlignment,SetAlignment,doc="See `GetAlignment` and `SetAlignment`")
564 BackgroundColour = property(GetBackgroundColour,SetBackgroundColour,doc="See `GetBackgroundColour` and `SetBackgroundColour`")
b39fe951 565 BulletFont = property(GetBulletFont,SetBulletFont,doc="See `GetBulletFont` and `SetBulletFont`")
e70b4d2d
RD
566 BulletNumber = property(GetBulletNumber,SetBulletNumber,doc="See `GetBulletNumber` and `SetBulletNumber`")
567 BulletStyle = property(GetBulletStyle,SetBulletStyle,doc="See `GetBulletStyle` and `SetBulletStyle`")
568 BulletSymbol = property(GetBulletSymbol,SetBulletSymbol,doc="See `GetBulletSymbol` and `SetBulletSymbol`")
569 CharacterStyleName = property(GetCharacterStyleName,SetCharacterStyleName,doc="See `GetCharacterStyleName` and `SetCharacterStyleName`")
570 Flags = property(GetFlags,SetFlags,doc="See `GetFlags` and `SetFlags`")
571 Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`")
572 FontAttributes = property(GetFontAttributes,doc="See `GetFontAttributes`")
573 FontFaceName = property(GetFontFaceName,SetFontFaceName,doc="See `GetFontFaceName` and `SetFontFaceName`")
574 FontSize = property(GetFontSize,SetFontSize,doc="See `GetFontSize` and `SetFontSize`")
575 FontStyle = property(GetFontStyle,SetFontStyle,doc="See `GetFontStyle` and `SetFontStyle`")
576 FontUnderlined = property(GetFontUnderlined,SetFontUnderlined,doc="See `GetFontUnderlined` and `SetFontUnderlined`")
577 FontWeight = property(GetFontWeight,SetFontWeight,doc="See `GetFontWeight` and `SetFontWeight`")
578 LeftIndent = property(GetLeftIndent,SetLeftIndent,doc="See `GetLeftIndent` and `SetLeftIndent`")
579 LeftSubIndent = property(GetLeftSubIndent,doc="See `GetLeftSubIndent`")
580 LineSpacing = property(GetLineSpacing,SetLineSpacing,doc="See `GetLineSpacing` and `SetLineSpacing`")
581 ParagraphSpacingAfter = property(GetParagraphSpacingAfter,SetParagraphSpacingAfter,doc="See `GetParagraphSpacingAfter` and `SetParagraphSpacingAfter`")
582 ParagraphSpacingBefore = property(GetParagraphSpacingBefore,SetParagraphSpacingBefore,doc="See `GetParagraphSpacingBefore` and `SetParagraphSpacingBefore`")
583 ParagraphStyleName = property(GetParagraphStyleName,SetParagraphStyleName,doc="See `GetParagraphStyleName` and `SetParagraphStyleName`")
584 RightIndent = property(GetRightIndent,SetRightIndent,doc="See `GetRightIndent` and `SetRightIndent`")
585 Tabs = property(GetTabs,SetTabs,doc="See `GetTabs` and `SetTabs`")
586 TextColour = property(GetTextColour,SetTextColour,doc="See `GetTextColour` and `SetTextColour`")
06810ecf
RD
587_richtext.RichTextAttr_swigregister(RichTextAttr)
588cvar = _richtext.cvar
589RICHTEXT_ALL = cvar.RICHTEXT_ALL
590RICHTEXT_NONE = cvar.RICHTEXT_NONE
591
592TEXT_ATTR_CHARACTER = _richtext.TEXT_ATTR_CHARACTER
593TEXT_ATTR_PARAGRAPH = _richtext.TEXT_ATTR_PARAGRAPH
594TEXT_ATTR_ALL = _richtext.TEXT_ATTR_ALL
595class RichTextCtrl(_windows.ScrolledWindow):
596 """Proxy of C++ RichTextCtrl class"""
597 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
598 __repr__ = _swig_repr
599 def __init__(self, *args, **kwargs):
600 """
0ef86618
RD
601 __init__(self, Window parent, int id=-1, String value=EmptyString,
602 Point pos=DefaultPosition, Size size=DefaultSize,
603 long style=RE_MULTILINE) -> RichTextCtrl
06810ecf
RD
604 """
605 _richtext.RichTextCtrl_swiginit(self,_richtext.new_RichTextCtrl(*args, **kwargs))
606 self._setOORInfo(self)
607
608 def Create(*args, **kwargs):
609 """
0ef86618
RD
610 Create(self, Window parent, int id=-1, String value=EmptyString,
611 Point pos=DefaultPosition, Size size=DefaultSize,
612 long style=RE_MULTILINE) -> bool
06810ecf
RD
613 """
614 return _richtext.RichTextCtrl_Create(*args, **kwargs)
615
616 def GetValue(*args, **kwargs):
617 """GetValue(self) -> String"""
618 return _richtext.RichTextCtrl_GetValue(*args, **kwargs)
619
620 def SetValue(*args, **kwargs):
621 """SetValue(self, String value)"""
622 return _richtext.RichTextCtrl_SetValue(*args, **kwargs)
623
624 def GetRange(*args, **kwargs):
625 """GetRange(self, long from, long to) -> String"""
626 return _richtext.RichTextCtrl_GetRange(*args, **kwargs)
627
628 def GetLineLength(*args, **kwargs):
629 """GetLineLength(self, long lineNo) -> int"""
630 return _richtext.RichTextCtrl_GetLineLength(*args, **kwargs)
631
632 def GetLineText(*args, **kwargs):
633 """GetLineText(self, long lineNo) -> String"""
634 return _richtext.RichTextCtrl_GetLineText(*args, **kwargs)
635
636 def GetNumberOfLines(*args, **kwargs):
637 """GetNumberOfLines(self) -> int"""
638 return _richtext.RichTextCtrl_GetNumberOfLines(*args, **kwargs)
639
640 def IsModified(*args, **kwargs):
641 """IsModified(self) -> bool"""
642 return _richtext.RichTextCtrl_IsModified(*args, **kwargs)
643
644 def IsEditable(*args, **kwargs):
645 """IsEditable(self) -> bool"""
646 return _richtext.RichTextCtrl_IsEditable(*args, **kwargs)
647
648 def IsSingleLine(*args, **kwargs):
649 """IsSingleLine(self) -> bool"""
650 return _richtext.RichTextCtrl_IsSingleLine(*args, **kwargs)
651
652 def IsMultiLine(*args, **kwargs):
653 """IsMultiLine(self) -> bool"""
654 return _richtext.RichTextCtrl_IsMultiLine(*args, **kwargs)
655
656 def GetSelection(*args, **kwargs):
657 """
658 GetSelection() --> (start, end)
659
660 Returns the start and end positions of the current selection. If the
661 values are the same then there is no selection.
662 """
663 return _richtext.RichTextCtrl_GetSelection(*args, **kwargs)
664
665 def GetStringSelection(*args, **kwargs):
666 """GetStringSelection(self) -> String"""
667 return _richtext.RichTextCtrl_GetStringSelection(*args, **kwargs)
668
669 def GetFilename(*args, **kwargs):
670 """GetFilename(self) -> String"""
671 return _richtext.RichTextCtrl_GetFilename(*args, **kwargs)
672
673 def SetFilename(*args, **kwargs):
674 """SetFilename(self, String filename)"""
675 return _richtext.RichTextCtrl_SetFilename(*args, **kwargs)
676
677 def SetDelayedLayoutThreshold(*args, **kwargs):
678 """
679 SetDelayedLayoutThreshold(self, long threshold)
680
681 Set the threshold in character positions for doing layout optimization
682 during sizing.
683 """
684 return _richtext.RichTextCtrl_SetDelayedLayoutThreshold(*args, **kwargs)
685
686 def GetDelayedLayoutThreshold(*args, **kwargs):
687 """
688 GetDelayedLayoutThreshold(self) -> long
689
690 Get the threshold in character positions for doing layout optimization
691 during sizing.
692 """
693 return _richtext.RichTextCtrl_GetDelayedLayoutThreshold(*args, **kwargs)
694
695 def Clear(*args, **kwargs):
696 """Clear(self)"""
697 return _richtext.RichTextCtrl_Clear(*args, **kwargs)
698
699 def Replace(*args, **kwargs):
700 """Replace(self, long from, long to, String value)"""
701 return _richtext.RichTextCtrl_Replace(*args, **kwargs)
702
703 def Remove(*args, **kwargs):
704 """Remove(self, long from, long to)"""
705 return _richtext.RichTextCtrl_Remove(*args, **kwargs)
706
707 def LoadFile(*args, **kwargs):
708 """
709 LoadFile(self, String file, int type=RICHTEXT_TYPE_ANY) -> bool
710
711 Load the contents of the document from the given filename.
712 """
713 return _richtext.RichTextCtrl_LoadFile(*args, **kwargs)
714
715 def SaveFile(*args, **kwargs):
716 """
717 SaveFile(self, String file=EmptyString, int type=RICHTEXT_TYPE_ANY) -> bool
718
719 Save the contents of the document to the given filename, or if the
1d5ee749 720 empty string is passed then to the filename set with `SetFilename`.
06810ecf
RD
721 """
722 return _richtext.RichTextCtrl_SaveFile(*args, **kwargs)
723
724 def MarkDirty(*args, **kwargs):
725 """
726 MarkDirty(self)
727
728 Sets the dirty flag, meaning that the contents of the control have
729 changed and need to be saved.
730 """
731 return _richtext.RichTextCtrl_MarkDirty(*args, **kwargs)
732
733 def DiscardEdits(*args, **kwargs):
734 """
735 DiscardEdits(self)
736
737 Clears the dirty flag.
738 :see: `MarkDirty`
739 """
740 return _richtext.RichTextCtrl_DiscardEdits(*args, **kwargs)
741
742 def SetMaxLength(*args, **kwargs):
743 """
744 SetMaxLength(self, unsigned long len)
745
746 Set the max number of characters which may be entered in a single line
747 text control.
748 """
749 return _richtext.RichTextCtrl_SetMaxLength(*args, **kwargs)
750
751 def WriteText(*args, **kwargs):
752 """
753 WriteText(self, String text)
754
755 Insert text at the current position.
756 """
757 return _richtext.RichTextCtrl_WriteText(*args, **kwargs)
758
759 def AppendText(*args, **kwargs):
760 """
761 AppendText(self, String text)
762
763 Append text to the end of the document.
764 """
765 return _richtext.RichTextCtrl_AppendText(*args, **kwargs)
766
767 def SetStyle(*args, **kwargs):
768 """
769 SetStyle(self, RichTextRange range, RichTextAttr style) -> bool
770
771 Set the style for the text in ``range`` to ``style``
772 """
773 return _richtext.RichTextCtrl_SetStyle(*args, **kwargs)
774
b39fe951
RD
775 def SetStyleEx(*args, **kwargs):
776 """
777 SetStyleEx(self, RichTextRange range, RichTextAttr style, int flags=RICHTEXT_SETSTYLE_WITH_UNDO) -> bool
778
779 Extended style setting operation with flags including:
780 RICHTEXT_SETSTYLE_WITH_UNDO, RICHTEXT_SETSTYLE_OPTIMIZE,
781 RICHTEXT_SETSTYLE_PARAGRAPHS_ONLY, RICHTEXT_SETSTYLE_CHARACTERS_ONLY
782 """
783 return _richtext.RichTextCtrl_SetStyleEx(*args, **kwargs)
784
06810ecf
RD
785 def GetStyle(*args, **kwargs):
786 """
787 GetStyle(self, long position, RichTextAttr style) -> bool
788
789 Retrieve the style used at the given position. Copies the style
c2829a8f 790 values at ``position`` into the ``style`` parameter and returns ``True``
06810ecf
RD
791 if successful. Returns ``False`` otherwise.
792 """
793 return _richtext.RichTextCtrl_GetStyle(*args, **kwargs)
794
c2829a8f
RD
795 def GetUncombinedStyle(*args, **kwargs):
796 """
797 GetUncombinedStyle(self, long position, RichTextAttr style) -> bool
798
799 Get the content (uncombined) attributes for this position. Copies the
800 style values at ``position`` into the ``style`` parameter and returns
801 ``True`` if successful. Returns ``False`` otherwise.
802 """
803 return _richtext.RichTextCtrl_GetUncombinedStyle(*args, **kwargs)
804
06810ecf
RD
805 def SetDefaultStyle(*args, **kwargs):
806 """
807 SetDefaultStyle(self, RichTextAttr style) -> bool
808
809 Set the style used by default for the rich text document.
810 """
811 return _richtext.RichTextCtrl_SetDefaultStyle(*args, **kwargs)
812
813 def GetDefaultStyle(*args, **kwargs):
814 """
815 GetDefaultStyle(self) -> RichTextAttr
816
817 Retrieves a copy of the default style object.
818 """
819 return _richtext.RichTextCtrl_GetDefaultStyle(*args, **kwargs)
820
821 def XYToPosition(*args, **kwargs):
822 """
823 XYToPosition(self, long x, long y) -> long
824
825 Translate a col,row coordinants into a document position.
826 """
827 return _richtext.RichTextCtrl_XYToPosition(*args, **kwargs)
828
829 def PositionToXY(*args, **kwargs):
830 """
831 PositionToXY(self, long pos) --> (x, y)
832
833 Retrieves the col,row for the given position within the document
834 """
835 return _richtext.RichTextCtrl_PositionToXY(*args, **kwargs)
836
837 def ShowPosition(*args, **kwargs):
838 """
839 ShowPosition(self, long position)
840
841 Ensure that the given position in the document is visible.
842 """
843 return _richtext.RichTextCtrl_ShowPosition(*args, **kwargs)
844
845 def HitTest(*args, **kwargs):
846 """
847 HitTest(self, Point pt) --> (result, pos)
848
849 Returns the character position at the given point in pixels. Note
850 that ``pt`` should be given in device coordinates, and not be adjusted
851 for the client area origin nor for scrolling. The return value is a
852 tuple of the hit test result and the position.
853 """
854 return _richtext.RichTextCtrl_HitTest(*args, **kwargs)
855
856 def HitTestXY(*args, **kwargs):
857 """
858 HitTestRC(self, Point pt) --> (result, col, row)
859
860 Returns the column and row of the given point in pixels. Note that
861 ``pt`` should be given in device coordinates, and not be adjusted for
862 the client area origin nor for scrolling. The return value is a tuple
863 of the hit test result and the column and row values.
864 """
865 return _richtext.RichTextCtrl_HitTestXY(*args, **kwargs)
866
867 def Copy(*args, **kwargs):
868 """
869 Copy(self)
870
871 Copies the selected text to the clipboard.
872 """
873 return _richtext.RichTextCtrl_Copy(*args, **kwargs)
874
875 def Cut(*args, **kwargs):
876 """
877 Cut(self)
878
879 Copies the selected text to the clipboard and removes the selection.
880 """
881 return _richtext.RichTextCtrl_Cut(*args, **kwargs)
882
883 def Paste(*args, **kwargs):
884 """
885 Paste(self)
886
887 Pastes text from the clipboard into the document at the current
888 insertion point.
889 """
890 return _richtext.RichTextCtrl_Paste(*args, **kwargs)
891
892 def DeleteSelection(*args, **kwargs):
893 """
894 DeleteSelection(self)
895
896 Remove the current selection.
897 """
898 return _richtext.RichTextCtrl_DeleteSelection(*args, **kwargs)
899
900 def CanCopy(*args, **kwargs):
901 """
902 CanCopy(self) -> bool
903
904 Returns ``True`` if the selection can be copied to the clipboard.
905 """
906 return _richtext.RichTextCtrl_CanCopy(*args, **kwargs)
907
908 def CanCut(*args, **kwargs):
909 """
910 CanCut(self) -> bool
911
912 Returns ``True`` if the selection can be cut to the clipboard.
913 """
914 return _richtext.RichTextCtrl_CanCut(*args, **kwargs)
915
916 def CanPaste(*args, **kwargs):
917 """
918 CanPaste(self) -> bool
919
920 Returns ``True`` if the current contents of the clipboard can be
921 pasted into the document.
922 """
923 return _richtext.RichTextCtrl_CanPaste(*args, **kwargs)
924
925 def CanDeleteSelection(*args, **kwargs):
926 """
927 CanDeleteSelection(self) -> bool
928
929 Returns ``True`` if the selection can be removed from the document.
930 """
931 return _richtext.RichTextCtrl_CanDeleteSelection(*args, **kwargs)
932
933 def Undo(*args, **kwargs):
934 """
935 Undo(self)
936
937 If the last operation can be undone, undoes the last operation.
938 """
939 return _richtext.RichTextCtrl_Undo(*args, **kwargs)
940
941 def Redo(*args, **kwargs):
942 """
943 Redo(self)
944
945 If the last operation can be redone, redoes the last operation.
946 """
947 return _richtext.RichTextCtrl_Redo(*args, **kwargs)
948
949 def CanUndo(*args, **kwargs):
950 """
951 CanUndo(self) -> bool
952
953 Returns ``True`` if the last operation can be undone.
954 """
955 return _richtext.RichTextCtrl_CanUndo(*args, **kwargs)
956
957 def CanRedo(*args, **kwargs):
958 """
959 CanRedo(self) -> bool
960
961 Returns ``True`` if the last operation can be redone.
962 """
963 return _richtext.RichTextCtrl_CanRedo(*args, **kwargs)
964
965 def SetInsertionPoint(*args, **kwargs):
966 """
967 SetInsertionPoint(self, long pos)
968
969 Sets the insertion point at the given position.
970 """
971 return _richtext.RichTextCtrl_SetInsertionPoint(*args, **kwargs)
972
973 def SetInsertionPointEnd(*args, **kwargs):
974 """
975 SetInsertionPointEnd(self)
976
977 Moves the insertion point to the end of the document.
978 """
979 return _richtext.RichTextCtrl_SetInsertionPointEnd(*args, **kwargs)
980
981 def GetInsertionPoint(*args, **kwargs):
982 """
983 GetInsertionPoint(self) -> long
984
985 Returns the insertion point. This is defined as the zero based index
986 of the character position to the right of the insertion point.
987 """
988 return _richtext.RichTextCtrl_GetInsertionPoint(*args, **kwargs)
989
990 def GetLastPosition(*args, **kwargs):
991 """
992 GetLastPosition(self) -> long
993
994 Returns the zero based index of the last position in the document.
995 """
996 return _richtext.RichTextCtrl_GetLastPosition(*args, **kwargs)
997
998 def SetSelection(*args, **kwargs):
999 """
1000 SetSelection(self, long from, long to)
1001
1002 Selects the text starting at the first position up to (but not
1003 including) the character at the last position. If both parameters are
1004 equal to -1 then all text in the control is selected.
1005 """
1006 return _richtext.RichTextCtrl_SetSelection(*args, **kwargs)
1007
1008 def SelectAll(*args, **kwargs):
1009 """
1010 SelectAll(self)
1011
1012 Select all text in the document.
1013 """
1014 return _richtext.RichTextCtrl_SelectAll(*args, **kwargs)
1015
1016 def SetEditable(*args, **kwargs):
1017 """
1018 SetEditable(self, bool editable)
1019
1020 Makes the document editable or read-only, overriding the RE_READONLY
1021 flag.
1022 """
1023 return _richtext.RichTextCtrl_SetEditable(*args, **kwargs)
1024
1025 def HasSelection(*args, **kwargs):
1026 """HasSelection(self) -> bool"""
1027 return _richtext.RichTextCtrl_HasSelection(*args, **kwargs)
1028
1029 def WriteImage(*args, **kwargs):
1030 """WriteImage(self, Image image, int bitmapType=BITMAP_TYPE_PNG) -> bool"""
1031 return _richtext.RichTextCtrl_WriteImage(*args, **kwargs)
1032
1033 def WriteBitmap(*args, **kwargs):
1034 """WriteBitmap(self, Bitmap bitmap, int bitmapType=BITMAP_TYPE_PNG) -> bool"""
1035 return _richtext.RichTextCtrl_WriteBitmap(*args, **kwargs)
1036
1037 def WriteImageFile(*args, **kwargs):
1038 """WriteImageFile(self, String filename, int bitmapType) -> bool"""
1039 return _richtext.RichTextCtrl_WriteImageFile(*args, **kwargs)
1040
1041 def WriteImageBlock(*args, **kwargs):
1042 """WriteImageBlock(self, wxRichTextImageBlock imageBlock) -> bool"""
1043 return _richtext.RichTextCtrl_WriteImageBlock(*args, **kwargs)
1044
1045 def Newline(*args, **kwargs):
1046 """Newline(self) -> bool"""
1047 return _richtext.RichTextCtrl_Newline(*args, **kwargs)
1048
1049 def SetBasicStyle(*args, **kwargs):
1050 """SetBasicStyle(self, RichTextAttr style)"""
1051 return _richtext.RichTextCtrl_SetBasicStyle(*args, **kwargs)
1052
1053 def EndStyle(*args, **kwargs):
1054 """EndStyle(self) -> bool"""
1055 return _richtext.RichTextCtrl_EndStyle(*args, **kwargs)
1056
1057 def EndAllStyles(*args, **kwargs):
1058 """EndAllStyles(self) -> bool"""
1059 return _richtext.RichTextCtrl_EndAllStyles(*args, **kwargs)
1060
1061 def BeginBold(*args, **kwargs):
1062 """BeginBold(self) -> bool"""
1063 return _richtext.RichTextCtrl_BeginBold(*args, **kwargs)
1064
1065 def EndBold(*args, **kwargs):
1066 """EndBold(self) -> bool"""
1067 return _richtext.RichTextCtrl_EndBold(*args, **kwargs)
1068
1069 def BeginItalic(*args, **kwargs):
1070 """BeginItalic(self) -> bool"""
1071 return _richtext.RichTextCtrl_BeginItalic(*args, **kwargs)
1072
1073 def EndItalic(*args, **kwargs):
1074 """EndItalic(self) -> bool"""
1075 return _richtext.RichTextCtrl_EndItalic(*args, **kwargs)
1076
1077 def BeginUnderline(*args, **kwargs):
1078 """BeginUnderline(self) -> bool"""
1079 return _richtext.RichTextCtrl_BeginUnderline(*args, **kwargs)
1080
1081 def EndUnderline(*args, **kwargs):
1082 """EndUnderline(self) -> bool"""
1083 return _richtext.RichTextCtrl_EndUnderline(*args, **kwargs)
1084
1085 def BeginFontSize(*args, **kwargs):
1086 """BeginFontSize(self, int pointSize) -> bool"""
1087 return _richtext.RichTextCtrl_BeginFontSize(*args, **kwargs)
1088
1089 def EndFontSize(*args, **kwargs):
1090 """EndFontSize(self) -> bool"""
1091 return _richtext.RichTextCtrl_EndFontSize(*args, **kwargs)
1092
1093 def BeginFont(*args, **kwargs):
1094 """BeginFont(self, Font font) -> bool"""
1095 return _richtext.RichTextCtrl_BeginFont(*args, **kwargs)
1096
1097 def EndFont(*args, **kwargs):
1098 """EndFont(self) -> bool"""
1099 return _richtext.RichTextCtrl_EndFont(*args, **kwargs)
1100
1101 def BeginTextColour(*args, **kwargs):
1102 """BeginTextColour(self, Colour colour) -> bool"""
1103 return _richtext.RichTextCtrl_BeginTextColour(*args, **kwargs)
1104
1105 def EndTextColour(*args, **kwargs):
1106 """EndTextColour(self) -> bool"""
1107 return _richtext.RichTextCtrl_EndTextColour(*args, **kwargs)
1108
1109 def BeginAlignment(*args, **kwargs):
1110 """BeginAlignment(self, int alignment) -> bool"""
1111 return _richtext.RichTextCtrl_BeginAlignment(*args, **kwargs)
1112
1113 def EndAlignment(*args, **kwargs):
1114 """EndAlignment(self) -> bool"""
1115 return _richtext.RichTextCtrl_EndAlignment(*args, **kwargs)
1116
1117 def BeginLeftIndent(*args, **kwargs):
1118 """BeginLeftIndent(self, int leftIndent, int leftSubIndent=0) -> bool"""
1119 return _richtext.RichTextCtrl_BeginLeftIndent(*args, **kwargs)
1120
1121 def EndLeftIndent(*args, **kwargs):
1122 """EndLeftIndent(self) -> bool"""
1123 return _richtext.RichTextCtrl_EndLeftIndent(*args, **kwargs)
1124
1125 def BeginRightIndent(*args, **kwargs):
1126 """BeginRightIndent(self, int rightIndent) -> bool"""
1127 return _richtext.RichTextCtrl_BeginRightIndent(*args, **kwargs)
1128
1129 def EndRightIndent(*args, **kwargs):
1130 """EndRightIndent(self) -> bool"""
1131 return _richtext.RichTextCtrl_EndRightIndent(*args, **kwargs)
1132
1133 def BeginParagraphSpacing(*args, **kwargs):
1134 """BeginParagraphSpacing(self, int before, int after) -> bool"""
1135 return _richtext.RichTextCtrl_BeginParagraphSpacing(*args, **kwargs)
1136
1137 def EndParagraphSpacing(*args, **kwargs):
1138 """EndParagraphSpacing(self) -> bool"""
1139 return _richtext.RichTextCtrl_EndParagraphSpacing(*args, **kwargs)
1140
1141 def BeginLineSpacing(*args, **kwargs):
1142 """BeginLineSpacing(self, int lineSpacing) -> bool"""
1143 return _richtext.RichTextCtrl_BeginLineSpacing(*args, **kwargs)
1144
1145 def EndLineSpacing(*args, **kwargs):
1146 """EndLineSpacing(self) -> bool"""
1147 return _richtext.RichTextCtrl_EndLineSpacing(*args, **kwargs)
1148
1149 def BeginNumberedBullet(*args, **kwargs):
1150 """
1151 BeginNumberedBullet(self, int bulletNumber, int leftIndent, int leftSubIndent,
1152 int bulletStyle=wxTEXT_ATTR_BULLET_STYLE_ARABIC|wxTEXT_ATTR_BULLET_STYLE_PERIOD) -> bool
1153 """
1154 return _richtext.RichTextCtrl_BeginNumberedBullet(*args, **kwargs)
1155
1156 def EndNumberedBullet(*args, **kwargs):
1157 """EndNumberedBullet(self) -> bool"""
1158 return _richtext.RichTextCtrl_EndNumberedBullet(*args, **kwargs)
1159
1160 def BeginSymbolBullet(*args, **kwargs):
1161 """BeginSymbolBullet(self, char symbol, int leftIndent, int leftSubIndent, int bulletStyle=TEXT_ATTR_BULLET_STYLE_SYMBOL) -> bool"""
1162 return _richtext.RichTextCtrl_BeginSymbolBullet(*args, **kwargs)
1163
1164 def EndSymbolBullet(*args, **kwargs):
1165 """EndSymbolBullet(self) -> bool"""
1166 return _richtext.RichTextCtrl_EndSymbolBullet(*args, **kwargs)
1167
1168 def BeginCharacterStyle(*args, **kwargs):
1169 """BeginCharacterStyle(self, String characterStyle) -> bool"""
1170 return _richtext.RichTextCtrl_BeginCharacterStyle(*args, **kwargs)
1171
1172 def EndCharacterStyle(*args, **kwargs):
1173 """EndCharacterStyle(self) -> bool"""
1174 return _richtext.RichTextCtrl_EndCharacterStyle(*args, **kwargs)
1175
1176 def BeginParagraphStyle(*args, **kwargs):
1177 """BeginParagraphStyle(self, String paragraphStyle) -> bool"""
1178 return _richtext.RichTextCtrl_BeginParagraphStyle(*args, **kwargs)
1179
1180 def EndParagraphStyle(*args, **kwargs):
1181 """EndParagraphStyle(self) -> bool"""
1182 return _richtext.RichTextCtrl_EndParagraphStyle(*args, **kwargs)
1183
1184 def SetDefaultStyleToCursorStyle(*args, **kwargs):
1185 """SetDefaultStyleToCursorStyle(self) -> bool"""
1186 return _richtext.RichTextCtrl_SetDefaultStyleToCursorStyle(*args, **kwargs)
1187
1188 def SelectNone(*args, **kwargs):
1189 """SelectNone(self)"""
1190 return _richtext.RichTextCtrl_SelectNone(*args, **kwargs)
1191
c2829a8f
RD
1192 def SelectWord(*args, **kwargs):
1193 """SelectWord(self, long position) -> bool"""
1194 return _richtext.RichTextCtrl_SelectWord(*args, **kwargs)
1195
06810ecf
RD
1196 def GetSelectionRange(*args, **kwargs):
1197 """GetSelectionRange(self) -> RichTextRange"""
1198 return _richtext.RichTextCtrl_GetSelectionRange(*args, **kwargs)
1199
1200 def SetSelectionRange(*args, **kwargs):
1201 """SetSelectionRange(self, RichTextRange range)"""
1202 return _richtext.RichTextCtrl_SetSelectionRange(*args, **kwargs)
1203
79df624a
RD
1204 def GetInternalSelectionRange(*args, **kwargs):
1205 """GetInternalSelectionRange(self) -> RichTextRange"""
1206 return _richtext.RichTextCtrl_GetInternalSelectionRange(*args, **kwargs)
1207
1208 def SetInternalSelectionRange(*args, **kwargs):
1209 """SetInternalSelectionRange(self, RichTextRange range)"""
1210 return _richtext.RichTextCtrl_SetInternalSelectionRange(*args, **kwargs)
1211
06810ecf
RD
1212 def AddParagraph(*args, **kwargs):
1213 """AddParagraph(self, String text) -> RichTextRange"""
1214 return _richtext.RichTextCtrl_AddParagraph(*args, **kwargs)
1215
1216 def AddImage(*args, **kwargs):
1217 """AddImage(self, Image image) -> RichTextRange"""
1218 return _richtext.RichTextCtrl_AddImage(*args, **kwargs)
1219
1220 def LayoutContent(*args, **kwargs):
1221 """LayoutContent(self, bool onlyVisibleRect=False) -> bool"""
1222 return _richtext.RichTextCtrl_LayoutContent(*args, **kwargs)
1223
1224 def MoveCaret(*args, **kwargs):
1225 """MoveCaret(self, long pos, bool showAtLineStart=False) -> bool"""
1226 return _richtext.RichTextCtrl_MoveCaret(*args, **kwargs)
1227
1228 def MoveRight(*args, **kwargs):
1229 """MoveRight(self, int noPositions=1, int flags=0) -> bool"""
1230 return _richtext.RichTextCtrl_MoveRight(*args, **kwargs)
1231
1232 def MoveLeft(*args, **kwargs):
1233 """MoveLeft(self, int noPositions=1, int flags=0) -> bool"""
1234 return _richtext.RichTextCtrl_MoveLeft(*args, **kwargs)
1235
1236 def MoveUp(*args, **kwargs):
1237 """MoveUp(self, int noLines=1, int flags=0) -> bool"""
1238 return _richtext.RichTextCtrl_MoveUp(*args, **kwargs)
1239
1240 def MoveDown(*args, **kwargs):
1241 """MoveDown(self, int noLines=1, int flags=0) -> bool"""
1242 return _richtext.RichTextCtrl_MoveDown(*args, **kwargs)
1243
1244 def MoveToLineEnd(*args, **kwargs):
1245 """MoveToLineEnd(self, int flags=0) -> bool"""
1246 return _richtext.RichTextCtrl_MoveToLineEnd(*args, **kwargs)
1247
1248 def MoveToLineStart(*args, **kwargs):
1249 """MoveToLineStart(self, int flags=0) -> bool"""
1250 return _richtext.RichTextCtrl_MoveToLineStart(*args, **kwargs)
1251
1252 def MoveToParagraphEnd(*args, **kwargs):
1253 """MoveToParagraphEnd(self, int flags=0) -> bool"""
1254 return _richtext.RichTextCtrl_MoveToParagraphEnd(*args, **kwargs)
1255
1256 def MoveToParagraphStart(*args, **kwargs):
1257 """MoveToParagraphStart(self, int flags=0) -> bool"""
1258 return _richtext.RichTextCtrl_MoveToParagraphStart(*args, **kwargs)
1259
1260 def MoveHome(*args, **kwargs):
1261 """MoveHome(self, int flags=0) -> bool"""
1262 return _richtext.RichTextCtrl_MoveHome(*args, **kwargs)
1263
1264 def MoveEnd(*args, **kwargs):
1265 """MoveEnd(self, int flags=0) -> bool"""
1266 return _richtext.RichTextCtrl_MoveEnd(*args, **kwargs)
1267
1268 def PageUp(*args, **kwargs):
1269 """PageUp(self, int noPages=1, int flags=0) -> bool"""
1270 return _richtext.RichTextCtrl_PageUp(*args, **kwargs)
1271
1272 def PageDown(*args, **kwargs):
1273 """PageDown(self, int noPages=1, int flags=0) -> bool"""
1274 return _richtext.RichTextCtrl_PageDown(*args, **kwargs)
1275
1276 def WordLeft(*args, **kwargs):
1277 """WordLeft(self, int noPages=1, int flags=0) -> bool"""
1278 return _richtext.RichTextCtrl_WordLeft(*args, **kwargs)
1279
1280 def WordRight(*args, **kwargs):
1281 """WordRight(self, int noPages=1, int flags=0) -> bool"""
1282 return _richtext.RichTextCtrl_WordRight(*args, **kwargs)
1283
1284 def GetBuffer(*args, **kwargs):
1285 """GetBuffer(self) -> wxRichTextBuffer"""
1286 return _richtext.RichTextCtrl_GetBuffer(*args, **kwargs)
1287
1288 def BeginBatchUndo(*args, **kwargs):
1289 """BeginBatchUndo(self, String cmdName) -> bool"""
1290 return _richtext.RichTextCtrl_BeginBatchUndo(*args, **kwargs)
1291
1292 def EndBatchUndo(*args, **kwargs):
1293 """EndBatchUndo(self) -> bool"""
1294 return _richtext.RichTextCtrl_EndBatchUndo(*args, **kwargs)
1295
1296 def BatchingUndo(*args, **kwargs):
1297 """BatchingUndo(self) -> bool"""
1298 return _richtext.RichTextCtrl_BatchingUndo(*args, **kwargs)
1299
1300 def BeginSuppressUndo(*args, **kwargs):
1301 """BeginSuppressUndo(self) -> bool"""
1302 return _richtext.RichTextCtrl_BeginSuppressUndo(*args, **kwargs)
1303
1304 def EndSuppressUndo(*args, **kwargs):
1305 """EndSuppressUndo(self) -> bool"""
1306 return _richtext.RichTextCtrl_EndSuppressUndo(*args, **kwargs)
1307
1308 def SuppressingUndo(*args, **kwargs):
1309 """SuppressingUndo(self) -> bool"""
1310 return _richtext.RichTextCtrl_SuppressingUndo(*args, **kwargs)
1311
1312 def HasCharacterAttributes(*args, **kwargs):
1313 """HasCharacterAttributes(self, RichTextRange range, RichTextAttr style) -> bool"""
1314 return _richtext.RichTextCtrl_HasCharacterAttributes(*args, **kwargs)
1315
1316 def HasParagraphAttributes(*args, **kwargs):
1317 """HasParagraphAttributes(self, RichTextRange range, RichTextAttr style) -> bool"""
1318 return _richtext.RichTextCtrl_HasParagraphAttributes(*args, **kwargs)
1319
1320 def IsSelectionBold(*args, **kwargs):
1321 """IsSelectionBold(self) -> bool"""
1322 return _richtext.RichTextCtrl_IsSelectionBold(*args, **kwargs)
1323
1324 def IsSelectionItalics(*args, **kwargs):
1325 """IsSelectionItalics(self) -> bool"""
1326 return _richtext.RichTextCtrl_IsSelectionItalics(*args, **kwargs)
1327
1328 def IsSelectionUnderlined(*args, **kwargs):
1329 """IsSelectionUnderlined(self) -> bool"""
1330 return _richtext.RichTextCtrl_IsSelectionUnderlined(*args, **kwargs)
1331
1332 def IsSelectionAligned(*args, **kwargs):
1333 """IsSelectionAligned(self, int alignment) -> bool"""
1334 return _richtext.RichTextCtrl_IsSelectionAligned(*args, **kwargs)
1335
1336 def ApplyBoldToSelection(*args, **kwargs):
1337 """ApplyBoldToSelection(self) -> bool"""
1338 return _richtext.RichTextCtrl_ApplyBoldToSelection(*args, **kwargs)
1339
1340 def ApplyItalicToSelection(*args, **kwargs):
1341 """ApplyItalicToSelection(self) -> bool"""
1342 return _richtext.RichTextCtrl_ApplyItalicToSelection(*args, **kwargs)
1343
1344 def ApplyUnderlineToSelection(*args, **kwargs):
1345 """ApplyUnderlineToSelection(self) -> bool"""
1346 return _richtext.RichTextCtrl_ApplyUnderlineToSelection(*args, **kwargs)
1347
1348 def ApplyAlignmentToSelection(*args, **kwargs):
1349 """ApplyAlignmentToSelection(self, int alignment) -> bool"""
1350 return _richtext.RichTextCtrl_ApplyAlignmentToSelection(*args, **kwargs)
1351
1352 def SetStyleSheet(*args, **kwargs):
1353 """SetStyleSheet(self, wxRichTextStyleSheet styleSheet)"""
1354 return _richtext.RichTextCtrl_SetStyleSheet(*args, **kwargs)
1355
1356 def GetStyleSheet(*args, **kwargs):
1357 """GetStyleSheet(self) -> wxRichTextStyleSheet"""
1358 return _richtext.RichTextCtrl_GetStyleSheet(*args, **kwargs)
1359
c2829a8f
RD
1360 def ApplyStyleSheet(*args, **kwargs):
1361 """ApplyStyleSheet(self, wxRichTextStyleSheet styleSheet=None) -> bool"""
1362 return _richtext.RichTextCtrl_ApplyStyleSheet(*args, **kwargs)
1363
e70b4d2d
RD
1364 Buffer = property(GetBuffer,doc="See `GetBuffer`")
1365 DefaultStyle = property(GetDefaultStyle,SetDefaultStyle,doc="See `GetDefaultStyle` and `SetDefaultStyle`")
1366 DelayedLayoutThreshold = property(GetDelayedLayoutThreshold,SetDelayedLayoutThreshold,doc="See `GetDelayedLayoutThreshold` and `SetDelayedLayoutThreshold`")
1367 Filename = property(GetFilename,SetFilename,doc="See `GetFilename` and `SetFilename`")
1368 InsertionPoint = property(GetInsertionPoint,SetInsertionPoint,doc="See `GetInsertionPoint` and `SetInsertionPoint`")
1369 InternalSelectionRange = property(GetInternalSelectionRange,SetInternalSelectionRange,doc="See `GetInternalSelectionRange` and `SetInternalSelectionRange`")
1370 LastPosition = property(GetLastPosition,doc="See `GetLastPosition`")
1371 NumberOfLines = property(GetNumberOfLines,doc="See `GetNumberOfLines`")
1372 Selection = property(GetSelection,SetSelection,doc="See `GetSelection` and `SetSelection`")
1373 SelectionRange = property(GetSelectionRange,SetSelectionRange,doc="See `GetSelectionRange` and `SetSelectionRange`")
1374 StringSelection = property(GetStringSelection,doc="See `GetStringSelection`")
1375 StyleSheet = property(GetStyleSheet,SetStyleSheet,doc="See `GetStyleSheet` and `SetStyleSheet`")
1376 Value = property(GetValue,SetValue,doc="See `GetValue` and `SetValue`")
06810ecf
RD
1377_richtext.RichTextCtrl_swigregister(RichTextCtrl)
1378
1379def PreRichTextCtrl(*args, **kwargs):
1380 """PreRichTextCtrl() -> RichTextCtrl"""
1381 val = _richtext.new_PreRichTextCtrl(*args, **kwargs)
1382 return val
1383
1384wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED = _richtext.wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED
1385wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED = _richtext.wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED
1386wxEVT_COMMAND_RICHTEXT_LEFT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_LEFT_CLICK
1387wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK
1388wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK = _richtext.wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK
1389wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK = _richtext.wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK
1390wxEVT_COMMAND_RICHTEXT_RETURN = _richtext.wxEVT_COMMAND_RICHTEXT_RETURN
1391EVT_RICHTEXT_ITEM_SELECTED = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_ITEM_SELECTED, 1)
1392EVT_RICHTEXT_ITEM_DESELECTED = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_ITEM_DESELECTED, 1)
1393EVT_RICHTEXT_LEFT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_LEFT_CLICK, 1)
1394EVT_RICHTEXT_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_RIGHT_CLICK, 1)
1395EVT_RICHTEXT_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_MIDDLE_CLICK, 1)
1396EVT_RICHTEXT_LEFT_DCLICK = wx.PyEventBinder(wxEVT_COMMAND_RICHTEXT_LEFT_DCLICK, 1)
1397EVT_RICHTEXT_RETURN = wx.PyEventBinder( wxEVT_COMMAND_RICHTEXT_RETURN, 1)
1398
1399class RichTextEvent(_core.NotifyEvent):
1400 """Proxy of C++ RichTextEvent class"""
1401 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1402 __repr__ = _swig_repr
1403 def __init__(self, *args, **kwargs):
1404 """__init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> RichTextEvent"""
1405 _richtext.RichTextEvent_swiginit(self,_richtext.new_RichTextEvent(*args, **kwargs))
1406 def GetIndex(*args, **kwargs):
1407 """GetIndex(self) -> int"""
1408 return _richtext.RichTextEvent_GetIndex(*args, **kwargs)
1409
1410 def SetIndex(*args, **kwargs):
1411 """SetIndex(self, int n)"""
1412 return _richtext.RichTextEvent_SetIndex(*args, **kwargs)
1413
1414 def GetFlags(*args, **kwargs):
1415 """GetFlags(self) -> int"""
1416 return _richtext.RichTextEvent_GetFlags(*args, **kwargs)
1417
1418 def SetFlags(*args, **kwargs):
1419 """SetFlags(self, int flags)"""
1420 return _richtext.RichTextEvent_SetFlags(*args, **kwargs)
1421
e70b4d2d
RD
1422 Flags = property(GetFlags,SetFlags,doc="See `GetFlags` and `SetFlags`")
1423 Index = property(GetIndex,SetIndex,doc="See `GetIndex` and `SetIndex`")
06810ecf
RD
1424_richtext.RichTextEvent_swigregister(RichTextEvent)
1425
1426
1427