更新动态库,更新界面库,更新编辑器

This commit is contained in:
liujianjun 2025-04-29 11:02:16 +08:00
parent ef1986a030
commit 5a31db348a
34 changed files with 224 additions and 341 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
TSL.exe

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -593,6 +593,7 @@ type teditorform = class(TVCform) //
Function SearDirMenuClick(o,e);
begin
FSearchDir.SetData(FDirs);
center_popup_wnd(FSearchDir,true);
if FSearchDir.ShowModal() then
begin
ndirs :=FSearchDir.GetData();
@ -1272,13 +1273,9 @@ type tsearchdir = class(TCustomControl)
Fidx := -1;
FFolder := new TFolderChooseADlg(self);
FFolder.parent := self;
rc:=_wapi.GetScreenRect();
l:=(rc[2]-rc[0])/2-400;
t:=(rc[3]-rc[1])/2-300;
SetBoundsRect(array(l,t,545+l+5,310+t+15));
FLists := array();
FBtns := array();
for i,v in array(array(2,28,120,230),array(148,2,500,230)) do
for i,v in array(array(2,28,220,430),array(248,2,700,430)) do
begin
ls := new tdirlistbox(self);
ls.SetBoundsRect(v);
@ -1291,11 +1288,11 @@ type tsearchdir = class(TCustomControl)
if o.ItemIndex<0 then return e.skip;
end
btrecs := array(
array(124,3,144,25),
array(124,206,144,230),
array(502,3,528,25),
array(502,206,528,230),
array(400,240,500,265)
array(224,3,244,25),
array(224,406,244,430),
array(702,3,728,25),
array(702,406,728,430),
array(600,440,700,465)
);
btcolor := array(0x00c800,0x0000c8,0x00c800,0x0000c8,0);
btcolor := array();
@ -1314,7 +1311,7 @@ type tsearchdir = class(TCustomControl)
FBtns[4].autosize := true;
/////////////////////////////////
FEdit := new tedit(self);
FEdit.SetBoundsRect(array(2,2,120,26));
FEdit.SetBoundsRect(array(2,2,220,26));
FEdit.parent := self;
FEdit.onkeyup := thisfunction(editkeyup);
FEdit.placeholder := "²éÕÒorÌí¼Ó";

View File

@ -1293,17 +1293,6 @@ type %s=class(%s)
begin
inherited;
end
function Recycling();override; //回收变量
begin
inherited;
ci := self.classinfo(); //将成员变量赋值为nil避免循环引用
for i,v in ci["members"] do
begin
if v["const"] then continue;
if v["static"] then continue;
invoke(self,v["name"],nil);
end
end
end
@ -3082,24 +3071,6 @@ r := format(%% type %s=class(tdcreateform)
begin
inherited;
end
function DoControlAlign();override;//对齐子控件
begin
//当窗口大小改变时,该函数会被调用,
//可以通过 clientrect 获取客户区大小,设置子控件的位置以及大小
//如果自己处理了子控件的对齐,就可以去掉 inherited
inherited;
end
function Recycling();override; //回收变量
begin
inherited;
ci := self.classinfo(); //将成员变量赋值为nil避免循环引用
for i,v in ci["members"] do
begin
if v["const"] then continue;
if v["static"] then continue;
invoke(self,v["name"],nil);
end
end
end
%%,n);
return r;
@ -3351,3 +3322,24 @@ begin
end
end.
{*
function DoControlAlign();override;//对齐子控件
begin
//当窗口大小改变时,该函数会被调用,
//可以通过 clientrect 获取客户区大小,设置子控件的位置以及大小
//如果自己处理了子控件的对齐,就可以去掉 inherited
inherited;
end
function Recycling();override; //回收变量
begin
inherited;
ci := self.classinfo(); //将成员变量赋值为nil避免循环引用
for i,v in ci["members"] do
begin
if v["const"] then continue;
if v["static"] then continue;
invoke(self,v["name"],nil);
end
end
*}

View File

