■-J '-2J 'ii
PyCrustEditor.py x SciTE
File Edit Search View Tools Options Help
©class Editor(wxStyledTextCtrl):
......PyCrust Editor based on
revision = _version_
def init (self, parent.
wxStyledTextCtrl id):_
def config(self) def setStyles(self, faces) def QnKeyDown(self, event) def OnCharCself, event):
......Keypress event handler
key = event. KeyCodeO currpos = sel f .GetCurrentPosO stoppos = self.promptPos[1] if currpos >= stoppos: if key == 46:
# The dotor period key activates auto completion.
# Get the command between the prompt and the cursor.
# Add a dot to the end of the command.
command = self.GetTextRange(stoppos, currpos) +
self.write( ’ . *)
if self.autoComplete: self.autoCompleteShow(command) elif key == 40:
# "(" The left paren activates a cali tip and cancels
# an active auto completion.
if self.AutoCompActive(): self.AutoCompCancel O
# Get the command between the prompt and the cursor.
# Add the to the end of the command.
command = self.Get
else
else
self.write(' (' ] if self.autoCa' ; •
# Allow the normal ■ event.Skip()
GetCurrentPos
GetTextRanae
GetCurrentLine GetCurLine GetTextl enath
ow(command)
pass
def setStatusText(self, text):
......Display status information