mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 03:48:08 +02:00
IdeInspector: Work with modal too
git-svn-id: trunk@28687 -
This commit is contained in:
parent
be513b35da
commit
77a6748d93
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -4,6 +4,8 @@
|
||||
/COPYING.modifiedLGPL.txt -text svneol=unset#application/octet-stream
|
||||
/COPYING.txt svneol=native#text/plain
|
||||
/README.txt svneol=native#text/plain
|
||||
components/IdeInspector/ideinspectkeygrapper.lfm svneol=native#text/plain
|
||||
components/IdeInspector/ideinspectkeygrapper.pas svneol=native#text/pascal
|
||||
components/IdeInspector/ideinspector.lpk svneol=native#text/xml
|
||||
components/IdeInspector/ideinspector.pas svneol=native#text/pascal
|
||||
components/IdeInspector/maininspector.lfm svneol=native#text/plain
|
||||
|
32
components/IdeInspector/ideinspectkeygrapper.lfm
Normal file
32
components/IdeInspector/ideinspectkeygrapper.lfm
Normal file
@ -0,0 +1,32 @@
|
||||
object IdeInspectKeyGrabForm: TIdeInspectKeyGrabForm
|
||||
Left = 1193
|
||||
Height = 240
|
||||
Top = 155
|
||||
Width = 320
|
||||
Caption = 'Key Shortcut'
|
||||
ClientHeight = 240
|
||||
ClientWidth = 320
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '0.9.29'
|
||||
object ButtonPanel1: TButtonPanel
|
||||
Left = 6
|
||||
Height = 34
|
||||
Top = 200
|
||||
Width = 308
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.Caption = '&OK'
|
||||
OKButton.OnClick = OKButtonClick
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.Caption = '&Help'
|
||||
HelpButton.Enabled = False
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.Caption = '&Close'
|
||||
CloseButton.Enabled = False
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.Caption = 'Cancel'
|
||||
CancelButton.OnClick = CancelButtonClick
|
||||
TabOrder = 0
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
ShowGlyphs = [pbOK, pbCancel]
|
||||
end
|
||||
end
|
57
components/IdeInspector/ideinspectkeygrapper.pas
Normal file
57
components/IdeInspector/ideinspectkeygrapper.pas
Normal file
@ -0,0 +1,57 @@
|
||||
unit IdeInspectKeyGrapper;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ButtonPanel, PropEdits;
|
||||
|
||||
type
|
||||
|
||||
{ TIdeInspectKeyGrabForm }
|
||||
|
||||
TIdeInspectKeyGrabForm = class(TForm)
|
||||
ButtonPanel1: TButtonPanel;
|
||||
procedure CancelButtonClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure OKButtonClick(Sender: TObject);
|
||||
private
|
||||
FKeyBox: TShortCutGrabBox;
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
property KeyBox: TShortCutGrabBox read FKeyBox;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TIdeInspectKeyGrabForm }
|
||||
|
||||
procedure TIdeInspectKeyGrabForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
FKeyBox:=TShortCutGrabBox.Create(Self);
|
||||
with FKeyBox do begin
|
||||
Name:='FKeyBox';
|
||||
Align:=alClient;
|
||||
AutoSize:=true;
|
||||
BorderSpacing.Around:=6;
|
||||
Parent:=self;
|
||||
end;
|
||||
AutoSize := True;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectKeyGrabForm.OKButtonClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := mrOK;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectKeyGrabForm.CancelButtonClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := mrCancel;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -24,12 +24,16 @@
|
||||
"Here be dragons" Be careful and save your data first"/>
|
||||
<License Value="LGPL, same as LCL"/>
|
||||
<Version Minor="1"/>
|
||||
<Files Count="1">
|
||||
<Files Count="2">
|
||||
<Item1>
|
||||
<Filename Value="maininspector.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="MainInspector"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="ideinspectkeygrapper.pas"/>
|
||||
<UnitName Value="ideinspectkeygrapper"/>
|
||||
</Item2>
|
||||
</Files>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="3">
|
||||
|
@ -7,7 +7,7 @@ unit IdeInspector;
|
||||
interface
|
||||
|
||||
uses
|
||||
MainInspector, LazarusPackageIntf;
|
||||
MainInspector, IdeInspectKeyGrapper, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -1,19 +1,24 @@
|
||||
object IdeInspectForm: TIdeInspectForm
|
||||
Left = 2070
|
||||
Height = 479
|
||||
Height = 494
|
||||
Top = 157
|
||||
Width = 498
|
||||
Width = 512
|
||||
BorderStyle = bsSizeToolWin
|
||||
Caption = 'IdeInspectForm'
|
||||
ClientHeight = 479
|
||||
ClientWidth = 498
|
||||
ClientHeight = 494
|
||||
ClientWidth = 512
|
||||
Constraints.MinHeight = 220
|
||||
Constraints.MinWidth = 280
|
||||
OnClose = FormClose
|
||||
OnShow = FormShow
|
||||
Position = poDefault
|
||||
LCLVersion = '0.9.29'
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Height = 26
|
||||
Height = 24
|
||||
Top = 0
|
||||
Width = 498
|
||||
Width = 512
|
||||
AutoSize = True
|
||||
Caption = 'ToolBar1'
|
||||
EdgeBorders = [ebBottom]
|
||||
Images = ImageList1
|
||||
@ -22,23 +27,21 @@ object IdeInspectForm: TIdeInspectForm
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
object btnComponent: TToolButton
|
||||
Left = 98
|
||||
Left = 121
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
DropdownMenu = popComponent
|
||||
OnClick = btnComponentClick
|
||||
Style = tbsDropDown
|
||||
end
|
||||
object btnSubComponent: TToolButton
|
||||
Left = 141
|
||||
Left = 164
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
DropdownMenu = popSubComponent
|
||||
OnClick = btnSubComponentClick
|
||||
Style = tbsDropDown
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 90
|
||||
Left = 113
|
||||
Top = 0
|
||||
Width = 8
|
||||
Caption = 'ToolButton1'
|
||||
@ -51,14 +54,14 @@ object IdeInspectForm: TIdeInspectForm
|
||||
OnClick = btnRemoveSelectedClick
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 133
|
||||
Left = 156
|
||||
Top = 0
|
||||
Width = 8
|
||||
Caption = 'ToolButton2'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object btnControls: TToolButton
|
||||
Left = 176
|
||||
Left = 199
|
||||
Top = 0
|
||||
DropdownMenu = popControls
|
||||
OnClick = btnControlsClick
|
||||
@ -72,7 +75,7 @@ object IdeInspectForm: TIdeInspectForm
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object ToolButtonFollowActive: TToolButton
|
||||
Left = 32
|
||||
Left = 55
|
||||
Hint = 'Follow Active Window or Frame'
|
||||
Top = 0
|
||||
ImageIndex = 1
|
||||
@ -81,18 +84,56 @@ object IdeInspectForm: TIdeInspectForm
|
||||
Style = tbsCheck
|
||||
end
|
||||
object ToolButtonActiveType: TToolButton
|
||||
Left = 55
|
||||
Left = 78
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
DropdownMenu = popFollowType
|
||||
OnClick = ToolButtonActiveTypeClick
|
||||
Style = tbsDropDown
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 234
|
||||
Top = 0
|
||||
Width = 8
|
||||
Caption = 'ToolButton4'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object ToolButtonKey: TToolButton
|
||||
Left = 242
|
||||
Hint = 'Set Key shortcut'
|
||||
Top = 0
|
||||
ImageIndex = 2
|
||||
OnClick = ToolButtonKeyClick
|
||||
ShowCaption = False
|
||||
end
|
||||
object btnEndModal: TToolButton
|
||||
Left = 1
|
||||
Hint = 'Finish modal'
|
||||
Top = 0
|
||||
ImageIndex = 3
|
||||
OnClick = btnEndModalClick
|
||||
Visible = False
|
||||
end
|
||||
object sepModal: TToolButton
|
||||
Left = 1
|
||||
Top = 0
|
||||
Width = 8
|
||||
Caption = 'sepModal'
|
||||
Style = tbsSeparator
|
||||
Visible = False
|
||||
end
|
||||
object btnKeepTop: TToolButton
|
||||
Left = 32
|
||||
Hint = 'Keep on top'
|
||||
Top = 0
|
||||
ImageIndex = 4
|
||||
OnClick = btnKeepTopClick
|
||||
Style = tbsCheck
|
||||
end
|
||||
end
|
||||
object TreeView1: TTreeView
|
||||
Left = 0
|
||||
Height = 364
|
||||
Top = 26
|
||||
Height = 381
|
||||
Top = 24
|
||||
Width = 217
|
||||
Align = alLeft
|
||||
DefaultItemHeight = 17
|
||||
@ -106,20 +147,20 @@ object IdeInspectForm: TIdeInspectForm
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Left = 217
|
||||
Height = 364
|
||||
Top = 26
|
||||
Height = 381
|
||||
Top = 24
|
||||
Width = 5
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 89
|
||||
Top = 390
|
||||
Width = 498
|
||||
Top = 405
|
||||
Width = 512
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 89
|
||||
ClientWidth = 498
|
||||
ClientWidth = 512
|
||||
TabOrder = 3
|
||||
object ComboHistory: TComboBox
|
||||
AnchorSideLeft.Control = Panel1
|
||||
@ -129,7 +170,7 @@ object IdeInspectForm: TIdeInspectForm
|
||||
Left = 5
|
||||
Height = 23
|
||||
Top = 5
|
||||
Width = 488
|
||||
Width = 502
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 5
|
||||
BorderSpacing.Top = 5
|
||||
@ -143,13 +184,13 @@ object IdeInspectForm: TIdeInspectForm
|
||||
AnchorSideLeft.Control = ComboHistory
|
||||
AnchorSideTop.Control = EditUnit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = btnOpenFile
|
||||
AnchorSideRight.Control = Panel2
|
||||
AnchorSideBottom.Control = Panel1
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 5
|
||||
Height = 23
|
||||
Top = 61
|
||||
Width = 454
|
||||
Width = 451
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 5
|
||||
BorderSpacing.Right = 5
|
||||
@ -161,43 +202,69 @@ object IdeInspectForm: TIdeInspectForm
|
||||
AnchorSideLeft.Control = ComboHistory
|
||||
AnchorSideTop.Control = ComboHistory
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = btnOpenFile
|
||||
AnchorSideRight.Control = Panel2
|
||||
Left = 5
|
||||
Height = 23
|
||||
Top = 33
|
||||
Width = 454
|
||||
Width = 451
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 5
|
||||
BorderSpacing.Right = 5
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
object btnOpenFile: TSpeedButton
|
||||
object Panel2: TPanel
|
||||
AnchorSideTop.Control = EditFile
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = Panel1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 464
|
||||
Height = 22
|
||||
Hint = 'Open File'
|
||||
Top = 61
|
||||
Width = 29
|
||||
Left = 461
|
||||
Height = 28
|
||||
Top = 58
|
||||
Width = 51
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 5
|
||||
BorderSpacing.Right = 5
|
||||
Caption = '...'
|
||||
NumGlyphs = 0
|
||||
OnClick = btnOpenFileClick
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.Layout = cclTopToBottomThenLeftToRight
|
||||
ClientHeight = 28
|
||||
ClientWidth = 51
|
||||
TabOrder = 3
|
||||
object btnOpenFile: TSpeedButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = Panel2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 23
|
||||
Hint = 'Open File'
|
||||
Top = 5
|
||||
Width = 23
|
||||
BorderSpacing.Top = 5
|
||||
BorderSpacing.Right = 5
|
||||
Caption = '...'
|
||||
NumGlyphs = 0
|
||||
OnClick = btnOpenFileClick
|
||||
ShowHint = True
|
||||
ParentShowHint = False
|
||||
end
|
||||
object btnSaveHist: TSpeedButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 28
|
||||
Height = 23
|
||||
Top = 5
|
||||
Width = 23
|
||||
Caption = '+'
|
||||
NumGlyphs = 0
|
||||
Visible = False
|
||||
OnClick = btnSaveHistClick
|
||||
end
|
||||
end
|
||||
end
|
||||
object TabControl1: TTabControl
|
||||
Left = 222
|
||||
Height = 364
|
||||
Top = 26
|
||||
Width = 276
|
||||
Height = 381
|
||||
Top = 24
|
||||
Width = 290
|
||||
Align = alClient
|
||||
OnChange = TabControl1Change
|
||||
TabIndex = 0
|
||||
@ -223,7 +290,7 @@ object IdeInspectForm: TIdeInspectForm
|
||||
left = 48
|
||||
top = 200
|
||||
Bitmap = {
|
||||
4C69020000001000000010000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
4C69050000001000000010000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF006360
|
||||
F80AFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF007774FF1F7774
|
||||
FF2BFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00625FF82B5D5B
|
||||
@ -287,7 +354,103 @@ object IdeInspectForm: TIdeInspectForm
|
||||
8CFFBA848CFFBA848CFFBA848CFFBA848CFFBA848CFFBA858DFFBA848CFFBB87
|
||||
8FFFC2949BFFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00858A8849888D8BEB858A88FF858A
|
||||
88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A
|
||||
88FF878C8AF1878C8A61FFFFFF00FFFFFF008A8E8CD7D4D7D6FFECEEEDFFEEF0
|
||||
EFFFF1F2F2FFF3F4F4FFF5F6F6FFF7F7F7FFF7F7F7FFF5F6F6FFF3F4F4FFF1F2
|
||||
F2FFDEE0E0FF888C8AF1FFFFFF00FFFFFF00888D8BECE4E7E5FFD7DBDBFFD7DA
|
||||
DAFFD8DCDBFFD8DCDBFFD8DCDBFFD8DDDCFFD8DDDCFFD8DCDBFFD8DCDBFFD9DD
|
||||
DCFFEFF0F0FF858A88FFFFFFFF00FFFFFF00888D8BECE3E5E4FFD5D9D9FFD8DF
|
||||
DBFFDAE0DDFFDBE1DEFFDCE2DFFFDDE2DFFF6B6D6CFF515453FFDBE2DEFFD5D9
|
||||
D9FFEDEEEEFF858A88FFFFFFFF00FFFFFF00888D8BECE0E3E2FFD9DDDDFFDBE1
|
||||
DEFFDDE3E0FFDEE4E1FFE0E5E2FFDCE2DFFFBABFBCFFD5DAD7FFDFE4E1FFD9DD
|
||||
DDFFE9EBEBFF858A88FFFFFFFF00FFFFFF00888D8BECDDE0DFFFE0E3E3FFDDE3
|
||||
E0FFE0E5E2FFE1E7E4FFE3E8E5FF9C9F9DFF6E716FFF393B3AFFE2E7E4FFE0E3
|
||||
E3FFE5E7E7FF858A88FFFFFFFF00FFFFFF00878C8AECD9DDDBFFE5E7E7FFE0E5
|
||||
E2FFE2E7E4FFE4E9E6FFE6EAE8FF9A9C9BFF696C6AFF232323FFD7DBD9FFE5E7
|
||||
E7FFE0E3E2FF858A88FFFFFFFF00FFFFFF00878C8AECD5D9D7FFEBEEEDFFE1E6
|
||||
E4FFE4E9E6FFE7EBE8FFE9EDEBFF3B3C3CFFE3E6E4FF2B2C2CFFD8DDDAFFEBEE
|
||||
EEFFDBDEDDFF858A88FFFFFFFF00FFFFFF00878C8AECD5D8D7FFF3F4F4FFE2E7
|
||||
E4FFE5EAE7FFE8ECEAFFEBEFECFF969997FF767877FF7E807FFFE0E4E2FFF3F4
|
||||
F4FFD8DCDBFF858A88FFFFFFFF00FFFFFF00878C8AECD5D8D7FFF4F5F5FFF5F7
|
||||
F7FFF5F8F7FFF6F8F8FFF6F8F8FFF6F8F8FFF6F8F8FFF6F8F8FFF6F8F8FFF4F5
|
||||
F5FFD8DCDBFF858A88FFFFFFFF00FFFFFF00878C8AECD5D8D7FFBAC0BEFFBCC3
|
||||
C0FFBCC3C0FFBCC3C0FFBCC3C0FFBCC3C0FFBCC3C0FFBCC3C0FFBCC3C0FFBAC0
|
||||
BEFFD8DCDBFF858A88FFFFFFFF00FFFFFF00878C8AECD5D8D7FFB7BEBBFFB6BD
|
||||
BAFFB6BDBAFFB6BDBAFFB6BDBAFFB6BDBAFFB6BDBAFFB6BDBAFFB6BDBAFFB7BE
|
||||
BBFFD8DCDBFF858A88FFFFFFFF00FFFFFF00888D8BD9C8CCCBFFD9DDDBFFD9DD
|
||||
DBFFD9DDDBFFD9DDDBFFD9DDDBFFD9DDDBFFD9DDDBFFD9DDDBFFD9DDDBFFD9DD
|
||||
DBFFCBCFCEFF868B89F3FFFFFF00FFFFFF00858A8851868B89EF858A88FC858A
|
||||
88FC858A88FC858A88FC858A88FC858A88FC858A88FC858A88FC858A88FC858A
|
||||
88FC868B89F4868C896AFFFFFF00FFFFFF00FFFFFF00858A8802858A8808858A
|
||||
8808858A8808858A8808858A8808858A8808858A8808858A8808858A8808858A
|
||||
8808858A8803FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF006D9CD4896A9AD2FB6697CFEEFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00709ED6DB6D9C
|
||||
D4FF85B1DAFF5A91B9FF6093CBEAFFFFFF00FFFFFF00808080FF7E7E7EFF7C7C
|
||||
7CFF7A7A7AFF777777FF757575FF727272FF719ED4FF6F9ED6FF87B2DCFFABD3
|
||||
E8FFA9D0E6FF5890B8FF598EC6EAFFFFFF00FFFFFF007D7D7DFF999999FF9999
|
||||
99FF9A9A9AFF9A9A9AFF9B9B9BFF9B9B9BFF6F9DD3FFAAD1E7FFABD1E7FF98C7
|
||||
E1FF91C2DEFF568FB7FF5289C1EAFFFFFF00FFFFFF007A7A7AFF999999FF5291
|
||||
59FF999A99FF9B9B9BFF9C9C9CFF9C9C9CFF6C9AD0FFA7CEE5FF8FC1DFFF89BD
|
||||
DCFF8BBDDCFF538DB6FF4B84BCEAFFFFFF00FFFFFF00777777FF9A9A9AFF3D8A
|
||||
45FF498A4FFF9C9C9CFF9D9D9DFF9D9D9DFF6696CCFFA2CBE3FF89BDDCFF83B9
|
||||
DAFF84B9DAFF518BB5FF437EB6EA44944DFF42914BFF3F8D48FF3D8945FF5DA4
|
||||
65FF5AA061FF45834BFF9E9E9EFF9E9E9EFF6092C9FF9EC7E2FF83B8DAFF7DB4
|
||||
D7FF7EB3D7FF4F89B4FF3B79B1EA41904AFF94D29FFF91D09AFF8DCD96FF89CB
|
||||
92FF84C88DFF519858FF417C46FF9F9F9FFF5A8EC4FF98C3E0FF7CB3D7FF74AF
|
||||
D6FF5EC4EDFF4B88B3FF3473ABEA3E8B46FF8FCE99FF7DC687FF78C381FF73C0
|
||||
7CFF74C07CFF79C281FF49904FFF547F57FF5489BFFF94BFDDFF75ADD4FF63B8
|
||||
E1FF4BD4FFFF428BB8FF2C6EA6EA3B8742FF89CB92FF84C88DFF80C688FF7BC3
|
||||
83FF77C17FFF478F4DFF3B743FFFA1A1A1FF4C84BAFF8DBBDBFF6EA8D1FF66A6
|
||||
D1FF5FB4DFFF4785B1FF2569A1EA37823EFF347E3BFF317937FF2E7534FF4991
|
||||
50FF468F4CFF39733DFFA1A1A1FFA2A2A2FF457EB4FF88B7D9FF67A3CFFF619E
|
||||
CCFF639FCCFF4583B1FF1F649CEAFFFFFF00FFFFFF00606060FFA0A0A0FF3D76
|
||||
41FF367139FFA2A2A2FFA2A2A2FFA3A3A3FF3D79B0FF82B3D7FF629FCCFF5A9A
|
||||
C9FF5E9BCAFF4381AFFF196098EAFFFFFF00FFFFFF005C5C5CFFA1A1A1FF3C73
|
||||
40FFA0A1A1FFA3A3A3FFA3A3A3FFA4A4A4FF3674AAFF7DAFD4FF5B9AC9FF5495
|
||||
C7FF5896C8FF4180AEFF135C94EAFFFFFF00FFFFFF00585858FFA2A2A2FFA2A2
|
||||
A2FFA3A3A3FFA4A4A4FFA4A4A4FFA5A5A5FF2F6FA5FF78ABD2FF78ABD3FF73A7
|
||||
D1FF69A0CDFF407FAEFF0F5991EA999999FF717171FF545454FF515151FF4F4F
|
||||
4FFF4C4C4CFF4A4A4AFF474747FF454545FF25679DFF3274A8FF3D7CAFFF4784
|
||||
B5FF4E8ABAFF3E7EADFF0C578FEAFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF001D639B1619609839145D9562105A
|
||||
92880D5890A4135C92FC0C578FEDDFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDEFFDADADAFFD2D1D1FFC9C9C8FFBFBFBFFFB6B6
|
||||
B6FFAEAEAEFFA4A5A5FFDFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDF00DCDCDCFFD9D9D9FFD8D8D8FFD4D4D4FFD0D0
|
||||
D0FFCECECEFFA5A5A5FFDFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDEFFDADADAFFD2D1D1FFC9C9C8FFBFBFBFFFB6B6B6FFAEAEAEFFA4A5
|
||||
A5FFCCCCCCFFA5A5A5FFDFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDF00DCDCDCFFD9D9D9FFD8D8D8FFD4D4D4FFD0D0D0FFCECECEFFA5A5
|
||||
A5FFCACACAFFA5A6A5FFDFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDEFFDADA
|
||||
DAFFD2D1D1FFC9C9C8FFBFBFBFFFB6B6B6FFAEAEAEFFA4A5A5FFCCCCCCFFA5A5
|
||||
A5FFCCCCCCFFA5A5A5FFDFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DCDC
|
||||
DCFFD9D9D9FFD8D8D8FFD4D4D4FFD0D0D0FFCECECEFFA5A5A5FFCACACAFFA5A6
|
||||
A5FFCACACAFFA5A5A5FFDFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DCDC
|
||||
DCFFD8D8D8FFD5D5D5FFD1D1D1FFCECECEFFCCCCCCFFA5A5A5FFCCCCCCFFA5A5
|
||||
A5FFAFAEAEFFA6A5A6FFDFDFDF00DFDFDF00E7B48DFEE6B38CFFE6B38CFFE5AF
|
||||
88FFE2A880FFDE9F76FFDA956CFFD49876FFCACACAFFA5A6A5FFCACACAFFA5A5
|
||||
A5FFDFDFDF00DFDFDF00DFDFDF00DFDFDF00E7B48DFEECC8ACFFEBC3A4FFEABE
|
||||
A0FFE7B798FFE4AF90FFE2AA8BFFD79B7AFFCCCCCCFFA5A5A5FFAFAEAEFFA6A5
|
||||
A6FFDFDFDF00DFDFDF00DFDFDF00DFDFDF00E7B48DFEECC7AAFFEBC0A1FFE7BA
|
||||
9BFFE5B192FFE2AA8BFFE0A687FFD59877FFCACACAFFA5A5A5FFDFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00E7B48DFEEBC5A7FFE9BB9DFFE5B4
|
||||
95FFE2AC8DFFE0A584FFDFA384FFD29574FFAFAEAEFFA6A5A6FFDFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00E7B48DFEECC7AAFFEBC0A1FFE7BA
|
||||
9BFFE5B192FFE2AA8BFFE0A687FFD88E66D2DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00E7B48DFEEBC5A7FFE9BB9DFFE5B4
|
||||
95FFE2AC8DFFE0A584FFDFA384FFD88E66D2DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00E6B089FEE2A880FFDD9F76FFD996
|
||||
6CFFD78C63FFD3855AFFD28358FFD48358D2DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDFDF00DFDF
|
||||
DF00DFDFDF00DFDFDF00DFDFDF00
|
||||
}
|
||||
end
|
||||
object popControls: TPopupMenu
|
||||
|
@ -7,7 +7,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, Buttons,
|
||||
ComCtrls, Menus, StdCtrls, MenuIntf, ObjectInspector, PropEdits, types, typinfo,
|
||||
LazIDEIntf, LCLProc;
|
||||
LazIDEIntf, LazConfigStorage, BaseIDEIntf, LCLProc, IdeInspectKeyGrapper, math;
|
||||
|
||||
type
|
||||
|
||||
@ -35,11 +35,13 @@ type
|
||||
menuFollowForm: TMenuItem;
|
||||
menuFollowFrame: TMenuItem;
|
||||
Panel1: TPanel;
|
||||
Panel2: TPanel;
|
||||
popComponent: TPopupMenu;
|
||||
popSubComponent: TPopupMenu;
|
||||
popControls: TPopupMenu;
|
||||
popFollowType: TPopupMenu;
|
||||
btnOpenFile: TSpeedButton;
|
||||
btnSaveHist: TSpeedButton;
|
||||
Splitter1: TSplitter;
|
||||
TabControl1: TTabControl;
|
||||
ToolBar1: TToolBar;
|
||||
@ -50,13 +52,23 @@ type
|
||||
ToolButton2: TToolButton;
|
||||
btnControls: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
ToolButton4: TToolButton;
|
||||
btnEndModal: TToolButton;
|
||||
sepModal: TToolButton;
|
||||
btnKeepTop: TToolButton;
|
||||
ToolButtonKey: TToolButton;
|
||||
ToolButtonActiveType: TToolButton;
|
||||
ToolButtonFollowActive: TToolButton;
|
||||
TreeView1: TTreeView;
|
||||
procedure btnControlsClick(Sender: TObject);
|
||||
procedure btnEndModalClick(Sender: TObject);
|
||||
procedure btnKeepTopClick(Sender: TObject);
|
||||
procedure btnOpenFileClick(Sender: TObject);
|
||||
procedure btnSaveHistClick(Sender: TObject);
|
||||
procedure btnSubComponentClick(Sender: TObject);
|
||||
procedure ComboHistoryChange(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure menuFollowFormClick(Sender: TObject);
|
||||
procedure menuFollowFrameClick(Sender: TObject);
|
||||
procedure MenuItem1Click(Sender: TObject);
|
||||
@ -68,6 +80,7 @@ type
|
||||
procedure TabControl1Change(Sender: TObject);
|
||||
procedure ToolButtonActiveTypeClick(Sender: TObject);
|
||||
procedure ToolButtonFollowActiveClick(Sender: TObject);
|
||||
procedure ToolButtonKeyClick(Sender: TObject);
|
||||
procedure TreeView1Change(Sender: TObject; Node: TTreeNode);
|
||||
procedure TreeView1Click(Sender: TObject);
|
||||
private
|
||||
@ -77,6 +90,10 @@ type
|
||||
FHistoryList: TList;
|
||||
FCurEntry: THistoryEntry;
|
||||
FIsUpdatingHistory: Boolean;
|
||||
FConf: TConfigStorage;
|
||||
FKeyGrabForm: TIdeInspectKeyGrabForm;
|
||||
FShortCutKey: Word;
|
||||
FShortCutShift: TShiftState;
|
||||
procedure DoPropSelChanged(Sender: TObject);
|
||||
protected
|
||||
FPropertiesGrid: TCustomPropertiesGrid;
|
||||
@ -85,7 +102,9 @@ type
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure DoActiveFormChanged(Sender: TObject; Form: TCustomForm);
|
||||
procedure DoActiveControChanged(Sender: TObject; LastControl: TControl);
|
||||
procedure UpdateHistory;
|
||||
procedure DoKeyDownBefore(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
function IndexOfCurrent: Integer;
|
||||
procedure UpdateHistory(ForceAdd: Boolean = False);
|
||||
procedure UpdateCurrent;
|
||||
public
|
||||
{ public declarations }
|
||||
@ -115,6 +134,13 @@ implementation
|
||||
|
||||
const
|
||||
MAX_HIST_CNT = 25;
|
||||
IDE_INSPECT_CONF_FILE = 'ide_inspector_config.xml';
|
||||
ShiftStateNames: Array [TShiftStateEnum] of string =
|
||||
('ssShift', 'ssAlt', 'ssCtrl',
|
||||
'ssLeft', 'ssRight', 'ssMiddle', 'ssDouble',
|
||||
// Extra additions
|
||||
'ssMeta', 'ssSuper', 'ssHyper', 'ssAltGr', 'ssCaps', 'ssNum',
|
||||
'ssScroll', 'ssTriple', 'ssQuad', 'ssExtra1', 'ssExtra2');
|
||||
|
||||
var
|
||||
OriginalBackTraceStrFunc: TBackTraceStrFunc;
|
||||
@ -185,6 +211,28 @@ begin
|
||||
UpdateCurrent;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
begin
|
||||
FConf.SetDeleteValue('IDEInspect/FormPos/Left', Left, 400);
|
||||
FConf.SetDeleteValue('IDEInspect/FormPos/top', Top, 50);
|
||||
FConf.SetDeleteValue('IDEInspect/FormPos/Heigh', Height, 520);
|
||||
FConf.SetDeleteValue('IDEInspect/FormPos/Width', Width, 500);
|
||||
FConf.WriteToDisk;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.FormShow(Sender: TObject);
|
||||
begin
|
||||
Left := FConf.GetValue('IDEInspect/FormPos/Left', 400);
|
||||
Top := FConf.GetValue('IDEInspect/FormPos/top', 50);
|
||||
Height := Max(220, FConf.GetValue('IDEInspect/FormPos/Heigh', 520));
|
||||
Width := Max(280, FConf.GetValue('IDEInspect/FormPos/Width', 500));
|
||||
|
||||
//if Screen.MonitorFromPoint(IdeInspectForm.ClientToScreen
|
||||
// (Point(IdeInspectForm.Left, IdeInspectForm.Top))) = nil
|
||||
//then
|
||||
MakeFullyVisible;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.DoPropSelChanged(Sender: TObject);
|
||||
var
|
||||
i: LongInt;
|
||||
@ -209,7 +257,7 @@ begin
|
||||
|
||||
s := TObject(Method.Data).MethodName(Method.Code);
|
||||
if s = '' then
|
||||
s := IntToHex(PtrUint(Method.Code), 2*SizeOf(Pointer));
|
||||
s := IntToHex(QWord(PtrUint(Method.Code)), 2*SizeOf(Pointer));
|
||||
|
||||
s := TObject(Method.Data).ClassName + OName + '.' + s;
|
||||
|
||||
@ -227,7 +275,7 @@ begin
|
||||
FCurEntry.Display := s;
|
||||
FCurEntry.Comp := nil;
|
||||
FCurEntry.TheUnitName := TObject(Method.Data).ClassType.UnitName;
|
||||
FCurEntry.FileName := LazarusIDE.FindUnitFile(FCurEntry.TheUnitName);
|
||||
FCurEntry.FileName := LazarusIDE.FindUnitFile(FCurEntry.TheUnitName, LazarusIDE);
|
||||
|
||||
//LazarusIDE.DoOpenFileAndJumpToIdentifier(AFile, copy(AName,1,i), -1, -1, [ofOnlyIfExists, ofRegularFile]);
|
||||
//LazarusIDE.DoOpenFileAndJumpToPos(AFile, Point(1,i), Max(i-1,1), -1, -1, [ofOnlyIfExists, ofRegularFile]);
|
||||
@ -239,6 +287,9 @@ begin
|
||||
FFollowFrames := False;
|
||||
ToolButtonActiveType.Caption := menuFollowForm.Caption;
|
||||
ToolButtonFollowActive.Down := True;
|
||||
|
||||
FConf.SetDeleteValue('IDEInspect/FollowActive/Type', 0, 0);
|
||||
FConf.WriteToDisk;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.menuFollowFrameClick(Sender: TObject);
|
||||
@ -246,6 +297,9 @@ begin
|
||||
FFollowFrames := True;
|
||||
ToolButtonActiveType.Caption := menuFollowFrame.Caption;
|
||||
ToolButtonFollowActive.Down := True;
|
||||
|
||||
FConf.SetDeleteValue('IDEInspect/FollowActive/Type', 1, 0);
|
||||
FConf.WriteToDisk;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.btnControlsClick(Sender: TObject);
|
||||
@ -253,11 +307,31 @@ begin
|
||||
btnControls.CheckMenuDropdown;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.btnEndModalClick(Sender: TObject);
|
||||
begin
|
||||
ModalResult := mrOK;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.btnKeepTopClick(Sender: TObject);
|
||||
begin
|
||||
if btnKeepTop.Down then
|
||||
FormStyle := fsStayOnTop
|
||||
else
|
||||
FormStyle := fsNormal;
|
||||
FConf.SetDeleteValue('IDEInspect/FormPos/KeepTop', btnKeepTop.Down, False);
|
||||
FConf.WriteToDisk;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.btnOpenFileClick(Sender: TObject);
|
||||
begin
|
||||
LazarusIDE.DoOpenEditorFile(EditFile.Text, -1, -1, [ofOnlyIfExists, ofRegularFile]);
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.btnSaveHistClick(Sender: TObject);
|
||||
begin
|
||||
UpdateHistory(True);
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.btnComponentClick(Sender: TObject);
|
||||
begin
|
||||
btnComponent.CheckMenuDropdown;
|
||||
@ -367,6 +441,26 @@ procedure TIdeInspectForm.ToolButtonFollowActiveClick(Sender: TObject);
|
||||
begin
|
||||
if ToolButtonFollowActive.Down then
|
||||
SetSelected(Self);
|
||||
FConf.SetDeleteValue('IDEInspect/FollowActive/Enabled', ToolButtonFollowActive.Down, False);
|
||||
FConf.WriteToDisk;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.ToolButtonKeyClick(Sender: TObject);
|
||||
var
|
||||
i: TShiftStateEnum;
|
||||
begin
|
||||
FKeyGrabForm.KeyBox.Key := FShortCutKey;
|
||||
FKeyGrabForm.KeyBox.ShiftState := FShortCutShift;
|
||||
if FKeyGrabForm.ShowModal = mrOK then begin
|
||||
FShortCutKey := FKeyGrabForm.KeyBox.Key;
|
||||
FShortCutShift := FKeyGrabForm.KeyBox.ShiftState;
|
||||
|
||||
FConf.SetDeleteValue('IDEInspect/KeyShortCut/Key', FShortCutKey, 0);
|
||||
for i := low(TShiftStateEnum) to high(TShiftStateEnum) do
|
||||
FConf.SetDeleteValue('IDEInspect/KeyShortCut/' + ShiftStateNames[i],
|
||||
i in FShortCutShift, False);
|
||||
FConf.WriteToDisk;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.TreeView1Change(Sender: TObject; Node: TTreeNode);
|
||||
@ -394,8 +488,14 @@ begin
|
||||
if FCurEntry.Comp <> FSelected then begin
|
||||
FCurEntry.Comp := FSelected;
|
||||
FCurEntry.UpdateDisplayName;
|
||||
FCurEntry.TheUnitName := FSelected.UnitName;
|
||||
FCurEntry.FileName := LazarusIDE.FindUnitFile(FCurEntry.TheUnitName);
|
||||
if FSelected <> nil then begin
|
||||
FCurEntry.TheUnitName := FSelected.UnitName;
|
||||
FCurEntry.FileName := LazarusIDE.FindUnitFile(FCurEntry.TheUnitName, LazarusIDE);
|
||||
end
|
||||
else begin
|
||||
FCurEntry.TheUnitName := '';
|
||||
FCurEntry.FileName := '';
|
||||
end;
|
||||
UpdateHistory;
|
||||
end;
|
||||
end;
|
||||
@ -483,7 +583,7 @@ end;
|
||||
|
||||
procedure TIdeInspectForm.DoActiveFormChanged(Sender: TObject; Form: TCustomForm);
|
||||
begin
|
||||
If not ToolButtonFollowActive.Down then
|
||||
If (not ToolButtonFollowActive.Down) or (not Self.Visible) then
|
||||
exit;
|
||||
|
||||
if Form <> Self then
|
||||
@ -492,7 +592,7 @@ end;
|
||||
|
||||
procedure TIdeInspectForm.DoActiveControChanged(Sender: TObject; LastControl: TControl);
|
||||
begin
|
||||
If (not ToolButtonFollowActive.Down) or (not FFollowFrames) then
|
||||
If (not ToolButtonFollowActive.Down) or (not FFollowFrames) or (not Self.Visible) then
|
||||
exit;
|
||||
if Screen.ActiveForm = Self then
|
||||
exit;
|
||||
@ -501,20 +601,62 @@ begin
|
||||
SetSelected(Screen.ActiveControl.Owner);
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.UpdateHistory;
|
||||
procedure TIdeInspectForm.DoKeyDownBefore(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
var
|
||||
CurVisible: Boolean;
|
||||
begin
|
||||
if (Screen.ActiveForm = self) or (Screen.ActiveForm = FKeyGrabForm) then exit;
|
||||
if FShortCutKey = 0 then exit;
|
||||
|
||||
if (FShortCutKey <> Key) or (FShortCutShift <> Shift) then
|
||||
exit;
|
||||
|
||||
Key := 0;
|
||||
if Application.ModalLevel = 0 then begin
|
||||
Self.Show;
|
||||
exit;
|
||||
end;
|
||||
|
||||
CurVisible := Visible;
|
||||
Close;
|
||||
DestroyHandle;
|
||||
btnOpenFile.Visible := False;
|
||||
btnSaveHist.Visible := True;
|
||||
btnEndModal.Visible := True;
|
||||
sepModal.Visible := True;
|
||||
sepModal.Left := 1;
|
||||
btnEndModal.Left := 1;
|
||||
btnRemoveSelected.Left := 2;
|
||||
if Self. ShowModal <> mrOK then
|
||||
CurVisible := False;
|
||||
btnSaveHist.Visible := False;
|
||||
btnOpenFile.Visible := True;
|
||||
btnEndModal.Visible := False;
|
||||
sepModal.Visible := False;
|
||||
Visible := CurVisible;
|
||||
end;
|
||||
|
||||
function TIdeInspectForm.IndexOfCurrent: Integer;
|
||||
begin
|
||||
if FCurEntry.Comp = nil then exit(-1);;
|
||||
Result := FHistoryList.Count - 1;
|
||||
while (Result >= 0) and (THistoryEntry(FHistoryList[Result]).Comp <> FCurEntry.Comp) do
|
||||
dec(Result);
|
||||
end;
|
||||
|
||||
procedure TIdeInspectForm.UpdateHistory(ForceAdd: Boolean = False);
|
||||
var
|
||||
i: Integer;
|
||||
FNewHist: THistoryEntry;
|
||||
CanAdd: Boolean;
|
||||
begin
|
||||
FIsUpdatingHistory := True;
|
||||
CanAdd := (FCurEntry.Comp is TCustomForm) or (FCurEntry.Comp is TCustomFrame)
|
||||
or ForceAdd;
|
||||
|
||||
i := -1;
|
||||
if (FCurEntry.Comp <> nil) and
|
||||
( (FCurEntry.Comp is TCustomForm) or (FCurEntry.Comp is TCustomFrame) )
|
||||
then begin
|
||||
i := FHistoryList.Count - 1;
|
||||
while (i >= 0) and (THistoryEntry(FHistoryList[i]).Comp <> FCurEntry.Comp) do
|
||||
dec(i);
|
||||
if (FCurEntry.Comp <> nil) and CanAdd then begin
|
||||
i := IndexOfCurrent;
|
||||
if i < 0 then begin
|
||||
FNewHist := THistoryEntry.Create;
|
||||
FNewHist.Assign(FCurEntry);
|
||||
@ -554,14 +696,20 @@ begin
|
||||
Caption := ideinspIdeInspector;
|
||||
btnOpenFile.Enabled := EditFile.Text <> '';
|
||||
FIsUpdatingHistory := False;
|
||||
|
||||
btnSaveHist.Enabled := (FCurEntry.Comp <> nil) and (IndexOfCurrent < 0);
|
||||
end;
|
||||
|
||||
constructor TIdeInspectForm.Create(TheOwner: TComponent);
|
||||
var
|
||||
i: TShiftStateEnum;
|
||||
begin
|
||||
FKeyGrabForm := TIdeInspectKeyGrabForm.Create(Self);
|
||||
FHistoryList := TList.Create;
|
||||
FCurEntry := THistoryEntry.Create;
|
||||
Screen.AddHandlerActiveFormChanged(@DoActiveFormChanged);
|
||||
Screen.AddHandlerActiveControlChanged(@DoActiveControChanged);
|
||||
Application.AddOnKeyDownBeforeHandler(@DoKeyDownBefore);
|
||||
inherited Create(TheOwner);
|
||||
|
||||
FPropertiesGrid := TCustomPropertiesGrid.Create(Self);
|
||||
@ -578,16 +726,32 @@ begin
|
||||
btnControls.Caption := ideinspControlsChildren;
|
||||
btnRemoveSelected.Hint := ideinspRemoveSelectedItemSFromTree;
|
||||
|
||||
FFollowFrames := True;
|
||||
ToolButtonActiveType.Caption := menuFollowFrame.Caption;
|
||||
FConf := GetIDEConfigStorage(IDE_INSPECT_CONF_FILE, True);
|
||||
|
||||
FFollowFrames := FConf.GetValue('IDEInspect/FollowActive/Type', 0) > 0;
|
||||
if FFollowFrames then
|
||||
ToolButtonActiveType.Caption := menuFollowFrame.Caption
|
||||
else
|
||||
ToolButtonActiveType.Caption := menuFollowForm.Caption;
|
||||
TabControl1Change(nil);
|
||||
SetSelected(Application);
|
||||
|
||||
FShortCutKey := FConf.GetValue('IDEInspect/KeyShortCut/Key', 0);
|
||||
FShortCutShift := [];
|
||||
for i := low(TShiftStateEnum) to high(TShiftStateEnum) do
|
||||
if FConf.GetValue('IDEInspect/KeyShortCut/' + ShiftStateNames[i], False) then
|
||||
FShortCutShift := FShortCutShift + [i];
|
||||
|
||||
btnKeepTop.Down := FConf.GetValue('IDEInspect/FormPos/KeepTop', False);
|
||||
ToolButtonFollowActive.Down := FConf.GetValue('IDEInspect/FollowActive/Enabled', False);
|
||||
end;
|
||||
|
||||
destructor TIdeInspectForm.Destroy;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
FreeAndNil(fConf);
|
||||
Application.RemoveOnKeyDownBeforeHandler(@DoKeyDownBefore);
|
||||
Screen.RemoveHandlerActiveControlChanged(@DoActiveControChanged);
|
||||
Screen.RemoveHandlerActiveFormChanged(@DoActiveFormChanged);
|
||||
for i := 0 to FHistoryList.Count - 1 do
|
||||
@ -595,19 +759,18 @@ begin
|
||||
FreeAndNil(FHistoryList);
|
||||
FreeAndNil(FCurEntry);
|
||||
FreeAndNil(TreeView1);
|
||||
FreeAndNil(FKeyGrabForm);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure IDEMenuClicked(Sender: TObject);
|
||||
begin
|
||||
if not Assigned(IdeInspectForm) then begin
|
||||
IdeInspectForm := TIdeInspectForm.Create(Application);
|
||||
end;
|
||||
IdeInspectForm.Show;
|
||||
end;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
IdeInspectForm := TIdeInspectForm.Create(Application);
|
||||
RegisterIDEMenuCommand(itmViewIDEInternalsWindows, 'mnuIdeInspector', ideinspInspectIDE, nil,
|
||||
@IDEMenuClicked);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user