@ -2825,7 +2825,7 @@ type TEditer=class(TCustomcontrol) //
end else
if pos("¶¨Î»",cp)=1 then
begin
InitShowWndPos(FGotoLineWnd,"g",200,200);
center_popup_wnd(FGotoLineWnd,true);//InitShowWndPos(FGotoLineWnd,"g",200,200);
FGotoLineWnd.ShowGoto();
return;
end else
@ -3106,7 +3106,7 @@ type TEditer=class(TCustomcontrol) //
begin
d := FOpenHistory.Data;
FHistoryWnd.SetData(d);
InitShowWndPos(FHistoryWnd,"history",100,100);
center_popup_wnd(FHistoryWnd,true);//InitShowWndPos(FHistoryWnd,"history",100,100);
FHistoryWnd.ShowModal();
end
end
@ -3236,7 +3236,7 @@ type TEditer=class(TCustomcontrol) //
"¿ì½Ý¼ü˵Ã÷":
begin
if not FShortCutshower.Parent then FShortCutshower.Parent := self;
InitShowWndPos(FShortCutshower,"surcut",500,150,true);
center_popup_wnd(FShortCutshower,true);//InitShowWndPos(FShortCutshower,"surcut",500,150,true);
FShortCutshower.Show();
end
"³·Ïú":
@ -3614,7 +3614,7 @@ type TEditer=class(TCustomcontrol) //
end
ord("J"):
begin
InitShowWndPos(ffuncfind,"ff",200,150);
center_popup_wnd(ffuncfind,true);//InitShowWndPos(ffuncfind,"ff",200,150);
ffuncfind.show_finder();
return true;
end
@ -3642,7 +3642,7 @@ type TEditer=class(TCustomcontrol) //
end
ord("G"):
begin
InitShowWndPos(FGotoLineWnd,"g",200,200);
center_popup_wnd(FGotoLineWnd,true);//InitShowWndPos(FGotoLineWnd,"g",200,200);
FGotoLineWnd.ShowGoto();
return true;
end

View File

@ -2026,6 +2026,7 @@ type TDSaveFileADlg = class(TDRootComponent)
**}
function HitTip();override;
begin
return inherited;
return "文件保存选择";
end
function bitmapinfo();override;
@ -2068,6 +2069,7 @@ type TDColorChoose = class(TDRootComponent)
**}
function HitTip();override;
begin
return inherited;
return "颜色选择";
end
function bitmapinfo();override;
@ -2099,6 +2101,7 @@ type TDFontChoose = class(TDRootComponent)
**}
function HitTip();override;
begin
return inherited;
return "字体选择";
end
function classification();override;
@ -2131,6 +2134,7 @@ type TDFolderChoose = class(TDRootComponent)
**}
function HitTip();override;
begin
return inherited;
return "目录选择";
end
function classification();override;
@ -2163,6 +2167,7 @@ type TDToolButton = class(TDComponent)
**}
function HitTip();override;
begin
return inherited;
return "toolbutton";
end
function classification();override;
@ -2530,6 +2535,7 @@ type TDActionList = class(TDRootComponent)
**}
function HitTip();override;
begin
return inherited;
return "actionlist";
end
function CheckChild(cd);override;
@ -2715,6 +2721,7 @@ end
type TDtlogincontrol = class(TDRootComponent)
function HitTip();override;
begin
return inherited;
return "登陆天软";
end
function classification();override;
@ -2801,8 +2808,47 @@ C6D53F7109130000000049454E44AE42608200";
);
end
end
//**************tgraphicsctl*****************************
type tdgraphicsctl = class(TDComponent)
{**
@explan(˵Ã÷) tgraphicsctl »æÍ¼¿Ø¼þ %%
**}
function HitTip();override;
begin
return inherited;
end
function bitmapinfo();override;
begin
return "9002000000000000000200000002000000010000002D0200003C0000000000000
004000000040000000400000008000000030000000B000000E601000074797065
64617461696D6789504E470D0A1A0A0000000D494844520000001800000018080
6000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F
0BFC6105000000097048597300000EC300000EC301C76FA8640000017B4944415
4484BB5953D4BC4401086F30753FA818DBD8536D676FA030405F5C04A512C4402
121434C559088A958AD8A8855A9CA068257737EE3B9B097B93CFE5CC03536C263
3CF4C12EE026A1916C4714C5114554618865E21B0000DEA708B343AD79A2008EC
131F4B80266E002D2F15B889AB27A2E1303D18741317E4740885828169BCB04FF
4F2C14746727A7A80DC451265512B481E882636884E6EF9C8B8451A2F814C0FC1
EA195F66A4C8DD40B6F012C8F488B95DBECCB8451A2FC1FC9E6D3E994A7ADF9CC
A8AF4F400391D424E80A6902C1F5B41F7915323451A9DAB15E0311DDE5841A7CB
A9ACC8DD40B67073A05280E9FB03A2FB372B583CE0D4489146E72A05981EFCF68
9663AE65D6C9A1F43F3B922E713424E80CF54583AB25BB831BD45F4FE95DE5082
F4033981CBCEA56D3ABB4D747A47B4766ECFEB497A43098D05D7CF442BE66BEAF
DD83326C70653E6B1BD7EDA6B453416E0656B307DDD168D054534D9A252304E08
A582FF222768F2A7EF13E827B0A03D88FE00082185F0F546C5F10000000049454
E44AE426082";
end
function WndClass();override;
begin
return Class(tgraphicsctl);
end
function Create(AOwner);override;
begin
inherited;
excludepropertys := array("childsizing");
fiscontainerdcmp := false;
end
end
//**************TSPinEdit*****************************
@ -2812,7 +2858,7 @@ type TDSpinEdit = class(TDComponent)
**}
function HitTip();override;
begin
return "SpinEdit";
return inherited;
end
function bitmapinfo();override;
begin
@ -3221,6 +3267,7 @@ end
type TDColorComboBox= class(TDComponent)
function HitTip();override;
begin
return inherited;
return "颜色下拉选择框";
end
function bitmapinfo();override;
@ -3343,6 +3390,7 @@ end
type TDmessagebox = class(TDRootComponent)
function HitTip();override;
begin
return inherited;
return "提示框";
end
function bitmapinfo();override;
@ -3458,7 +3506,9 @@ B42AAFB0D92EF9A97CCEA3101743140FDAF375D09D22364135D083CEE841618C7
end
end
type TDColorBox=class(TDComponent)
function HitTip();override;begin
function HitTip();override;
begin
return inherited;
return "颜色列表框";
end
function WndClass();override;begin
@ -3525,7 +3575,8 @@ D60BA44F8013782F60023EBD3020000000049454E44AE42608200";
end
type TDProgressBar=class(TDComponent)
public
function HitTip();override;begin
function HitTip();override;
begin
return inherited;
return "进度条";
end
@ -3562,7 +3613,8 @@ F80BE89DC603B9C603B9C603B9C603B9C603BD1EA27F2BABB3A7A95F430C00000
end
type TDCheckBtn=class(TDComponent)
public
function HitTip();override;begin
function HitTip();override;
begin
return inherited;
return "复选框";
end
@ -3613,7 +3665,8 @@ end
type TDDateTimePicker=class(TDComponent)
private
public
function HitTip();override;begin
function HitTip();override;
begin
return inherited;
return "时间日期选择";
end
@ -3639,7 +3692,8 @@ CC541E3100000000049454E44AE42608200";
end
type TDTimePicker=class(TDComponent)
public
function HitTip();override;begin
function HitTip();override;
begin
return inherited;
return "时间选择";
end
@ -4042,6 +4096,7 @@ begin
class(tdworkerctl),
class(TDImageList),
class(TDClipBoard),
class(tdgraphicsctl),
class(TDMainMenu),class(TDPopUpMenu),class(TDMenu),
class(TDOpenFileADlg),class(TDSaveFileADlg),
class(TDColorChoose),class(TDFontChoose),class(TDFolderChoose),

