parent
8cd45006e2
commit
b22c97eebb
|
|
@ -6814,6 +6814,7 @@ type TPropGrid = class(TTSLDataGrid)
|
||||||
end
|
end
|
||||||
function clickediter(o,e);
|
function clickediter(o,e);
|
||||||
begin
|
begin
|
||||||
|
return FDesigner.openclassfile();//
|
||||||
if FComponent then
|
if FComponent then
|
||||||
FDesigner.AddAndOPenEvent(FComponent.TreeNode);//DBLClickComponent();
|
FDesigner.AddAndOPenEvent(FComponent.TreeNode);//DBLClickComponent();
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1693,7 +1693,6 @@ type TEditer=class(TCustomcontrol) //
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
DeletePageItem(it);
|
DeletePageItem(it);
|
||||||
ECHO "==222=>>>";
|
|
||||||
end;
|
end;
|
||||||
FFindWnd := new TFindWnd(self); //²éÕÒ
|
FFindWnd := new TFindWnd(self); //²éÕÒ
|
||||||
FGotoLineWnd := new TGoToLineWnd(self); //¹²Í¬
|
FGotoLineWnd := new TGoToLineWnd(self); //¹²Í¬
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,7 @@ type TTslDebuga=class(TCustomControl)
|
||||||
begin
|
begin
|
||||||
if not FValewnd then
|
if not FValewnd then
|
||||||
begin
|
begin
|
||||||
FValewnd := new TTSLDataGrid(self);
|
FValewnd := new tdbgvalueshowgrid(self);
|
||||||
FValewnd.Visible := false;
|
FValewnd.Visible := false;
|
||||||
FValewnd.Caption := "Value";
|
FValewnd.Caption := "Value";
|
||||||
FValewnd.left := owner.left+100;
|
FValewnd.left := owner.left+100;
|
||||||
|
|
@ -2004,7 +2004,7 @@ end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
type TTSLDataGrid=class(TDrawGrid)
|
type tdbgvalueshowgrid=class(TDrawGrid)
|
||||||
{**
|
{**
|
||||||
@explan(说明)TSL数组和对象展示 %%
|
@explan(说明)TSL数组和对象展示 %%
|
||||||
**}
|
**}
|
||||||
|
|
@ -2235,7 +2235,7 @@ type TTSLDataGrid=class(TDrawGrid)
|
||||||
return v;
|
return v;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
o := new TTSlDataGrid(initializeapplication());
|
o := new tdbgvalueshowgrid(initializeapplication());
|
||||||
o.ControlIndexs(idexs);
|
o.ControlIndexs(idexs);
|
||||||
o.height := 500;
|
o.height := 500;
|
||||||
o.width := 500;
|
o.width := 500;
|
||||||
|
|
|
||||||
|
|
@ -1277,6 +1277,7 @@ type tsgtkapi = class(tgtkapis)
|
||||||
begin
|
begin
|
||||||
g_object_set_data(hMenu,"popmenubarwindow",hWnd);
|
g_object_set_data(hMenu,"popmenubarwindow",hWnd);
|
||||||
gtk_menu_popup(hmenu,0,0,0,0,3,0);//µ¯³ö
|
gtk_menu_popup(hmenu,0,0,0,0,3,0);//µ¯³ö
|
||||||
|
//popup_at_rect(hmenu,0,array(x,y,-1,-1),0,0,0);
|
||||||
return 1;
|
return 1;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
|
|
@ -3449,6 +3450,13 @@ type tgtkapis = class() //gtk
|
||||||
data:pointer;
|
data:pointer;
|
||||||
button:integer;
|
button:integer;
|
||||||
activate_time:integer);cdecl;external 'libgtk-3.so';
|
activate_time:integer);cdecl;external 'libgtk-3.so';
|
||||||
|
procedure popup_at_rect(
|
||||||
|
menu:pointer;
|
||||||
|
rect_window:pointer;
|
||||||
|
var rect : array of integer;
|
||||||
|
rect_anchor:pointer;
|
||||||
|
menu_anchor:pointer;
|
||||||
|
trigger_event:pointer);cdecl;external 'libgtk-3.so';
|
||||||
procedure gtk_menu_item_activate(mi:pointer);cdecl;external 'libgtk-3.so';
|
procedure gtk_menu_item_activate(mi:pointer);cdecl;external 'libgtk-3.so';
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2025,7 +2025,12 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd)
|
||||||
if bb[0]=ee[0]then
|
if bb[0]=ee[0]then
|
||||||
begin
|
begin
|
||||||
s := fLines[bb[0]-1].FStr;
|
s := fLines[bb[0]-1].FStr;
|
||||||
if ee[1]>bb[1]and ee[1]>1 then r := s[bb[1]:ee[1]-1]; //可能出错
|
if ee[1]>bb[1]and ee[1]>1 then
|
||||||
|
try
|
||||||
|
r := s[bb[1]:ee[1]-1]; //可能出错,添加try
|
||||||
|
except
|
||||||
|
r := "";
|
||||||
|
end;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
//第一行
|
//第一行
|
||||||
|
|
|
||||||
|
|
@ -1555,7 +1555,8 @@ type TNode = class()
|
||||||
@param(Expanded)(bool) 是否展开 %%
|
@param(Expanded)(bool) 是否展开 %%
|
||||||
@param(Parent)(TNode) 父节点 %%
|
@param(Parent)(TNode) 父节点 %%
|
||||||
**}
|
**}
|
||||||
protected property CurrentDeleteNode read FCurrentDeleteNode write FCurrentDeleteNode;
|
protected
|
||||||
|
property CurrentDeleteNode read FCurrentDeleteNode write FCurrentDeleteNode;
|
||||||
property CurrentAddNode read FCurrentAddNode write FCurrentAddNode;
|
property CurrentAddNode read FCurrentAddNode write FCurrentAddNode;
|
||||||
{**
|
{**
|
||||||
@ignoremembers(CurrentDeleteNode,CurrentAddNode)
|
@ignoremembers(CurrentDeleteNode,CurrentAddNode)
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ type TGdi = class(TSLUIBASE)
|
||||||
end
|
end
|
||||||
type Tcustomfont = class(tgdi)
|
type Tcustomfont = class(tgdi)
|
||||||
private
|
private
|
||||||
|
fdwfacename;
|
||||||
FHeight;
|
FHeight;
|
||||||
FWidth;
|
FWidth;
|
||||||
Fescapement;
|
Fescapement;
|
||||||
|
|
@ -283,8 +284,16 @@ type Tcustomfont = class(tgdi)
|
||||||
end
|
end
|
||||||
function Setfacename(v)
|
function Setfacename(v)
|
||||||
begin
|
begin
|
||||||
if ifstring(v)and v <> Ffacename and length(v)<= 32 then
|
{$ifdef linux}
|
||||||
|
|
||||||
|
{$else}
|
||||||
|
if not(v in fdwfacename) then
|
||||||
begin
|
begin
|
||||||
|
return ;
|
||||||
|
end
|
||||||
|
{$endif}
|
||||||
|
if ifstring(v)and v <> Ffacename and length(v)<= 32 then
|
||||||
|
begin
|
||||||
Ffacename := v;
|
Ffacename := v;
|
||||||
onchange();
|
onchange();
|
||||||
end
|
end
|
||||||
|
|
@ -347,6 +356,7 @@ type Tcustomfont = class(tgdi)
|
||||||
function create();override;
|
function create();override;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
fdwfacename := array( "ÐÂËÎÌå","ËÎÌå","Courier New");
|
||||||
fheight := 15;
|
fheight := 15;
|
||||||
fwidth := 7;
|
fwidth := 7;
|
||||||
fescapement := 0;
|
fescapement := 0;
|
||||||
|
|
@ -399,6 +409,14 @@ type Tcustomfont = class(tgdi)
|
||||||
begin
|
begin
|
||||||
v0 := v[0];
|
v0 := v[0];
|
||||||
vsv := vs[v0];
|
vsv := vs[v0];
|
||||||
|
{$ifdef linux}
|
||||||
|
|
||||||
|
{$else}
|
||||||
|
if v0="facename" and not(vsv in fdwfacename ) then
|
||||||
|
begin
|
||||||
|
continue;
|
||||||
|
end
|
||||||
|
{$endif}
|
||||||
if not ifnil(vsv)then
|
if not ifnil(vsv)then
|
||||||
begin
|
begin
|
||||||
ovi := invoke(self,"f"+v0);
|
ovi := invoke(self,"f"+v0);
|
||||||
|
|
|
||||||
|
|
@ -3570,10 +3570,23 @@ type TcustomToolButton=class(tcomponent)
|
||||||
end
|
end
|
||||||
function DoOnClick(o,e);virtual;
|
function DoOnClick(o,e);virtual;
|
||||||
begin
|
begin
|
||||||
|
if Parent then
|
||||||
|
begin
|
||||||
|
if FPopupMenu is class(TcustomPopupmenu) then
|
||||||
|
begin
|
||||||
|
Parent.PopupMenu := FPopupMenu;
|
||||||
|
rec := GetRect();
|
||||||
|
xy := Parent.clienttoscreen(rec[0],rec[3]);
|
||||||
|
uf := TPM_LEFTALIGN .| TPM_TOPALIGN .| TPM_RIGHTBUTTON;
|
||||||
|
_wapi.TrackPopupMenu(FPopupMenu.Handle,uf,xy[0],xy[1],0,Parent.Handle,nil);
|
||||||
|
return ;
|
||||||
|
end
|
||||||
|
end
|
||||||
if action and action.Execute()then
|
if action and action.Execute()then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
end else
|
end else
|
||||||
CallMessgeFunction(OnClick,o,e);
|
CallMessgeFunction(OnClick,o,e);
|
||||||
end
|
end
|
||||||
function GetRect();
|
function GetRect();
|
||||||
begin
|
begin
|
||||||
|
|
@ -3585,7 +3598,7 @@ type TcustomToolButton=class(tcomponent)
|
||||||
end
|
end
|
||||||
function publishs();override;
|
function publishs();override;
|
||||||
begin
|
begin
|
||||||
return array("name","caption","enabled","imageid","visible","onclick");
|
return array("name","caption","enabled","imageid","visible","onclick","popupmenu");
|
||||||
end
|
end
|
||||||
function Recycling();override;
|
function Recycling();override;
|
||||||
begin
|
begin
|
||||||
|
|
@ -3600,6 +3613,7 @@ type TcustomToolButton=class(tcomponent)
|
||||||
end
|
end
|
||||||
FToolbar := nil;
|
FToolbar := nil;
|
||||||
inherited;
|
inherited;
|
||||||
|
FPopupMenu := nil;
|
||||||
FCaption := ""; //标题
|
FCaption := ""; //标题
|
||||||
FOnClick := nil; //点击
|
FOnClick := nil; //点击
|
||||||
FImageId :=-1; //imageid
|
FImageId :=-1; //imageid
|
||||||
|
|
@ -3616,6 +3630,7 @@ type TcustomToolButton=class(tcomponent)
|
||||||
property willaddBar read FWillAddbar;
|
property willaddBar read FWillAddbar;
|
||||||
property Action:taction read GetAction write SetAction;
|
property Action:taction read GetAction write SetAction;
|
||||||
property ShortCut read getShortCut write SetShortCut;
|
property ShortCut read getShortCut write SetShortCut;
|
||||||
|
property PopupMenu:tpopupmenu read FPopupMenu write FPopupMenu;
|
||||||
{**
|
{**
|
||||||
@param(OnClick)(function[o:TToolButton;e:tuieventbase]) 点击消息 %%
|
@param(OnClick)(function[o:TToolButton;e:tuieventbase]) 点击消息 %%
|
||||||
@param(Caption)(string) 标题 %%
|
@param(Caption)(string) 标题 %%
|
||||||
|
|
@ -3754,6 +3769,7 @@ type TcustomToolButton=class(tcomponent)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
private
|
private
|
||||||
|
FPopupMenu;//µ¯³ö²Ëµ¥
|
||||||
FCaption; //标题
|
FCaption; //标题
|
||||||
FOnClick; //点击
|
FOnClick; //点击
|
||||||
FCommandId; //command id 可以不要
|
FCommandId; //command id 可以不要
|
||||||
|
|
@ -3802,6 +3818,10 @@ type TcustomToolBar=class(TCustomControl)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function ContextMenu(o,e);override;
|
||||||
|
begin
|
||||||
|
e.skip := true;
|
||||||
|
end
|
||||||
function MouseUp(o,e);override;
|
function MouseUp(o,e);override;
|
||||||
begin
|
begin
|
||||||
if csDesigning in ComponentState then return;
|
if csDesigning in ComponentState then return;
|
||||||
|
|
@ -3874,8 +3894,11 @@ type TcustomToolBar=class(TCustomControl)
|
||||||
begin
|
begin
|
||||||
if not FTipWnd.Visible then
|
if not FTipWnd.Visible then
|
||||||
begin
|
begin
|
||||||
st := FButtons[idx].ShortCut;
|
bt := FButtons[idx];
|
||||||
FTipWnd.Tip := FButtons[idx].Caption+(st?(" ("+st+")"):"");
|
st := bt.ShortCut;
|
||||||
|
if bt.PopupMenu is class(TcustomPopupmenu) then s1 := bt.PopupMenu.Caption;
|
||||||
|
else s1 := bt.Caption;
|
||||||
|
FTipWnd.Tip := s1+(st?(" ("+st+")"):"");
|
||||||
FTipWnd.ShowTIp();
|
FTipWnd.ShowTIp();
|
||||||
end
|
end
|
||||||
end else
|
end else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue