parent
0a4713c591
commit
c3e7ddbc9f
|
|
@ -4247,10 +4247,10 @@ type TEditer=class(TCustomcontrol) //
|
|||
if ifobj(c[0])and ifobj(c[1])then
|
||||
begin
|
||||
h := CreateObject(c[0],ow);//Fhightercolor;
|
||||
if n="tsl" then
|
||||
begin
|
||||
//if n="tsl" then
|
||||
// begin
|
||||
h.hightercolor := Fhightercolor;
|
||||
end
|
||||
//end
|
||||
return array(h,CreateObject(c[1],ow));
|
||||
end
|
||||
end
|
||||
|
|
@ -4545,9 +4545,9 @@ type thighlightercoloredter=class(tvcform)
|
|||
openfileadlg1:topenfileadlg;
|
||||
function Create(AOwner);override; //¹¹Ôì
|
||||
begin
|
||||
fcolorindexname := array("字体","关键字","符号","注释","字符串","数字","系统函数","选中背景","当前行背景");
|
||||
ffrontcolordefault := array(0,0x0000ff,0,0x228B22,0x8B008B,0x666666,0xcd0000,0,0);
|
||||
fbkcolordefalut := zeros(7)+0xfafafa union array(rgb(192,192,192),rgb(232,232,255));
|
||||
fcolorindexname := array("字体","关键字","符号","注释","字符串","数字","系统函数","选中背景","当前行背景","行号背景");
|
||||
ffrontcolordefault := array(0,0x0000ff,0,0x228B22,0x8B008B,0x666666,0xcd0000,0,0,0);
|
||||
fbkcolordefalut := zeros(7)+0xfafafa union array(rgb(192,192,192),rgb(232,232,255),rgb(228,228,228));
|
||||
ffrontcolors := ffrontcolordefault;
|
||||
fbkcols := fbkcolordefalut;
|
||||
inherited;
|
||||
|
|
@ -4592,7 +4592,7 @@ type thighlightercoloredter=class(tvcform)
|
|||
begin
|
||||
if flistboxchanging then return ;
|
||||
idx := listbox1.ItemIndex;
|
||||
if idx in array(0,7,8) then
|
||||
if idx in array(0,7,8,9) then
|
||||
begin
|
||||
cl := colorcombobox2.getcurrentColor();
|
||||
fbkcols[idx] := cl;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@ type thighlitcolor = class(tcomponent)
|
|||
inherited;
|
||||
intitcolors();
|
||||
end
|
||||
function gutterbkcolor();
|
||||
begin
|
||||
return FColors["行号背景"];
|
||||
end
|
||||
function selbkcolor();
|
||||
begin
|
||||
return FColors["选中背景"];
|
||||
|
|
@ -62,7 +66,8 @@ type thighlitcolor = class(tcomponent)
|
|||
array("字体":
|
||||
("font":0,"back":16448250),"关键字":
|
||||
("font":255,"back":16448250),"符号":
|
||||
("font":0,"back":16448250),"注释":
|
||||
("font":255,"back":16448250),"行号背景":
|
||||
("font":0,"back":15000804),"注释":
|
||||
("font":2263842,"back":16448250),"字符串":
|
||||
("font":9109643,"back":16448250),"数字":
|
||||
("font":6710886,"back":16448250),"系统函数":
|
||||
|
|
@ -74,7 +79,7 @@ type thighlitcolor = class(tcomponent)
|
|||
begin
|
||||
FColors["back"] := new tcolor(v["back"]);
|
||||
end
|
||||
if i in array("选中背景","当前行背景") then
|
||||
if i in array("选中背景","当前行背景","行号背景") then
|
||||
begin
|
||||
FColors[i] := new tcolor(v["back"]);
|
||||
end else
|
||||
|
|
@ -103,7 +108,7 @@ type thighlitcolor = class(tcomponent)
|
|||
end else
|
||||
begin
|
||||
v.changed := false;
|
||||
if i in array("选中背景","当前行背景") then
|
||||
if i in array("选中背景","当前行背景","行号背景") then
|
||||
begin
|
||||
v.color := transblk(cls[i]["back"]);
|
||||
end else
|
||||
|
|
@ -121,6 +126,10 @@ type thighlitcolor = class(tcomponent)
|
|||
if i= "当前行背景" then
|
||||
begin
|
||||
cgd .|= 16;
|
||||
end else
|
||||
if i="行号背景" then
|
||||
begin
|
||||
cgd .|= 32;
|
||||
end else
|
||||
cgd .|= 1;
|
||||
end
|
||||
|
|
@ -362,7 +371,6 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
private
|
||||
fpairbegin;
|
||||
public
|
||||
hightercolor;
|
||||
fforcehtml;
|
||||
function forcehtml(h);
|
||||
begin
|
||||
|
|
@ -470,11 +478,14 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
case tp of
|
||||
'//','/*':
|
||||
begin
|
||||
d.FFColor := 0x8D9600;
|
||||
if hightercolor then d.FFcolor := hightercolor.commentcolor() ;
|
||||
else
|
||||
d.FFColor := 0x8D9600;
|
||||
end
|
||||
'"',"'":
|
||||
begin
|
||||
d.FFColor := 0x968080;
|
||||
if hightercolor then d.FFcolor := hightercolor.strcolor() ;
|
||||
else d.FFcolor := 0x968080;
|
||||
end
|
||||
"{":
|
||||
begin
|
||||
|
|
@ -516,23 +527,33 @@ type TTslSynHighLighter = class(TSynHighLighter)
|
|||
begin
|
||||
if FJsWindows[bttk] then //
|
||||
begin
|
||||
d.FFColor := 0xFF0000;
|
||||
if hightercolor then d.FFcolor := hightercolor.sysfunccolor() ;
|
||||
else
|
||||
d.FFColor := 0xFF0000;
|
||||
end else
|
||||
if FJsKeyWords[bttk] then // FE0064
|
||||
begin
|
||||
d.FFColor := 0xFF0000;
|
||||
if hightercolor then d.FFcolor := hightercolor.keycolor() ;
|
||||
else
|
||||
d.FFColor := 0xFF0000;
|
||||
end else
|
||||
if FJsSysClass[bttk] then //
|
||||
begin
|
||||
d.FFColor := 0xFF0000;
|
||||
if hightercolor then d.FFcolor := hightercolor.keycolor() ;
|
||||
else
|
||||
d.FFcolor := 0xcd0000;
|
||||
end else
|
||||
if FJsHtmlEvent[bttk] then //
|
||||
begin
|
||||
d.FFColor := 0xFF0000;
|
||||
if hightercolor then d.FFcolor := hightercolor.sysfunccolor() ;
|
||||
else
|
||||
d.FFColor := 0xFF0000;
|
||||
end else
|
||||
if FCssPropertys[bttk] then
|
||||
begin
|
||||
d.FFColor := 0x0000FF;
|
||||
if hightercolor then d.FFcolor := hightercolor.keycolor() ;
|
||||
else
|
||||
d.FFColor := 0x0000FF;
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -1440,16 +1461,24 @@ type TxmlSynHighLighter = class(tcustomsynhighlighter)
|
|||
if st1=1 and st.state=1 then
|
||||
begin
|
||||
st.subitemadd();
|
||||
if st.subitemcount()>1 then
|
||||
begin
|
||||
|
||||
|
||||
end else
|
||||
begin
|
||||
|
||||
end
|
||||
case d.FFColor of
|
||||
stringcolor,symcolor:
|
||||
begin
|
||||
end else
|
||||
begin
|
||||
if st.subitemcount()>1 then
|
||||
if st.subitemcount()>1 then
|
||||
begin
|
||||
d.FFColor := 0x0000ff;
|
||||
d.FFColor := keywordcolor;// 0x0000ff;
|
||||
end else
|
||||
d.FFColor := 0xff0000;
|
||||
d.FFColor := sysfuncolor;
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ type TFTSLScriptcustomMemo=class(TSYNmemoNorm)
|
|||
setfc(hc.fontcolor().color);
|
||||
setselbc(hc.selbkcolor().color);
|
||||
curbc(hc.curbkcolor().color);
|
||||
setgutter(hc.gutterbkcolor().color);
|
||||
end
|
||||
end
|
||||
function setselbc(bc);
|
||||
|
|
@ -31,6 +32,12 @@ type TFTSLScriptcustomMemo=class(TSYNmemoNorm)
|
|||
if bc>0 then selectbkcolor := bc;
|
||||
else selectbkcolor := rgb(192,192,192);
|
||||
end
|
||||
function setgutter(bc);
|
||||
begin
|
||||
if bc>0 then guttercolor := bc;
|
||||
else guttercolor := rgb(228,228,288);
|
||||
|
||||
end
|
||||
function curbc(bc);
|
||||
begin
|
||||
if bc>0 then currentLineColor := bc;
|
||||
|
|
@ -256,6 +263,10 @@ type TFTSLScriptcustomMemo=class(TSYNmemoNorm)
|
|||
begin
|
||||
curbc(a.curbkcolor().color);
|
||||
end
|
||||
if op["value"] .& 32 then
|
||||
begin
|
||||
setgutter(a.gutterbkcolor().color);
|
||||
end
|
||||
return ;
|
||||
end
|
||||
inherited;
|
||||
|
|
|
|||
|
|
@ -779,7 +779,13 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
function PaintGutter(rcDraw,nL1,nL2);
|
||||
begin
|
||||
dc := Canvas;
|
||||
dc.brush.Color :=FGutterColor ;//rgb(228,228,228);
|
||||
if ifnumber(FGutterColor) then
|
||||
begin
|
||||
c := FGutterColor;
|
||||
end else
|
||||
if ifobj(FGutterColor) then c := FGutterColor.color;
|
||||
else c := rgb(228,228,228);
|
||||
dc.brush.Color :=c ;//rgb(228,228,228);
|
||||
rc := rcDraw;
|
||||
rc[2]-= 6;
|
||||
dc.FillRect(rc);
|
||||
|
|
@ -1783,7 +1789,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
end
|
||||
function setguttercolor(c);
|
||||
begin
|
||||
if ifnumber(c) and c<>fguttercolor then
|
||||
if ifnumber(c) and c<>fguttercolor then
|
||||
begin
|
||||
fguttercolor := c;
|
||||
InvalidateRect(nil,false);
|
||||
|
|
@ -1791,7 +1797,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
end
|
||||
function setselectbkcolor(c);
|
||||
begin
|
||||
if ifnumber(c) and c<>fselectbkcolor then
|
||||
if c<>fselectbkcolor then
|
||||
begin
|
||||
fselectbkcolor := c;
|
||||
b1 := BlockBegin;
|
||||
|
|
@ -2994,6 +3000,8 @@ type TSynCompletion = class(TSynCompletionList)
|
|||
end
|
||||
end
|
||||
type TSynHighLighter = class(TComponent) //Óï·¨¸ßÁÁÀàÐÍ
|
||||
public
|
||||
hightercolor;
|
||||
type thtcolor = class()
|
||||
function create(cl);
|
||||
begin
|
||||
|
|
@ -3262,6 +3270,15 @@ type tcustomsynhighlighter = class(TSynHighLighter)
|
|||
FChangeDeal := true;
|
||||
if fdolastline>=LastLine then return ;
|
||||
fdolastline := LastLine;
|
||||
if hightercolor then
|
||||
begin
|
||||
fsymcolor := hightercolor.symcolor();
|
||||
fnumbercolor := hightercolor.numcolor();
|
||||
fkeywordcolor := hightercolor.keycolor();
|
||||
fsysfuncolor := hightercolor.sysfunccolor();
|
||||
fstringcolor := hightercolor.strcolor();
|
||||
fannotationcolor := hightercolor.commentcolor();
|
||||
end
|
||||
for i := FSatesCount-1 to LastLine do
|
||||
begin
|
||||
if i<0 then continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue