]> git.saurik.com Git - wxWidgets.git/commitdiff
more tweaks for release
authorRobin Dunn <robin@alldunn.com>
Sat, 13 Nov 1999 07:33:29 +0000 (07:33 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 13 Nov 1999 07:33:29 +0000 (07:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

16 files changed:
utils/wxPython/demo/Calbmp/Calend.bmp [deleted file]
utils/wxPython/demo/Calbmp/DbDec.bmp [deleted file]
utils/wxPython/demo/Calbmp/DbInc.bmp [deleted file]
utils/wxPython/demo/Calbmp/Dec.bmp [deleted file]
utils/wxPython/demo/Calbmp/Inc.bmp [deleted file]
utils/wxPython/demo/Calbmp/Pt.bmp [deleted file]
utils/wxPython/demo/Threads.py
utils/wxPython/demo/bitmaps/Calend.bmp [new file with mode: 0644]
utils/wxPython/demo/bitmaps/DbDec.bmp [new file with mode: 0644]
utils/wxPython/demo/bitmaps/DbInc.bmp [new file with mode: 0644]
utils/wxPython/demo/bitmaps/Dec.bmp [new file with mode: 0644]
utils/wxPython/demo/bitmaps/Inc.bmp [new file with mode: 0644]
utils/wxPython/demo/bitmaps/Pt.bmp [new file with mode: 0644]
utils/wxPython/demo/wxCalendar.py
utils/wxPython/modules/glcanvas/.cvsignore
utils/wxPython/src/build.cfg

diff --git a/utils/wxPython/demo/Calbmp/Calend.bmp b/utils/wxPython/demo/Calbmp/Calend.bmp
deleted file mode 100644 (file)
index c192c88..0000000
Binary files a/utils/wxPython/demo/Calbmp/Calend.bmp and /dev/null differ
diff --git a/utils/wxPython/demo/Calbmp/DbDec.bmp b/utils/wxPython/demo/Calbmp/DbDec.bmp
deleted file mode 100644 (file)
index 970266c..0000000
Binary files a/utils/wxPython/demo/Calbmp/DbDec.bmp and /dev/null differ
diff --git a/utils/wxPython/demo/Calbmp/DbInc.bmp b/utils/wxPython/demo/Calbmp/DbInc.bmp
deleted file mode 100644 (file)
index 5f5dffa..0000000
Binary files a/utils/wxPython/demo/Calbmp/DbInc.bmp and /dev/null differ
diff --git a/utils/wxPython/demo/Calbmp/Dec.bmp b/utils/wxPython/demo/Calbmp/Dec.bmp
deleted file mode 100644 (file)
index 64efbb3..0000000
Binary files a/utils/wxPython/demo/Calbmp/Dec.bmp and /dev/null differ
diff --git a/utils/wxPython/demo/Calbmp/Inc.bmp b/utils/wxPython/demo/Calbmp/Inc.bmp
deleted file mode 100644 (file)
index 8dd2649..0000000
Binary files a/utils/wxPython/demo/Calbmp/Inc.bmp and /dev/null differ
diff --git a/utils/wxPython/demo/Calbmp/Pt.bmp b/utils/wxPython/demo/Calbmp/Pt.bmp
deleted file mode 100644 (file)
index 6c49461..0000000
Binary files a/utils/wxPython/demo/Calbmp/Pt.bmp and /dev/null differ
index 75a96e786951f9a4d6c2684114310bdd6159b201..0aa4c91320ea76836955d2b97645ebb0cb61bacd 100644 (file)
@@ -74,7 +74,8 @@ class GraphWindow(wxWindow):
         self.font = wxFont(12, wxSWISS, wxNORMAL, wxBOLD)
         self.SetFont(self.font)
 
-        self.colors = [ wxRED, wxGREEN, wxBLUE, wxCYAN] #, wxNamedColour("Yellow") ]
+        self.colors = [ wxRED, wxGREEN, wxBLUE, wxCYAN,
+                        wxNamedColour("Yellow"), wxNamedColor("Navy") ]
 
 
     def SetValue(self, index, value):
@@ -94,12 +95,11 @@ class GraphWindow(wxWindow):
         self.barHeight = hmax
 
 
-    def OnPaint(self, evt):
-        size = self.GetSize()
-        dc = wxPaintDC(self)
-        dc.BeginDrawing()
+    def Draw(self, dc, size):
         dc.SetFont(self.font)
         dc.SetTextForeground(wxBLUE)
+        dc.SetBackground(wxBrush(self.GetBackgroundColour()))
+        dc.Clear()
         dc.SetPen(wxPen(wxBLACK, 3, wxSOLID))
         dc.DrawLine(self.linePos, 0, self.linePos, size.height-10)
 
@@ -118,7 +118,24 @@ class GraphWindow(wxWindow):
             if ypos > size.height-10:
                 break
 
-        dc.EndDrawing()
+
+    def OnPaint(self, evt):
+        size = self.GetSize()
+        bmp = wxEmptyBitmap(size.width, size.height)
+        dc = wxMemoryDC()
+        dc.SelectObject(bmp)
+        self.Draw(dc, size)
+
+        wdc = wxPaintDC(self)
+        wdc.BeginDrawing()
+        wdc.Blit(0,0, size.width, size.height, dc, 0,0)
+        wdc.EndDrawing()
+
+
+    def OnEraseBackground(self, evt):
+        pass
+
+
 
 
 #----------------------------------------------------------------------
@@ -137,7 +154,8 @@ class TestFrame(wxFrame):
                      "window by sending events to it.", wxPoint(5,5))
         panel.Fit()
 
-        self.graph = GraphWindow(self, ['Zero', 'One', 'Two', 'Three'])
+        self.graph = GraphWindow(self, ['Zero', 'One', 'Two', 'Three', 'Four',
+                                        'Five', 'Six', 'Seven'])
 
         sizer = wxBoxSizer(wxVERTICAL)
         sizer.Add(panel, 0, wxEXPAND)
@@ -153,10 +171,14 @@ class TestFrame(wxFrame):
 
         EVT_UPDATE_BARGRAPH(self, self.OnUpdate)
         self.threads = []
-        self.threads.append(CalcBarThread(self, 0, 25))
-        self.threads.append(CalcBarThread(self, 1, 50))
-        self.threads.append(CalcBarThread(self, 2, 75))
-        self.threads.append(CalcBarThread(self, 3, 100))
+        self.threads.append(CalcBarThread(self, 0, 50))
+        self.threads.append(CalcBarThread(self, 1, 75))
+        self.threads.append(CalcBarThread(self, 2, 100))
+        self.threads.append(CalcBarThread(self, 3, 150))
+        self.threads.append(CalcBarThread(self, 4, 225))
+        self.threads.append(CalcBarThread(self, 5, 300))
+        self.threads.append(CalcBarThread(self, 6, 250))
+        self.threads.append(CalcBarThread(self, 7, 175))
 
         for t in self.threads:
             t.Start()
@@ -165,7 +187,7 @@ class TestFrame(wxFrame):
 
     def OnUpdate(self, evt):
         self.graph.SetValue(evt.barNum, evt.value)
-        self.graph.Refresh()
+        self.graph.Refresh(false)
 
 
     def OnCloseWindow(self, evt):
diff --git a/utils/wxPython/demo/bitmaps/Calend.bmp b/utils/wxPython/demo/bitmaps/Calend.bmp
new file mode 100644 (file)
index 0000000..c192c88
Binary files /dev/null and b/utils/wxPython/demo/bitmaps/Calend.bmp differ
diff --git a/utils/wxPython/demo/bitmaps/DbDec.bmp b/utils/wxPython/demo/bitmaps/DbDec.bmp
new file mode 100644 (file)
index 0000000..970266c
Binary files /dev/null and b/utils/wxPython/demo/bitmaps/DbDec.bmp differ
diff --git a/utils/wxPython/demo/bitmaps/DbInc.bmp b/utils/wxPython/demo/bitmaps/DbInc.bmp
new file mode 100644 (file)
index 0000000..5f5dffa
Binary files /dev/null and b/utils/wxPython/demo/bitmaps/DbInc.bmp differ
diff --git a/utils/wxPython/demo/bitmaps/Dec.bmp b/utils/wxPython/demo/bitmaps/Dec.bmp
new file mode 100644 (file)
index 0000000..64efbb3
Binary files /dev/null and b/utils/wxPython/demo/bitmaps/Dec.bmp differ
diff --git a/utils/wxPython/demo/bitmaps/Inc.bmp b/utils/wxPython/demo/bitmaps/Inc.bmp
new file mode 100644 (file)
index 0000000..8dd2649
Binary files /dev/null and b/utils/wxPython/demo/bitmaps/Inc.bmp differ
diff --git a/utils/wxPython/demo/bitmaps/Pt.bmp b/utils/wxPython/demo/bitmaps/Pt.bmp
new file mode 100644 (file)
index 0000000..6c49461
Binary files /dev/null and b/utils/wxPython/demo/bitmaps/Pt.bmp differ
index 7648a7fbe86c8d624c5cb67beb67fcdefb6b6b14..6ef4e745d2e38d5cd9ac248529c5dc29f8ac3528 100644 (file)
@@ -100,7 +100,7 @@ class TestPanel(wxPanel):
 
         wxStaticText(self, -1, "Test Calendar Dialog", wxPoint(350, 50)).SetBackgroundColour(wxNamedColour('Red'))
 
-        bmp = wxBitmap('Calbmp/Calend.bmp', wxBITMAP_TYPE_BMP)
+        bmp = wxBitmap('bitmaps/Calend.bmp', wxBITMAP_TYPE_BMP)
         self.but = wxBitmapButton(self, 60, bmp, wxPoint(380, 80))#, wxSize(30, 30))
         EVT_BUTTON(self, 60, self.TestDlg)
 
@@ -108,7 +108,7 @@ class TestPanel(wxPanel):
 
         wxStaticText(self, -1, "Test Calendar Window", wxPoint(350, 150)).SetBackgroundColour(wxNamedColour('Blue'))
 
-        bmp = wxBitmap('Calbmp/Calend.bmp', wxBITMAP_TYPE_BMP)
+        bmp = wxBitmap('bitmaps/Calend.bmp', wxBITMAP_TYPE_BMP)
         self.but = wxBitmapButton(self, 160, bmp, wxPoint(380, 180))#, wxSize(30, 30))
         EVT_BUTTON(self, 160, self.TestFrame)
 
@@ -374,7 +374,7 @@ class CalendFrame(wxFrame):
     def MakeToolMenu(self):
         tb = self.CreateToolBar(wxTB_HORIZONTAL|wxNO_BORDER)
 
-        bmp_path = 'Calbmp/'
+        bmp_path = 'bitmaps/'
         SetToolPath(self, tb, 10, bmp_path + 'DbDec.bmp', 'Dec Year')
         EVT_TOOL(self, 10, self.OnDecYear)
 
index e8f0a7bd7a8be584e45f14b43ecf1bcd6c03ac12..82c04024fdbbe154cf52e307b1d38407081c8111 100644 (file)
@@ -8,6 +8,7 @@ Makefile.pre
 Setup
 build.local
 config.c
+glcanvas.h
 glcanvasc.ilk
 glcanvasc.pyd
 sedscript
index 5c48af31bce1495447d472aac95a6507f839c3c7..e0cd0cd43bab01464f1f53b562ea0ab0ad1ac1b7 100644 (file)
@@ -64,8 +64,8 @@ installLibDemo:
                cp ../lib/*.txt $(TARGETDIR)/lib;               \\
                cp ../lib/sizers/*.txt $(TARGETDIR)/lib/sizers; \\
                cp ../demo/*.txt $(TARGETDIR)/demo;             \\
-               cp ../demo/bitmaps/[a-z]* $(TARGETDIR)/demo/bitmaps;    \\
-               cp ../demo/data/[a-z]* $(TARGETDIR)/demo/data;  \\
+               cp ../demo/bitmaps/* $(TARGETDIR)/demo/bitmaps; \\
+               cp ../demo/data/* $(TARGETDIR)/demo/data;       \\
                $(EXECPREFIX)/bin/python $(PYLIB)/compileall.py $(TARGETDIR); \\
                $(EXECPREFIX)/bin/python -O $(PYLIB)/compileall.py $(TARGETDIR); \\
        fi