~repos /sabel-ide

#python#qt

git clone https://pyrossh.dev/repos/sabel-ide.git

sabel-ide



file:

Widget/editor.pyc



�
p9�Pc@s�ddlmZmZmZmZmZmZmZmZddl m
Z
m Z m Z ddl mZmZmZmZmZmZddlmZmZmZmZddlmZdefd��YZdS( i����(tfontSizet
ospathjoint os_pixmaptapiDirtconfigtAutoteoltEncoding(tSIGNALtQStringtQEvent(t QFontMetricstQFonttQPixmaptQColortQPalettetQWidget(t QsciScintillatQsciLexerPythontQsciAPIst QsciLexerCPP(t LexerSquirreltEditorcBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z
d �Z d
�Z d �Z d �Zd �Zd�Zd�Zd�Zd�Zd�ZRS(icCs�tj||�||_||_t|_||_g|_|j|�|jt �t
dkrv|j |j �n/t
dkr�|j |j �n|j |j�|j�|jtj��dS(Nii(Rt__init__tparenttlangRt
colorStylet
errorLinestsetTexttsetUtf8tTrueRt
setEolModet
EolWindowstEolUnixtEolMactinitt setTabWidthRttabwidth(tselfRttextRR((sC:\CODE\Sabel\Widget\editor.pyR
s         
cCs�|jdt�|jj|jj�|jtj��|j |j
j �|j t�|j tj|j�|j tjd�|j|j
j|j�|jdtj�|jdtj�|jdtj�|jdtj�|jtj��|jtj�|jtj�|j t�|j!|j"�t#tj$�tj%��|_&|j'|j&�t(|j&�|_)|j*|j&�|j+dkr�t,�|_-nE|j+dkr�t.�|_-n'|j+dkr�t/|j
|�|_-n|j-j0|j&�t1|j-�|_2|j2j3t4t5d��|j2j6�|j-j7|j2�|j8t�|j t�|j9tj:��|j;|j-�dS(Niiiisemo.api(<tsetMarginSensitivityRtcursorPositionChangedtconnectRt
updateLinet setMarginRtmargintsetCaretLineBackgroundColorRtcarettsetCaretLineVisiblet markerDefineRt
RightArrowtARROW_MARKER_NUMRt
auto_errortsetMarkerBackgroundColortmarkert registerImaget auto_class2t auto_methodt
auto_fieldt auto_packagetsetAutoCompletionThresholdtthreshtsetAutoCompletionSourcetAcsAPIstsetBraceMatchingtSloppyBraceMatchtsetBackspaceUnindentsRR R tfontNameRtfonttsetFontR t fontmetricstsetMarginsFontRRtlexerRRtsetDefaultFontRtapitloadRRtpreparetsetAPIst setAutoIndentt setIndenttindenttsetLexer(R&((sC:\CODE\Sabel\Widget\editor.pyR#sH     cCs�||_|j|jj�|j|jj�|j|jj|j�|jdkr�|j j
|j�|j j t d�d�ndS(Nis#008000i( RR.R/tsetMarginsBackgroundColorR-R5R6R3RRHt setColorStyletsetColorR(R&R((sC:\CODE\Sabel\Widget\editor.pyRSbs cCsB|j|�dkr+|j||j�n|j||j�dS(Ni(t markersAtLinet markerDeleteR3t markerAdd(R&tnmargintnlinet modifiers((sC:\CODE\Sabel\Widget\editor.pyton_margin_clickedjscCsDt|j�dkr@|jj|d�|j|dd�ndS(s=First delete all present markers then add new lines or errorsiiN(tlenRtappendRW(R&tlineno((sC:\CODE\Sabel\Widget\editor.pytaddErrorsscCsJt|j�dkrFx!|jD]}|j|d�qWg|j(ndS(Ni(R\RRV(R&ti((sC:\CODE\Sabel\Widget\editor.pytreset�scCsY|jd7_tj|j�|jj|j�|jj|j�|j|j�dS(Ni(RRt setFontSizeRDt setPointSizeRHRERG(R&((sC:\CODE\Sabel\Widget\editor.pytzoomin�s
cCsY|jd8_tj|j�|jj|j�|jj|j�|j|j�dS(Ni(RRRbRDRcRHRERG(R&((sC:\CODE\Sabel\Widget\editor.pytzoomout�s
cCs!|j|�|jj|�dS(N(RERH(R&RD((sC:\CODE\Sabel\Widget\editor.pyt
setNewFont�s cCs-|jjtj��|jj|j�dS(N(RDRcRRRHRE(R&((sC:\CODE\Sabel\Widget\editor.pyRb�scCs�|dkr`|jdt�|j�dkrG|jdtd��q�|jdtd��n&|jdt�|jdtd��dS(Nii�s-------s ---------s---(tsetMarginLineNumbersRtlinestsetMarginWidthR tFalse(R&tmar((sC:\CODE\Sabel\Widget\editor.pyR,�s cCs-|dkr|jt�n |jt�dS(Ni(tsetIndentationGuidesRjR(R&tval((sC:\CODE\Sabel\Widget\editor.pyRO�s cCs|j|�dS(N(R<(R&Rm((sC:\CODE\Sabel\Widget\editor.pyt setThreshold�scCs8|jt�|jt|�dd�|jt�dS(Nii(tsetFocusRtsetCursorPositiontintR0(R&R^((sC:\CODE\Sabel\Widget\editor.pytsetLine�s cCs|j�GHdS(N(tgetCursorPosition(R&((sC:\CODE\Sabel\Widget\editor.pytgetLine�scCs3|dkr/|j||||t| �}|SdS(Nt(t findFirstR(R&R'tretcstwotbktdone((sC:\CODE\Sabel\Widget\editor.pytfindText�s cCs|j|�dS(N(treplace(R&R'((sC:\CODE\Sabel\Widget\editor.pyt replaceText�scCs|j|�dS(N(R}(R&R'((sC:\CODE\Sabel\Widget\editor.pytreplaceFindText�s(t__name__t
__module__R3RR#RSR[R_RaRdReRfRbR,RORnRrRtR|R~R(((sC:\CODE\Sabel\Widget\editor.pyRs&  C             N(tglobalsRRRRRRRRt PyQt4.QtCoreRR R
t PyQt4.QtGuiR R R RRRt
PyQt4.QsciRRRRt lexersquirrelRR(((sC:\CODE\Sabel\Widget\editor.pyt<module>s
:."