1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-04 16:35:15 -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:
bullzeye95 2009-12-22 06:10:58 +00:00
parent 41587968ef
commit fdf4b9ee35
4 changed files with 1281 additions and 1256 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
object Form1: TForm1
Left = 274
Left = 474
Height = 557
Top = 233
Top = 246
Width = 731
ActiveControl = ScriptPanel
Caption = 'THA FUKING MUFASA'
ClientHeight = 534
ClientHeight = 532
ClientWidth = 731
KeyPreview = True
Menu = MainMenu1
@ -166,8 +166,8 @@ object Form1: TForm1
end
object StatusBar: TStatusBar
Left = 0
Height = 17
Top = 517
Height = 21
Top = 536
Width = 731
Panels = <
item
@ -185,7 +185,7 @@ object Form1: TForm1
object PanelMemo: TPanel
Left = 0
Height = 154
Top = 363
Top = 382
Width = 731
Align = alBottom
ClientHeight = 154
@ -205,25 +205,25 @@ object Form1: TForm1
Cursor = crVSplit
Left = 0
Height = 5
Top = 358
Top = 377
Width = 731
Align = alBottom
ResizeAnchor = akBottom
end
object ScriptPanel: TPanel
Left = 0
Height = 334
Height = 353
Top = 24
Width = 731
Align = alClient
BevelOuter = bvNone
Caption = 'ScriptPanel'
ClientHeight = 334
ClientHeight = 353
ClientWidth = 731
TabOrder = 4
object PageControl1: TPageControl
Left = 0
Height = 299
Height = 318
Top = 0
Width = 731
Align = alClient
@ -236,12 +236,13 @@ object Form1: TForm1
OnDragDrop = PageControl1DragDrop
OnDragOver = PageControl1DragOver
OnMouseDown = PageControl1MouseDown
OnMouseUp = PageControl1MouseUp
OnPageChanged = PageControl1Change
end
object SearchPanel: TPanel
Left = 0
Height = 35
Top = 299
Top = 318
Width = 731
Align = alBottom
BevelOuter = bvSpace
@ -345,10 +346,10 @@ object Form1: TForm1
EditLabel.AnchorSideTop.Side = asrCenter
EditLabel.AnchorSideRight.Control = LabeledEditSearch
EditLabel.AnchorSideBottom.Control = LabeledEditSearch
EditLabel.Left = 67
EditLabel.Left = 65
EditLabel.Height = 18
EditLabel.Top = 10
EditLabel.Width = 34
EditLabel.Width = 36
EditLabel.Caption = 'Find: '
EditLabel.ParentColor = False
LabelPosition = lpLeft
@ -361,9 +362,9 @@ object Form1: TForm1
end
object CheckBoxMatchCase: TCheckBox
Left = 320
Height = 20
Height = 22
Top = 7
Width = 95
Width = 98
Caption = 'Match case'
OnClick = CheckBoxMatchCaseClick
TabOrder = 1

File diff suppressed because it is too large Load Diff

View File

@ -241,6 +241,8 @@ type
State: TDragState; var Accept: Boolean);
procedure PageControl1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure PageControl1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure ProcessDebugStream(Sender: TObject);
procedure ScriptPopupPopup(Sender: TObject);
procedure SpeedButtonSearchClick(Sender: TObject);
@ -1166,17 +1168,35 @@ end;
procedure TForm1.PageControl1DragOver(Sender, Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean);
var
Pos: Integer;
begin
if Sender = PageControl1 then;
Accept := True;
Pos := PageControl1.TabIndexAtClientPos(Point(x,y));
if (Pos <> PageControl1.TabIndex) and (Pos <> -1) then
PageControl1.DragCursor := crDrag
else
PageControl1.DragCursor := crNo;
Accept := PageControl1.DragCursor = crDrag;
end;
procedure TForm1.PageControl1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
{$ifdef mswindows}
PageControl1.BeginDrag(false);
{$endif}
if(Button = mbLeft)then
begin
{$ifdef linux}
PageControl1.TabIndex := PageControl1.TabIndexAtClientPos(Point(x,y));
{$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;
function TForm1.GetScriptState: TScriptState;