]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxOGL.py
Updated wxSTC from Scintilla 1.40 to Scintilla 1.45
[wxWidgets.git] / wxPython / demo / wxOGL.py
index 63501224ae3e821926fa7ec5a5d8cb4c22d5dc3a..32b0676cfaf1cac2e2bfc28fbe23e71dd0ceee05 100644 (file)
@@ -60,6 +60,7 @@ class MyEvtHandler(wxShapeEvtHandler):
 
     def OnLeftClick(self, x, y, keys = 0, attachment = 0):
         shape = self.GetShape()
 
     def OnLeftClick(self, x, y, keys = 0, attachment = 0):
         shape = self.GetShape()
+        print shape.__class__
         canvas = shape.GetCanvas()
         dc = wxClientDC(canvas)
         canvas.PrepareDC(dc)
         canvas = shape.GetCanvas()
         dc = wxClientDC(canvas)
         canvas.PrepareDC(dc)
@@ -122,7 +123,7 @@ class TestWindow(wxShapeCanvas):
 
         self.log = log
         self.frame = frame
 
         self.log = log
         self.frame = frame
-        self.SetBackgroundColour(wxWHITE)
+        self.SetBackgroundColour("LIGHT BLUE") #wxWHITE)
         self.diagram = wxDiagram()
         self.SetDiagram(self.diagram)
         self.diagram.SetCanvas(self)
         self.diagram = wxDiagram()
         self.SetDiagram(self.diagram)
         self.diagram.SetCanvas(self)
@@ -165,6 +166,11 @@ class TestWindow(wxShapeCanvas):
             # for some reason, the shapes have to be moved for the line to show up...
             fromShape.Move(dc, fromShape.GetX(), fromShape.GetY())
 
             # for some reason, the shapes have to be moved for the line to show up...
             fromShape.Move(dc, fromShape.GetX(), fromShape.GetY())
 
+##         EVT_PAINT(self, self.OnPaint)
+
+##     def OnPaint(self, evt):
+##         evt.Skip()
+##         print "TheLists:", wxThePenList.GetCount(), wxTheBrushList.GetCount(), wxTheFontList.GetCount()
 
 
     def MyAddShape(self, shape, x, y, pen, brush, text):
 
 
     def MyAddShape(self, shape, x, y, pen, brush, text):
@@ -193,6 +199,14 @@ class TestWindow(wxShapeCanvas):
             if shape.GetParent() == None:
                 shape.SetCanvas(None)
                 shape.Destroy()
             if shape.GetParent() == None:
                 shape.SetCanvas(None)
                 shape.Destroy()
+        self.diagram.Destroy()
+
+
+    def OnBeginDragLeft(self, x, y, keys):
+        self.log.write("OnBeginDragLeft: %s, %s, %s\n" % (x, y, keys))
+
+    def OnEndDragLeft(self, x, y, keys):
+        self.log.write("OnEndDragLeft: %s, %s, %s\n" % (x, y, keys))
 
 
 #----------------------------------------------------------------------
 
 
 #----------------------------------------------------------------------