界面库

优化
This commit is contained in:
JianjunLiu 2022-11-01 17:51:28 +08:00
parent e855fce170
commit eb4da18fa4
3 changed files with 62 additions and 55 deletions

View File

@ -712,7 +712,7 @@ type TLabel = class(TGraphicControl)
return array("name","action","align","anchors","caption","enabled","font",
"popupmenu","visible","textalign",
"height","width","left","top","color","bkbitmap","parentcolor","parentfont","transparent",
"onpopupmenu","onmousedown","onmouseup");
"onpopupmenu","onmousedown","onmouseup","onnotification");
end
{**
@param(TextAlign)(member of TAlignStyle9) 文字对齐 %%
@ -928,7 +928,7 @@ type TPanel=class(TScrollingWinControl) //
"onmousedown","onmouseup",
"onactivate","onclose",
"onsetfocus","onkillfocus",
"onkeyup","onkeydown","onkeypress"
"onkeyup","onkeydown","onkeypress","onnotification"
);
end
end
@ -1098,7 +1098,7 @@ type TTray=class(TComponent)
end
function publishs();override;
begin
return array("name","caption","icon","popupmenu","onclick");
return array("name","caption","icon","popupmenu","onclick","onnotification");
end
property Form read FForm write SetForm;
property Caption:string read FCaption write SetCaption;
@ -1475,7 +1475,7 @@ type TVCForm = class(TScrollingWinControl)
"onmousedown","onmouseup",
"onactivate","onclose",
"onsetfocus","onkillfocus",
"onkeyup","onkeydown","onkeypress"
"onkeyup","onkeydown","onkeypress","onnotification"
);
end
@ -1593,7 +1593,7 @@ type tbtn = class(tcustombtn)
begin
return array("name","action","left","top","width","height",
"align","anchors","caption","font","enabled","visible","bkbitmap","color","parentcolor","parentfont","tabstop",
"onclick","onmousemove","onsetfocus","onkillfocus","onkeyup","onkeydown","onkeypress");
"onclick","onmousemove","onsetfocus","onkillfocus","onkeyup","onkeydown","onkeypress","onnotification");
end
end
@ -1609,7 +1609,7 @@ type tcheckbtn = class(tcustomcheckbtn)
begin
return array("name","left","top","width","height",
"caption","anchors","enabled","color","visible","font","parentcolor","parentfont",
"textpos","checked","lefttext","tabstop","onclick","onmousemove","onmousedown","onmouseup");
"textpos","checked","lefttext","tabstop","onclick","onmousemove","onmousedown","onmouseup","onnotification");
end
end
@ -1625,7 +1625,7 @@ type tradiobtn = class(tcustomradiobtn)
begin
return array("name","left","top","width","height",
"caption","anchors","enabled","color","visible","font","parentcolor","parentfont",
"textpos","checked","lefttext","tabstop","onclick","onmousemove","onmousedown","onmouseup");
"textpos","checked","lefttext","tabstop","onclick","onmousemove","onmousedown","onmouseup","onnotification");
end
end
@ -1718,7 +1718,7 @@ type tedit = class(tcustomedit)
begin
return array("name","align","anchors","border","font","color","enabled","parentcolor","parentfont","popupmenu","visible","height","width","left","top","text","placeholder"
,"readonly","limitlength","linewrap","tabstop","onmousemove","onpopupmenu","onmousedown","onmouseup","onkeyup"
,"onkeydown","onkeypress","onmaxtext","onkillfocus","onsetfocus","onchange");
,"onkeydown","onkeypress","onmaxtext","onkillfocus","onsetfocus","onchange","onnotification");
end
end
type tpassword = class(tcustompassword)
@ -1739,7 +1739,7 @@ type tpassword = class(tcustompassword)
"passwordchar","onmousemove","onpopupmenu",
"onmousedown","onmouseup",
"onkeyup","onkeydown","onkeypress",
"onmaxtext","onkillfocus","onsetfocus","onchange");
"onmaxtext","onkillfocus","onsetfocus","onchange","onnotification");
end
end
@ -1813,7 +1813,7 @@ type tmemo = class(TSynMemoNorm)
"tabspace","highlighter","onmousewheel","onmousemove","onpopupmenu",
"onmousedown","onmouseup","onsetfocus","onkillfocus",
"onkeyup","onkeydown","onkeypress",
"onchange");
"onchange","onnotification");
end
private
Fonchange;
@ -1830,7 +1830,7 @@ type thighlighter= class(tcustomsynhighlighter)
end
function publishs();override;
begin
return array("name","keywordcolor","symcolor","stringcolor","annotationcolor","ignorecase");
return array("name","keywordcolor","symcolor","stringcolor","annotationcolor","ignorecase","onnotification");
end
end
@ -1847,7 +1847,7 @@ type tgroupbox = class(tcustomgroupbox)
begin
return array("name","left","top","width","height",
"align","anchors","border","caption","color","enabled","font","visible","textpos","parentcolor","parentfont","wsdlgmodalframe",
"onsize");
"onsize","onnotification");
end
end
@ -1924,7 +1924,7 @@ type TCheckGroupBox=class(TRadioGroupBox)
return array("name","left","top","width","height",
"align","border","ItemIndexs","caption","color","enabled","font",
//"minheight","minwidth",
"parentfont","parentfont","visible","textpos","wsdlgmodalframe");
"parentfont","parentfont","visible","textpos","wsdlgmodalframe","onnotification");
end
end
@ -2203,7 +2203,7 @@ type TRadioGroupBox=class(TGroupbox)
r := array("name","left","top","width","height",
"align","border","ItemIndexs","caption","color","enabled","font",
//"minheight","minwidth",
"parentfont","parentcolor","visible","textpos","wsdlgmodalframe","onselectionchanged");
"parentfont","parentcolor","visible","textpos","wsdlgmodalframe","onselectionchanged","onnotification");
return r;
end
{**
@ -2231,7 +2231,7 @@ type TListBox = class(TcustomListBox)
"height","width","left","top","items",
"multisel","checkbox","popupmenu","wsdlgmodalframe",
"onmousedown","onmouseup",
"onselchanged"
"onselchange","onnotification"
);
end
@ -2331,7 +2331,7 @@ type TColorbox=class(TcustomListBox)
"height","width","left","top",
"wsdlgmodalframe","popupmenu","parentcolor","parentfont",
"onmousedown","onmouseup",
"onselchanged"
"onselchanged","onnotification"
);
end
private
@ -2448,7 +2448,7 @@ type TColorCombobox=class(TCustomComboBoxbase)
"visible","parentcolor","parentfont",
"height","width","left","top",
"readonly","itemindex",
"onselchanged","ondropdown","oncloseup");
"onselchanged","ondropdown","oncloseup","onnotification");
end
private
function SetItemIndex(idx);override;
@ -2474,9 +2474,9 @@ type TComboBox = class(TcustomComboBox)
return array("name","font","border","font","color",
"visible","anchors","align","enabled","parentcolor","parentfont",
"height","width","left","top",
"readonly","itemindex",
"readonly","items",
"checkbox","multisel",
"items","dropdowncount","oncloseup","ondropdown","onselchanged","oneditchanged");
"itemindex","dropdowncount","oncloseup","ondropdown","onselchanged","oneditchanged","onnotification");
end
end
@ -2493,7 +2493,7 @@ type TToolButton = class(TcustomToolButton)
end
function publishs();override;
begin
return array("name","action","caption","enabled","stylesep","imageid","visible","onclick","popupmenu");
return array("name","action","caption","enabled","stylesep","imageid","visible","onclick","popupmenu","onnotification");
end
end
@ -2508,7 +2508,7 @@ type TToolBar = class( TcustomToolBar)
function publishs();override;
begin
return array("name","align","caption","enabled","font","left","top","width","height",
"visible","imagelist","mainmenu");
"visible","imagelist","mainmenu","onnotification");
if Align <> alNone then
begin
return array("name","align","caption","enabled","font",
@ -2529,7 +2529,7 @@ type TStatusBar = class(TcustomStatusBar)
function publishs();override;
begin
return array("name","caption","enabled","border",
"font","visible","items","ondblclick","onmousedown","onmouseup");
"font","visible","items","ondblclick","onmousedown","onmouseup","onnotification");
end
end
type tcoolbar = class(tcustomcoolbar)
@ -2542,7 +2542,7 @@ type tcoolbar = class(tcustomcoolbar)
end
function publishs();override;
begin
return array("name","enabled","caption","autosize","align","border","wsdlgmodalframe","font","color","dragbtncolor","visible","arrange");
return array("name","enabled","caption","autosize","align","border","wsdlgmodalframe","font","color","dragbtncolor","visible","arrange","onnotification");
end
end
type tsplitter = class(tcustomsplitter)
@ -2555,7 +2555,7 @@ type tsplitter = class(tcustomsplitter)
end
function publishs();override;
begin
return array("name","enabled","border","left","top","width","height","color","parentcolor","transparent","visible","align");
return array("name","enabled","border","left","top","width","height","color","parentcolor","transparent","visible","align","onnotification");
end
end
@ -2940,7 +2940,7 @@ type TTreeView=class(TTreeCtl)
return array("name",
"left","top","width","height","caption","align","anchors",
"checkbox","visible","itemheght","imagelist","hasline","singleexpand","color","font","parentcolor","parentfont",
"lazyitems","onselchanged","onmousedown","onsetfocus","onkillfocus","onkeyup","onkeydown");
"lazyitems","onselchanged","onmousedown","onsetfocus","onkillfocus","onkeyup","onkeydown","onnotification");
end
//property OnDeleteItem read FOnDeleteItem write FOnDeleteItem;
//property OnItemExpand:eventhandler read FOnItemExpand write FOnItemExpand;
@ -2961,7 +2961,7 @@ type TTabSheet = class(tcustomtabsheet)
end
function publishs();override;
begin
return array("name","caption","font","color","border","parentcolor","parentfont","wsdlgmodalframe","onsize");
return array("name","caption","font","color","border","parentcolor","parentfont","wsdlgmodalframe","onsize","onnotification");
end
end
type tpagecontrol = class(tcustompagecontrol)
@ -2976,7 +2976,7 @@ type tpagecontrol = class(tcustompagecontrol)
begin
return array("name","left","top","width","height",
"align","anchors","color","font","parentcolor","parentfont","border","caption","popupmenu","enabled","visible","cursel","cursor",
"wsdlgmodalframe","wssizebox","onselchange");
"wsdlgmodalframe","wssizebox","onselchange","onnotification");
end
end
//二分控件
@ -3036,7 +3036,7 @@ type TPairSplitterSide=class(TCustomControl)
end
function publishs();override;
begin
return array("name","border","caption","color","font","parentcolor","parentfont","popupmenu","bkbitmap","wsdlgmodalframe","onsize");
return array("name","border","caption","color","font","parentcolor","parentfont","popupmenu","bkbitmap","wsdlgmodalframe","onsize","onnotification");
end
end
type TPairSplitter=class(tcustomcontrol) //
@ -3349,7 +3349,7 @@ type TPairSplitter=class(tcustomcontrol) //
begin
return array("name","left","top","width","height",
"align","anchors","border","color","font","caption","enabled","visible","parentcolor","parentfont","splittertype","position",
"wsdlgmodalframe","wscaption","wspopup","wssizebox","wssysmenu");
"wsdlgmodalframe","wscaption","wspopup","wssizebox","wssysmenu","onnotification");
end
{**
@param(Position)(integer) 分割线位置 %%
@ -4415,7 +4415,7 @@ type TListView = class(TDrawGrid)
"selectedid","selbkcolor","mouseonbkcolor",
"onmousewheel","onmousemove",
"onmousedown","onmouseup","ondblclick",
"onkeyup","onkeydown","onkeypress","oncolumnclick","oncheckitem");
"onkeyup","onkeydown","onkeypress","oncolumnclick","oncheckitem","onnotification");
end
{**
@param(SelectedId)(integer) 当前选中的序号,<0表示没有选中项 %%
@ -4453,7 +4453,7 @@ type tprogressbar = class(tcustomprogressbar)
"popupmenu","color","visible","enabled","parnetcolor",
"height","width","left","top",
"vertical","range","position","barcolor","onmousemove","onpopupmenu",
"onmousedown","onmouseup");
"onmousedown","onmouseup","onnotification");
end
end
@ -4755,7 +4755,7 @@ type tdatetimepicker = class(tthreeEntry)
return array("name","caption","anchors","enabled","font","color",
"popupmenu","visible","parentcolor","parentfont",
"height","width","left","top","border","onmousemove","onpopupmenu",
"onmousedown","onmouseup","onselectchange");
"onmousedown","onmouseup","onselectchange","onnotification");
end
property onselectchange:eventhandler read Fonselectchange write Fonselectchange;
{
@ -4922,7 +4922,7 @@ type ttimepicker = class(tthreeEntry)
return array("name","align","anchors","caption","enabled","font","color",
"popupmenu","visible","parentcolor","parentfont",
"height","width","left","top","border","onmousemove","onpopupmenu",
"onmousedown","onmouseup","onkeyup","onkeydown","onselectchange");
"onmousedown","onmouseup","onkeyup","onkeydown","onselectchange","onnotification");
end
property onselectchange:eventhandler read Fonselectchange write Fonselectchange;
{
@ -4960,7 +4960,7 @@ type tipaddr = class(tcustomipaddr)
function publishs();override;
begin
return array("name","align","anchors","font","color","caption","visible","parentcolor","parentfont","height","width","left","top",
"ipaddr","HasPort","onAddrChange","border","wsdlgmodalframe");
"ipaddr","HasPort","onAddrChange","border","wsdlgmodalframe","onnotification");
end
end
@ -4977,7 +4977,7 @@ type TSpinEdit=class(TCustomSpinEdit)
begin
return array("name","left","top","anchors","width","height",
"border","enabled","visible",
"increment","minvalue","maxvalue","value","wsdlgmodalframe","onincrease","ondecrease");
"increment","minvalue","maxvalue","value","wsdlgmodalframe","onincrease","ondecrease","onnotification");
end
end
@ -5204,7 +5204,7 @@ type TTimer = class(TCustomTimer)
end
function publishs();override;
begin
return array("name","interval","ontimer");
return array("name","interval","ontimer","onnotification");
end
end
@ -5222,7 +5222,7 @@ type TAction=class(TCustomAction)
function publishs();override;
begin
r := array("name","caption","enabled","shortcut","onexecute");
r := array("name","caption","enabled","shortcut","onexecute","onnotification");
return r;
end
end
@ -5233,7 +5233,7 @@ type tactionlist =class(TCustomactionlist)
end
function publishs();override;
begin
return array("name");
return array("name","onnotification");
end
end
@ -5250,7 +5250,7 @@ type TMessageboxADlg = class(TcustommsgADlg)
function publishs();override;
begin
return array("name","chooseok","caption",
"mbtext","mbbtnstyle","mbiconstyle");
"mbtext","mbbtnstyle","mbiconstyle","onnotification");
end
end
type TColorChooseADlg = class(tcustomcolordlg)
@ -5264,7 +5264,7 @@ type TColorChooseADlg = class(tcustomcolordlg)
function publishs();override;
begin
return array("name","chooseok","caption",
"customcolors","result");
"customcolors","result","onnotification");
end
end
type TFontChooseADlg = class(tcustomfontdlg)
@ -5277,7 +5277,7 @@ type TFontChooseADlg = class(tcustomfontdlg)
end
function publishs();override;
begin
array("name","chooseok","caption","color");
array("name","chooseok","caption","color","onnotification");
end
end
@ -5293,7 +5293,7 @@ type TSavefileADlg = class(tcustomfsdlg)
function publishs();override;
begin
return array("name","caption","filter","filterindex","filename","defaultfileextension",
"showhidden","multiselected","overwriteprompt","filemustexist"); //"linkfilepath" "createprompt"
"showhidden","multiselected","overwriteprompt","filemustexist","onnotification"); //"linkfilepath" "createprompt"
end
end
@ -5320,7 +5320,7 @@ type TOpenFileADlg=class(tcustomfsdlg)
function publishs();override;
begin
return array("name","caption","filter","filterindex","filename",
"defaultfileextension","showhidden","multiselected"); //,"linkfilepath"
"defaultfileextension","showhidden","multiselected","onnotification"); //,"linkfilepath"
end
end
type TFolderChooseADlg = class(tcustomfolderdlg)
@ -5334,7 +5334,7 @@ type TFolderChooseADlg = class(tcustomfolderdlg)
function publishs();override;
begin
return array("name","caption",
"defaultdir","rootfolder","folder");
"defaultdir","rootfolder","folder","onnotification");
end
end
@ -5350,7 +5350,7 @@ type TMenu = class(TcustomMenu)
function publishs();override;
begin
return array("action","bitmap","caption","checked","enabled","name","tseparator",
"onclick","onrbuttonup","onselect");
"onclick","onrbuttonup","onselect","onnotification");
end
end
type TPopupmenu=class(TcustomPopupmenu)
@ -5363,7 +5363,7 @@ type TPopupmenu=class(TcustomPopupmenu)
end
function publishs();override;
begin
return array("name","caption","enabled","onrbuttonup");
return array("name","caption","enabled","onrbuttonup","onnotification");
end
end
type TMainmenu = class(TcustomMainmenu)
@ -5809,7 +5809,7 @@ type TSocketClient=class(TSocketInterface)
function publishs();override;
begin
return array("name","handle","ip","port","ipproto",
"onclose","onconnected","onread","onwrite","onaccept","onerror");
"onclose","onconnected","onread","onwrite","onaccept","onerror","onnotification");
end
end
type TSocketAccept=class(TSocketInterface)
@ -5863,7 +5863,7 @@ type TSocketAccept=class(TSocketInterface)
function publishs();override;
begin
return array("name","handle","ip","port","ipproto",
"onread","onwrite","onaccept","onerror");
"onread","onwrite","onaccept","onerror","onnotification");
end
end
type TSocketServer=class(TSocketInterface)
@ -5981,7 +5981,7 @@ type TSocketServer=class(TSocketInterface)
function publishs();override;
begin
return array("name","handle","ip","port","ipproto",
"onclose","onconnected","onread","onwrite","onaccept","onerror");
"onclose","onconnected","onread","onwrite","onaccept","onerror","onnotification");
end
end
type TClipBoard = class(TcustomClipBoard)
@ -6567,7 +6567,7 @@ type TQuotations=class(tcomponent)
property Script:text read FScript write FScript;
function publishs();override;
begin
return array("name","ids","subs","globalvariable","script","oncallback");
return array("name","ids","subs","globalvariable","script","oncallback","onnotification");
end
{**
@param(OnCallBack)(function[TQuotations]) 执行回调 %%
@ -6802,7 +6802,7 @@ type tlogincontrol=class(tpanel)
end
function publishs();override;
begin
return lowercase(array("name","port","ip","usrname","onlogined"));
return lowercase(array("name","port","ip","usrname","onlogined","onnotification"));
end
property Port:string read GetPort write SetPort;
property Ip:string read GetIp write SetIp;

View File

@ -25,14 +25,20 @@ type tcustomcoolbar=class(tcustomcontrol)
fdragbtncolor := _wapi.GetSysColor(COLOR_MENUBAR);
end
function ControlAppended(AControl);override;
begin
if fcoolbands then
begin
it := new tcoolband(AControl);
fcoolbands.appendrow(it);
end
end
function ControlDeleted(AControl);override;
begin
if fcoolbands then
begin
fcoolbands.deleteitem(AControl,true);
end
end
function Notification(o,op);override;
begin
if class(tcoolbarlocker).haslocker then return ;
@ -264,6 +270,7 @@ type tcustomcoolbar=class(tcustomcontrol)
end
function Recycling();override;
begin
fcoolbands := nil;
inherited;
FDRageimglist := nil;
end

View File

@ -3918,7 +3918,7 @@ type TCustomComboBoxbase=class(TCustomControl)
inherited;
end
published
property ItemIndex:lazytsl read GetItemIndex write SetItemIndex;
property ItemIndex:tsl read GetItemIndex write SetItemIndex;
property OnSelchanged:eventhandler read FOnSelchanged write FOnSelchanged;
property ondropdown:eventhandler read Fondropdown write Fondropdown;
property oncloseup:eventhandler read Foncloseup write Foncloseup;