View File

@ -1980,6 +1980,7 @@ type TPropEditGrid = class(TPropGrid) //
function Create(AOwner);
begin
inherited;
FobjProptype := p_properys;
end
end
@ -2006,6 +2007,7 @@ type TEventEditGrid = class(TPropGrid) //
function Create(AOwner);
begin
inherited;
FobjProptype := p_evnets;
OndblClick := thisfunction(GridCellDblClick);
end
function GridCellDblClick(o,e);override;//双击处理

View File

@ -600,6 +600,9 @@ type TPropGrid = class(TTSLDataGrid)
@explan(说明)属性编辑器 %%
**}
protected
FobjProptype;
static const p_properys="peopery";
static const p_evnets="pevents";
FDesigner;
private
FCellEditers;
@ -688,9 +691,18 @@ type TPropGrid = class(TTSLDataGrid)
//echo "\r\n",FComponent.name," ",pv,"===",tostn(od[index])," ",tostn(d);
end
SetValue(indexs union array(index),d);
regets := array("parentfont":true,"parentcolor":true); /////////需要重新获取的属性
if regets[pv] then
begin
bkfc := FComponent;
FComponent := nil;
SetComponent(bkfc);
end else
begin
rec := GetSubItemRect(i,j);
InvalidateRect(rec,true);
end
end
currentLeave();
except

Binary file not shown.

View File

@ -5596,6 +5596,13 @@ type TInPutQuerys = class(TcustomInPutQuerys)
inherited;
end
end
type tgraphicsctl =class(tg_WinControl) ///////绘图控件
uses utvclgraphics;
function create(AOwner);
begin
inherited;
end
end
implementation
///////////////tmf文件转换///////////////////////
type Ttfm2Component = class(TTmfParser)

