mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 12:00:13 +01:00
Add a GetIM() method to Colour, Point, Size, Rect and other ‘value’ types.
GetIM() returns a replicant of the original object that is immutable, so it can be used as a dictionary key, or etc., but still gives access to the properties by name, which using the Get() method to get a tuple of the values does not do.
This commit is contained in:
@@ -171,6 +171,8 @@ def run():
|
||||
pyArgsString="() -> (start, end)",
|
||||
briefDoc="Return the start and end properties as a tuple.")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['Start', 'End'])
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "RichTextRange"+str(self.Get())')
|
||||
|
||||
Reference in New Issue
Block a user