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,