mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 07:21:34 +02:00
SynEdit: Hide unimplemented options in object inspector
git-svn-id: trunk@33828 -
This commit is contained in:
parent
1b09de06b0
commit
f50e6546ff
@ -182,7 +182,6 @@ type
|
||||
|
||||
TSynEditorOption = (
|
||||
eoAutoIndent, // Will indent the caret on new lines with the same amount of leading white space as the preceding line
|
||||
eoAutoIndentOnPaste, // Indent text inserted from clipboard
|
||||
eoBracketHighlight, // Highlight matching bracket
|
||||
eoEnhanceHomeKey, // home key jumps to line start if nearer, similar to visual studio
|
||||
eoGroupUndo, // When undoing/redoing actions, handle all continous changes of the same kind in one call instead undoing/redoing each command separately
|
||||
@ -199,7 +198,6 @@ type
|
||||
eoShowScrollHint, // Shows a hint of the visible line numbers when scrolling vertically
|
||||
eoShowSpecialChars, // Shows the special Characters
|
||||
eoSmartTabs, // When tabbing, the cursor will go to the next non-white space character of the previous line
|
||||
eoSpacesToTabs, // Converts space characters to tabs and spaces
|
||||
eoTabIndent, // When active <Tab> and <Shift><Tab> act as block indent, unindent when text is selected
|
||||
eoTabsToSpaces, // Converts a tab character to a specified number of space characters
|
||||
eoTrimTrailingSpaces, // Spaces at the end of lines will be trimmed and not saved
|
||||
@ -210,6 +208,8 @@ type
|
||||
eoHideShowScrollbars, //TODO if enabled, then the scrollbars will only show when necessary. If you have ScrollPastEOL, then it the horizontal bar will always be there (it uses MaxLength instead)
|
||||
eoDropFiles, //TODO Allows the editor accept file drops
|
||||
eoSmartTabDelete, //TODO similar to Smart Tabs, but when you delete characters
|
||||
eoSpacesToTabs, // Converts space characters to tabs and spaces
|
||||
eoAutoIndentOnPaste, // Indent text inserted from clipboard
|
||||
//eoSpecialLineDefaultFg, //TODO disables the foreground text color override when using the OnSpecialLineColor event
|
||||
|
||||
// Only for compatibility, moved to TSynEditorMouseOptions
|
||||
|
@ -234,6 +234,10 @@ begin
|
||||
RegisterClasses([TSynGutterPartList, TSynGutterSeparator, TSynGutterCodeFolding,
|
||||
TSynGutterLineNumber, TSynGutterChanges, TSynGutterMarks]);
|
||||
|
||||
// property editor, with filter for deprecated values
|
||||
RegisterPropertyEditor(TypeInfo(TSynEditorOptions), nil,
|
||||
'', TSynEdOptionsPropertyEditor);
|
||||
|
||||
RegisterPropertyEditor(ClassTypeInfo(TSynGutterPartListBase), nil,
|
||||
'', TSynPropertyEditGutterPartList);
|
||||
RegisterPropertyEditor(TypeInfo(TSynEditorMouseCommand), nil,
|
||||
|
@ -24,12 +24,19 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc,
|
||||
SynGutterBase, SynEditMiscClasses, SynEditMouseCmds,
|
||||
SynEdit, SynGutterBase, SynEditMiscClasses, SynEditMouseCmds,
|
||||
PropEdits, PropEditUtils, Forms, StdCtrls, ComCtrls, Dialogs,
|
||||
ObjInspStrConsts, Controls, IDEImagesIntf, typinfo, FormEditingIntf;
|
||||
|
||||
type
|
||||
|
||||
{ TSynEdOptionsPropertyEditor }
|
||||
|
||||
TSynEdOptionsPropertyEditor = class(TSetPropertyEditor)
|
||||
public
|
||||
procedure GetProperties(Proc: TGetPropEditProc); override;
|
||||
end;
|
||||
|
||||
{ TSynPropertEditClassList }
|
||||
|
||||
TSynPropertyEditObjectList = class(TListPropertyEditor)
|
||||
@ -119,6 +126,19 @@ begin
|
||||
KnownSynGutterPartClasses.AddObject(AName, TObject(Pointer(AClass)));
|
||||
end;
|
||||
|
||||
{ TSynEdOptionsPropertyEditor }
|
||||
|
||||
procedure TSynEdOptionsPropertyEditor.GetProperties(Proc: TGetPropEditProc);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
with GetTypeData(GetTypeData(GetPropType)^.CompType)^ do
|
||||
for I := MinValue to MaxValue do
|
||||
if not(TSynEditorOption(I) in SYNEDIT_UNIMPLEMENTED_OPTIONS)
|
||||
then
|
||||
Proc(TSetElementPropertyEditor.Create(Self, I));
|
||||
end;
|
||||
|
||||
{ TSynMouseCommandPropertyEditor }
|
||||
|
||||
function TSynMouseCommandPropertyEditor.GetAttributes: TPropertyAttributes;
|
||||
|
Loading…
Reference in New Issue
Block a user