http://scintilla.org/ScintillaDoc.html http://wiki.wxpython.org/index.cgi/wxStyledTextCtrl Scintilla ê´€ë ¨ 참조 ë„í먼트들. (Refactoring í•„ìš”) PythonCard ì˜ ì½”ë“œë¥¼ ì½ì–´ë³´ë©´ì„œ ì´ìš©ë°©ë²•ë“¤ì„ ìµížˆê²Œ ë˜ì—ˆë‹¤. === syntax hilighting 셋팅 === Boa Constructor 나 Pythoncard, wxPython ì˜ samples ì˜ StyleEditor ë“±ì„ ë³´ë©´ STCStyleEditor ëª¨ë“ˆì´ ìžˆë‹¤. ì´ ëª¨ë“ˆì—ì„œ initSTC 함수를 사용하면 ëœë‹¤. 환경 셋팅 다ì´ì–¼ë¡œê·¸ë¥¼ ë„ìš°ê³ ì‹¶ë‹¤ë©´ STCStyleEditDlg 를 사용한다. {{{~cpp stcControl = self language = 'python' configFileAbsolutePath = os.path.abspath("stc-styles.rc.cfg") STCStyleEditor.STCStyleEditDlg(stcControl, language, configFileAbsolutePath) try: dlg.ShowModal() finally: dlg.Destroy() stcControl.setDefaultStyles() }}} === 커서 위치 ê´€ë ¨ 메소드들 === GetCurrentPos() LineFromPosition(aPos) GetColumn(aPos) === Refactor í• ê²ƒë“¤ === SetEdgeColumn(aCol) GetModify() - ìˆ˜ì •ìƒí™©ì¸ì§€ 아닌지 표시 setEditorStyle('python') text SetSavePoint() SetUndoCollection(0) ClearAll() EmptyUndoBuffer() SetUndoCollection(1) SetSavePoint() GotoLine(lineNum - 1) CmdKeyExecute(stc.wxSTC_CMD_TAB) CmdKeyExecute(stc.wxSTC_CMD_BACKTAB) sel=GetSelection() LineFromPosition(sel[0]) LineFromPosition(sel[1]) if end > start and doc.GetColumn(sel[1]) == 0: end = end-1 BeginUndoAction() firstChar = PositionFromLine(lineNumber) InsertText(firstChar, "##") SetCurrentPos(PositionFromLine(start)) SetAnchor(GetLineEndPosition(end)) EndUndoAction() SetCurrentPos(aPos) GetCharAt(aPos) DelLineLeft() SetViewWhiteSpace(boolean) SetIndentationGuides(boolean) SetEdgeMode(stc.wxSTC_EDGE_LINE) SetEdgeMode(stc.wxSTC_EDGE_NONE) getStyleConfigPath() SetWrapMode(boolean) CmdKeyExecute(stc.wxSTC_CMD_NEWLINE) indent = GetLineIndentation(line) padding = " " * indent pos = GetCurrentPos() GetStyleAt(colonPos) not in [stc.wxSTC_P_COMMENTLINE, stc.wxSTC_P_COMMENTBLOCK, stc.wxSTC_P_TRIPLEDOUBLE]: padding += " " * 4 InsertText(pos, padding) newpos = pos + len(pandding) SetCurrentPos(newpos) SetSelection(newpos, newpos) ---- [PyIde]