git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24942
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
13 files changed:
self.SetTable(table, True)
# Enable Column moving
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)
- #>> 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):
# Event method called when a column move needs to take place
def OnColMove(self,evt):
# o Issues - library has to be converted to work properly
# with new namespace.
#
# 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.lib.floatbar as float
"Toggle the last tool to remove\nthe title.", (15,15)
)
"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!")
self.SetToolBar(tb)
tb.SetFloatable(1)
tb.SetTitle("Floating!")
self.log.WriteText("tool %s clicked\n" % event.GetId())
if event.GetId() == 60:
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("")
if event.GetExtraLong():
self.tb.SetTitle("")
#---------------------------------------------------------------------------
overview = """\
#---------------------------------------------------------------------------
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
can be detached from its frame.
Drag the toolbar with the mouse to make it float, and drag it back, or
#
# o got the wxpTag stuff working right.
#
#
# o got the wxpTag stuff working right.
#
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxScrolledMessageDialog -> ScrolledMessageDialog
+#
def OnViewSource(self, event):
def OnViewSource(self, event):
- import wx.lib.dialogs as dlgs
source = self.html.GetParser().GetSource()
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()
dlg.ShowModal()
dlg.Destroy()
#
# o wx renamer not applied to lib.
#
#
# o wx renamer not applied to lib.
#
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxMultipleChoiceDialog -> MultipleChoiceDialog
+#
-import wx.lib.dialogs as dlgs
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
lst = [ 'apple', 'pear', 'banana', 'coconut', 'orange',
'etc', 'etc..', 'etc...' ]
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()
if (dlg.ShowModal() == wx.ID_OK):
print "Selection:", dlg.GetValue(), " -> ", dlg.GetValueString()
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.
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>
pos = wx.wxDefaultPosition, size = (200,200), style = wx.wxDEFAULT_DIALOG_STYLE)
</code>
-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>
methods applicable to that class.
</body>
#
# o dialogs library converted. All is well.
#
#
# o dialogs library converted. All is well.
#
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxScrolledMessageDialog -> ScrolledMessageDialog
+#
-import wx.lib.dialogs as dlgs
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
- dlg = dlgs.wxScrolledMessageDialog(frame, msg, "message test")
+ dlg = wx.lib.dialogs.ScrolledMessageDialog(frame, msg, "message test")
dlg.ShowModal()
#---------------------------------------------------------------------------
dlg.ShowModal()
#---------------------------------------------------------------------------
-<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
This class represents a message dialog that uses a wxTextCtrl to display the
message. This allows more flexible information display without having to be
#
# o Updated for 2.5 compatability.
#
#
# o Updated for 2.5 compatability.
#
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxScrolledMessageDialog -> ScrolledMessageDialog
+# o wxMultipleChoiceDialog -> MultipleChoiceDialog
+#
import wx
import layoutf
#----------------------------------------------------------------------
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)
def __init__(self, parent, msg, caption, pos = wx.DefaultPosition,
size = (500,300)):
wx.Dialog.__init__(self, parent, -1, caption, pos, size)
-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)
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)
def scrolledMessageDialog(parent=None, message='', title='', pos=wx.DefaultPosition,
size=(500,300)):
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
result = DialogResults(dialog.ShowModal())
dialog.Destroy()
return result
def multipleChoiceDialog(parent=None, message='', title='', lst=[], pos=wx.DefaultPosition,
size=(200,200)):
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()
result = DialogResults(dialog.ShowModal())
result.selection = dialog.GetValueString()
dialog.Destroy()
#
# o Added deprecation warning.
#
#
# 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
"""
NOTE: This module is *not* supported in any way. Use it however you
#
# For wxGTK all we have to do is set the wxTB_DOCKABLE flag
#
#
# 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,
def __init__(self, parent, ID,
pos = wx.DefaultPosition,
size = wx.DefaultSize,
else:
_DOCKTHRESHOLD = 25
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
"""
wxToolBar subclass which can be dragged off its frame and later
replaced there. Drag on the toolbar to release it, close it like
#
# o 2.5 Compatability changes
#
#
# 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
+#
+
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
-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)
def __init__(self, id, dCol, bCol):
wx.PyCommandEvent.__init__(self, id = id)
self.SetEventType(wxEVT_COMMAND_GRID_COL_MOVE)
-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)
def __init__(self, id, dRow, bRow):
wx.PyCommandEvent.__init__(self,id = id)
self.SetEventType(wxEVT_COMMAND_GRID_ROW_MOVE)
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
-class wxGridColMover(wx.EvtHandler):
+class GridColMover(wx.EvtHandler):
def __init__(self,grid):
wx.EvtHandler.__init__(self)
def __init__(self,grid):
wx.EvtHandler.__init__(self)
bCol = self.colWin.GetInsertionColumn()
dCol = self.colWin.GetMoveColumn()
wx.PostEvent(self,
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()
self.colWin.Destroy()
evt.Skip()
-class wxGridRowMover(wx.EvtHandler):
+class GridRowMover(wx.EvtHandler):
def __init__(self,grid):
wx.EvtHandler.__init__(self)
def __init__(self,grid):
wx.EvtHandler.__init__(self)
dRow = self.rowWin.GetMoveRow()
wx.PostEvent(self,
dRow = self.rowWin.GetMoveRow()
wx.PostEvent(self,
- wxGridRowMoveEvent(self.grid.GetId(), dRow, bRow))
+ GridRowMoveEvent(self.grid.GetId(), dRow, bRow))
self.rowWin.Destroy()
evt.Skip()
self.rowWin.Destroy()
evt.Skip()
#
# o Updated for wx namespace
#
#
# o Updated for wx namespace
#
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxScrolledMessageDialog -> ScrolledMessageDialog
+#
def OnAbout(self, event):
import wx.lib.dialogs
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()
msg.ShowModal()
msg.Destroy()
# 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.
#
# 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
"""
This is a simple light weight plotting module that can be used with
self.client.Reset()
def OnHelpAbout(self, event):
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):
about.ShowModal()
def resetDefaults(self):
scrolledMessageDialog = wx.lib.dialogs.scrolledMessageDialog
singleChoiceDialog = wx.lib.dialogs.singleChoiceDialog
textEntryDialog = wx.lib.dialogs.textEntryDialog
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
__doc__ = wx.lib.floatbar.__doc__
__doc__ = wx.lib.floatbar.__doc__
-wxFloatBar = wx.lib.floatbar.wxFloatBar
+wxFloatBar = wx.lib.floatbar.FloatBar
RowDragWindow = wx.lib.gridmovers.RowDragWindow
_ColToRect = wx.lib.gridmovers._ColToRect
_RowToRect = wx.lib.gridmovers._RowToRect
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