View File

@ -1,11 +1,14 @@
unit utslvclcef;
//20230410
//20250410
{**
@explan(说明)封装cef到vcl控件,提供cef窗口的宿主控件,加入了,cookie,download,等功能 %%
@explan(说明)封装cef到vcl控件,提供cef窗口的宿主控件 %%
**}
interface
uses utslvclcefinterface,tslvcl;
type tcefowner = class(tcustomcontrol)
{**
@explan(说明)窗口的宿主控件
**}
protected
static fargs; //命令行参数
static fcefapp; //app
@ -13,8 +16,6 @@ type tcefowner = class(tcustomcontrol)
static finitcef; //初始化标记
static finitcefobj;//初始化标记
static fcefloop; //消息循环
static fcookiemgr;
static fcookiewills;
static fcefwindows;
class function initcef(); //初始化cef
begin
@ -27,29 +28,11 @@ type tcefowner = class(tcustomcontrol)
fcefapp.on_before_command_line_processing := function(o,u,cmd)
begin
//cmd.set_program(%% D:\Program Files\Tinysoft\AnalyseNG.NET\tsl_cef_main.exe%%);
cmd.append_argument("single-process");
//cmd.Append_Switch("single-process");
end
app := initializeapplication();
app.addExitMessageLoopdo(thisfunction(cef_shutdown));
cef_initialize(fargs._getptr_(), fappsetting._getptr_(), fcefapp._getptr_(),0);
fcookiemgr := new cef_cookie_manager_global_t();
if fcookiewills then
begin
for i,v in fcookiewills do
begin
if ifnil(v[1]) then
begin
fcookiemgr.delete_cookies(v[2],v[0],fcookiemgr.callback);
end else
begin
c := new cef_cookie_t();
c.name := v[0];
c.value := v[1];
fcookiemgr.set_cookie(v[2],c,fcookiemgr.callback);
end
end
fcookiewills := array();
end
end
end
class function sinit();override; //初始化
@ -62,10 +45,9 @@ type tcefowner = class(tcustomcontrol)
fcefapp := new cef_app_t();
fappsetting := new cef_settings_t();
tp := unit(utslvclauxiliary).gettemppath();
fappsetting.log_file := tp+"-ceflogfile-"+datetostr(date())+".log";
//fappsetting.browser_subprocess_path := %% F:\cef_105.3.39\AnalyseNG.NET\cefclient.exe%%;
fappsetting.browser_subprocess_path := tslpath()+"tsl_cef_main.exe";
fappsetting.cache_path := tp+"-cefcatche-";// %% F:\cef_105.3.39\tslcache%%;
fappsetting.log_file := tp+"-cefownerlogfile-"+datetostr(date())+".log";
fappsetting.browser_subprocess_path := tslpath()+"tsl_cef_main";
fappsetting.cache_path := tp+"-cefownercatche-";
fappsetting.log_severity :=99;//0;
end
end
@ -77,62 +59,6 @@ type tcefowner = class(tcustomcontrol)
height := 300;
fwinfo := new cef_window_info_t();
fclient := new cef_client_t();
{frm := new cef_life_span_handler_t();
frm.on_after_created := function(o,b)begin
echo "\r\n craeteted:",b.get_main_frame().get_url(),"<<";
end
frm.on_before_close := function(o,b)begin
echo "\r\n====doclose:",b.get_main_frame().get_url();
end
fclient.on_process_message_received := function()begin
echo "\r\n>>>>:messagesabed:",params[4];
//return 1;
end
fclient.life_span_handler := frm; }
d := new cef_download_handler_t();
fdownloader := d;
d.can_download := function(o,b,u,m)begin
return docandownload(o,b,u,m);
//return true;
end
d.on_before_download := function(o,b,it,s,c)begin
c.cont(s,1);
end
d.on_download_updated := function(o,b,it,c) begin
return dodownloadupdate(o,b,it,c);
end
{fOndownloadupdate := function(o,e)begin
echo "\r\n",e.get_id(),e.is_complete(),"=====",e.is_in_progress(),"===",e.is_complete(),"===",e.get_percent_complete(),"====",e.get_suggested_file_name();
end
foncandownload := function(o,e)begin
echo "\r\n",e.method,"==>>=",e.url;
//e.skip := true;
end}
muh := new cef_context_menu_handler_t();
muh.on_before_context_menu := function(o,b,f,pms,d)begin
ppm := PopupMenu;
if d then d.remove(0x84);
if ppm then
begin
fpopupmenushine := array();
createusrmenu(ppm,d,27500);
end
end
muh.on_context_menu_dismissed := function(o,b,f)begin
fpopupmenushine := array();
end
muh.on_context_menu_command := function(o,b,f,pms,id,flg)begin
oi := fpopupmenushine[id];
if oi then
begin
e := new tuieventbase(0,0,0,0);
CallMessgeFunction(oi.onclick,oi,e);
return 1;
end
end
//fclient.context_menu_handler := muh;
//fclient.download_handler := d;
fbrssetting := new cef_browser_settings_t();
ftimer := new TTimer(self);
end
@ -140,7 +66,6 @@ type tcefowner = class(tcustomcontrol)
begin
return false;
end
function WMSize(o,e);override;
begin
if not HandleAllocated() then return ;//
@ -205,55 +130,13 @@ type tcefowner = class(tcustomcontrol)
end
end
end
////////////////cookie///////////////////
function setcookie(n,v,ur);//设置cookie值
begin
if not( n and ifstring(n)) then return 0;
if not( v and ifstring(v)) then return 0;
if not(ur and ifstring(ur)) then
begin
cur := furl;
end else
begin
cur := ur;
end
cookie := new cef_cookie_t();
cookie.name := n;
cookie.value := v;
if fcookiemgr then
begin
return fcookiemgr.set_cookie(cur,cookie,fcookiemgr.callback);
end else
begin
if not(ifarray( fcookiewills)) then fcookiewills := array();
fcookiewills[length(fcookiewills)] := array(n,v,cur);
end
end
function delcookie(n,ur); //根据名字删除cookie
begin
if not( n and ifstring(n)) then return 0;
if not(ur and ifstring(ur)) then
begin
cur := furl;
end else
begin
cur := ur;
end
if fcookiemgr then
begin
fcookiemgr.delete_cookies(cur,n,fcookiemgr.callback);
end else
begin
if not(ifarray( fcookiewills)) then fcookiewills := array();
fcookiewills[length(fcookiewills)] := array(n,nil,cur);
end
end
published
property client read fclient;
property appsetting read getappsetting;
property url:string read furl write seturl;
property oncandownload:eventhandler read FOncandownload write FOncandownload;
property Ondownloadupdate:eventhandler read FOndownloadupdate write fOndownloadupdate;
{**
@param(url)(string)网址 %%
**}
private
function seturl(u); //设置url
begin
@ -305,65 +188,8 @@ type tcefowner = class(tcustomcontrol)
fneedload := true;
ftimer.timeout(thisfunction(lazy_load()),60);
end
function createusrmenu(mu,d,idx); //构造菜单映射
begin
if not mu then return ;//
for i,v in mu.items do
begin
idx++;
fpopupmenushine[idx] := v;
smu := v.ItemCount;
if smu>0 then //存在子节点
begin
nd := d.add_sub_menu(idx,v.Caption);
if not(v.Enabled) then //处理是否有效
begin
d.set_enabled(idx,false);
end else
createusrmenu(v,nd,idx); //处理子菜单
end else //单个菜单
begin
if v.TSeparator then //分割类型
begin
d.add_separator();
end else //添加菜单
begin
d.add_item(idx,v.Caption);
if not(v.Enabled) then d.set_enabled(idx,false); //设置是否enabled
end
end
end
end
function docandownload(o,b,u,m);//是否可以下载处理
begin
if FOncandownload then
begin
e := new tcandownevent(0,0,0,0);
e.url := u;
e.method := m;
CallMessgeFunction(FOncandownload,self(true),e);
return not(e.skip);
end else
begin
return 1;
end
end
function dodownloadupdate(o,b,it,c);//下载过程处理
begin
if FOndownloadupdate and it and c then
begin
e := new tdownupdateevent(0,0,0,0);
e.FDownitem := it;
e.fcallback := c;
CallMessgeFunction(FOndownloadupdate,self(true),e);
end
end
private
[weakref]fbrower;
[weakref]FOncandownload;
[weakref]FOndownloadupdate;
[weakref]fdownloader;
[weakref]fpopupmenushine;
[weakref]fclient;
furl;
fwinfo;
@ -386,72 +212,6 @@ type tcefowner = class(tcustomcontrol)
return fappsetting;
end
end
type tcandownevent = class(tuieventbase) //是否可以下载
function create(m,w,l,h);override;
begin
inherited;
end
url; //url
method; //post or get
end
type tdownupdateevent=class(tuieventbase)
function create(m,w,l,h);override;
begin
inherited;
end
//call--back;
function cancel();
begin
fcallback.cancel();
end
function pause();
begin
fcallback.pause();
end
function resume();
begin
fcallback.resume();
end
//down ----
function is_complete();//是否完成
begin
return FDownitem.is_complete();
end
function is_in_progress();//正在进行
begin
return FDownitem.is_in_progress();
end
function get_current_speed();//当前速度
begin
return FDownitem.get_current_speed();
end
function get_percent_complete();//完成进度
begin
return FDownitem.get_percent_complete();
end
function get_full_path();//路径
begin
return FDownitem.get_full_path();
end
function get_original_url();//原始路径
begin
return FDownitem.get_original_url();
end
function get_suggested_file_name();//建议文件名
begin
return FDownitem.get_suggested_file_name();
end
function get_total_bytes(); //大小
begin
return FDownitem.get_total_bytes();
end
function get_id(); //序号
begin
return FDownitem.get_id();
end
FDownitem;
fcallback;
end
implementation
initialization

