mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-01 05:12:16 -05:00
Made tabs draggable in Linux, made middle click close tabs, and a couple of other tab-related changes that I can't remember
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@316 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
41587968ef
commit
fdf4b9ee35
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,11 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 274
|
Left = 474
|
||||||
Height = 557
|
Height = 557
|
||||||
Top = 233
|
Top = 246
|
||||||
Width = 731
|
Width = 731
|
||||||
ActiveControl = ScriptPanel
|
ActiveControl = ScriptPanel
|
||||||
Caption = 'THA FUKING MUFASA'
|
Caption = 'THA FUKING MUFASA'
|
||||||
ClientHeight = 534
|
ClientHeight = 532
|
||||||
ClientWidth = 731
|
ClientWidth = 731
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
Menu = MainMenu1
|
Menu = MainMenu1
|
||||||
@ -166,8 +166,8 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object StatusBar: TStatusBar
|
object StatusBar: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 17
|
Height = 21
|
||||||
Top = 517
|
Top = 536
|
||||||
Width = 731
|
Width = 731
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
@ -185,7 +185,7 @@ object Form1: TForm1
|
|||||||
object PanelMemo: TPanel
|
object PanelMemo: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 154
|
Height = 154
|
||||||
Top = 363
|
Top = 382
|
||||||
Width = 731
|
Width = 731
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
ClientHeight = 154
|
ClientHeight = 154
|
||||||
@ -205,25 +205,25 @@ object Form1: TForm1
|
|||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 5
|
Height = 5
|
||||||
Top = 358
|
Top = 377
|
||||||
Width = 731
|
Width = 731
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
ResizeAnchor = akBottom
|
ResizeAnchor = akBottom
|
||||||
end
|
end
|
||||||
object ScriptPanel: TPanel
|
object ScriptPanel: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 334
|
Height = 353
|
||||||
Top = 24
|
Top = 24
|
||||||
Width = 731
|
Width = 731
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Caption = 'ScriptPanel'
|
Caption = 'ScriptPanel'
|
||||||
ClientHeight = 334
|
ClientHeight = 353
|
||||||
ClientWidth = 731
|
ClientWidth = 731
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 299
|
Height = 318
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 731
|
Width = 731
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@ -236,12 +236,13 @@ object Form1: TForm1
|
|||||||
OnDragDrop = PageControl1DragDrop
|
OnDragDrop = PageControl1DragDrop
|
||||||
OnDragOver = PageControl1DragOver
|
OnDragOver = PageControl1DragOver
|
||||||
OnMouseDown = PageControl1MouseDown
|
OnMouseDown = PageControl1MouseDown
|
||||||
|
OnMouseUp = PageControl1MouseUp
|
||||||
OnPageChanged = PageControl1Change
|
OnPageChanged = PageControl1Change
|
||||||
end
|
end
|
||||||
object SearchPanel: TPanel
|
object SearchPanel: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 35
|
Height = 35
|
||||||
Top = 299
|
Top = 318
|
||||||
Width = 731
|
Width = 731
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvSpace
|
BevelOuter = bvSpace
|
||||||
@ -345,10 +346,10 @@ object Form1: TForm1
|
|||||||
EditLabel.AnchorSideTop.Side = asrCenter
|
EditLabel.AnchorSideTop.Side = asrCenter
|
||||||
EditLabel.AnchorSideRight.Control = LabeledEditSearch
|
EditLabel.AnchorSideRight.Control = LabeledEditSearch
|
||||||
EditLabel.AnchorSideBottom.Control = LabeledEditSearch
|
EditLabel.AnchorSideBottom.Control = LabeledEditSearch
|
||||||
EditLabel.Left = 67
|
EditLabel.Left = 65
|
||||||
EditLabel.Height = 18
|
EditLabel.Height = 18
|
||||||
EditLabel.Top = 10
|
EditLabel.Top = 10
|
||||||
EditLabel.Width = 34
|
EditLabel.Width = 36
|
||||||
EditLabel.Caption = 'Find: '
|
EditLabel.Caption = 'Find: '
|
||||||
EditLabel.ParentColor = False
|
EditLabel.ParentColor = False
|
||||||
LabelPosition = lpLeft
|
LabelPosition = lpLeft
|
||||||
@ -361,9 +362,9 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object CheckBoxMatchCase: TCheckBox
|
object CheckBoxMatchCase: TCheckBox
|
||||||
Left = 320
|
Left = 320
|
||||||
Height = 20
|
Height = 22
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 95
|
Width = 98
|
||||||
Caption = 'Match case'
|
Caption = 'Match case'
|
||||||
OnClick = CheckBoxMatchCaseClick
|
OnClick = CheckBoxMatchCaseClick
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -241,6 +241,8 @@ type
|
|||||||
State: TDragState; var Accept: Boolean);
|
State: TDragState; var Accept: Boolean);
|
||||||
procedure PageControl1MouseDown(Sender: TObject; Button: TMouseButton;
|
procedure PageControl1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure PageControl1MouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
procedure ProcessDebugStream(Sender: TObject);
|
procedure ProcessDebugStream(Sender: TObject);
|
||||||
procedure ScriptPopupPopup(Sender: TObject);
|
procedure ScriptPopupPopup(Sender: TObject);
|
||||||
procedure SpeedButtonSearchClick(Sender: TObject);
|
procedure SpeedButtonSearchClick(Sender: TObject);
|
||||||
@ -1166,17 +1168,35 @@ end;
|
|||||||
|
|
||||||
procedure TForm1.PageControl1DragOver(Sender, Source: TObject; X, Y: Integer;
|
procedure TForm1.PageControl1DragOver(Sender, Source: TObject; X, Y: Integer;
|
||||||
State: TDragState; var Accept: Boolean);
|
State: TDragState; var Accept: Boolean);
|
||||||
|
var
|
||||||
|
Pos: Integer;
|
||||||
begin
|
begin
|
||||||
if Sender = PageControl1 then;
|
Pos := PageControl1.TabIndexAtClientPos(Point(x,y));
|
||||||
Accept := True;
|
if (Pos <> PageControl1.TabIndex) and (Pos <> -1) then
|
||||||
|
PageControl1.DragCursor := crDrag
|
||||||
|
else
|
||||||
|
PageControl1.DragCursor := crNo;
|
||||||
|
Accept := PageControl1.DragCursor = crDrag;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.PageControl1MouseDown(Sender: TObject; Button: TMouseButton;
|
procedure TForm1.PageControl1MouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
begin
|
begin
|
||||||
{$ifdef mswindows}
|
if(Button = mbLeft)then
|
||||||
PageControl1.BeginDrag(false);
|
begin
|
||||||
|
{$ifdef linux}
|
||||||
|
PageControl1.TabIndex := PageControl1.TabIndexAtClientPos(Point(x,y));
|
||||||
{$endif}
|
{$endif}
|
||||||
|
PageControl1.BeginDrag(false, 10);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.PageControl1MouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
if(Button = mbMiddle) and (not(PageControl1.Dragging))then
|
||||||
|
if(PageControl1.TabIndexAtClientPos(Point(x,y)) <> -1)then
|
||||||
|
DeleteTab(PageControl1.TabIndexAtClientPos(Point(x,y)), False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TForm1.GetScriptState: TScriptState;
|
function TForm1.GetScriptState: TScriptState;
|
||||||
|
Loading…
Reference in New Issue
Block a user