cody: help buttons

git-svn-id: trunk@30854 -
This commit is contained in:
mattias 2011-05-22 10:23:48 +00:00
parent 01f454abce
commit 3e9aa252a9
4 changed files with 88 additions and 76 deletions

View File

@ -12,42 +12,43 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
LCLVersion = '0.9.31' LCLVersion = '0.9.31'
object ButtonPanel1: TButtonPanel object ButtonPanel1: TButtonPanel
Left = 6 Left = 6
Height = 34 Height = 42
Top = 444 Top = 436
Width = 557 Width = 557
OKButton.Name = 'OKButton' OKButton.Name = 'OKButton'
OKButton.Caption = '&OK' OKButton.Caption = '&OK'
OKButton.OnClick = OkButtonClick OKButton.OnClick = OkButtonClick
HelpButton.Name = 'HelpButton' HelpButton.Name = 'HelpButton'
HelpButton.Caption = '&Help' HelpButton.Caption = '&Help'
HelpButton.OnClick = HelpButtonClick
CloseButton.Name = 'CloseButton' CloseButton.Name = 'CloseButton'
CloseButton.Caption = '&Close' CloseButton.Caption = '&Close'
CancelButton.Name = 'CancelButton' CancelButton.Name = 'CancelButton'
CancelButton.Caption = 'Cancel' CancelButton.Caption = 'Cancel'
TabOrder = 3 TabOrder = 3
ShowButtons = [pbOK, pbCancel] ShowButtons = [pbOK, pbCancel, pbHelp]
end end
object MembersGroupBox: TGroupBox object MembersGroupBox: TGroupBox
AnchorSideTop.Control = InheritedGroupBox AnchorSideTop.Control = InheritedGroupBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 181 Height = 142
Top = 257 Top = 288
Width = 557 Width = 557
Align = alBottom Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'MembersGroupBox' Caption = 'MembersGroupBox'
ClientHeight = 163 ClientHeight = 121
ClientWidth = 553 ClientWidth = 549
TabOrder = 2 TabOrder = 2
object MembersTreeView: TCodyTreeView object MembersTreeView: TCodyTreeView
Left = 0 Left = 0
Height = 163 Height = 121
Top = 0 Top = 0
Width = 553 Width = 549
Align = alClient Align = alClient
DefaultItemHeight = 17 DefaultItemHeight = 19
Images = ImageList1 Images = ImageList1
ReadOnly = True ReadOnly = True
TabOrder = 0 TabOrder = 0
@ -57,24 +58,24 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
end end
object InheritedGroupBox: TGroupBox object InheritedGroupBox: TGroupBox
Left = 6 Left = 6
Height = 128 Height = 144
Top = 123 Top = 138
Width = 557 Width = 557
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'InheritedGroupBox' Caption = 'InheritedGroupBox'
ClientHeight = 110 ClientHeight = 123
ClientWidth = 553 ClientWidth = 549
TabOrder = 1 TabOrder = 1
object InheritedLabel: TLabel object InheritedLabel: TLabel
AnchorSideLeft.Control = InheritedGroupBox AnchorSideLeft.Control = InheritedGroupBox
AnchorSideTop.Control = InheritedEdit AnchorSideTop.Control = InheritedEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 16 Height = 18
Top = 9 Top = 10
Width = 76 Width = 100
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'InheritedLabel' Caption = 'InheritedLabel'
@ -86,10 +87,10 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideTop.Control = InheritedGroupBox AnchorSideTop.Control = InheritedGroupBox
AnchorSideRight.Control = InheritedGroupBox AnchorSideRight.Control = InheritedGroupBox
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 88 Left = 112
Height = 23 Height = 27
Top = 6 Top = 6
Width = 459 Width = 431
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
@ -102,9 +103,9 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideTop.Control = InheritedEdit AnchorSideTop.Control = InheritedEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 12 Left = 12
Height = 19 Height = 22
Top = 35 Top = 39
Width = 134 Width = 174
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'InhOverrideCheckBox' Caption = 'InhOverrideCheckBox'
TabOrder = 1 TabOrder = 1
@ -114,9 +115,9 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideTop.Control = InhOverrideCheckBox AnchorSideTop.Control = InhOverrideCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 12 Left = 12
Height = 19 Height = 22
Top = 60 Top = 67
Width = 109 Width = 140
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'InhCallCheckBox' Caption = 'InhCallCheckBox'
TabOrder = 2 TabOrder = 2
@ -126,9 +127,9 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideTop.Control = InhCallCheckBox AnchorSideTop.Control = InhCallCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 12 Left = 12
Height = 19 Height = 22
Top = 85 Top = 95
Width = 164 Width = 209
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'InhCallOnlyInElseCheckBox' Caption = 'InhCallOnlyInElseCheckBox'
TabOrder = 3 TabOrder = 3
@ -136,24 +137,24 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
end end
object DeclGroupBox: TGroupBox object DeclGroupBox: TGroupBox
Left = 6 Left = 6
Height = 111 Height = 126
Top = 6 Top = 6
Width = 557 Width = 557
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'DeclGroupBox' Caption = 'DeclGroupBox'
ClientHeight = 93 ClientHeight = 105
ClientWidth = 553 ClientWidth = 549
TabOrder = 0 TabOrder = 0
object ParamTypeLabel: TLabel object ParamTypeLabel: TLabel
AnchorSideLeft.Control = ProcNameLabel AnchorSideLeft.Control = ProcNameLabel
AnchorSideTop.Control = ParamTypeEdit AnchorSideTop.Control = ParamTypeEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 16 Height = 18
Top = 67 Top = 76
Width = 89 Width = 115
Caption = 'ParamTypeLabel' Caption = 'ParamTypeLabel'
ParentColor = False ParentColor = False
end end
@ -162,9 +163,9 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ParamNameEdit AnchorSideTop.Control = ParamNameEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 101 Left = 127
Height = 23 Height = 27
Top = 64 Top = 72
Width = 141 Width = 141
BorderSpacing.Around = 6 BorderSpacing.Around = 6
OnChange = ParamTypeEditChange OnChange = ParamTypeEditChange
@ -176,9 +177,9 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ProcNameEdit AnchorSideTop.Control = ProcNameEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 107 Left = 135
Height = 23 Height = 27
Top = 35 Top = 39
Width = 136 Width = 136
BorderSpacing.Around = 6 BorderSpacing.Around = 6
OnChange = ParamNameEditChange OnChange = ParamNameEditChange
@ -190,9 +191,9 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideTop.Control = ParamNameEdit AnchorSideTop.Control = ParamNameEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 16 Height = 18
Top = 38 Top = 43
Width = 95 Width = 123
Caption = 'ParamNameLabel' Caption = 'ParamNameLabel'
ParentColor = False ParentColor = False
end end
@ -200,8 +201,8 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideLeft.Control = ProcNameLabel AnchorSideLeft.Control = ProcNameLabel
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = DeclGroupBox AnchorSideTop.Control = DeclGroupBox
Left = 97 Left = 122
Height = 23 Height = 27
Top = 6 Top = 6
Width = 147 Width = 147
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -214,9 +215,9 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideTop.Control = ProcNameEdit AnchorSideTop.Control = ProcNameEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 16 Height = 18
Top = 9 Top = 10
Width = 85 Width = 110
BorderSpacing.Left = 6 BorderSpacing.Left = 6
Caption = 'ProcNameLabel' Caption = 'ProcNameLabel'
ParentColor = False ParentColor = False
@ -226,10 +227,10 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ProcNameEdit AnchorSideTop.Control = ProcNameEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 250 Left = 275
Height = 16 Height = 18
Top = 9 Top = 10
Width = 110 Width = 145
Caption = 'ProcNameErrorLabel' Caption = 'ProcNameErrorLabel'
Font.Color = clRed Font.Color = clRed
ParentColor = False ParentColor = False
@ -240,10 +241,10 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ParamNameEdit AnchorSideTop.Control = ParamNameEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 249 Left = 277
Height = 16 Height = 18
Top = 38 Top = 43
Width = 120 Width = 158
Caption = 'ParamNameErrorLabel' Caption = 'ParamNameErrorLabel'
Font.Color = clRed Font.Color = clRed
ParentColor = False ParentColor = False
@ -254,10 +255,10 @@ object AddAssignMethodDialog: TAddAssignMethodDialog
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = ParamTypeEdit AnchorSideTop.Control = ParamTypeEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 248 Left = 274
Height = 16 Height = 18
Top = 67 Top = 76
Width = 114 Width = 150
Caption = 'ParamTypeErrorLabel' Caption = 'ParamTypeErrorLabel'
Font.Color = clRed Font.Color = clRed
ParentColor = False ParentColor = False

