]> git.saurik.com Git - wxWidgets.git/commitdiff
More lib and demo changes for dropping the wx prefix, from Jeff G.
authorRobin Dunn <robin@alldunn.com>
Sat, 20 Dec 2003 19:36:30 +0000 (19:36 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 20 Dec 2003 19:36:30 +0000 (19:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 files changed:
wxPython/demo/GridDragable.py
wxPython/demo/wxFloatBar.py
wxPython/demo/wxHtmlWindow.py
wxPython/demo/wxMultipleChoiceDialog.py
wxPython/demo/wxScrolledMessageDialog.py
wxPython/wx/lib/dialogs.py
wxPython/wx/lib/floatbar.py
wxPython/wx/lib/gridmovers.py
wxPython/wx/lib/layoutf.py
wxPython/wx/lib/plot.py
wxPython/wxPython/lib/dialogs.py
wxPython/wxPython/lib/floatbar.py
wxPython/wxPython/lib/gridmovers.py

index 547b19ee94918daabfe754d6270869243d1455da..b30467c209fb5af840fd4bbb6668e589c9fef0c6 100644 (file)
@@ -176,16 +176,12 @@ class DragableGrid(gridlib.Grid):
         self.SetTable(table, True)
 
         # Enable Column moving
-        #>> TODO - renamer didn't get this one
-        gridmovers.wxGridColMover(self)
-        #>> TODO - Bind() not working here
-        gridmovers.EVT_GRID_COL_MOVE(self,self.GetId(),self.OnColMove)
+        gridmovers.GridColMover(self)
+        self.Bind(gridmovers.EVT_GRID_COL_MOVE, self.OnColMove, self)
 
         # Enable Row moving
-        #>> TODO - renamer didn't get this one
-        gridmovers.wxGridRowMover(self)
-        #>> TODO - Bind() not working here
-        gridmovers.EVT_GRID_ROW_MOVE(self,self.GetId(),self.OnRowMove)
+        gridmovers.GridRowMover(self)
+        self.Bind(gridmovers.EVT_GRID_ROW_MOVE, self.OnRowMove, self)
 
     # Event method called when a column move needs to take place
     def OnColMove(self,evt):
index 3772682e03a8088bc420c5784ce05685eac2962a..c218731bb4db0cc9280080ffaeba1565bbeb2d5d 100644 (file)
@@ -9,9 +9,13 @@
 # o Issues - library has to be converted to work properly
 #   with new namespace.
 #
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxFloatBar -> FloatBar
+#
 
 import  wx
-import  wx.lib.floatbar as  float
+import  wx.lib.floatbar
 
 import  images
 
@@ -31,7 +35,7 @@ class TestFloatBar(wx.Frame):
             "Toggle the last tool to remove\nthe title.", (15,15)
             )
 
-        tb = float.wxFloatBar(self, -1)
+        tb = wx.lib.floatbar.FloatBar(self, -1)
         self.SetToolBar(tb)
         tb.SetFloatable(1)
         tb.SetTitle("Floating!")
@@ -73,7 +77,7 @@ class TestFloatBar(wx.Frame):
         self.log.WriteText("tool %s clicked\n" % event.GetId())
 
         if event.GetId() == 60:
-            print event.GetExtraLong(), event.Checked(), event.GetInt(), self.tb.GetToolState(60)
+            print event.GetExtraLong(), event.IsChecked(), event.GetInt(), self.tb.GetToolState(60)
 
             if event.GetExtraLong():
                 self.tb.SetTitle("")
@@ -93,7 +97,7 @@ def runTest(frame, nb, log):
 #---------------------------------------------------------------------------
 
 overview = """\
-wxFloatBar is a subclass of wxToolBar, implemented in Python, which
+FloatBar is a subclass of wx.ToolBar, implemented in Python, which
 can be detached from its frame.
 
 Drag the toolbar with the mouse to make it float, and drag it back, or
index 0c6a0118a9541883fd67e7f48636c6464942a620..48b0706111614bcb041da9a0e61edfc4d567a433 100644 (file)
@@ -6,6 +6,10 @@
 #
 # o got the wxpTag stuff working right.
 # 
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxScrolledMessageDialog -> ScrolledMessageDialog
+# 
 
 import  os
 import  sys
@@ -182,11 +186,11 @@ class TestHtmlPanel(wx.Panel):
 
 
     def OnViewSource(self, event):
-        import  wx.lib.dialogs  as  dlgs
+        import  wx.lib.dialogs
 
         source = self.html.GetParser().GetSource()
 
-        dlg = dlgs.wxScrolledMessageDialog(self, source, 'HTML Source')
+        dlg = wx.lib.dialogs.ScrolledMessageDialog(self, source, 'HTML Source')
         dlg.ShowModal()
         dlg.Destroy()
 
index c2a0b6638a6e54b8600d8cfcaad3844f53da820e..e354d280707a01cbc8be3788ec2c134f94a16d9e 100644 (file)
@@ -6,9 +6,13 @@
 #
 # o wx renamer not applied to lib.
 # 
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxMultipleChoiceDialog -> MultipleChoiceDialog
+# 
 
 import  wx
-import  wx.lib.dialogs  as  dlgs
+import  wx.lib.dialogs
 
 #---------------------------------------------------------------------------
 
@@ -16,9 +20,10 @@ def runTest(frame, nb, log):
     lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange',
             'etc', 'etc..', 'etc...' ]
 
-    dlg = dlgs.wxMultipleChoiceDialog(frame,
-                                 "Pick some from\n this list\nblah blah...",
-                                 "m.s.d.", lst)
+    dlg = wx.lib.dialogs.MultipleChoiceDialog(
+                                frame,
+                                "Pick some from\n this list\nblah blah...",
+                                "m.s.d.", lst)
 
     if (dlg.ShowModal() == wx.ID_OK):
         print "Selection:", dlg.GetValue(), " -> ", dlg.GetValueString()
@@ -34,7 +39,7 @@ overview = """\
 This is a Python implementation of a dialog that is not yet implemented in wxWindows
 proper, so don't let the wxWindows documentation mislead you.
 
-<p><code><b>wxMultipleChoiceDialog</b>(self, parent, msg, title, lst, 
+<p><code><b>MultipleChoiceDialog</b>(self, parent, msg, title, lst, 
 pos = wx.wxDefaultPosition, size = (200,200), style = wx.wxDEFAULT_DIALOG_STYLE)
 </code>
 
@@ -74,7 +79,7 @@ available.
 
 </dl>
 
-Additionally, wxMultipleChoiceDialog.lbox is a standard wxListBox which supports all
+Additionally, MultipleChoiceDialog.lbox is a standard wx.ListBox which supports all
 methods applicable to that class.
 
 </body>
index 5838d884449350f73d4e5495a2092982e7a37c2e..03158917af665ace6aa05e982a17d176c9499882 100644 (file)
 #
 # o dialogs library converted. All is well.
 # 
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxScrolledMessageDialog -> ScrolledMessageDialog
+# 
 
 import  wx
-import  wx.lib.dialogs  as  dlgs
+import  wx.lib.dialogs
 
 #---------------------------------------------------------------------------
 
@@ -21,7 +25,7 @@ def runTest(frame, nb, log):
     msg = f.read()
     f.close()
     
-    dlg = dlgs.wxScrolledMessageDialog(frame, msg, "message test")
+    dlg = wx.lib.dialogs.ScrolledMessageDialog(frame, msg, "message test")
     dlg.ShowModal()
 
 #---------------------------------------------------------------------------
@@ -30,7 +34,7 @@ def runTest(frame, nb, log):
 
 overview = """\
 
-<code><b>wxScrolledMessageDialog</b>(parent, msg, caption, pos=wx.DefaultPosition, size=(500,300))</code>
+<code><b>ScrolledMessageDialog</b>(parent, msg, caption, pos=wx.DefaultPosition, size=(500,300))</code>
 
 This class represents a message dialog that uses a wxTextCtrl to display the
 message. This allows more flexible information display without having to be
index 3012e18cdf1e60985796cb91c98ae79434280c35..7d79bb51a40cc9f16aa278c2e0ddad0d24198c68 100644 (file)
 #
 # o Updated for 2.5 compatability.
 #
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxScrolledMessageDialog -> ScrolledMessageDialog
+# o wxMultipleChoiceDialog -> MultipleChoiceDialog
+#
 
 import  wx
 import  layoutf
 
 #----------------------------------------------------------------------
 
-class wxScrolledMessageDialog(wx.Dialog):
+class ScrolledMessageDialog(wx.Dialog):
     def __init__(self, parent, msg, caption, pos = wx.DefaultPosition, 
                  size = (500,300)):
         wx.Dialog.__init__(self, parent, -1, caption, pos, size)
@@ -41,7 +46,7 @@ class wxScrolledMessageDialog(wx.Dialog):
         self.Layout()
 
 
-class wxMultipleChoiceDialog(wx.Dialog):
+class MultipleChoiceDialog(wx.Dialog):
     def __init__(self, parent, msg, title, lst, pos = wx.DefaultPosition,
                  size = (200,200), style = wx.DEFAULT_DIALOG_STYLE):
         wx.Dialog.__init__(self, parent, -1, title, pos, size, style)
@@ -263,7 +268,7 @@ def alertDialog(parent=None, message='', title='Alert', pos=wx.DefaultPosition):
 def scrolledMessageDialog(parent=None, message='', title='', pos=wx.DefaultPosition,
                           size=(500,300)):
 
-    dialog = wxScrolledMessageDialog(parent, message, title, pos, size)
+    dialog = ScrolledMessageDialog(parent, message, title, pos, size)
     result = DialogResults(dialog.ShowModal())
     dialog.Destroy()
     return result
@@ -324,7 +329,7 @@ def singleChoiceDialog(parent=None, message='', title='', lst=[],
 def multipleChoiceDialog(parent=None, message='', title='', lst=[], pos=wx.DefaultPosition, 
                          size=(200,200)):
 
-    dialog = wxMultipleChoiceDialog(parent, message, title, lst, pos, size)
+    dialog = MultipleChoiceDialog(parent, message, title, lst, pos, size)
     result = DialogResults(dialog.ShowModal())
     result.selection = dialog.GetValueString()
     dialog.Destroy()
index 8443ebe7bf2a9f4641944e53426a62a234b75d2a..2fef791b89aa00ed347e84ad4ea29e68e69b5d35 100644 (file)
 #
 # o Added deprecation warning.
 #
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxFloatBar -> FloatBar
+#
 
 """
 NOTE: This module is *not* supported in any way.  Use it however you
@@ -42,7 +46,7 @@ if wx.Platform == '__WXGTK__':
     #
     # For wxGTK all we have to do is set the wxTB_DOCKABLE flag
     #
-    class wxFloatBar(wx.ToolBar):
+    class FloatBar(wx.ToolBar):
         def __init__(self, parent, ID,
                      pos = wx.DefaultPosition,
                      size = wx.DefaultSize,
@@ -68,7 +72,7 @@ if wx.Platform == '__WXGTK__':
 else:
     _DOCKTHRESHOLD = 25
 
-    class wxFloatBar(wx.ToolBar):
+    class FloatBar(wx.ToolBar):
         """
         wxToolBar subclass which can be dragged off its frame and later
         replaced there.  Drag on the toolbar to release it, close it like
index 40c5156d5597062eb9f47440065027419a1f919a..bb931d1e4681f3721fe9d3e856a09a60587588b0 100644 (file)
 #
 # o 2.5 Compatability changes
 #
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxGridColMoveEvent -> GridColMoveEvent
+# o wxGridRowMoveEvent -> GridRowMoveEvent
+# o wxGridColMover -> GridColMover
+# o wxGridRowMover -> GridRowMover
+#
+
 
 import  wx
 import  wx.grid
@@ -31,7 +39,7 @@ EVT_GRID_ROW_MOVE = wx.PyEventBinder(wxEVT_COMMAND_GRID_ROW_MOVE, 1)
 
 #----------------------------------------------------------------------------
 
-class wxGridColMoveEvent(wx.PyCommandEvent):
+class GridColMoveEvent(wx.PyCommandEvent):
     def __init__(self, id, dCol, bCol):
         wx.PyCommandEvent.__init__(self, id = id)
         self.SetEventType(wxEVT_COMMAND_GRID_COL_MOVE)
@@ -45,7 +53,7 @@ class wxGridColMoveEvent(wx.PyCommandEvent):
         return self.beforeColumn
 
 
-class wxGridRowMoveEvent(wx.PyCommandEvent):
+class GridRowMoveEvent(wx.PyCommandEvent):
     def __init__(self, id, dRow, bRow):
         wx.PyCommandEvent.__init__(self,id = id)
         self.SetEventType(wxEVT_COMMAND_GRID_ROW_MOVE)
@@ -223,7 +231,7 @@ class RowDragWindow(wx.Window):
 
 #----------------------------------------------------------------------------
 
-class wxGridColMover(wx.EvtHandler):
+class GridColMover(wx.EvtHandler):
     def __init__(self,grid):
         wx.EvtHandler.__init__(self)
 
@@ -328,7 +336,7 @@ class wxGridColMover(wx.EvtHandler):
                 bCol = self.colWin.GetInsertionColumn()
                 dCol = self.colWin.GetMoveColumn()
                 wx.PostEvent(self,
-                             wxGridColMoveEvent(self.grid.GetId(), dCol, bCol))
+                             GridColMoveEvent(self.grid.GetId(), dCol, bCol))
 
             self.colWin.Destroy()
         evt.Skip()
@@ -343,7 +351,7 @@ class wxGridColMover(wx.EvtHandler):
         return bmp
 
 
-class wxGridRowMover(wx.EvtHandler):
+class GridRowMover(wx.EvtHandler):
     def __init__(self,grid):
         wx.EvtHandler.__init__(self)
 
@@ -451,7 +459,7 @@ class wxGridRowMover(wx.EvtHandler):
                 dRow = self.rowWin.GetMoveRow()
 
                 wx.PostEvent(self,
-                             wxGridRowMoveEvent(self.grid.GetId(), dRow, bRow))
+                             GridRowMoveEvent(self.grid.GetId(), dRow, bRow))
 
             self.rowWin.Destroy()
         evt.Skip()
index 84fc7116fbdf22ee2fc403bcb41ef18b344f54fe..65a4bdc737e0be01d5eed4872a80413d73fd41a9 100644 (file)
@@ -2,6 +2,10 @@
 #
 # o Updated for wx namespace
 # 
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxScrolledMessageDialog -> ScrolledMessageDialog
+# 
 
 import  re
 import  wx
@@ -240,7 +244,7 @@ if __name__=='__main__':
 
         def OnAbout(self, event):
             import  wx.lib.dialogs
-            msg = wx.lib.dialogs.wxScrolledMessageDialog(self, Layoutf.__doc__, "about")
+            msg = wx.lib.dialogs.ScrolledMessageDialog(self, Layoutf.__doc__, "about")
             msg.ShowModal()
             msg.Destroy()
 
index 416fc559af81ff56cbc91656d14dd9cb933093d3..7b8535945f86e0b55584620d628ee0dd5a9860be 100644 (file)
 # o Reworked test frame to work with wx demo framework. This saves a bit
 #   of tedious cut and paste, and the test app is excellent.
 #
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxScrolledMessageDialog -> ScrolledMessageDialog
+#
 
 """
 This is a simple light weight plotting module that can be used with
@@ -1455,8 +1459,8 @@ class TestFrame(wx.Frame):
         self.client.Reset()
 
     def OnHelpAbout(self, event):
-        from wx.lib.dialogs import wxScrolledMessageDialog
-        about = wxScrolledMessageDialog(self, __doc__, "About...")
+        from wx.lib.dialogs import ScrolledMessageDialog
+        about = ScrolledMessageDialog(self, __doc__, "About...")
         about.ShowModal()
 
     def resetDefaults(self):
index be216b129a721954c00da7216e20e6d36a369ca3..822863f72460f32d41b5806d424efcbc437fdf7f 100644 (file)
@@ -23,5 +23,5 @@ saveFileDialog = wx.lib.dialogs.saveFileDialog
 scrolledMessageDialog = wx.lib.dialogs.scrolledMessageDialog
 singleChoiceDialog = wx.lib.dialogs.singleChoiceDialog
 textEntryDialog = wx.lib.dialogs.textEntryDialog
-wxMultipleChoiceDialog = wx.lib.dialogs.wxMultipleChoiceDialog
-wxScrolledMessageDialog = wx.lib.dialogs.wxScrolledMessageDialog
+wxMultipleChoiceDialog = wx.lib.dialogs.MultipleChoiceDialog
+wxScrolledMessageDialog = wx.lib.dialogs.ScrolledMessageDialog
index 760a63e292b5a56230c622aac9a96ad49f052aa9..bbc9624f29a0308ebc35ed306de1fa0ab4dfd0ea 100644 (file)
@@ -6,4 +6,4 @@ import wx.lib.floatbar
 
 __doc__ =  wx.lib.floatbar.__doc__
 
-wxFloatBar = wx.lib.floatbar.wxFloatBar
+wxFloatBar = wx.lib.floatbar.FloatBar
index 4b88f64fe9ee79d768a5746e1831a32e8753b3b4..df3fb209b44b31598ab12b925af18f1f782e13ae 100644 (file)
@@ -12,7 +12,7 @@ EVT_GRID_ROW_MOVE = wx.lib.gridmovers.EVT_GRID_ROW_MOVE
 RowDragWindow = wx.lib.gridmovers.RowDragWindow
 _ColToRect = wx.lib.gridmovers._ColToRect
 _RowToRect = wx.lib.gridmovers._RowToRect
-wxGridColMoveEvent = wx.lib.gridmovers.wxGridColMoveEvent
-wxGridColMover = wx.lib.gridmovers.wxGridColMover
-wxGridRowMoveEvent = wx.lib.gridmovers.wxGridRowMoveEvent
-wxGridRowMover = wx.lib.gridmovers.wxGridRowMover
+wxGridColMoveEvent = wx.lib.gridmovers.GridColMoveEvent
+wxGridColMover = wx.lib.gridmovers.GridColMover
+wxGridRowMoveEvent = wx.lib.gridmovers.GridRowMoveEvent
+wxGridRowMover = wx.lib.gridmovers.GridRowMover