View File

@ -575,9 +575,30 @@ type cef_main_args_t=class(t_cef_stc_base)
function create(ptr);override;
begin
inherited create(getstruct(),ptr);
fargv := Create_argv(nt);
argv := fargv._getptr_();
argc := nt;
end
property argc index "argc" read _getvalue_ write _setvalue_;
property argv index "argv" read _getvalue_ write _setvalue_;
private
function Create_argv(nt); //¹¹Ôìargv
begin
uses cstructurelib;
data := array();
nt := 0;
for i := 0 to sysparamcount() do
begin
data[nt][0] := nt;
data[nt][1] := "char*";
data[nt][2] := sysparamstr(i);
nt++;
end
stc := MemoryAlignmentCalculate(data);
obj := new tslcstructureobj(stc,nil);
return obj;
end
fargv;
end
{$else}
type cef_main_args_t=class(t_cef_stc_base)
@ -592,9 +613,11 @@ type cef_main_args_t=class(t_cef_stc_base)
function create(ptr)
begin
inherited create(getstruct(),ptr);
instance := GetModuleHandleA();
end
property instance index "instance" read _getvalue_ write _setvalue_;
private
function GetModuleHandleA(name:pointer):pointer;stdcall;external "Kernel32.dll" name "GetModuleHandleA";
end
{$endif}
type cef_basetime_t = class(t_cef_stc_base) //32bit ¿ÉÄÜÓÐÎÊÌâÐèÒªÐÞÕý

