]> git.saurik.com Git - wxWidgets.git/commitdiff
A couple new simple tests
authorRobin Dunn <robin@alldunn.com>
Tue, 28 Nov 2006 23:25:38 +0000 (23:25 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 28 Nov 2006 23:25:38 +0000 (23:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/tests/test_appleevents.py [new file with mode: 0644]
wxPython/tests/test_rendererButton.py [new file with mode: 0644]

diff --git a/wxPython/tests/test_appleevents.py b/wxPython/tests/test_appleevents.py
new file mode 100644 (file)
index 0000000..b13c08e
--- /dev/null
@@ -0,0 +1,17 @@
+import sys, os
+import wx
+
+class MyApp(wx.App):
+    def OnInit(self):
+        f = wx.Frame(None, title="Hello World")
+        f.Show()
+        return True
+    
+    def MacOpenFile(self, filename):
+        # code to load filename goes here.
+        wx.MessageBox(
+            "You requested to open this file:\n\"%s\"" % filename)
+
+app = MyApp()
+app.MainLoop()
+
diff --git a/wxPython/tests/test_rendererButton.py b/wxPython/tests/test_rendererButton.py
new file mode 100644 (file)
index 0000000..39504c2
--- /dev/null
@@ -0,0 +1,23 @@
+import wx
+
+class TestPanel(wx.Panel):
+    def __init__(self, parent):
+        wx.Panel.__init__(self, parent)
+        self.Bind(wx.EVT_PAINT, self.OnPaint)
+
+    def OnPaint(self, evt):
+        dc = wx.PaintDC(self)
+        r = wx.Rect(10,10, 22,22)
+        dc.SetClippingRect(r)
+        rndr = wx.RendererNative.Get()
+        rndr.DrawComboBoxDropButton(self, dc, r)
+
+        r.x = 50
+        rndr.DrawPushButton(self, dc, r)
+        
+
+app = wx.App(False)
+frm = wx.Frame(None)
+pnl = TestPanel(frm)
+frm.Show()
+app.MainLoop()