mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 01:16:01 +02:00
SynEdit: formatting
git-svn-id: trunk@39092 -
This commit is contained in:
parent
ec95f00f98
commit
b5b8a10263
@ -623,8 +623,7 @@ type
|
||||
function GetBracketMatchColor : TSynSelectedColor;
|
||||
function GetMouseLinkColor : TSynSelectedColor;
|
||||
function GetTrimSpaceType: TSynEditStringTrimmingType;
|
||||
procedure SetBracketHighlightStyle(
|
||||
const AValue: TSynEditBracketHighlightStyle);
|
||||
procedure SetBracketHighlightStyle(const AValue: TSynEditBracketHighlightStyle);
|
||||
procedure SetOnGutterClick(const AValue : TGutterClickEvent);
|
||||
procedure SetSelectedColor(const AValue : TSynSelectedColor);
|
||||
procedure SetSpecialLineColors(const AValue : TSpecialLineColorsEvent);
|
||||
@ -967,8 +966,7 @@ type
|
||||
function ScreenRowToRow(ScreenRow: integer; LimitToLines: Boolean = True): integer;
|
||||
function RowToScreenRow(PhysicalRow: integer): integer;
|
||||
|
||||
procedure Notification(AComponent: TComponent;
|
||||
Operation: TOperation); override;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure RegisterCommandHandler(AHandlerProc: THookedCommandEvent;
|
||||
AHandlerData: pointer; AFlags: THookedCommandFlags = [hcfPreExec, hcfPostExec]);
|
||||
procedure UnregisterCommandHandler(AHandlerProc: THookedCommandEvent);
|
||||
@ -1031,8 +1029,7 @@ type
|
||||
property LeftChar: Integer read GetLeftChar write SetLeftChar;
|
||||
property LineHeight: integer read GetLineHeight;
|
||||
property LinesInWindow: Integer read GetLinesInWindow;
|
||||
property MaxLeftChar: integer read fMaxLeftChar write SetMaxLeftChar
|
||||
default 1024;
|
||||
property MaxLeftChar: integer read fMaxLeftChar write SetMaxLeftChar default 1024;
|
||||
property TopLine: Integer read GetTopLine write SetTopLine;
|
||||
|
||||
property UseIncrementalColor : Boolean write SetUseIncrementalColor;
|
||||
@ -1049,10 +1046,8 @@ type
|
||||
property Plugin[Index: Integer]: TLazSynEditPlugin read GetPlugin;
|
||||
function MarkupCount: Integer;
|
||||
property Markup[Index: integer]: TSynEditMarkup read GetMarkup;
|
||||
property MarkupByClass[Index: TSynEditMarkupClass]: TSynEditMarkup
|
||||
read GetMarkupByClass;
|
||||
property TrimSpaceType: TSynEditStringTrimmingType
|
||||
read GetTrimSpaceType write SetTrimSpaceType;
|
||||
property MarkupByClass[Index: TSynEditMarkupClass]: TSynEditMarkup read GetMarkupByClass;
|
||||
property TrimSpaceType: TSynEditStringTrimmingType read GetTrimSpaceType write SetTrimSpaceType;
|
||||
public
|
||||
// Caret
|
||||
property InsertCaret: TSynEditCaretType read FInsertCaret write SetInsertCaret default ctVerticalLine;
|
||||
@ -1082,21 +1077,16 @@ type
|
||||
property Highlighter: TSynCustomHighlighter read fHighlighter write SetHighlighter;
|
||||
property Gutter: TSynGutter read FLeftGutter write SetGutter;
|
||||
property RightGutter: TSynGutter read FRightGutter write SetRightGutter;
|
||||
property InsertMode: boolean read fInserting write SetInsertMode
|
||||
default true;
|
||||
property Keystrokes: TSynEditKeyStrokes
|
||||
read FKeystrokes write SetKeystrokes;
|
||||
property MouseActions: TSynEditMouseActions
|
||||
read GetMouseActions write SetMouseActions;
|
||||
property MouseTextActions: TSynEditMouseActions
|
||||
read GetMouseTextActions write SetMouseTextActions;
|
||||
property MouseSelActions: TSynEditMouseActions // Mouseactions, if mouse is over selection => fallback to normal
|
||||
read GetMouseSelActions write SetMouseSelActions;
|
||||
property InsertMode: boolean read fInserting write SetInsertMode default true;
|
||||
property Keystrokes: TSynEditKeyStrokes read FKeystrokes write SetKeystrokes;
|
||||
property MouseActions: TSynEditMouseActions read GetMouseActions write SetMouseActions;
|
||||
property MouseTextActions: TSynEditMouseActions read GetMouseTextActions write SetMouseTextActions;
|
||||
// Mouseactions, if mouse is over selection => fallback to normal
|
||||
property MouseSelActions: TSynEditMouseActions read GetMouseSelActions write SetMouseSelActions;
|
||||
property MaxUndo: Integer read GetMaxUndo write SetMaxUndo default 1024;
|
||||
property Options: TSynEditorOptions read FOptions write SetOptions // See SYNEDIT_UNIMPLEMENTED_OPTIONS for deprecated Values
|
||||
default SYNEDIT_DEFAULT_OPTIONS;
|
||||
property Options2: TSynEditorOptions2 read FOptions2 write SetOptions2
|
||||
default SYNEDIT_DEFAULT_OPTIONS2;
|
||||
// See SYNEDIT_UNIMPLEMENTED_OPTIONS for deprecated Values
|
||||
property Options: TSynEditorOptions read FOptions write SetOptions default SYNEDIT_DEFAULT_OPTIONS;
|
||||
property Options2: TSynEditorOptions2 read FOptions2 write SetOptions2 default SYNEDIT_DEFAULT_OPTIONS2;
|
||||
property MouseOptions: TSynEditorMouseOptions read FMouseOptions write SetMouseOptions
|
||||
default SYNEDIT_DEFAULT_MOUSE_OPTIONS;
|
||||
property ShareOptions: TSynEditorShareOptions read FShareOptions write SetShareOptions
|
||||
@ -1105,8 +1095,7 @@ type
|
||||
property ReadOnly: Boolean read GetReadOnly write SetReadOnly default FALSE;
|
||||
property RightEdge: Integer read GetRightEdge write SetRightEdge default 80;
|
||||
property RightEdgeColor: TColor read GetRightEdgeColor write SetRightEdgeColor default clSilver;
|
||||
property ScrollBars: TScrollStyle
|
||||
read FScrollBars write SetScrollBars default ssBoth;
|
||||
property ScrollBars: TScrollStyle read FScrollBars write SetScrollBars default ssBoth;
|
||||
property BracketHighlightStyle: TSynEditBracketHighlightStyle
|
||||
read GetBracketHighlightStyle write SetBracketHighlightStyle;
|
||||
property TabWidth: integer read fTabWidth write SetTabWidth default 8;
|
||||
@ -2491,8 +2480,7 @@ begin
|
||||
Result := FFoldedLinesView;
|
||||
end;
|
||||
|
||||
procedure TCustomSynEdit.SetBracketHighlightStyle(
|
||||
const AValue: TSynEditBracketHighlightStyle);
|
||||
procedure TCustomSynEdit.SetBracketHighlightStyle(const AValue: TSynEditBracketHighlightStyle);
|
||||
begin
|
||||
fMarkupBracket.HighlightStyle := AValue;
|
||||
end;
|
||||
@ -2507,8 +2495,7 @@ begin
|
||||
fMarkupSelection.UseIncrementalColor:=AValue;
|
||||
end;
|
||||
|
||||
function TCustomSynEdit.GetCharLen(const Line: string; CharStartPos: integer
|
||||
): integer;
|
||||
function TCustomSynEdit.GetCharLen(const Line: string; CharStartPos: integer): integer;
|
||||
begin
|
||||
if UseUTF8 and (length(Line)>=CharStartPos) then
|
||||
Result:=UTF8CharacterLength(@Line[CharStartPos])
|
||||
@ -5751,8 +5738,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomSynEdit.Notification(AComponent: TComponent;
|
||||
Operation: TOperation);
|
||||
procedure TCustomSynEdit.Notification(AComponent: TComponent; Operation: TOperation);
|
||||
begin
|
||||
inherited Notification(AComponent, Operation);
|
||||
if Operation = opRemove then begin
|
||||
|
@ -127,7 +127,7 @@ type
|
||||
published
|
||||
property Shift: TShiftState read FShift write SetShift default [];
|
||||
property ShiftMask: TShiftState read FShiftMask write SetShiftMask default [];
|
||||
property Button: TSynMouseButton read FButton write SetButton default mbXLeft;
|
||||
property Button: TSynMouseButton read FButton write SetButton default mbXLeft;
|
||||
property ClickCount: TSynMAClickCount read FClickCount write SetClickCount default ccSingle;
|
||||
property ClickDir: TSynMAClickDir read FClickDir write SetClickDir default cdUp;
|
||||
property Command: TSynEditorMouseCommand read FCommand write SetCommand;
|
||||
|
33
ide/main.pp
33
ide/main.pp
@ -10408,8 +10408,7 @@ begin
|
||||
{$ENDIF}
|
||||
LogCaret:=ActiveSrcEdit.EditorComponent.LogicalCaretXY;
|
||||
if CodeToolBoss.JumpToMethod(ActiveUnitInfo.Source,
|
||||
LogCaret.X,LogCaret.Y,
|
||||
NewSource,NewX,NewY,NewTopLine,RevertableJump) then
|
||||
LogCaret.X,LogCaret.Y,NewSource,NewX,NewY,NewTopLine,RevertableJump) then
|
||||
begin
|
||||
Flags := [jfFocusEditor];
|
||||
if not RevertableJump then include(Flags, jfAddJumpPoint);
|
||||
@ -10517,9 +10516,7 @@ begin
|
||||
if CodeToolsOpts.SkipForwardDeclarations then
|
||||
Include(FindFlags, fsfSkipClassForward);
|
||||
if CodeToolBoss.FindDeclaration(ActiveUnitInfo.Source,
|
||||
LogCaretXY.X,LogCaretXY.Y,
|
||||
NewSource,NewX,NewY,NewTopLine,FindFlags
|
||||
)
|
||||
LogCaretXY.X, LogCaretXY.Y, NewSource, NewX, NewY, NewTopLine, FindFlags )
|
||||
then begin
|
||||
//debugln(['TMainIDE.DoFindDeclarationAtCaret ',NewSource.Filename,' NewX=',Newx,',y=',NewY,' ',NewTopLine]);
|
||||
DoJumpToCodePosition(ActiveSrcEdit, ActiveUnitInfo,
|
||||
@ -10643,8 +10640,7 @@ begin
|
||||
// create the file list
|
||||
Files:=TStringList.Create;
|
||||
Files.Add(TargetUnitInfo.Filename);
|
||||
if CompareFilenames(DeclarationUnitInfo.Filename,TargetUnitInfo.Filename)<>0
|
||||
then
|
||||
if CompareFilenames(DeclarationUnitInfo.Filename,TargetUnitInfo.Filename)<>0 then
|
||||
Files.Add(DeclarationUnitInfo.Filename);
|
||||
|
||||
Options:=MiscellaneousOptions.FindRenameIdentifierOptions;
|
||||
@ -11212,8 +11208,7 @@ begin
|
||||
Project1.UpdateVisibleUnit(ASrcEdit,
|
||||
SourceEditorManager.IndexOfSourceWindow(ASrcEdit.SourceNotebook));
|
||||
|
||||
ActiveUnitInfo :=
|
||||
Project1.UnitWithEditorComponent(SourceEditorManager.ActiveEditor);
|
||||
ActiveUnitInfo := Project1.UnitWithEditorComponent(SourceEditorManager.ActiveEditor);
|
||||
if ActiveUnitInfo = nil then Exit;
|
||||
ActiveUnitInfo.SetLastUsedEditor(SourceEditorManager.ActiveEditor);
|
||||
|
||||
@ -11737,8 +11732,7 @@ var
|
||||
end;
|
||||
|
||||
// rename inherited component
|
||||
InheritedComponent:=
|
||||
DependingUnit.Component.FindComponent(AComponent.Name);
|
||||
InheritedComponent:=DependingUnit.Component.FindComponent(AComponent.Name);
|
||||
if InheritedComponent<>nil then begin
|
||||
// inherited component found
|
||||
if FRenamingComponents=nil then
|
||||
@ -12225,8 +12219,7 @@ begin
|
||||
DoViewJumpHistory(true);
|
||||
end;
|
||||
|
||||
procedure TMainIDE.OnSrcNoteBookPopupMenu(
|
||||
const AddMenuItemProc: TAddMenuItemProc);
|
||||
procedure TMainIDE.OnSrcNoteBookPopupMenu(const AddMenuItemProc: TAddMenuItemProc);
|
||||
begin
|
||||
PkgBoss.OnSourceEditorPopupMenu(AddMenuItemProc);
|
||||
end;
|
||||
@ -12931,8 +12924,7 @@ begin
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
function TMainIDE.GetProjectFileWithDesigner(ADesigner: TIDesigner
|
||||
): TLazProjectFile;
|
||||
function TMainIDE.GetProjectFileWithDesigner(ADesigner: TIDesigner): TLazProjectFile;
|
||||
var
|
||||
TheDesigner: TDesigner;
|
||||
AComponent: TComponent;
|
||||
@ -12944,8 +12936,7 @@ begin
|
||||
Result:=GetProjectFileWithRootComponent(AComponent);
|
||||
end;
|
||||
|
||||
function TMainIDE.OnPropHookMethodExists(const AMethodName: String;
|
||||
TypeData: PTypeData;
|
||||
function TMainIDE.OnPropHookMethodExists(const AMethodName: String; TypeData: PTypeData;
|
||||
var MethodIsCompatible,MethodIsPublished,IdentIsMethod: boolean): boolean;
|
||||
var
|
||||
ActiveSrcEdit: TSourceEditor;
|
||||
@ -12970,7 +12961,7 @@ end;
|
||||
function TMainIDE.OnPropHookCreateMethod(const AMethodName: ShortString;
|
||||
ATypeInfo: PTypeInfo;
|
||||
APersistent: TPersistent; const APropertyPath: string): TMethod;
|
||||
{ APersistent is the intance that gets the new method, not the lookuproot.
|
||||
{ APersistent is the instance that gets the new method, not the lookuproot.
|
||||
For example assign 'Button1Click' to Form1.Button1.OnClick:
|
||||
APersistent = APersistent
|
||||
AMethodName = 'Button1Click'
|
||||
@ -13296,8 +13287,7 @@ begin
|
||||
end;
|
||||
|
||||
if (ADesigner<>nil) and ((RegComp<>nil) or (ClassUnitInfo<>nil)) then begin
|
||||
if not BeginCodeTool(ADesigner,ActiveSrcEdit,ActiveUnitInfo,
|
||||
[ctfSwitchToFormSource])
|
||||
if not BeginCodeTool(ADesigner,ActiveSrcEdit,ActiveUnitInfo,[ctfSwitchToFormSource])
|
||||
then exit;
|
||||
|
||||
// remember cursor position
|
||||
@ -13320,8 +13310,7 @@ begin
|
||||
|
||||
// add component definitions to form source
|
||||
Ancestor:=GetAncestorLookupRoot(ActiveUnitInfo);
|
||||
CodeToolBoss.CompleteComponent(ActiveUnitInfo.Source,ADesigner.LookupRoot,
|
||||
Ancestor);
|
||||
CodeToolBoss.CompleteComponent(ActiveUnitInfo.Source,ADesigner.LookupRoot,Ancestor);
|
||||
end;
|
||||
|
||||
if ObjectInspector1<>nil then
|
||||
|
Loading…
Reference in New Issue
Block a user