View File

@ -4463,11 +4463,11 @@ type TCustomComboBoxbase=class(TCustomControl)
begin
return 20;
end
function GetItemIndex();virtual;//获得选中的序号
function GetItemIndex(idx);virtual;//获得选中的序号
begin
return -1;
end
function SetItemIndex();virtual;//设置选中的序号
function SetItemIndex(idx);virtual;//设置选中的序号
begin
end
end
@ -4498,9 +4498,11 @@ type TcustomComboBox=class(TCustomComboBoxbase)
function create(AOwner);override;
begin
inherited;
caption := "combobox";
fmultisel := false;
fcheckbox := false;
FEdit := new TcustomEdit(self);
FEdit.Text := caption;
FEdit.OnKeyDown := function(o,e)
begin
if FMultisel then return ;
@ -4520,7 +4522,7 @@ type TcustomComboBox=class(TCustomComboBoxbase)
FEdit.onchange := function(o,e);
begin
if feditischanging then return feditischanging := false;
if not(o.Readonly) then
if {not(o.Readonly)} true then
begin
feditischanging := true;
if Foneditchanged then
@ -4691,12 +4693,21 @@ type TcustomComboBox=class(TCustomComboBoxbase)
property onEditUpdate:eventhandler read FoneditUpdate write FoneditUpdate;
property onkillfocus read Fonkillfocus write Fonkillfocus;
property onsetfocus read Fonsetfocus write Fonsetfocus;
property text:string read getedttext write setedttext;
property Editer read FEdit;
{**
@param(oneditchanged)(function[tcomboBox,tuieventbase])文本被改变回调,文本显示后调用%%
**}
private
function getedttext();
begin
return fedit.text;
end
function setedttext(s);
begin
FEdit.Text := s;
end
function setMultisel(v);
begin
nv := v?true:false;

View File