View File

@ -38,7 +38,7 @@ uses
// IDEIntf // IDEIntf
IDEDialogs, LazIDEIntf, SrcEditorIntf, IDEDialogs, LazIDEIntf, SrcEditorIntf,
// Cody // Cody
CodyCtrls, CodyStrConsts; CodyCtrls, CodyStrConsts, CodyUtils;
type type
@ -80,6 +80,7 @@ type
procedure MembersTreeViewMouseDown(Sender: TObject; Button: TMouseButton; procedure MembersTreeViewMouseDown(Sender: TObject; Button: TMouseButton;
{%H-}Shift: TShiftState; X, Y: Integer); {%H-}Shift: TShiftState; X, Y: Integer);
procedure OkButtonClick(Sender: TObject); procedure OkButtonClick(Sender: TObject);
procedure HelpButtonClick(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure ParamNameEditChange(Sender: TObject); procedure ParamNameEditChange(Sender: TObject);
@ -277,6 +278,11 @@ begin
ModalResult:=mrOk; ModalResult:=mrOk;
end; end;
procedure TAddAssignMethodDialog.HelpButtonClick(Sender: TObject);
begin
OpenCodyHelp('#Add_Assign_method');
end;
procedure TAddAssignMethodDialog.MembersTreeViewMouseDown(Sender: TObject; procedure TAddAssignMethodDialog.MembersTreeViewMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var var

View File

@ -1,7 +1,7 @@
object PPUListDialog: TPPUListDialog object PPUListDialog: TPPUListDialog
Left = 275 Left = 276
Height = 531 Height = 531
Top = 250 Top = 249
Width = 740 Width = 740
Caption = 'PPUListDialog' Caption = 'PPUListDialog'
ClientHeight = 531 ClientHeight = 531
@ -13,22 +13,20 @@ object PPUListDialog: TPPUListDialog
LCLVersion = '0.9.31' LCLVersion = '0.9.31'
object ButtonPanel1: TButtonPanel object ButtonPanel1: TButtonPanel
Left = 6 Left = 6
Height = 40 Height = 42
Top = 485 Top = 483
Width = 728 Width = 728
OKButton.Name = 'OKButton' OKButton.Name = 'OKButton'
OKButton.Caption = '&OK' OKButton.Caption = '&OK'
OKButton.Enabled = False
HelpButton.Name = 'HelpButton' HelpButton.Name = 'HelpButton'
HelpButton.Caption = '&Help' HelpButton.Caption = '&Help'
HelpButton.Enabled = False HelpButton.OnClick = HelpButtonClick
CloseButton.Name = 'CloseButton' CloseButton.Name = 'CloseButton'
CloseButton.Caption = '&Close' CloseButton.Caption = '&Close'
CancelButton.Name = 'CancelButton' CancelButton.Name = 'CancelButton'
CancelButton.Caption = 'Cancel' CancelButton.Caption = 'Cancel'
CancelButton.Enabled = False
TabOrder = 0 TabOrder = 0
ShowButtons = [pbClose] ShowButtons = [pbClose, pbHelp]
end end
object UnitsStringGrid: TStringGrid object UnitsStringGrid: TStringGrid
Left = 6 Left = 6
@ -106,18 +104,18 @@ object PPUListDialog: TPPUListDialog
end end
object UnitGroupBox: TGroupBox object UnitGroupBox: TGroupBox
Left = 6 Left = 6
Height = 188 Height = 186
Top = 291 Top = 291
Width = 728 Width = 728
Align = alClient Align = alClient
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'UnitGroupBox' Caption = 'UnitGroupBox'
ClientHeight = 167 ClientHeight = 165
ClientWidth = 720 ClientWidth = 720
TabOrder = 3 TabOrder = 3
object UnitPageControl: TPageControl object UnitPageControl: TPageControl
Left = 0 Left = 0
Height = 167 Height = 165
Top = 0 Top = 0
Width = 720 Width = 720
ActivePage = UsesTabSheet ActivePage = UsesTabSheet
@ -150,11 +148,11 @@ object PPUListDialog: TPPUListDialog
end end
object UsesTabSheet: TTabSheet object UsesTabSheet: TTabSheet
Caption = 'UsesTabSheet' Caption = 'UsesTabSheet'
ClientHeight = 134 ClientHeight = 132
ClientWidth = 716 ClientWidth = 716
object UsesStringGrid: TStringGrid object UsesStringGrid: TStringGrid
Left = 0 Left = 0
Height = 134 Height = 132
Top = 0 Top = 0
Width = 716 Width = 716
Align = alClient Align = alClient

View File

@ -38,7 +38,8 @@ uses
PackageIntf, PackageIntf,
// codetools // codetools
BasicCodeTools, FileProcs, CodyStrConsts, CodeToolManager, CodeCache, BasicCodeTools, FileProcs, CodyStrConsts, CodeToolManager, CodeCache,
PPUParser, PPUCodeTools, DefineTemplates; PPUParser, PPUCodeTools, DefineTemplates,
CodyUtils;
const const
PPUFileNotFound = ' '; PPUFileNotFound = ' ';
@ -106,6 +107,7 @@ type
var {%H-}CanSelect: Boolean); var {%H-}CanSelect: Boolean);
procedure UnitStringGridMouseDown(Sender: TObject; procedure UnitStringGridMouseDown(Sender: TObject;
{%H-}Button: TMouseButton; Shift: TShiftState; X, Y: Integer); {%H-}Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure HelpButtonClick(Sender: TObject);
private private
FMainItem: TPPUListItem; FMainItem: TPPUListItem;
FProject: TLazProject; FProject: TLazProject;
@ -326,6 +328,11 @@ begin
end; end;
end; end;
procedure TPPUListDialog.HelpButtonClick(Sender: TObject);
begin
OpenCodyHelp('#PPU_files_of_project');
end;
procedure TPPUListDialog.FormClose(Sender: TObject; procedure TPPUListDialog.FormClose(Sender: TObject;
var CloseAction: TCloseAction); var CloseAction: TCloseAction);
begin begin