No older revisions available
No older revisions available
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,