mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 00:59:25 +02:00
IDE: identifier completion window: optional icons. issue #32983, patch from regs
git-svn-id: trunk@57110 -
This commit is contained in:
parent
761123c874
commit
203b6860ad
@ -1390,6 +1390,7 @@ type
|
|||||||
fAutoDisplayFuncPrototypes: Boolean;
|
fAutoDisplayFuncPrototypes: Boolean;
|
||||||
fUseContainsFilter: Boolean;
|
fUseContainsFilter: Boolean;
|
||||||
fHighlightCodeCompletionPrefix: Boolean;
|
fHighlightCodeCompletionPrefix: Boolean;
|
||||||
|
fUseImagesInCompletionBox: Boolean;
|
||||||
|
|
||||||
// Code Folding
|
// Code Folding
|
||||||
FUseCodeFolding: Boolean;
|
FUseCodeFolding: Boolean;
|
||||||
@ -1585,6 +1586,8 @@ type
|
|||||||
read fUseContainsFilter write fUseContainsFilter default True;
|
read fUseContainsFilter write fUseContainsFilter default True;
|
||||||
property HighlightCodeCompletionPrefix: Boolean
|
property HighlightCodeCompletionPrefix: Boolean
|
||||||
read fHighlightCodeCompletionPrefix write fHighlightCodeCompletionPrefix default True;
|
read fHighlightCodeCompletionPrefix write fHighlightCodeCompletionPrefix default True;
|
||||||
|
property UseImagesInCompletionBox: Boolean
|
||||||
|
read fUseImagesInCompletionBox write fUseImagesInCompletionBox default True;
|
||||||
|
|
||||||
published
|
published
|
||||||
property DbgHintAutoTypeCastClass: Boolean
|
property DbgHintAutoTypeCastClass: Boolean
|
||||||
@ -4778,6 +4781,8 @@ begin
|
|||||||
XMLConfig.GetValue('EditorOptions/CodeTools/ContainsCompletionFilter', True);
|
XMLConfig.GetValue('EditorOptions/CodeTools/ContainsCompletionFilter', True);
|
||||||
fHighlightCodeCompletionPrefix :=
|
fHighlightCodeCompletionPrefix :=
|
||||||
XMLConfig.GetValue('EditorOptions/CodeTools/HighlightCodeCompletionPrefix', True);
|
XMLConfig.GetValue('EditorOptions/CodeTools/HighlightCodeCompletionPrefix', True);
|
||||||
|
fUseImagesInCompletionBox :=
|
||||||
|
XMLConfig.GetValue('EditorOptions/CodeTools/UseImagesInCompletionBox', True);
|
||||||
|
|
||||||
// Code Folding
|
// Code Folding
|
||||||
FUseCodeFolding :=
|
FUseCodeFolding :=
|
||||||
@ -4975,6 +4980,8 @@ begin
|
|||||||
, fUseContainsFilter, True);
|
, fUseContainsFilter, True);
|
||||||
XMLConfig.SetDeleteValue('EditorOptions/CodeTools/HighlightCodeCompletionPrefix'
|
XMLConfig.SetDeleteValue('EditorOptions/CodeTools/HighlightCodeCompletionPrefix'
|
||||||
, fHighlightCodeCompletionPrefix, True);
|
, fHighlightCodeCompletionPrefix, True);
|
||||||
|
XMLConfig.SetDeleteValue('EditorOptions/CodeTools/UseImagesInCompletionBox'
|
||||||
|
, fUseImagesInCompletionBox, True);
|
||||||
|
|
||||||
// Code Folding
|
// Code Folding
|
||||||
XMLConfig.SetDeleteValue('EditorOptions/CodeFolding/UseCodeFolding',
|
XMLConfig.SetDeleteValue('EditorOptions/CodeFolding/UseCodeFolding',
|
||||||
|
@ -16,10 +16,10 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideLeft.Control = AutoHintAndCompletionDelayLabel
|
AnchorSideLeft.Control = AutoHintAndCompletionDelayLabel
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = AutoHintAndCompletionDelayLabel
|
AnchorSideTop.Control = AutoHintAndCompletionDelayLabel
|
||||||
Left = 253
|
Left = 217
|
||||||
Height = 19
|
Height = 15
|
||||||
Top = 180
|
Top = 156
|
||||||
Width = 101
|
Width = 83
|
||||||
BorderSpacing.Left = 20
|
BorderSpacing.Left = 20
|
||||||
Caption = 'AutoDelayLabel'
|
Caption = 'AutoDelayLabel'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -32,7 +32,7 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 3
|
Height = 3
|
||||||
Top = 64
|
Top = 56
|
||||||
Width = 634
|
Width = 634
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -42,9 +42,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 19
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 255
|
Width = 210
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'AutoRemoveEmptyMethodsOnSave'
|
Caption = 'AutoRemoveEmptyMethodsOnSave'
|
||||||
@ -55,9 +55,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideTop.Control = AutoDisplayFuncProtoCheckBox
|
AnchorSideTop.Control = AutoDisplayFuncProtoCheckBox
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 19
|
||||||
Top = 99
|
Top = 87
|
||||||
Width = 236
|
Width = 198
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'AutoToolTipSymbToolsCheckBox'
|
Caption = 'AutoToolTipSymbToolsCheckBox'
|
||||||
@ -68,9 +68,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideTop.Control = AutoRemoveEmptyMethodsOnSave
|
AnchorSideTop.Control = AutoRemoveEmptyMethodsOnSave
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 19
|
||||||
Top = 35
|
Top = 31
|
||||||
Width = 218
|
Width = 179
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'AutoCompleteBlockCheckBox'
|
Caption = 'AutoCompleteBlockCheckBox'
|
||||||
@ -81,9 +81,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideTop.Control = AutoToolTipSymbToolsCheckBox
|
AnchorSideTop.Control = AutoToolTipSymbToolsCheckBox
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 19
|
||||||
Top = 128
|
Top = 112
|
||||||
Width = 222
|
Width = 182
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'AutoToolTipExprEvalCheckBox'
|
Caption = 'AutoToolTipExprEvalCheckBox'
|
||||||
@ -97,7 +97,7 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 30
|
Height = 30
|
||||||
Top = 200
|
Top = 172
|
||||||
Width = 622
|
Width = 622
|
||||||
Frequency = 250
|
Frequency = 250
|
||||||
Max = 4000
|
Max = 4000
|
||||||
@ -116,9 +116,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideTop.Control = DbgToolTipAutoCastClass
|
AnchorSideTop.Control = DbgToolTipAutoCastClass
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 15
|
||||||
Top = 180
|
Top = 156
|
||||||
Width = 227
|
Width = 191
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'AutoHintAndCompletionDelayLabel'
|
Caption = 'AutoHintAndCompletionDelayLabel'
|
||||||
@ -132,7 +132,7 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 30
|
Height = 30
|
||||||
Top = 256
|
Top = 224
|
||||||
Width = 622
|
Width = 622
|
||||||
Frequency = 250
|
Frequency = 250
|
||||||
Max = 4000
|
Max = 4000
|
||||||
@ -150,9 +150,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideTop.Control = AutoDelayTrackBar
|
AnchorSideTop.Control = AutoDelayTrackBar
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 19
|
Height = 15
|
||||||
Top = 236
|
Top = 208
|
||||||
Width = 177
|
Width = 148
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'CompletionDropDownLabel'
|
Caption = 'CompletionDropDownLabel'
|
||||||
@ -162,10 +162,10 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideLeft.Control = CompletionDropDownLabel
|
AnchorSideLeft.Control = CompletionDropDownLabel
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = CompletionDropDownLabel
|
AnchorSideTop.Control = CompletionDropDownLabel
|
||||||
Left = 203
|
Left = 174
|
||||||
Height = 19
|
Height = 15
|
||||||
Top = 236
|
Top = 208
|
||||||
Width = 213
|
Width = 177
|
||||||
BorderSpacing.Left = 20
|
BorderSpacing.Left = 20
|
||||||
Caption = 'CompletionDropDownDelayLabel'
|
Caption = 'CompletionDropDownDelayLabel'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -177,12 +177,12 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideBottom.Control = Owner
|
AnchorSideBottom.Control = Owner
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 33
|
Height = 23
|
||||||
Top = 288
|
Top = 256
|
||||||
Width = 220
|
Width = 220
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 2
|
BorderSpacing.Top = 2
|
||||||
ItemHeight = 19
|
ItemHeight = 15
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
end
|
end
|
||||||
@ -192,9 +192,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideTop.Control = CompletionDropDownHint
|
AnchorSideTop.Control = CompletionDropDownHint
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 232
|
Left = 232
|
||||||
Height = 19
|
Height = 15
|
||||||
Top = 295
|
Top = 260
|
||||||
Width = 205
|
Width = 171
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'CompletionDropDownHintLabel'
|
Caption = 'CompletionDropDownHintLabel'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -204,9 +204,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideTop.Control = AutoToolTipExprEvalCheckBox
|
AnchorSideTop.Control = AutoToolTipExprEvalCheckBox
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 26
|
Left = 26
|
||||||
Height = 23
|
Height = 19
|
||||||
Top = 151
|
Top = 131
|
||||||
Width = 191
|
Width = 159
|
||||||
BorderSpacing.Left = 20
|
BorderSpacing.Left = 20
|
||||||
Caption = 'DbgToolTipAutoCastClass'
|
Caption = 'DbgToolTipAutoCastClass'
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
@ -215,9 +215,9 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = ToolTipBevel
|
AnchorSideTop.Control = ToolTipBevel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 23
|
Height = 19
|
||||||
Top = 70
|
Top = 62
|
||||||
Width = 234
|
Width = 191
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'AutoDisplayFuncProtoCheckBox'
|
Caption = 'AutoDisplayFuncProtoCheckBox'
|
||||||
@ -227,12 +227,12 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = CompletionDropDownHint
|
AnchorSideTop.Control = CompletionDropDownHint
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 9
|
Left = 6
|
||||||
Height = 23
|
Height = 19
|
||||||
Top = 330
|
Top = 285
|
||||||
Width = 181
|
Width = 145
|
||||||
BorderSpacing.Left = 9
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 9
|
BorderSpacing.Top = 6
|
||||||
Caption = 'ContainsFilterCheckBox'
|
Caption = 'ContainsFilterCheckBox'
|
||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
end
|
end
|
||||||
@ -240,13 +240,26 @@ object EditorCodetoolsOptionsFrame: TEditorCodetoolsOptionsFrame
|
|||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = ContainsFilterCheckBox
|
AnchorSideTop.Control = ContainsFilterCheckBox
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 9
|
Left = 6
|
||||||
Height = 23
|
Height = 19
|
||||||
Top = 362
|
Top = 310
|
||||||
Width = 188
|
Width = 151
|
||||||
BorderSpacing.Left = 9
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 9
|
BorderSpacing.Top = 6
|
||||||
Caption = 'HighlightPrefixCheckBox'
|
Caption = 'HighlightPrefixCheckBox'
|
||||||
TabOrder = 10
|
TabOrder = 10
|
||||||
end
|
end
|
||||||
|
object UseImagesInCompletionBoxCheckBox: TCheckBox
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
AnchorSideTop.Control = HighlightPrefixCheckBox
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 19
|
||||||
|
Top = 335
|
||||||
|
Width = 221
|
||||||
|
BorderSpacing.Left = 6
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
Caption = 'UseImagesInCompletionBoxCheckBox'
|
||||||
|
TabOrder = 11
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -41,6 +41,7 @@ type
|
|||||||
CompletionDropDownHintLabel: TLabel;
|
CompletionDropDownHintLabel: TLabel;
|
||||||
CompletionDropDownHint: TComboBox;
|
CompletionDropDownHint: TComboBox;
|
||||||
CompletionDropDownDelayLabel: TLabel;
|
CompletionDropDownDelayLabel: TLabel;
|
||||||
|
UseImagesInCompletionBoxCheckBox: TCheckBox;
|
||||||
AutoDelayTrackBar: TTrackBar;
|
AutoDelayTrackBar: TTrackBar;
|
||||||
CompletionDropDownLabel: TLabel;
|
CompletionDropDownLabel: TLabel;
|
||||||
CompletionDropDownHintTrackBar: TTrackBar;
|
CompletionDropDownHintTrackBar: TTrackBar;
|
||||||
@ -89,6 +90,7 @@ begin
|
|||||||
AutoDisplayFuncProtoCheckBox.Caption := dlgAutoDisplayFuncProto;
|
AutoDisplayFuncProtoCheckBox.Caption := dlgAutoDisplayFuncProto;
|
||||||
ContainsFilterCheckBox.Caption := dlgIncludeIdentifiersContainingPrefix;
|
ContainsFilterCheckBox.Caption := dlgIncludeIdentifiersContainingPrefix;
|
||||||
HighlightPrefixCheckBox.Caption := dlgHighlightPrefix;
|
HighlightPrefixCheckBox.Caption := dlgHighlightPrefix;
|
||||||
|
UseImagesInCompletionBoxCheckBox.Caption := dlgUseImagesInCompletionBox;
|
||||||
|
|
||||||
AutoHintAndCompletionDelayLabel.Caption:=lisDelayForHintsAndCompletionBox;
|
AutoHintAndCompletionDelayLabel.Caption:=lisDelayForHintsAndCompletionBox;
|
||||||
CompletionDropDownLabel.Caption := lisDelayForCompletionLongLineHint;
|
CompletionDropDownLabel.Caption := lisDelayForCompletionLongLineHint;
|
||||||
@ -113,6 +115,7 @@ begin
|
|||||||
AutoDisplayFuncProtoCheckBox.Checked := AutoDisplayFunctionPrototypes;
|
AutoDisplayFuncProtoCheckBox.Checked := AutoDisplayFunctionPrototypes;
|
||||||
ContainsFilterCheckBox.Checked := ContainsCompletionFilter;
|
ContainsFilterCheckBox.Checked := ContainsCompletionFilter;
|
||||||
HighlightPrefixCheckBox.Checked := HighlightCodeCompletionPrefix;
|
HighlightPrefixCheckBox.Checked := HighlightCodeCompletionPrefix;
|
||||||
|
UseImagesInCompletionBoxCheckBox.Checked := UseImagesInCompletionBox;
|
||||||
|
|
||||||
CompletionDropDownHintTrackBar.Position := CompletionLongLineHintInMSec;
|
CompletionDropDownHintTrackBar.Position := CompletionLongLineHintInMSec;
|
||||||
CompletionDropDownHint.ItemIndex := ord(CompletionLongLineHintType);
|
CompletionDropDownHint.ItemIndex := ord(CompletionLongLineHintType);
|
||||||
@ -134,6 +137,7 @@ begin
|
|||||||
AutoDisplayFunctionPrototypes := AutoDisplayFuncProtoCheckBox.Checked;
|
AutoDisplayFunctionPrototypes := AutoDisplayFuncProtoCheckBox.Checked;
|
||||||
ContainsCompletionFilter := ContainsFilterCheckBox.Checked;
|
ContainsCompletionFilter := ContainsFilterCheckBox.Checked;
|
||||||
HighlightCodeCompletionPrefix := HighlightPrefixCheckBox.Checked;
|
HighlightCodeCompletionPrefix := HighlightPrefixCheckBox.Checked;
|
||||||
|
UseImagesInCompletionBox := UseImagesInCompletionBoxCheckBox.Checked;
|
||||||
|
|
||||||
CompletionLongLineHintInMSec := CompletionDropDownHintTrackBar.Position;
|
CompletionLongLineHintInMSec := CompletionDropDownHintTrackBar.Position;
|
||||||
CompletionLongLineHintType := TSynCompletionLongHintType(CompletionDropDownHint.ItemIndex);
|
CompletionLongLineHintType := TSynCompletionLongHintType(CompletionDropDownHint.ItemIndex);
|
||||||
|
@ -157,6 +157,7 @@
|
|||||||
<Filename Value="frames/editor_codetools_options.pas"/>
|
<Filename Value="frames/editor_codetools_options.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ComponentName Value="EditorCodetoolsOptionsFrame"/>
|
<ComponentName Value="EditorCodetoolsOptionsFrame"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Frame"/>
|
<ResourceBaseClass Value="Frame"/>
|
||||||
</Unit13>
|
</Unit13>
|
||||||
<Unit14>
|
<Unit14>
|
||||||
|
@ -1971,6 +1971,7 @@ resourcestring
|
|||||||
dlgHighlightPrefix = 'Highlight prefix';
|
dlgHighlightPrefix = 'Highlight prefix';
|
||||||
lisAutomaticFeatures = 'Completion and Hints';
|
lisAutomaticFeatures = 'Completion and Hints';
|
||||||
lisAutoMarkup = 'Markup and Matches';
|
lisAutoMarkup = 'Markup and Matches';
|
||||||
|
dlgUseImagesInCompletionBox = 'Icons in code completion box';
|
||||||
|
|
||||||
dlgMarkupUserDefined = 'User defined markup';
|
dlgMarkupUserDefined = 'User defined markup';
|
||||||
dlgMarkupUserDefinedNoLists = 'No lists';
|
dlgMarkupUserDefinedNoLists = 'No lists';
|
||||||
|
@ -261,7 +261,8 @@ var
|
|||||||
ItemNode: TCodeTreeNode;
|
ItemNode: TCodeTreeNode;
|
||||||
SubNode: TCodeTreeNode;
|
SubNode: TCodeTreeNode;
|
||||||
IsReadOnly: boolean;
|
IsReadOnly: boolean;
|
||||||
ImageIndex: longint;
|
UseImages: boolean;
|
||||||
|
ImageIndex, ImageIndexCC: longint;
|
||||||
Prefix: String;
|
Prefix: String;
|
||||||
PrefixPosition: Integer;
|
PrefixPosition: Integer;
|
||||||
HintModifiers: TPascalHintModifiers;
|
HintModifiers: TPascalHintModifiers;
|
||||||
@ -301,11 +302,14 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
IdentItem.BeautifyIdentifier(CodeToolBoss.IdentifierList);
|
IdentItem.BeautifyIdentifier(CodeToolBoss.IdentifierList);
|
||||||
|
ItemNode:=IdentItem.Node;
|
||||||
BackgroundColor:=ColorToRGB(ACanvas.Brush.Color);
|
BackgroundColor:=ColorToRGB(ACanvas.Brush.Color);
|
||||||
BGRed:=(BackgroundColor shr 16) and $ff;
|
BGRed:=(BackgroundColor shr 16) and $ff;
|
||||||
BGGreen:=(BackgroundColor shr 8) and $ff;
|
BGGreen:=(BackgroundColor shr 8) and $ff;
|
||||||
BGBlue:=BackgroundColor and $ff;
|
BGBlue:=BackgroundColor and $ff;
|
||||||
ImageIndex:=-1;
|
ImageIndex:=-1;
|
||||||
|
ImageIndexCC := -1;
|
||||||
|
UseImages := EditorOpts.UseImagesInCompletionBox;
|
||||||
|
|
||||||
// first write the type
|
// first write the type
|
||||||
// var, procedure, property, function, type, const
|
// var, procedure, property, function, type, const
|
||||||
@ -313,86 +317,160 @@ begin
|
|||||||
|
|
||||||
ctnVarDefinition, ctnRecordCase:
|
ctnVarDefinition, ctnRecordCase:
|
||||||
begin
|
begin
|
||||||
AColor:=clMaroon;
|
if UseImages then
|
||||||
s:='var';
|
ImageIndexCC := IDEImages.LoadImage('cc_variable', 16)
|
||||||
|
else begin
|
||||||
|
AColor:=clMaroon;
|
||||||
|
s:='var';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ctnTypeDefinition, ctnEnumerationType:
|
ctnTypeDefinition, ctnEnumerationType:
|
||||||
begin
|
begin
|
||||||
AColor:=clLime;
|
if UseImages then
|
||||||
s:='type';
|
begin
|
||||||
|
if ItemNode <> nil then
|
||||||
|
begin
|
||||||
|
ANode := IdentItem.Tool.FindTypeNodeOfDefinition(ItemNode);
|
||||||
|
case ANode.Desc of
|
||||||
|
ctnClass:
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_class', 16);
|
||||||
|
ctnRecordType:
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_record', 16);
|
||||||
|
ctnEnumerationType:
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_enum', 16);
|
||||||
|
else
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_type', 16);
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_type', 16);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AColor:=clLime;
|
||||||
|
s:='type';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ctnConstDefinition,ctnConstant:
|
ctnConstDefinition,ctnConstant:
|
||||||
begin
|
begin
|
||||||
AColor:=clOlive;
|
AColor:=clOlive;
|
||||||
s:='const';
|
s:='const';
|
||||||
|
if UseImages then
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_constant', 16);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ctnProcedure:
|
ctnProcedure:
|
||||||
begin
|
begin
|
||||||
if IdentItem.IsFunction then
|
if UseImages then
|
||||||
begin
|
begin
|
||||||
AColor:=clTeal;
|
if IdentItem.IsFunction then
|
||||||
s:='function';
|
ImageIndexCC := IDEImages.LoadImage('cc_function', 16)
|
||||||
|
else if IdentItem.IsConstructor then
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_constructor', 16)
|
||||||
|
else if IdentItem.IsDestructor then
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_destructor', 16)
|
||||||
|
else
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_procedure', 16);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
AColor:=clNavy;
|
if IdentItem.IsFunction then
|
||||||
if IdentItem.IsConstructor then
|
begin
|
||||||
s := 'constructor'
|
AColor:=clTeal;
|
||||||
|
s:='function';
|
||||||
|
end
|
||||||
else
|
else
|
||||||
if IdentItem.IsDestructor then
|
begin
|
||||||
s := 'destructor'
|
AColor:=clNavy;
|
||||||
else
|
if IdentItem.IsConstructor then
|
||||||
s:='procedure';
|
s := 'constructor'
|
||||||
|
else if IdentItem.IsDestructor then
|
||||||
|
s := 'destructor'
|
||||||
|
else
|
||||||
|
s:='procedure';
|
||||||
|
end;
|
||||||
|
if IdentItem.TryIsAbstractMethod then
|
||||||
|
AColor:=clRed;
|
||||||
|
if iliHasLowerVisibility in IdentItem.Flags then
|
||||||
|
AColor:=clGray;
|
||||||
end;
|
end;
|
||||||
if IdentItem.TryIsAbstractMethod then
|
|
||||||
AColor:=clRed;
|
|
||||||
if iliHasLowerVisibility in IdentItem.Flags then
|
|
||||||
AColor:=clGray;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ctnProperty,ctnGlobalProperty:
|
ctnProperty,ctnGlobalProperty:
|
||||||
begin
|
begin
|
||||||
AColor:=clPurple;
|
|
||||||
s:='property';
|
|
||||||
IsReadOnly:=IdentItem.IsPropertyReadOnly;
|
IsReadOnly:=IdentItem.IsPropertyReadOnly;
|
||||||
if IsReadOnly then
|
if UseImages then
|
||||||
ImageIndex:=IDEImages.LoadImage('ce_property_readonly');
|
begin
|
||||||
|
if IsReadOnly then
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_property_ro', 16)
|
||||||
|
else
|
||||||
|
ImageIndexCC := IDEImages.LoadImage('cc_property', 16);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AColor:=clPurple;
|
||||||
|
s:='property';
|
||||||
|
if IsReadOnly then
|
||||||
|
ImageIndex:=IDEImages.LoadImage('ce_property_readonly');
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ctnEnumIdentifier:
|
ctnEnumIdentifier:
|
||||||
begin
|
begin
|
||||||
AColor:=clOlive;
|
if UseImages then
|
||||||
s:='enum';
|
ImageIndexCC := IDEImages.LoadImage('cc_enum', 16)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AColor:=clOlive;
|
||||||
|
s:='enum';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ctnLabel:
|
ctnLabel:
|
||||||
begin
|
begin
|
||||||
AColor:=clOlive;
|
if UseImages then
|
||||||
s:='label';
|
ImageIndexCC := IDEImages.LoadImage('cc_label', 16)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AColor:=clOlive;
|
||||||
|
s:='label';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ctnUnit, ctnUseUnitClearName:
|
ctnUnit, ctnUseUnitClearName:
|
||||||
begin
|
begin
|
||||||
AColor:=clBlack;
|
if UseImages then
|
||||||
s:='unit';
|
ImageIndexCC := IDEImages.LoadImage('cc_unit', 16)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AColor:=clBlack;
|
||||||
|
s:='unit';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ctnUseUnitNamespace:
|
ctnUseUnitNamespace:
|
||||||
begin
|
begin
|
||||||
AColor:=clBlack;
|
if UseImages then
|
||||||
s:='namespace';
|
ImageIndexCC := IDEImages.LoadImage('cc_namespace', 16)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
AColor:=clBlack;
|
||||||
|
s:='namespace';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ctnNone:
|
ctnNone:
|
||||||
if iliKeyword in IdentItem.Flags then begin
|
if not UseImages then
|
||||||
AColor:=clBlack;
|
begin
|
||||||
s:='keyword';
|
if iliKeyword in IdentItem.Flags then begin
|
||||||
end else begin
|
AColor:=clBlack;
|
||||||
AColor:=clGray;
|
s:='keyword';
|
||||||
s:='';
|
end else begin
|
||||||
|
AColor:=clGray;
|
||||||
|
s:='';
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
else
|
else
|
||||||
@ -400,12 +478,28 @@ begin
|
|||||||
s:='';
|
s:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SetFontColor(AColor);
|
if UseImages then
|
||||||
if MeasureOnly then
|
begin
|
||||||
Inc(Result.X, ACanvas.TextWidth('constructor '))
|
// drawing type image
|
||||||
|
if MeasureOnly then
|
||||||
|
Inc(Result.X, IDEImages.Images_16.Width + round(IDEImages.Images_16.Width / 4))
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if ImageIndexCC >= 0 then
|
||||||
|
IDEImages.Images_16.Draw(ACanvas, x+1, y+(Result.Y-IDEImages.Images_16.Height) div 2, ImageIndexCC);
|
||||||
|
end;
|
||||||
|
Inc(x,IDEImages.Images_16.Width + round(IDEImages.Images_16.Width / 4));
|
||||||
|
end
|
||||||
else
|
else
|
||||||
ACanvas.TextOut(x+1,y,s);
|
begin
|
||||||
inc(x,ACanvas.TextWidth('constructor '));
|
SetFontColor(AColor);
|
||||||
|
if MeasureOnly then
|
||||||
|
Inc(Result.X, ACanvas.TextWidth('constructor '))
|
||||||
|
else
|
||||||
|
ACanvas.TextOut(x+1,y,s);
|
||||||
|
inc(x,ACanvas.TextWidth('constructor '));
|
||||||
|
end;
|
||||||
|
|
||||||
if x>MaxX then exit;
|
if x>MaxX then exit;
|
||||||
|
|
||||||
// paint the identifier
|
// paint the identifier
|
||||||
@ -445,19 +539,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// paint icon
|
// paint icon
|
||||||
if ImageIndex>=0 then begin
|
if not UseImages then
|
||||||
if MeasureOnly then
|
begin
|
||||||
Inc(Result.X, 18)
|
if ImageIndex>=0 then begin
|
||||||
else begin
|
if MeasureOnly then
|
||||||
IDEImages.Images_16.Draw(ACanvas,x+1,y+(Result.Y-16) div 2,ImageIndex);
|
Inc(Result.X, 18)
|
||||||
inc(x,18);
|
else begin
|
||||||
if x>MaxX then exit;
|
IDEImages.Images_16.Draw(ACanvas,x+1,y+(Result.Y-16) div 2,ImageIndex);
|
||||||
|
inc(x,18);
|
||||||
|
if x>MaxX then exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// finally paint the type/value/parameters
|
// finally paint the type/value/parameters
|
||||||
s:='';
|
s:='';
|
||||||
ItemNode:=IdentItem.Node;
|
|
||||||
if ItemNode<>nil then begin
|
if ItemNode<>nil then begin
|
||||||
case ItemNode.Desc of
|
case ItemNode.Desc of
|
||||||
|
|
||||||
|
@ -565,3 +565,26 @@ menu_quick_compile.png, menu_quick_compile_150.png, menu_quick_compile_200.png
|
|||||||
menu_reset_debugger.png, menu_reset_debugger_150.png, menu_reset_debugger_200.png
|
menu_reset_debugger.png, menu_reset_debugger_150.png, menu_reset_debugger_200.png
|
||||||
menu_run_file.png, menu_run_file_150.png, menu_run_file_200.png
|
menu_run_file.png, menu_run_file_150.png, menu_run_file_200.png
|
||||||
menu_uncomment.png, menu_uncomment_150.png, menu_uncomment_200.png
|
menu_uncomment.png, menu_uncomment_150.png, menu_uncomment_200.png
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Following images were created by regs:
|
||||||
|
|
||||||
|
codecompletion folder:
|
||||||
|
cc_class.png, cc_class_150.png, cc_class_200.png
|
||||||
|
cc_constant.png, cc_constant_150.png, cc_constant_200.png
|
||||||
|
cc_constructor.png, cc_constructor_150.png, cc_constructor_200.png
|
||||||
|
cc_destructor.png, cc_destructor_150.png, cc_destructor_200.png
|
||||||
|
cc_enum.png, cc_enum_150.png, cc_enum_200.png
|
||||||
|
cc_function.png, cc_function_150.png, cc_function_200.png
|
||||||
|
cc_label.png, cc_label_150.png, cc_label_200.png
|
||||||
|
cc_namespace.png, cc_namespace_150.png, cc_namespace_200.png
|
||||||
|
cc_procedure.png, cc_procedure_150.png, cc_procedure_200.png
|
||||||
|
cc_property.png, cc_property_150.png, cc_property_200.png
|
||||||
|
cc_property_ro.png, cc_property_ro_150.png, cc_property_ro_200.png
|
||||||
|
cc_record.png, cc_record_150.png, cc_record_200.png
|
||||||
|
cc_type.png, cc_type_150.png, cc_type_200.png
|
||||||
|
cc_unit.png, cc_unit_150.png, cc_unit_200.png
|
||||||
|
cc_variable.png, cc_variable_150.png, cc_variable_200.png
|
||||||
|
Binary file not shown.
@ -71,6 +71,51 @@ actions/laz_set_color_default.png
|
|||||||
actions/laz_tick.png
|
actions/laz_tick.png
|
||||||
actions/laz_wand.png
|
actions/laz_wand.png
|
||||||
actions/preferences.xpm
|
actions/preferences.xpm
|
||||||
|
codecompletion/cc_class.png
|
||||||
|
codecompletion/cc_class_150.png
|
||||||
|
codecompletion/cc_class_200.png
|
||||||
|
codecompletion/cc_constant.png
|
||||||
|
codecompletion/cc_constant_150.png
|
||||||
|
codecompletion/cc_constant_200.png
|
||||||
|
codecompletion/cc_constructor.png
|
||||||
|
codecompletion/cc_constructor_150.png
|
||||||
|
codecompletion/cc_constructor_200.png
|
||||||
|
codecompletion/cc_destructor.png
|
||||||
|
codecompletion/cc_destructor_150.png
|
||||||
|
codecompletion/cc_destructor_200.png
|
||||||
|
codecompletion/cc_enum.png
|
||||||
|
codecompletion/cc_enum_150.png
|
||||||
|
codecompletion/cc_enum_200.png
|
||||||
|
codecompletion/cc_function.png
|
||||||
|
codecompletion/cc_function_150.png
|
||||||
|
codecompletion/cc_function_200.png
|
||||||
|
codecompletion/cc_label.png
|
||||||
|
codecompletion/cc_label_150.png
|
||||||
|
codecompletion/cc_label_200.png
|
||||||
|
codecompletion/cc_namespace.png
|
||||||
|
codecompletion/cc_namespace_150.png
|
||||||
|
codecompletion/cc_namespace_200.png
|
||||||
|
codecompletion/cc_procedure.png
|
||||||
|
codecompletion/cc_procedure_150.png
|
||||||
|
codecompletion/cc_procedure_200.png
|
||||||
|
codecompletion/cc_property.png
|
||||||
|
codecompletion/cc_property_150.png
|
||||||
|
codecompletion/cc_property_200.png
|
||||||
|
codecompletion/cc_property_ro.png
|
||||||
|
codecompletion/cc_property_ro_150.png
|
||||||
|
codecompletion/cc_property_ro_200.png
|
||||||
|
codecompletion/cc_record.png
|
||||||
|
codecompletion/cc_record_150.png
|
||||||
|
codecompletion/cc_record_200.png
|
||||||
|
codecompletion/cc_type.png
|
||||||
|
codecompletion/cc_type_150.png
|
||||||
|
codecompletion/cc_type_200.png
|
||||||
|
codecompletion/cc_unit.png
|
||||||
|
codecompletion/cc_unit_150.png
|
||||||
|
codecompletion/cc_unit_200.png
|
||||||
|
codecompletion/cc_variable.png
|
||||||
|
codecompletion/cc_variable_150.png
|
||||||
|
codecompletion/cc_variable_200.png
|
||||||
codeexplorer/ce_class.png
|
codeexplorer/ce_class.png
|
||||||
codeexplorer/ce_classinterface.png
|
codeexplorer/ce_classinterface.png
|
||||||
codeexplorer/ce_const.png
|
codeexplorer/ce_const.png
|
||||||
|
Loading…
Reference in New Issue
Block a user