parent
35e7ed4ea5
commit
9d8d0ac2dc
|
|
@ -145,7 +145,7 @@ type TPage=class(TCustomControl) //
|
|||
r := inherited;
|
||||
FPageRect := R;
|
||||
r[1]+= FLineHeight * FLines; //FLabelsheight;
|
||||
FPageRect[3]:= r[1];
|
||||
FPageRect[3]:= r[1];
|
||||
return r;
|
||||
end
|
||||
function Paint();override; //삥齡
|
||||
|
|
@ -1087,6 +1087,7 @@ type TPageEditerItem=class(TPageItem)
|
|||
FGetInfoText := "";
|
||||
FLastVersion := "";
|
||||
FEditer := new TFTSLScriptMemo(AOwner);
|
||||
FEditer.Align := FEditer.alClient;
|
||||
FEditer.Visible := false;
|
||||
FEditer._Tag := self;
|
||||
end
|
||||
|
|
@ -1539,7 +1540,7 @@ type TPageEditer=class(TPage) //
|
|||
it := Currentitem;
|
||||
if it then
|
||||
begin
|
||||
it.FEditer.SetBoundsRect(self.ClientRect);
|
||||
it.FEditer.SetBoundsRect(getediterrect());
|
||||
it.FEditer.Visible := true;
|
||||
it.FEditer.SetFocus();
|
||||
end
|
||||
|
|
@ -1564,11 +1565,16 @@ type TPageEditer=class(TPage) //
|
|||
it := CurrentItem;
|
||||
if it then
|
||||
begin
|
||||
it.FEditer.SetBoundsRect(self.ClientRect);
|
||||
it.FEditer.SetBoundsRect(getediterrect(trc));
|
||||
end
|
||||
end
|
||||
property PageItemOnRClick read FPageItemOnRClick write FPageItemOnRClick;
|
||||
private
|
||||
function getediterrect();
|
||||
begin
|
||||
rc := ClientRect;
|
||||
return rc;
|
||||
end
|
||||
FPageItemOnRClick;
|
||||
end
|
||||
type TTslChmHelp=class
|
||||
|
|
@ -1604,10 +1610,6 @@ type TTslChmHelp=class
|
|||
FChmName;
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
type TEditer=class(TCustomcontrol) //관윅묏야으,榴檄으,渴놔,꿴冷
|
||||
function Create(AOwner);override;
|
||||
begin
|
||||
|
|
@ -1630,7 +1632,7 @@ type TEditer=class(TCustomcontrol) //
|
|||
fcoolbar := new tcoolbar(self);
|
||||
ftoolbara.Align := alNone;
|
||||
ftoolbarb.Align := alNone;
|
||||
ftoolbara.Width := 400;
|
||||
ftoolbara.Width := 430;
|
||||
ftoolbarb.Width := 250;
|
||||
fcoolbar.autosize := true;
|
||||
FInfoShowWnd := new TEditerAuxiliary(self);
|
||||
|
|
@ -1730,8 +1732,8 @@ type TEditer=class(TCustomcontrol) //
|
|||
////////////
|
||||
FPageEditer.PageItemOnRClick := thisfunction(PageItemOnRClick);
|
||||
FImages := new TControlImageList(self);
|
||||
FImages.Width := 22;
|
||||
FImages.Height := 22;
|
||||
FImages.Width := 24;
|
||||
FImages.Height := 24;
|
||||
bmp := new TBitmap();
|
||||
imgs := GetEditIcons();
|
||||
id := 0;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ type TFTSLScriptcustomMemo=class(TSYNmemoNorm)
|
|||
//134
|
||||
//font := array("facename":"Courier New");
|
||||
autogutterwidth := true;
|
||||
ongutterclick := function()begin
|
||||
SwitchMarkLine(CaretY-1);
|
||||
end
|
||||
end
|
||||
function DoCaretPosChanged();override;
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ function getbackwardbitmapinfo();
|
|||
function getforwardbitmapinfo();
|
||||
function getunredobitmapinfo();
|
||||
function gettslsyntaxcheckbitmapinfo();
|
||||
function gettslcodemapbitmapinfo();
|
||||
function gettslcodemapbitmapinfo();
|
||||
function getquickkeybitmapinfo();
|
||||
function getfindbitmapinfo();
|
||||
function gettslcodeformatbitmapinfo();
|
||||
|
|
@ -434,29 +434,29 @@ end
|
|||
function geteditcommetbmpinfo();
|
||||
begin
|
||||
return "0502000000060400000074797065000203000000696D670006040000006461746
|
||||
100021201000089504E470D0A1A0A0000000D4948445200000020000000200806
|
||||
000000737A7AF4000000017352474200AECE1CE90000000467414D410000B18F0
|
||||
BFC6105000000097048597300000EC300000EC301C76FA864000000A749444154
|
||||
5847ED94410A80201045BB9377F20A6EBD9757F03A82BB8909021333B56F1AF8E
|
||||
0D3A2181F8CFD8D06B30496C09C02CE39B2D642C333532405A4942484808667A6
|
||||
985360F80ABEE41F02C6986387FC445324105E26B444D125D45A6725C26FEF02E
|
||||
F81538287A7DEC781F740578170058C52EA32ACFB0A42BCF7D9C3DFF228C0F0A1
|
||||
437FC39ECC2910F70022F01EA80DBC076AD3DC03A834F7406F96C012182C40B40
|
||||
319335F36295E4B140000000049454E44AE42608200";
|
||||
10002E000000089504E470D0A1A0A0000000D4948445200000018000000180806
|
||||
000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F0
|
||||
BFC6105000000097048597300000EC300000EC301C76FA8640000007549444154
|
||||
484BDD91810AC0200844FD73FD73C7A0C1C5AE6491B2EDC14122F8D0C493F9994
|
||||
044B604A91564F02E013B070BD255AADA5E1C368C05E9AAB36966ADDAC34DB05B
|
||||
42052309F667418602F61FD89F05A93F51EA2747C3AF0DA3207D15C086B1208F0
|
||||
42BD40AD8BA2B416A05197C5DE07E00DBBA3D2C5C7DBE710000000049454E44AE
|
||||
42608200";
|
||||
end
|
||||
function getedituncommetbmpinfo();
|
||||
begin
|
||||
return "0502000000060400000074797065000203000000696D670006040000006461746
|
||||
100022001000089504E470D0A1A0A0000000D4948445200000020000000200806
|
||||
000000737A7AF4000000017352474200AECE1CE90000000467414D410000B18F0
|
||||
BFC6105000000097048597300000EC300000EC301C76FA864000000B549444154
|
||||
5847ED95C109C5200C40FF4E4EE15D07D0832B787142F1EC0C2EE03925FC2A9F9
|
||||
2160A7EE3C10739546DF220113FC0CC16D8026B0AD45A21A5343430270529E09C
|
||||
0321C4D0C09C146B0AB0B76026EB0B78EF2184707E8DE751008BB721C23EFE035
|
||||
2A094024AA95EDC180331C63E5039E7F3E497B6FE14AF86504AD98BDF45039353
|
||||
FBD778750DD905B0055AEBFEB3B5766E0B1A6C43F80BEB359CC19A02EC8F11FB7
|
||||
3CC2EC0DE82996C812DC02C0070005765629339C9EFE60000000049454E44AE42
|
||||
608200";
|
||||
100025801000089504E470D0A1A0A0000000D4948445200000018000000180806
|
||||
000000E0773DF8000000017352474200AECE1CE90000000467414D410000B18F0
|
||||
BFC6105000000097048597300000EC300000EC301C76FA864000000ED49444154
|
||||
484BDD953B0A8430144567B51696767636765676762EC0156821042C04B1B6D24
|
||||
2100B17203677484C243209F8990C8C076E212F794793105F30CC8304F33CA3EB
|
||||
3A344D732B7DDF635916DE5512144501CBB2BE92344D79574950D7351CC7514E3
|
||||
813D775D9CB0A1EB4C9572184A0AA2AFEF4C92D411445DBDAEBD809A669521E3D
|
||||
1119B9791886C8B20C6559A26D5B3E626513D0CF141374F17D9F8D4D924459175
|
||||
19EA23382388E957511ED313DBA44C330C0F33CD6CCB66DE479BE8DA13D642E6F
|
||||
B22CA119C79157F65C1650A8240802B6C93A6E098EF03B81F1CBCEF8756DFC876
|
||||
38A7F17006F3815FF63AEDCF5A00000000049454E44AE42608200";
|
||||
end
|
||||
function GetSaveFileBitmapInfo();
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -4619,7 +4619,14 @@ type tgtk_ctl_object = class(_gtkeventtype)
|
|||
_wapi.ScreenToClient(id,p);
|
||||
mp := makelong(p[0],p[1]);
|
||||
//CallTslVclProc(id,_const.WM_NCHITTEST,0,makelong(p[0],p[1]));
|
||||
AddMessageToGtkMessageQueue(id,_const.WM_MOUSEMOVE,0,mp,0);
|
||||
//echo "\r\n",nfer;
|
||||
global g_gtk_keytable,g_gtk_buttontable;
|
||||
wp := 0;
|
||||
if g_gtk_keytable[0x10] then wp .|= 0x0004;
|
||||
if g_gtk_keytable[0x11] then wp .|= 0x0008;
|
||||
wp .|= g_gtk_buttontable[0];
|
||||
wp .|= g_gtk_buttontable[1];
|
||||
AddMessageToGtkMessageQueue(id,_const.WM_MOUSEMOVE,wp,mp,0);
|
||||
end
|
||||
function DefaultMessageDo(msg,w,l);virtual;
|
||||
begin
|
||||
|
|
@ -4863,8 +4870,6 @@ type tgtk_ctl_object = class(_gtkeventtype)
|
|||
begin
|
||||
mn := GetGtkEventNameOrId(b); // _send_
|
||||
global g_current_get_focus_widget,g_current_loss_focus_widget,g_gtk_buttontable,G_GTK_WINDOW_ACTIVATE, g_gtk_keytable;
|
||||
if not ifarray(g_gtk_buttontable) then g_gtk_buttontable := array(0,0);
|
||||
if not ifarray(g_gtk_keytable) then g_gtk_keytable := array(0x10:0,0x11:0,0x12:0);
|
||||
if mn = "event" then
|
||||
begin
|
||||
e := new _GdkEventAny(c);
|
||||
|
|
@ -4883,7 +4888,6 @@ type tgtk_ctl_object = class(_gtkeventtype)
|
|||
end
|
||||
GDK_BUTTON_PRESS:
|
||||
begin
|
||||
|
||||
e := new _GdkEventButton(c);
|
||||
psi := makelong(integer(e.x),integer(e.y));
|
||||
//r := array();
|
||||
|
|
@ -4899,7 +4903,7 @@ type tgtk_ctl_object = class(_gtkeventtype)
|
|||
case e.button of
|
||||
1:
|
||||
begin
|
||||
|
||||
wp .|=0x1;
|
||||
g_gtk_buttontable[0] := _const.MK_LButton;
|
||||
if FHitwidgetposition in array(10,11,12,15) then
|
||||
begin
|
||||
|
|
@ -4914,7 +4918,8 @@ type tgtk_ctl_object = class(_gtkeventtype)
|
|||
_wapi.g_object_get_data(h,"gtk_layout_y"),
|
||||
_wapi.g_object_get_data(h,"gtk_layout_width"),
|
||||
_wapi.g_object_get_data(h,"gtk_layout_height"))
|
||||
);
|
||||
);
|
||||
|
||||
CallTslVclProc(_const.WM_NCLBUTTONDOWN ,wp,psi);
|
||||
|
||||
end else
|
||||
|
|
@ -4924,8 +4929,8 @@ type tgtk_ctl_object = class(_gtkeventtype)
|
|||
end
|
||||
3:
|
||||
begin
|
||||
g_gtk_buttontable[1] := _const.MK_RButton;
|
||||
|
||||
wp .|=0x2;
|
||||
g_gtk_buttontable[1] := _const.MK_RButton;
|
||||
CallTslVclProc(_const.WM_RBUTTONDOWN ,wp,psi);
|
||||
end
|
||||
end ;
|
||||
|
|
@ -4944,22 +4949,23 @@ type tgtk_ctl_object = class(_gtkeventtype)
|
|||
GDK_BUTTON_RELEASE:
|
||||
begin
|
||||
//t := 1+"1234";
|
||||
e := new _GdkEventButton(c);
|
||||
|
||||
e := new _GdkEventButton(c);
|
||||
psi := makelong(integer(e.x),integer(e.y));
|
||||
wp := 0;
|
||||
if ifarray(g_gtk_keytable) then
|
||||
begin
|
||||
if g_gtk_keytable[0x10] then wp .|= 0x0004;
|
||||
if g_gtk_keytable[0x11] then wp .|= 0x0008;
|
||||
end
|
||||
end
|
||||
case e.button of
|
||||
1:
|
||||
begin
|
||||
wp .|=0x1;
|
||||
g_gtk_buttontable[0] := 0;
|
||||
CallTslVclProc(_const.WM_LBUTTONUP ,wp,psi);
|
||||
end
|
||||
3:begin
|
||||
wp .|=0x2;
|
||||
g_gtk_buttontable[1] := 0;
|
||||
CallTslVclProc(_const.WM_RBUTTONUP ,wp,psi);
|
||||
//if not hasMessageFromGtkMessageQueue(a.handle,_const.LM_CONTEXTMENU ) then
|
||||
|
|
@ -7120,9 +7126,15 @@ CAIRO_OPERATOR_HSL_COLOR:=27;
|
|||
CAIRO_OPERATOR_HSL_LUMINOSITY:=28;
|
||||
}
|
||||
function gtk_init_check(argc:string;argcv:string):integer;cdecl;external 'libgtk-3.so';
|
||||
initialization
|
||||
global g_w_i_datas,g_w_c_width;
|
||||
function igtk();
|
||||
begin
|
||||
global g_w_i_datas,g_w_c_width, g_gtk_buttontable,g_gtk_keytable;
|
||||
gtk_init_check(nil,nil);
|
||||
g_w_i_datas := array();
|
||||
g_w_c_width := 35;
|
||||
g_gtk_buttontable := array(0,0);
|
||||
g_gtk_keytable := array(0x10:0,0x11:0,0x12:0);
|
||||
end
|
||||
initialization
|
||||
igtk();
|
||||
end.
|
||||
|
|
@ -632,6 +632,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
@explan(说明) 带滚动条的编辑控件 %%
|
||||
**}
|
||||
private
|
||||
fongutterclick;//µã»÷
|
||||
ftmemlockv;
|
||||
fundoing; //清空unredo标记
|
||||
fredoing; //清空unredo标记
|
||||
|
|
@ -1120,7 +1121,12 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
ComputeAndSelToCaret(e.ypos,e.xpos);
|
||||
end else
|
||||
begin
|
||||
ComputeCaret(e.xpos,e.ypos);
|
||||
x := e.xpos;
|
||||
if fongutterclick and x>2 and x<(GutterWidth-10) then
|
||||
begin
|
||||
callgcall := true;
|
||||
end
|
||||
ComputeCaret(x,e.ypos);
|
||||
ClearSelBlock();
|
||||
ClipCursor();
|
||||
end
|
||||
|
|
@ -1135,6 +1141,14 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
finally
|
||||
DecPaintLock();
|
||||
end ;
|
||||
if callgcall then
|
||||
begin
|
||||
if fongutterclick then
|
||||
begin
|
||||
CallMessgeFunction(fongutterclick,o,e);
|
||||
end
|
||||
//echo "\r\n callgutter->:",CaretY;
|
||||
end
|
||||
|
||||
end
|
||||
function MouseMove(o,e);override;//移动
|
||||
|
|
@ -1572,6 +1586,7 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
property currentLineColor:color read fcurrentLineColor write setcurrentLineColor;
|
||||
property guttercolor:color read fguttercolor write setguttercolor; //行标颜色
|
||||
property selectbkcolor:color read fselectbkcolor write setselectbkcolor; //选中的颜色
|
||||
property ongutterclick:eventhandler read fongutterclick write fongutterclick;
|
||||
{**
|
||||
@param(ReadOnly)(bool) 是否只读%%
|
||||
@param(Text)(string) 文本%%
|
||||
|
|
@ -1631,6 +1646,11 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
|||
begin
|
||||
fUndoList.MergeReplaceItem(); //
|
||||
end
|
||||
function Recycling();override;
|
||||
begin
|
||||
fongutterclick := nil;
|
||||
inherited;
|
||||
end
|
||||
protected
|
||||
function PrevWordPos(); //处理选择截断
|
||||
begin
|
||||
|
|
|
|||
Loading…
Reference in New Issue