Scintilla ๊ด๋ จ ์ฐธ์กฐ ๋ํ๋จผํธ๋ค. (Refactoring ํ์)
PythonCard ์ ์ฝ๋๋ฅผ ์ฝ์ด๋ณด๋ฉด์ ์ด์ฉ๋ฐฉ๋ฒ๋ค์ ์ตํ๊ฒ ๋์๋ค.
PythonCard ์ ์ฝ๋๋ฅผ ์ฝ์ด๋ณด๋ฉด์ ์ด์ฉ๋ฐฉ๋ฒ๋ค์ ์ตํ๊ฒ ๋์๋ค.
syntax hilighting ์ ํ ¶
Boa Constructor ๋ Pythoncard, wxPython ์ samples ์ StyleEditor ๋ฑ์ ๋ณด๋ฉด STCStyleEditor ๋ชจ๋์ด ์๋ค. ์ด ๋ชจ๋์์ initSTC ํจ์๋ฅผ ์ฌ์ฉํ๋ฉด ๋๋ค.
ํ๊ฒฝ ์ ํ ๋ค์ด์ผ๋ก๊ทธ๋ฅผ ๋์ฐ๊ณ ์ถ๋ค๋ฉด STCStyleEditDlg ๋ฅผ ์ฌ์ฉํ๋ค.
ํ๊ฒฝ ์ ํ ๋ค์ด์ผ๋ก๊ทธ๋ฅผ ๋์ฐ๊ณ ์ถ๋ค๋ฉด 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()
Refactor ํ ๊ฒ๋ค ¶
SetEdgeColumn(aCol)
GetModify() - ์์ ์ํฉ์ธ์ง ์๋์ง ํ์
setEditorStyle('python')
text
SetSavePoint()
SetUndoCollection(0)
ClearAll()
EmptyUndoBuffer()
SetUndoCollection(1)
SetSavePoint()
GotoLine(lineNum - 1)
GetModify() - ์์ ์ํฉ์ธ์ง ์๋์ง ํ์
setEditorStyle('python')
text
SetSavePoint()
SetUndoCollection(0)
ClearAll()
EmptyUndoBuffer()
SetUndoCollection(1)
SetSavePoint()
GotoLine(lineNum - 1)
sel=GetSelection()
LineFromPosition(sel0)
LineFromPosition(sel1)
if end > start and doc.GetColumn(sel1) == 0:
firstChar = PositionFromLine(lineNumber)
InsertText(firstChar, "##")
SetCurrentPos(PositionFromLine(start))
SetAnchor(GetLineEndPosition(end))
EndUndoAction()
LineFromPosition(sel0)
LineFromPosition(sel1)
if end > start and doc.GetColumn(sel1) == 0:
end = end-1
BeginUndoAction()firstChar = PositionFromLine(lineNumber)
InsertText(firstChar, "##")
SetCurrentPos(PositionFromLine(start))
SetAnchor(GetLineEndPosition(end))
EndUndoAction()
SetViewWhiteSpace(boolean)
SetIndentationGuides(boolean)
SetEdgeMode(stc.wxSTC_EDGE_LINE)
SetEdgeMode(stc.wxSTC_EDGE_NONE)
getStyleConfigPath()
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()
indent = GetLineIndentation(line)
padding = " " * indent
pos = GetCurrentPos()
GetStyleAt(colonPos) not in [stc.wxSTC_P_COMMENTLINE,