mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Merge branch 'master' into release-prep
This commit is contained in:
@@ -163,6 +163,8 @@ def run():
|
||||
briefDoc="""\
|
||||
Returns the RGB intensity values as a tuple, optionally the alpha value as well.""")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['red', 'green', 'blue', 'alpha'])
|
||||
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
|
||||
@@ -84,12 +84,8 @@ def run():
|
||||
c.addCppMethod('long', '__hash__', '()', """\
|
||||
return (long)self->GetID();
|
||||
""")
|
||||
c.addCppMethod('bool', '__lt__', '(wxDataViewItem* other)', "return (self->GetID() < other->GetID());")
|
||||
c.addCppMethod('bool', '__le__', '(wxDataViewItem* other)', "return (self->GetID() <= other->GetID());")
|
||||
c.addCppMethod('bool', '__eq__', '(wxDataViewItem* other)', "return (self->GetID() == other->GetID());")
|
||||
c.addCppMethod('bool', '__ne__', '(wxDataViewItem* other)', "return (self->GetID() != other->GetID());")
|
||||
c.addCppMethod('bool', '__ge__', '(wxDataViewItem* other)', "return (self->GetID() >= other->GetID());")
|
||||
c.addCppMethod('bool', '__gt__', '(wxDataViewItem* other)', "return (self->GetID() > other->GetID());")
|
||||
c.addAutoProperties()
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,9 @@ def run():
|
||||
""",
|
||||
briefDoc="Set both the row and column properties.")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['row', 'col'])
|
||||
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "wx.GBPosition"+str(self.Get())')
|
||||
@@ -92,6 +95,8 @@ def run():
|
||||
""",
|
||||
briefDoc="Set both the rowspan and colspan properties.")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['rowspan', 'colspan'])
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "wx.GBSpan"+str(self.Get())')
|
||||
|
||||
@@ -109,6 +109,9 @@ def run():
|
||||
pyArgsString="() -> (x,y)",
|
||||
briefDoc="Return the x and y properties as a tuple.")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['x', 'y'])
|
||||
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "wx.Point"+str(self.Get())')
|
||||
@@ -180,6 +183,8 @@ def run():
|
||||
pyArgsString="() -> (width, height)",
|
||||
briefDoc="Return the width and height properties as a tuple.")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['width', 'height'])
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "wx.Size"+str(self.Get())')
|
||||
@@ -258,6 +263,8 @@ def run():
|
||||
pyArgsString="() -> (x, y, width, height)",
|
||||
briefDoc="Return the rectangle's properties as a tuple.")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['x', 'y', 'width', 'height'])
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "wx.Rect"+str(self.Get())')
|
||||
@@ -310,6 +317,8 @@ def run():
|
||||
pyArgsString="() -> (x, y)",
|
||||
briefDoc="Return the point's properties as a tuple.")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['x', 'y'])
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "wx.RealPoint"+str(self.Get())')
|
||||
|
||||
@@ -65,6 +65,8 @@ def run():
|
||||
Get() -> (x,y)\n
|
||||
Return the x and y properties as a tuple.""")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['x', 'y'])
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "wx.Point2D"+str(self.Get())')
|
||||
@@ -110,6 +112,8 @@ def run():
|
||||
Get() -> (x, y, width, height)\n
|
||||
Return the rectangle's properties as a tuple.""")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['x', 'y', 'width', 'height'])
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "wx.Rect2D"+str(self.Get())')
|
||||
|
||||
@@ -103,6 +103,8 @@ def run():
|
||||
pyArgsString="() -> (row,col)",
|
||||
briefDoc="Return the row and col properties as a tuple.")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['Row', 'Col'])
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "GridCellCoords"+str(self.Get())')
|
||||
|
||||
@@ -43,6 +43,8 @@ def run():
|
||||
# These argument types are actually ButtonLabel, but the class is a private
|
||||
# helper. We will always be passing in strings, and ButtonLabel will implicitly
|
||||
# convert.
|
||||
#
|
||||
# TODO: Add a mapped type for ButtonLabel that converts from a string or stock ID. See #276
|
||||
c.find('SetHelpLabel.help').type = 'const wxString&'
|
||||
c.find('SetOKCancelLabels.ok').type = 'const wxString&'
|
||||
c.find('SetOKCancelLabels.cancel').type = 'const wxString&'
|
||||
|
||||
@@ -42,6 +42,8 @@ def run():
|
||||
pyArgsString="() -> (row,col)",
|
||||
briefDoc="Return the row and col properties as a tuple.")
|
||||
|
||||
tools.addGetIMMethodTemplate(module, c, ['Row', 'Col'])
|
||||
|
||||
# Add sequence protocol methods and other goodies
|
||||
c.addPyMethod('__str__', '(self)', 'return str(self.Get())')
|
||||
c.addPyMethod('__repr__', '(self)', 'return "wx.Position"+str(self.Get())')
|
||||
|
||||
@@ -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())')
|
||||
|
||||
@@ -42,10 +42,18 @@ def run():
|
||||
#-----------------------------------------------------------------
|
||||
c = module.find('wxTreeListItem')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
|
||||
c.addCppMethod('int', '__nonzero__', '()', """\
|
||||
return self->IsOk();
|
||||
""")
|
||||
|
||||
c.addCppMethod('long', '__hash__', '()', """\
|
||||
return (long)self->GetID();
|
||||
""")
|
||||
|
||||
c.addCppMethod('bool', '__eq__', '(wxTreeListItem* other)', "return (self->GetID() == other->GetID());")
|
||||
c.addCppMethod('bool', '__ne__', '(wxTreeListItem* other)', "return (self->GetID() != other->GetID());")
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
c = module.find('wxTreeListItemComparator')
|
||||
|
||||
Reference in New Issue
Block a user