@ -104,7 +104,7 @@ uses utslvclauxiliary;
bar_width 柱状图类型时候的宽度
tg_legend 图例
location 位置 tgc_in_upper_left tgc_in_lower_left ..... tgc_by_coordinates
postion 定位为tgc_by_coordinates设置具体位置 array(x,y)
position 定位为tgc_by_coordinates设置具体位置 array(x,y)
line_mode 边框线
links 关联的绘图tg_graph 数组
text 文本内容,字符串数组
@ -639,6 +639,8 @@ type tg_WinControl = class(tcustomcontrol,tg_figure_container) //
function create(AOwner);
begin
class(tcustomcontrol).create(AOwner);
width := 300;
height := 300;
class(tg_figure_container).create();
fg_timer := new unit(utslvclstdctl).tcustomtimer(self);
fg_timer.Interval := 300;
@ -1181,7 +1183,7 @@ type tg_axes = class(tg_base) //
begin
v.paint_pre(cvs);
end
modify_label_postion();
modify_label_position();
ftitle.paint_pre(cvs);
if fbox = tgc_on then
begin
@ -1603,7 +1605,7 @@ type tg_axes = class(tg_base) //
b1 := a1+len;
return true;
end
function modify_label_postion(); //修正标签位置
function modify_label_position(); //修正标签位置
begin
if ftitle and (ftitle.visible=tgc_on) and (ftitle.auto_position=tgc_on) then
begin
@ -1745,7 +1747,7 @@ type tg_axes = class(tg_base) //
end
end ;
end
function modify_y_postion(loc);
function modify_y_position(loc);
begin
get_duan_dian(x0,y0,z0,x1,y1,z1,x2,y2,z2);
//////left
@ -1835,7 +1837,7 @@ type tg_axes = class(tg_base) //
end
else
begin
return modify_y_postion(tgc_left);
return modify_y_position(tgc_left);
//axy.ytics_coord := array(fzoom_box[0,(faxes_reverse[0] = tgc_on)],"y",0);
end
axy.tics_direction := tgc_direct_asc;
@ -1889,7 +1891,7 @@ type tg_axes = class(tg_base) //
begin
////////////////y轴///////////////////////////////////
modify_y_postion(fy_location);
modify_y_position(fy_location);
///////////////x///////////////////////////////
modify_x_position(fx_location);
//////z-axis
@ -3264,7 +3266,7 @@ type tg_label =class(tg_base) //
published
property textalign read ftextalign write set_textalign;
property text read ftext write set_text;//= ""
property position read fposition write set_positon;//[-27.697388,-1.7130177]
property position read fposition write set_position;//[-27.697388,-1.7130177]
property location read flocation write Set_location;
property auto_position read fauto_position write set_auto_position;//"on"
//property auto_position_value read fauto_position_value write fauto_position_value;//"on"
@ -3310,7 +3312,7 @@ type tg_label =class(tg_base) //
if nv<>fauto_position then
begin
fauto_position := nv;
prop_changed("auto_postion",nil);
prop_changed("auto_position",nil);
end
end
function set_font_angle(v);
@ -3329,14 +3331,14 @@ type tg_label =class(tg_base) //
prop_changed("text",nil);
end
end
function set_positon(v);
function set_position(v);
begin
if ifarray(v) and ifnumber(v[0]) and ifnumber(v[1]) and v[0]<>fposition[0] and v[1]<>fposition[1] then
begin
fposition[0] :=v[0];
fposition[1] :=v[1];
fauto_position := tgc_off;
prop_changed("postion",v);
prop_changed("position",v);
end
end
function set_auto_rotation(v);
@ -3750,7 +3752,7 @@ type tg_legend = class(tg_base) //ͼ
end
published
property location read flocation write set_location; //相对位置类型
property postion read fposition write set_postion; //位置
property position read fposition write set_position; //位置
property links read flinks write set_links; //图形
property text read FText write set_text; //图例字符串
protected
@ -3818,12 +3820,12 @@ type tg_legend = class(tg_base) //ͼ
lw := ws[0]+ws[1];
lh := sum(hs);
end
function set_postion(v); //位置
function set_position(v); //位置
begin
if fposition<>v and ifarray(v) and ifnumber(v[0]) and ifnumber(v[1]) then
begin
fposition := array(v[0],v[1]);
prop_changed("postion",v);
prop_changed("position",v);
end
end
function set_text(s); //图例字符串设置
@ -3982,7 +3984,7 @@ type tg_Polyline = class(tg_graph) //
end
xys[i] := array(integer(x),integer(y));
case fpolyline_style of
tgc_LS_bar,tgc_LS_barplot,tgc_LS_filled:
tgc_LS_bar,tgc_ls_Bar2,tgc_LS_barplot,tgc_LS_filled:
begin
zoom_to_xyz(v[0],0,0,x,y) ;
ys[i] := array(x,y);
@ -4008,7 +4010,7 @@ type tg_Polyline = class(tg_graph) //
begin
if not(fface_rgn and point_in_rgn(p,fface_rgn)) then return -1;
case fpolyline_style of
tgc_LS_bar:
tgc_LS_bar,tgc_ls_Bar2:
begin
for i,v in fline_bar_rgn do
begin
@ -4043,11 +4045,21 @@ type tg_Polyline = class(tg_graph) //
end
function paint_legend(cvs,rec);override; //绘制图例
begin
y0 := ceil(rec[1]+(rec[3]-rec[1])/2);
dis := ceil((rec[2]-rec[0])/5);
xys := array((rec[0]+dis,y0),(rec[0]+4*dis,y0));
set_lineinfo_to_canvas(cvs);
dh := (rec[3]-rec[1]);
y0 := ceil(rec[1]+dh/2);
dis := ceil((rec[2]-rec[0])/5);
case fpolyline_style of
tgc_LS_bar,tgc_LS_bar2,tgc_LS_barplot,tgc_LS_filled:
begin
xys := array((rec[0]+dis,y0-dh/4),(rec[0]+4*dis,y0-dh/4),(rec[0]+4*dis,y0+dh/4),(rec[0]+dis,y0+dh/4));
paint_lines(cvs,tgc_LS_filled,xys,tgc_on,array("line_mode":line_mode,"bar_width":array(get_abs_barwidth(),0),"color":lineinfo.color,"bkcolor":lineinfo.bkcolor));
end else
begin
xys := array((rec[0]+dis,y0),(rec[0]+4*dis,y0));
paint_lines(cvs,tgc_LS_interpolated,xys,0,array("line_mode":line_mode,"bar_width":array(get_abs_barwidth(),0),"color":lineinfo.color,"bkcolor":lineinfo.bkcolor));
end
end ;
mk := markinfo.clone();
if mark_mode=tgc_on and mk.size>2 then
begin
@ -4462,9 +4474,9 @@ type tg_base = class(TNode,tg_evet_conainter) //
if not p then return 0;
return p.dispatchEvent(evt,tg);
end
function invalidate(); //刷新
function invalidate(n); //刷新
begin
if tgc_off=fvisibe then return ;
if (n<>"visible") and (tgc_off=fvisibe) then return ;
if fchange_locked then return ;
axs := get_axes();
if axs then
@ -4509,7 +4521,7 @@ type tg_base = class(TNode,tg_evet_conainter) //
end
function prop_changed(n,v);virtual; //改变通知
begin
invalidate();
invalidate(n);
end
function SetParent(V);virtual;
begin
@ -4660,6 +4672,7 @@ type tg_const = class()
static const tgc_LS_barplot="barplot";
static const tgc_LS_filled="filled";
static const tgc_LS_bar="bar";
static const tgc_LS_bar2="bar2";
/////////////////相对位置////////////////////////////
static const tgc_in_upper_right = "in_upper_right";
@ -4957,7 +4970,7 @@ begin
end
paint_lines(cvs,o.tgc_LS_interpolated,xys,cls,ifo);
end
o.tgc_LS_bar:
o.tgc_LS_bar,o.tgc_ls_bar2:
begin
b_w_x := integer(ifo["bar_width"][0]/2);
b_w_y := integer(ifo["bar_width"][1]/2);
@ -4982,6 +4995,7 @@ begin
end
end
ifo["bar_rgns"] := bar_rgns;
if o.tgc_ls_bar=pls then
paint_lines(cvs,o.tgc_LS_interpolated,xys,cls,ifo);
end
o.tgc_LS_arrowed:

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
tsjni.dll

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
tsnet.dll

Binary file not shown.

View File

@ -1,3 +1,13 @@
更新日志--------2025-4-28
修正:客户机检查语法生成代码跳转依赖时,某些错误发生会导致异常的问题。
修正:某些情况下函数编辑器内无法点击断点的问题。
修订使用线程池模式而且保留链接模式会导致线程被释放的时候数据库链接以及天软平台的链接的泄露。典型的如在TONGWEB等JAVA容器里用线程池。
升级:支持{$I includefile} 平台需升级支持(测试版平台已支持)。 ---该特性为测试特性---
更新日志--------2025-3-26
修订JDBC驱动对达梦数据库的兼容。
新增python3.14支持。
更新日志--------2025-3-24
修订TMemIniFile erasesection方法无法删除掉section本身。
修订TMemIniFile ValueExists和SectionExists在大小写敏感时查询到大小写不一致的内容。