+class wxXYPrinterBase:
+ def __init__(self, val):
+ self.x = val['x']
+ self.y = val['y']
+
+class wxPointPrinter(wxXYPrinterBase):
+ def to_string(self):
+ return '(%d, %d)' % (self.x, self.y)
+
+class wxSizePrinter(wxXYPrinterBase):
+ def to_string(self):
+ return '%d*%d' % (self.x, self.y)
+
+class wxRectPrinter(wxXYPrinterBase):
+ def __init__(self, val):
+ wxXYPrinterBase.__init__(self, val)
+ self.width = val['width']
+ self.height = val['height']
+
+ def to_string(self):
+ return '(%d, %d) %d*%d' % (self.x, self.y, self.width, self.height)
+
+
+# The function looking up the pretty-printer to use for the given value.