parent
899010e739
commit
8e99c3f339
|
|
@ -1433,7 +1433,7 @@ type TVclDesigner = class(tvcform)
|
||||||
ic.Readvcon(HexFormatStrToTsl(GetTsIconBitmapInfo()));
|
ic.Readvcon(HexFormatStrToTsl(GetTsIconBitmapInfo()));
|
||||||
self.FormICon := ic;
|
self.FormICon := ic;
|
||||||
//文件打窗口
|
//文件打窗口
|
||||||
FProjectFileOpener := new TOpenFileADlg(self);
|
FProjectFileOpener := new TSavefileADlg(self);
|
||||||
FProjectFileOpener.filter := array("tvcl工程":"*.tpj");
|
FProjectFileOpener.filter := array("tvcl工程":"*.tpj");
|
||||||
FProjectFileOpener.parent := self;
|
FProjectFileOpener.parent := self;
|
||||||
FProjectManager.FTslEditer.setdbugruncall(thisfunction(debugproject)); //设置调试回调
|
FProjectManager.FTslEditer.setdbugruncall(thisfunction(debugproject)); //设置调试回调
|
||||||
|
|
|
||||||
|
|
@ -318,6 +318,7 @@ type TDComponent = class()
|
||||||
dm := MessageBoxA("¼´½«¼ôÇÐ:"+nd.Caption,"ɾ³ý",(0x1 .| 0x30),nd.owner);//
|
dm := MessageBoxA("¼´½«¼ôÇÐ:"+nd.Caption,"ɾ³ý",(0x1 .| 0x30),nd.owner);//
|
||||||
end else dm := MessageBoxA("¼´½«É¾³ý:"+nd.Caption,"ɾ³ý",(0x1 .| 0x30),nd.owner);//
|
end else dm := MessageBoxA("¼´½«É¾³ý:"+nd.Caption,"ɾ³ý",(0x1 .| 0x30),nd.owner);//
|
||||||
if dm<>1 then exit;
|
if dm<>1 then exit;
|
||||||
|
if not nd.owner then exit;
|
||||||
d := nd.owner.Designer;
|
d := nd.owner.Designer;
|
||||||
if f then
|
if f then
|
||||||
d.cutnode(nd);
|
d.cutnode(nd);
|
||||||
|
|
|
||||||
|
|
@ -1502,6 +1502,8 @@ type TGridCellNaturalEdit = class(TGridPropertyRender,TPropertyNatural)
|
||||||
function Ched(o,e);
|
function Ched(o,e);
|
||||||
begin
|
begin
|
||||||
v := textonumber(o.TEXT);
|
v := textonumber(o.TEXT);
|
||||||
|
if flastvalue = v then return ;
|
||||||
|
flastvalue := v;
|
||||||
FGrid.CellChanged(FRow,FCol,"value",v);
|
FGrid.CellChanged(FRow,FCol,"value",v);
|
||||||
//o.parent.CallChanged(o.parent,nil);
|
//o.parent.CallChanged(o.parent,nil);
|
||||||
end
|
end
|
||||||
|
|
@ -1562,10 +1564,12 @@ type TGridCellNaturalEdit = class(TGridPropertyRender,TPropertyNatural)
|
||||||
@explan(˵Ã÷) À뿪±à¼¸ñ×Ó %%
|
@explan(˵Ã÷) À뿪±à¼¸ñ×Ó %%
|
||||||
**}
|
**}
|
||||||
if not(FEdit is class(TPopEditCtrl)) then exit;
|
if not(FEdit is class(TPopEditCtrl)) then exit;
|
||||||
FEdit.text := "";
|
//FEdit.text := "";
|
||||||
FEdit.visible := false;
|
FEdit.visible := false;
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
private
|
||||||
|
flastvalue;
|
||||||
|
|
||||||
end
|
end
|
||||||
type TGridCellIntegerEdit = class(TGridCellNaturalEdit)
|
type TGridCellIntegerEdit = class(TGridCellNaturalEdit)
|
||||||
|
|
@ -2478,7 +2482,7 @@ type UniCheckList = class(TTreeView) //
|
||||||
if nit >=0 then
|
if nit >=0 then
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
if CurrentNode<>nit then
|
if CurrentNode and CurrentNode<>nit then
|
||||||
begin
|
begin
|
||||||
DoOnSelChang(CurrentNode._tag);
|
DoOnSelChang(CurrentNode._tag);
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -800,7 +800,7 @@ type tsgtkapi = class(tgtkapis)
|
||||||
fc := ftod["facename"];
|
fc := ftod["facename"];
|
||||||
ht := ftod["height"];
|
ht := ftod["height"];
|
||||||
wd := ftod["width"];
|
wd := ftod["width"];
|
||||||
it := ftod["italic"];
|
it := 0;//ftod["italic"];
|
||||||
wt := ftod["weight"]=700;
|
wt := ftod["weight"]=700;
|
||||||
udl := ftod["underline"];
|
udl := ftod["underline"];
|
||||||
fnotset := false;
|
fnotset := false;
|
||||||
|
|
@ -2229,16 +2229,16 @@ type tsgtkapi = class(tgtkapis)
|
||||||
cairo_scale(hdc,p1,p2);
|
cairo_scale(hdc,p1,p2);
|
||||||
cairo_set_source_surface(hdc, img, 0, 0);
|
cairo_set_source_surface(hdc, img, 0, 0);
|
||||||
cairo_rectangle(hdc,0,0,rc[2]-rc[0],rc[3]-rc[1]);
|
cairo_rectangle(hdc,0,0,rc[2]-rc[0],rc[3]-rc[1]);
|
||||||
if flag = 0x8800c6 or flag = 0x4 then
|
if flag = 0x8800c6 or flag = 0x4 then //Ìí¼Óalpha´¦Àí
|
||||||
begin
|
begin
|
||||||
//echo "\r\nset alopha*******+++****************";
|
//echo "\r\nset alopha*******+++****************";
|
||||||
//cairo_paint_with_alpha(hdc,0.5);
|
cairo_paint_with_alpha(hdc,0.5);
|
||||||
//cairo_set_source_rgba(hdc, 0.6, 0.6, 0.6, 0.5);
|
cairo_set_source_rgba(hdc, 0.6, 0.6, 0.6, 0.5);
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
//cairo_paint_with_alpha(hdc,0);
|
//cairo_paint_with_alpha(hdc,0);
|
||||||
//cairo_paint_with_alpha(hdc,1);
|
cairo_paint_with_alpha(hdc,1);
|
||||||
//cairo_set_source_rgba(hdc, 1.0, 1.0, 1.0, 0);
|
cairo_set_source_rgba(hdc, 1.0, 1.0, 1.0, 0);
|
||||||
end
|
end
|
||||||
cairo_fill(hdc);
|
cairo_fill(hdc);
|
||||||
cairo_scale(hdc,1/p1,1/p2);
|
cairo_scale(hdc,1/p1,1/p2);
|
||||||
|
|
@ -2546,7 +2546,7 @@ type tsgtkapi = class(tgtkapis)
|
||||||
mulsel := false;
|
mulsel := false;
|
||||||
if obj._getvalue_("flags") .& 0x200 then mulsel := true;
|
if obj._getvalue_("flags") .& 0x200 then mulsel := true;
|
||||||
//echo "\r\n>>>", obj._getvalue_("nmaxfiletitle");
|
//echo "\r\n>>>", obj._getvalue_("nmaxfiletitle");
|
||||||
opaction := g_open_file_flag?false:true; //´ò¿ª»òÕßsave
|
opaction := g_open_file_flag?false:true; //´ò¿ª»òÕßsave
|
||||||
cdlg := gtk_file_chooser_dialog_new("file selector",wd,opaction,"open",GTK_RESPONSE_ACCEPT,"cancel",GTK_RESPONSE_CANCEL,nil);
|
cdlg := gtk_file_chooser_dialog_new("file selector",wd,opaction,"open",GTK_RESPONSE_ACCEPT,"cancel",GTK_RESPONSE_CANCEL,nil);
|
||||||
if mulsel then
|
if mulsel then
|
||||||
begin
|
begin
|
||||||
|
|
@ -2555,7 +2555,7 @@ type tsgtkapi = class(tgtkapis)
|
||||||
dfdir := obj._getvalue_("lpstrinitialdir");
|
dfdir := obj._getvalue_("lpstrinitialdir");
|
||||||
if dfdir then //默认位置
|
if dfdir then //默认位置
|
||||||
begin
|
begin
|
||||||
df := ReadStringFromPtr(dfdir);
|
df := my_trim( ReadStringFromPtr(dfdir));
|
||||||
if df then
|
if df then
|
||||||
begin
|
begin
|
||||||
gtk_file_chooser_set_filename(cdlg,TslStringToGtk( df));
|
gtk_file_chooser_set_filename(cdlg,TslStringToGtk( df));
|
||||||
|
|
@ -2678,7 +2678,7 @@ type tsgtkapi = class(tgtkapis)
|
||||||
ht := lgobj._getvalue_("height");
|
ht := lgobj._getvalue_("height");
|
||||||
hts := "";
|
hts := "";
|
||||||
if ht>5 then hts := inttostr(ht);
|
if ht>5 then hts := inttostr(ht);
|
||||||
ss := lgobj._getvalue_("facename")+" "+(lgobj._getvalue_("italic")?"Italic":"")+" "+((lgobj._getvalue_("weight")=700)?"Bold":"") + " "+ hts;;
|
ss := my_trim(lgobj._getvalue_("facename"))+" "+(lgobj._getvalue_("italic")?"Italic":"")+" "+((lgobj._getvalue_("weight")=700)?"Bold":"") + " "+ hts;;
|
||||||
cdlg := gtk_font_selection_dialog_new("font select");
|
cdlg := gtk_font_selection_dialog_new("font select");
|
||||||
gtk_font_selection_dialog_set_preview_text(cdlg,"test fonttext");
|
gtk_font_selection_dialog_set_preview_text(cdlg,"test fonttext");
|
||||||
gtk_font_selection_dialog_set_font_name(cdlg,TslStringToGtk(ss));
|
gtk_font_selection_dialog_set_font_name(cdlg,TslStringToGtk(ss));
|
||||||
|
|
@ -2772,7 +2772,7 @@ type tsgtkapi = class(tgtkapis)
|
||||||
dir := obj._getvalue_("pidlroot");
|
dir := obj._getvalue_("pidlroot");
|
||||||
if dir then //默认位置
|
if dir then //默认位置
|
||||||
begin
|
begin
|
||||||
df := ReadStringFromPtr(dir);
|
df := (ReadStringFromPtr(dir));
|
||||||
if df then
|
if df then
|
||||||
begin
|
begin
|
||||||
gtk_file_chooser_set_filename(cdlg,TslStringToGtk( df));
|
gtk_file_chooser_set_filename(cdlg,TslStringToGtk( df));
|
||||||
|
|
@ -3038,6 +3038,19 @@ begin
|
||||||
global G_O_TSWIN32API_;
|
global G_O_TSWIN32API_;
|
||||||
return G_O_TSWIN32API_;
|
return G_O_TSWIN32API_;
|
||||||
end
|
end
|
||||||
|
function my_trim(s);
|
||||||
|
begin
|
||||||
|
if not ifstring(s) then return "";
|
||||||
|
for i:= 1 to length(s) do
|
||||||
|
begin
|
||||||
|
if s[i]="\0" then
|
||||||
|
begin
|
||||||
|
if i=1 then return "";
|
||||||
|
return s[1:(i-1)];
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return s;
|
||||||
|
end
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
type TGtkList = class( _gslist) //gtk链表类
|
type TGtkList = class( _gslist) //gtk链表类
|
||||||
function create(ptr);
|
function create(ptr);
|
||||||
|
|
@ -3202,7 +3215,7 @@ type tgtkapis = class() //gtk
|
||||||
end
|
end
|
||||||
if needset then
|
if needset then
|
||||||
begin
|
begin
|
||||||
c := gtk_object_get_data(it,"caption");
|
c := my_trim(gtk_object_get_data(it,"caption"));
|
||||||
if gtk_object_get_data(it,"checked") then
|
if gtk_object_get_data(it,"checked") then
|
||||||
begin
|
begin
|
||||||
gtk_menu_item_set_label(it,TslStringToGtk("[√]"+c));
|
gtk_menu_item_set_label(it,TslStringToGtk("[√]"+c));
|
||||||
|
|
@ -3230,7 +3243,7 @@ type tgtkapis = class() //gtk
|
||||||
ft := lpm.ftype;
|
ft := lpm.ftype;
|
||||||
st := lpm.fstate;
|
st := lpm.fstate;
|
||||||
ss := " ";
|
ss := " ";
|
||||||
c := lpm.getdwtypedata()?:"";
|
c := my_trim(lpm.getdwtypedata())?:"";
|
||||||
if ft = _const.MFT_SEPARATOR then //分割
|
if ft = _const.MFT_SEPARATOR then //分割
|
||||||
begin
|
begin
|
||||||
it := gtk_separator_menu_item_new();
|
it := gtk_separator_menu_item_new();
|
||||||
|
|
@ -5498,7 +5511,7 @@ type tgtkapis = class() //gtk
|
||||||
end
|
end
|
||||||
return r;
|
return r;
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
type _cairo_matrix_t = class(tslcstructureobj)
|
type _cairo_matrix_t = class(tslcstructureobj)
|
||||||
|
|
|
||||||
|
|
@ -3032,7 +3032,14 @@ type TSynHighLighter = class(TComponent) //
|
||||||
if pos(vi," \t")>0 then
|
if pos(vi," \t")>0 then
|
||||||
begin
|
begin
|
||||||
SetTToken(tks,ctk,idx-1);
|
SetTToken(tks,ctk,idx-1);
|
||||||
end
|
end else
|
||||||
|
if idx<len and( ord(vi)=0xa3 or ord(vi)=0xa1) then
|
||||||
|
begin
|
||||||
|
SetTToken(tks,ctk,idx-1);
|
||||||
|
ctk := s[idx:(idx+1)];
|
||||||
|
idx++;
|
||||||
|
SetTToken(tks,ctk,idx);
|
||||||
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
ctk+=vi;
|
ctk+=vi;
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,10 @@ type TCustomThreadworker = class()
|
||||||
end
|
end
|
||||||
function Close(); //¹Ø±Õ
|
function Close(); //¹Ø±Õ
|
||||||
begin
|
begin
|
||||||
destroy();
|
if FThreader then
|
||||||
|
begin
|
||||||
|
FThreader.close();
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function terminate();
|
function terminate();
|
||||||
begin
|
begin
|
||||||
|
|
@ -138,10 +141,7 @@ type TCustomThreadworker = class()
|
||||||
end
|
end
|
||||||
function destroy();override;
|
function destroy();override;
|
||||||
begin
|
begin
|
||||||
if FThreader then
|
close();
|
||||||
begin
|
|
||||||
FThreader.close();
|
|
||||||
end
|
|
||||||
inherited;
|
inherited;
|
||||||
end
|
end
|
||||||
property componet read getcomponet write setcomponet;
|
property componet read getcomponet write setcomponet;
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue