Removed automatic "Magic Event Methods" bindings

Added explicit bindings where needed
other assorted odds and ends


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-06-02 01:50:43 +00:00
parent c1af1ea6b5
commit a95ee79d9c
75 changed files with 494 additions and 238 deletions

View File

@@ -77,13 +77,15 @@ class wxGenButton(wxControl):
self.SetBestSize(size)
self.InitColours()
EVT_LEFT_DOWN(self, self.OnLeftDown)
EVT_LEFT_UP(self, self.OnLeftUp)
EVT_MOTION(self, self.OnMotion)
EVT_SET_FOCUS(self, self.OnGainFocus)
EVT_KILL_FOCUS(self, self.OnLoseFocus)
EVT_KEY_DOWN(self, self.OnKeyDown)
EVT_KEY_UP(self, self.OnKeyUp)
EVT_LEFT_DOWN(self, self.OnLeftDown)
EVT_LEFT_UP(self, self.OnLeftUp)
EVT_MOTION(self, self.OnMotion)
EVT_SET_FOCUS(self, self.OnGainFocus)
EVT_KILL_FOCUS(self, self.OnLoseFocus)
EVT_KEY_DOWN(self, self.OnKeyDown)
EVT_KEY_UP(self, self.OnKeyUp)
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
EVT_PAINT(self, self.OnPaint)
def SetBestSize(self, size=None):

View File

@@ -394,6 +394,9 @@ class wxCalendar(wxWindow):
self.size = None
self.set_day = None
EVT_PAINT(self, self.OnPaint)
# control some of the main calendar attributes
def HideTitle(self):
@@ -523,7 +526,7 @@ class wxCalendar(wxWindow):
for key in self.rg.keys():
val = self.rg[key]
ms_rect = wxRect(mx, my, 1, 1)
if wxIntersectRect(ms_rect, val) != None:
if wxIntersectRect(ms_rect, val) is not None:
result = self.TestDay(key)
return result
return None

View File

@@ -48,6 +48,7 @@ class wxMultipleChoiceDialog(wxDialog):
self.SetAutoLayout(TRUE)
self.lst = lst
self.Layout()
EVT_SIZE(self, self.OnSize)
def OnSize(self, event):
self.Layout()

View File

@@ -111,6 +111,8 @@ class wxEditor(wxScrolledWindow):
EVT_LEFT_DOWN(self, self.OnMouseClick)
EVT_RIGHT_DOWN(self, self.OnMouseClick)
EVT_SCROLLWIN(self, self.OnScroll)
EVT_CHAR(self, self.OnChar)
EVT_PAINT(self, self.OnPaint)
self.o_cx = self.cx
self.o_cy = self.cy

View File

@@ -319,6 +319,7 @@ if __name__ == "__main__":
class DemoFrame( wxFrame ):
def __init__(self, parent):
wxFrame.__init__(self, parent, 2400, "File entry with browse", size=(500,260) )
EVT_CLOSE(self, self.OnCloseWindow)
panel = wxPanel (self,-1)
innerbox = wxBoxSizer(wxVERTICAL)
control = FileBrowseButton(

View File

@@ -200,6 +200,7 @@ if __name__=='__main__':
def __init__(self, parent):
wxFrame.__init__(self, parent, -1, 'Test Layout Constraints',
wxPyDefaultPosition, wxSize(500, 300))
EVT_CLOSE(self, self.OnCloseWindow)
self.SetAutoLayout(true)
EVT_BUTTON(self, 100, self.OnButton)

View File

@@ -769,6 +769,9 @@ class wxMVCTree(wxScrolledWindow):
EVT_MOUSE_EVENTS(self, self.OnMouse)
EVT_KEY_DOWN(self, self.OnKeyDown)
self.doubleBuffered = true
EVT_SIZE(self, self.OnSize)
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
EVT_PAINT(self, self.OnPaint)
def Refresh(self):

View File

@@ -155,7 +155,8 @@ class PyShellOutput(wxPanel):
# refreshes are annoying
self.in_batch =0
self.dirty =0
EVT_SIZE(self, self.OnSize)
EVT_IDLE(self, self.OnIdle)
def OnSize(self, event):
self.client.SetSize(self.GetClientSize())
@@ -248,6 +249,7 @@ class PyShell(wxPanel):
splitter.SetMinimumPaneSize(20)
self.splitter =splitter
EVT_SET_FOCUS(self, self.OnSetFocus)
EVT_SIZE(self, self.OnSize)
def OnSetFocus(self, event):
self.input.SetFocus()

View File

@@ -74,6 +74,8 @@ class SplashScreen(wxFrame):
self.timer = SplashTimer(callback)
self.timer.Start(duration, 1) # one-shot only
EVT_LEFT_DOWN(self, self.OnMouseClick)
EVT_CLOSE(self, self.OnCloseWindow)
EVT_PAINT(self, self.OnPaint)
def OnPaint(self, event):
dc = wxPaintDC(self)

View File

@@ -55,6 +55,9 @@ class wxVTKRenderWindow(wxScrolledWindow):
EVT_RIGHT_UP (self, self.Release)
EVT_MOTION (self, self.MouseMotion)
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
EVT_PAINT(self, self.OnPaint)
def GetRenderer(self):
self.renderWindow.GetRenderers().InitTraversal()

View File

@@ -176,6 +176,7 @@ class PlotCanvas(wx.wxWindow):
self.SetBackgroundColour(wx.wxNamedColour("white"))
wx.EVT_SIZE(self,self.reconfigure)
wx.EVT_PAINT(self, self.OnPaint)
self._setsize()
self.last_draw = None
# self.font = self._testFont(font)
@@ -446,8 +447,6 @@ Are you sure you want to do this?""", "Danger!", wx.wxYES_NO)
about = wx.wxMessageDialog(self, __doc__, "About...", wx.wxOK)
about.ShowModal()
def OnCloseWindow(self, event):
self.Destroy()
class MyApp(wx.wxApp):