U E D R , A S I H C RSS

Py Ide/Scintilla


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(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()

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)


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:24:08
Processing time 0.0143 sec