X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1918b6f78959585e7d141aadc49bedfd5d0511f1..52df3d15d8df4bdd1efa308aaf7b0f1b7d2c82f8:/wxPython/samples/frogedit/FrogEditor.py?ds=sidebyside diff --git a/wxPython/samples/frogedit/FrogEditor.py b/wxPython/samples/frogedit/FrogEditor.py index d94e83c6e6..bf6b750763 100644 --- a/wxPython/samples/frogedit/FrogEditor.py +++ b/wxPython/samples/frogedit/FrogEditor.py @@ -1,4 +1,3 @@ -#!/usr/local/bin/python # simple text editor # @@ -7,26 +6,27 @@ # License: Python import re -from wxPython.wx import * -from wxPython.lib.editor import wxEditor +import wx + +from wx.lib.editor import Editor #--------------------------------------------------------------------- -class FrogEditor(wxEditor): +class FrogEditor(Editor): def __init__(self, parent, id, - pos=wxDefaultPosition, size=wxDefaultSize, style=0, statusBar=None): + pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, statusBar=None): self.StatusBar = statusBar - wxEditor.__init__(self, parent, id, pos, size, style) + Editor.__init__(self, parent, id, pos, size, style) self.parent = parent ##------------------------------------ def TouchBuffer(self): - wxEditor.TouchBuffer(self) + Editor.TouchBuffer(self) self.StatusBar.setDirty(1) def UnTouchBuffer(self): - wxEditor.UnTouchBuffer(self) + Editor.UnTouchBuffer(self) self.StatusBar.setDirty(0) @@ -34,7 +34,7 @@ class FrogEditor(wxEditor): # override our base class method def DrawCursor(self, dc = None): - wxEditor.DrawCursor(self,dc) + Editor.DrawCursor(self,dc) self.StatusBar.setRowCol(self.cy,self.cx) def lastLine(self): @@ -68,17 +68,17 @@ class FrogEditor(wxEditor): self.status.append(data) if data[-1:] == '\n': data = data[:-1] - wxLogMessage(data) + wx.LogMessage(data) #--------- wxEditor keyboard overrides def SetControlFuncs(self, action): - wxEditor.SetControlFuncs(self, action) + Editor.SetControlFuncs(self, action) action['-'] = self.PrintSeparator def SetAltFuncs(self, action): - wxEditor.SetAltFuncs(self, action) - action['x'] = self.Exit + Editor.SetAltFuncs(self, action) + action['x'] = self.Exit #----------- commands -----------