mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-01 03:09:36 +01:00
fixed config path for IDE Dialogs
git-svn-id: trunk@7461 -
This commit is contained in:
parent
12ce6432d7
commit
7811bbddf9
@ -1,17 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="3"/>
|
||||
<PathDelim Value="/"/>
|
||||
<Version Value="5"/>
|
||||
<General>
|
||||
<ProjectType Value="Application"/>
|
||||
<Flags>
|
||||
<SaveOnlyProjectUnits Value="True"/>
|
||||
</Flags>
|
||||
<MainUnit Value="0"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<Title Value="jpegexample"/>
|
||||
</General>
|
||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||
<Units Count="23">
|
||||
<Units Count="3">
|
||||
<Unit0>
|
||||
<CursorPos X="10" Y="14"/>
|
||||
<EditorIndex Value="2"/>
|
||||
@ -23,7 +25,7 @@
|
||||
<UsageCount Value="33"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<CursorPos X="21" Y="17"/>
|
||||
<CursorPos X="21" Y="24"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<Filename Value="mainform.pas"/>
|
||||
<ComponentName Value="JPEGExampleForm"/>
|
||||
@ -35,140 +37,6 @@
|
||||
<UsageCount Value="33"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<CursorPos X="20" Y="156"/>
|
||||
<Filename Value="/home/mattias/pascal/wichtig/lazarus/lcl/dialogs.pp"/>
|
||||
<TopLine Value="134"/>
|
||||
<UnitName Value="Dialogs"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<CursorPos X="7" Y="48"/>
|
||||
<Filename Value="/home/mattias/pascal/wichtig/lazarus/components/jpeg/lazjpeg.pas"/>
|
||||
<TopLine Value="21"/>
|
||||
<UnitName Value="LazJPEG"/>
|
||||
<UsageCount Value="15"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<CursorPos X="9" Y="167"/>
|
||||
<Filename Value="/home/mattias/pascal/fpc_sources/19/fpc/fcl/image/fpreadjpeg.pas"/>
|
||||
<TopLine Value="141"/>
|
||||
<UnitName Value="FPReadJPEG"/>
|
||||
<UsageCount Value="14"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<CursorPos X="17" Y="171"/>
|
||||
<Filename Value="/home/mattias/pascal/fpc_sources/19/fpc/packages/base/pasjpeg/jdapimin.pas"/>
|
||||
<TopLine Value="139"/>
|
||||
<UnitName Value="JdAPImin"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<CursorPos X="3" Y="2543"/>
|
||||
<Filename Value="/home/mattias/pascal/fpc_sources/19/fpc/packages/base/pasjpeg/jdmarker.pas"/>
|
||||
<TopLine Value="2529"/>
|
||||
<UnitName Value="JdMarker"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<CursorPos X="1" Y="116"/>
|
||||
<Filename Value="/home/mattias/pascal/fpc_sources/19/fpc/packages/base/pasjpeg/jconfig.inc"/>
|
||||
<TopLine Value="74"/>
|
||||
<UsageCount Value="14"/>
|
||||
</Unit7>
|
||||
<Unit8>
|
||||
<CursorPos X="5" Y="1137"/>
|
||||
<Filename Value="/home/mattias/pascal/fpc_sources/19/fpc/packages/base/pasjpeg/jpeglib.pas"/>
|
||||
<TopLine Value="1096"/>
|
||||
<UnitName Value="JPEGLib"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit8>
|
||||
<Unit9>
|
||||
<CursorPos X="1" Y="43"/>
|
||||
<Filename Value="/home/mattias/pascal/wichtig/lazarus/components/codetools/memcheck.pas"/>
|
||||
<TopLine Value="20"/>
|
||||
<UnitName Value="MemCheck"/>
|
||||
<UsageCount Value="16"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<CursorPos X="25" Y="34"/>
|
||||
<Filename Value="/home/mattias/pascal/fpc_sources/19/fpc/packages/base/pasjpeg/jdatasrc.pas"/>
|
||||
<TopLine Value="11"/>
|
||||
<UnitName Value="JDataSrc"/>
|
||||
<UsageCount Value="13"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<CursorPos X="1" Y="37"/>
|
||||
<Filename Value="/home/mattias/pascal/fpc_sources/19/fpc/packages/base/pasjpeg/jinclude.pas"/>
|
||||
<TopLine Value="17"/>
|
||||
<UnitName Value="jinclude"/>
|
||||
<UsageCount Value="13"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<CursorPos X="6" Y="14"/>
|
||||
<Filename Value="/home/mattias/pascal/sf_lazarus/jpeg/jerror.pas"/>
|
||||
<TopLine Value="1"/>
|
||||
<UnitName Value="Jerror"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<CursorPos X="12" Y="113"/>
|
||||
<Filename Value="/home/mattias/pascal/sf_lazarus/jpeg/jconfig.inc"/>
|
||||
<TopLine Value="74"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<CursorPos X="13" Y="134"/>
|
||||
<Filename Value="/home/mattias/pascal/sf_lazarus/jpeg/lazjpeg.pas"/>
|
||||
<TopLine Value="109"/>
|
||||
<UnitName Value="LazJPEG"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<CursorPos X="37" Y="728"/>
|
||||
<Filename Value="/home/mattias/pascal/wichtig/lazarus/lcl/graphics.pp"/>
|
||||
<TopLine Value="707"/>
|
||||
<UnitName Value="Graphics"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<CursorPos X="1" Y="217"/>
|
||||
<Filename Value="/home/mattias/pascal/wichtig/lazarus/lcl/include/graphic.inc"/>
|
||||
<TopLine Value="191"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<CursorPos X="1" Y="1064"/>
|
||||
<Filename Value="/home/mattias/pascal/wichtig/lazarus/lcl/include/bitmap.inc"/>
|
||||
<TopLine Value="1041"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<CursorPos X="16" Y="306"/>
|
||||
<Filename Value="/home/mattias/pascal/wichtig/lazarus/lcl/intfgraphics.pas"/>
|
||||
<TopLine Value="287"/>
|
||||
<UnitName Value="IntfGraphics"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit18>
|
||||
<Unit19>
|
||||
<CursorPos X="1" Y="284"/>
|
||||
<Filename Value="/home/mattias/pascal/wichtig/lazarus/lcl/include/pixmap.inc"/>
|
||||
<TopLine Value="262"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit19>
|
||||
<Unit20>
|
||||
<CursorPos X="74" Y="34"/>
|
||||
<Filename Value="/home/mattias/pascal/wichtig/lazarus/lcl/include/png.inc"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
<CursorPos X="13" Y="1932"/>
|
||||
<Filename Value="/home/mattias/pascal/wichtig/lazarus/lcl/lcltype.pp"/>
|
||||
<TopLine Value="1909"/>
|
||||
<UnitName Value="LCLType"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<CursorPos X="2" Y="4"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<Filename Value="README.txt"/>
|
||||
@ -177,7 +45,7 @@
|
||||
<SyntaxHighlighter Value="None"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="21"/>
|
||||
</Unit22>
|
||||
</Unit2>
|
||||
</Units>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
@ -202,10 +70,14 @@
|
||||
</RequiredPackages>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="$(LazarusDir)/components/units/$(TargetCPU)/$(TargetOS)/"/>
|
||||
<SrcPath Value="$(LazarusDir)/lcl/;$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)/"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<Generate Value="Faster"/>
|
||||
</CodeGeneration>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
|
||||
@ -1147,12 +1147,13 @@ resourcestring
|
||||
uemBookmarkN = 'Bookmark';
|
||||
uemSetBookmark = '&Set Bookmark';
|
||||
uemReadOnly = 'Read Only';
|
||||
uemUnitInfo = 'Unit Info';
|
||||
uemShowLineNumbers = 'Show Line Numbers';
|
||||
uemShowUnitInfo = 'Unit Info';
|
||||
uemDebugWord = 'Debug';
|
||||
uemAddBreakpoint = '&Add Breakpoint';
|
||||
uemAddWatchAtCursor = 'Add &Watch At Cursor';
|
||||
uemRunToCursor='&Run to Cursor';
|
||||
uemViewCallStackCursor = 'View Call Stack';
|
||||
uemViewCallStack = 'View Call Stack';
|
||||
uemMoveEditorLeft='Move Editor Left';
|
||||
uemMoveEditorRight='Move Editor Right';
|
||||
uemRefactor = 'Refactoring';
|
||||
@ -1160,6 +1161,8 @@ resourcestring
|
||||
uemEncloseSelection = 'Enclose Selection';
|
||||
uemExtractProc = 'Extract Procedure';
|
||||
uemInvertAssignment = 'Invert Assignment';
|
||||
uemFindIdentifierReferences = 'Find Identifier References';
|
||||
uemRenameIdentifier = 'Rename Identifier';
|
||||
uemEditorproperties='Editor properties';
|
||||
ueNotImplCap='Not implemented yet';
|
||||
ueNotImplText='If You can help us to implement this feature, mail to '
|
||||
|
||||
@ -1698,6 +1698,7 @@ end;
|
||||
procedure TMainIDE.SetupStandardIDEMenuItems;
|
||||
begin
|
||||
IDEMenuRoots:=TIDEMenuRoots.Create;
|
||||
RegisterStandardSourceEditorMenuItems;
|
||||
RegisterStandardMessagesViewMenuItems;
|
||||
RegisterStandardCodeExplorerMenuItems;
|
||||
end;
|
||||
|
||||
@ -690,6 +690,22 @@ var
|
||||
SrcEditMenuCut: TIDEMenuCommand;
|
||||
SrcEditMenuCopy: TIDEMenuCommand;
|
||||
SrcEditMenuPaste: TIDEMenuCommand;
|
||||
SrcEditMenuAddBreakpoint: TIDEMenuCommand;
|
||||
SrcEditMenuRunToCursor: TIDEMenuCommand;
|
||||
SrcEditMenuAddWatchAtCursor: TIDEMenuCommand;
|
||||
SrcEditMenuViewCallStack: TIDEMenuCommand;
|
||||
SrcEditMenuCompleteCode: TIDEMenuCommand;
|
||||
SrcEditMenuEncloseSelection: TIDEMenuCommand;
|
||||
SrcEditMenuExtractProc: TIDEMenuCommand;
|
||||
SrcEditMenuInvertAssignment: TIDEMenuCommand;
|
||||
SrcEditMenuFindIdentifierReferences: TIDEMenuCommand;
|
||||
SrcEditMenuRenameIdentifier: TIDEMenuCommand;
|
||||
SrcEditMenuMoveEditorLeft: TIDEMenuCommand;
|
||||
SrcEditMenuMoveEditorRight: TIDEMenuCommand;
|
||||
SrcEditMenuReadOnly: TIDEMenuCommand;
|
||||
SrcEditMenuShowLineNumbers: TIDEMenuCommand;
|
||||
SrcEditMenuShowUnitInfo: TIDEMenuCommand;
|
||||
SrcEditMenuEditorProperties: TIDEMenuCommand;
|
||||
|
||||
procedure RegisterStandardSourceEditorMenuItems;
|
||||
|
||||
@ -765,174 +781,63 @@ begin
|
||||
RegisterIDEMenuCommand(SubSubPath,'SetBookmark'+IntToStr(I),
|
||||
uemBookmarkN+IntToStr(i));
|
||||
|
||||
{ TODO
|
||||
ReadOnlyMenuItem := TMenuItem.Create(Self);
|
||||
with ReadOnlyMenuItem do begin
|
||||
Name:='ReadOnlyMenuItem';
|
||||
Caption := uemReadOnly;
|
||||
OnClick := @ReadOnlyClicked;
|
||||
ShowAlwaysCheckable:=true;
|
||||
end;
|
||||
SrcPopupMenu.Items.Add(ReadOnlyMenuItem);
|
||||
// register the Debug submenu
|
||||
SrcEditSubMenuDebug:=RegisterIDESubMenu(Path,'Debug',uemDebugWord);
|
||||
SubSubPath:=SrcEditSubMenuDebug.GetPath;
|
||||
SrcEditMenuAddBreakpoint:=RegisterIDEMenuCommand(SubSubPath,'Add Breakpoint',
|
||||
uemAddBreakpoint);
|
||||
SrcEditMenuAddWatchAtCursor:=RegisterIDEMenuCommand(SubSubPath,
|
||||
'Add Watch at Cursor',uemAddWatchAtCursor);
|
||||
SrcEditMenuRunToCursor:=RegisterIDEMenuCommand(SubSubPath,
|
||||
'Run to cursor',uemRunToCursor);
|
||||
SrcEditMenuViewCallStack:=RegisterIDEMenuCommand(SubSubPath,
|
||||
'View Call Stack',uemViewCallStack);
|
||||
|
||||
ShowLineNumbersMenuItem := TMenuItem.Create(Self);
|
||||
with ShowLineNumbersMenuItem do begin
|
||||
Name := 'ShowLineNumbersMenuItem';
|
||||
Caption := dlgShowLineNumbers;
|
||||
OnClick := @ToggleLineNumbersClicked;
|
||||
ShowAlwaysCheckable:=true;
|
||||
end;
|
||||
SrcPopupMenu.Items.Add(ShowLineNumbersMenuItem);
|
||||
// register the Move Page section
|
||||
SrcEditMenuSectionMovePage:=RegisterIDEMenuSection(Path,'Move Page section');
|
||||
SubPath:=SrcEditMenuSectionMovePage.GetPath;
|
||||
SrcEditMenuMoveEditorLeft:=RegisterIDEMenuCommand(SubPath,'MoveEditorLeft',
|
||||
uemMoveEditorLeft);
|
||||
SrcEditMenuMoveEditorRight:=RegisterIDEMenuCommand(SubPath,'MoveEditorRight',
|
||||
uemMoveEditorRight);
|
||||
|
||||
SrcPopupMenu.Items.Add(Seperator);
|
||||
// register the Refactor submenu
|
||||
SrcEditSubMenuRefactor:=RegisterIDESubMenu(Path,'Refactor',uemRefactor);
|
||||
SubSubPath:=SrcEditSubMenuRefactor.GetPath;
|
||||
SrcEditMenuCompleteCode:=RegisterIDEMenuCommand(SubSubPath,'CompleteCode',
|
||||
uemCompleteCode);
|
||||
SrcEditMenuEncloseSelection:=RegisterIDEMenuCommand(SubSubPath,
|
||||
'EncloseSelection',uemEncloseSelection);
|
||||
SrcEditMenuExtractProc:=RegisterIDEMenuCommand(SubSubPath,
|
||||
'ExtractProc',uemExtractProc);
|
||||
SrcEditMenuInvertAssignment:=RegisterIDEMenuCommand(SubSubPath,
|
||||
'InvertAssignment',uemInvertAssignment);
|
||||
SrcEditMenuFindIdentifierReferences:=RegisterIDEMenuCommand(SubSubPath,
|
||||
'FindIdentifierReferences',uemFindIdentifierReferences);
|
||||
SrcEditMenuRenameIdentifier:=RegisterIDEMenuCommand(SubSubPath,
|
||||
'RenameIdentifier',uemRenameIdentifier);
|
||||
|
||||
ShowUnitInfoMenuItem := TMenuItem.Create(Self);
|
||||
with ShowUnitInfoMenuItem do begin
|
||||
Name:='ShowUnitInfoMenuItem';
|
||||
Caption := uemUnitInfo;
|
||||
OnClick:=@ShowUnitInfo;
|
||||
end;
|
||||
SrcPopupMenu.Items.Add(ShowUnitInfoMenuItem);
|
||||
|
||||
SrcPopupMenu.Items.Add(Seperator);
|
||||
|
||||
DebugMenuItem := TMenuItem.Create(Self);
|
||||
with DebugMenuItem do begin
|
||||
Name:='DebugMenuItem';
|
||||
Caption := uemDebugWord;
|
||||
end;
|
||||
SrcPopupMenu.Items.Add(DebugMenuItem);
|
||||
|
||||
AddBreakpointMenuItem := TMenuItem.Create(Self);
|
||||
with AddBreakpointMenuItem do begin
|
||||
Name := 'AddBreakpointMenuItem';
|
||||
Caption := uemAddBreakpoint;
|
||||
OnClick := @AddBreakpointClicked;
|
||||
end;
|
||||
DebugMenuItem.Add(AddBreakpointMenuItem);
|
||||
|
||||
AddWatchAtCursorMenuItem := TMenuItem.Create(Self);
|
||||
with AddWatchAtCursorMenuItem do begin
|
||||
Name := 'AddWatchAtCursorMenuItem';
|
||||
Caption := uemAddWatchAtCursor;
|
||||
OnClick := @AddWatchAtCursor;
|
||||
end;
|
||||
DebugMenuItem.Add(AddWatchAtCursorMenuItem);
|
||||
|
||||
RunToCursorMenuItem := TMenuItem.Create(Self);
|
||||
with RunToCursorMenuItem do begin
|
||||
Name := 'RunToCursorMenuItem';
|
||||
Caption := uemRunToCursor;
|
||||
OnClick := @RunToClicked;
|
||||
end;
|
||||
DebugMenuItem.Add(RunToCursorMenuItem);
|
||||
|
||||
ViewCallStackMenuItem := TMenuItem.Create(Self);
|
||||
with ViewCallStackMenuItem do begin
|
||||
Name := 'ViewCallStackMenuItem';
|
||||
Caption := uemViewCallStackCursor;
|
||||
OnClick := @ViewCallStackClick;
|
||||
end;
|
||||
DebugMenuItem.Add(ViewCallStackMenuItem);
|
||||
|
||||
|
||||
SrcPopupMenu.Items.Add(Seperator);
|
||||
|
||||
MoveEditorLeftMenuItem := TMenuItem.Create(Self);
|
||||
with MoveEditorLeftMenuItem do begin
|
||||
Name := 'MoveEditorLeftMenuItem';
|
||||
Caption := uemMoveEditorLeft;
|
||||
OnClick :=@MoveEditorLeftClicked;
|
||||
end;
|
||||
SrcPopupMenu.Items.Add(MoveEditorLeftMenuItem);
|
||||
|
||||
MoveEditorRightMenuItem := TMenuItem.Create(Self);
|
||||
with MoveEditorRightMenuItem do begin
|
||||
Name := 'MoveEditorRightMenuItem';
|
||||
Caption := uemMoveEditorRight;
|
||||
OnClick :=@MoveEditorRightClicked;
|
||||
end;
|
||||
SrcPopupMenu.Items.Add(MoveEditorRightMenuItem);
|
||||
|
||||
SrcPopupMenu.Items.Add(Seperator);
|
||||
|
||||
RefactorMenuItem := TMenuItem.Create(Self);
|
||||
with RefactorMenuItem do begin
|
||||
Name:='RefactorMenuItem';
|
||||
Caption := uemRefactor;
|
||||
end;
|
||||
SrcPopupMenu.Items.Add(RefactorMenuItem);
|
||||
|
||||
CompleteCodeMenuItem := TMenuItem.Create(Self);
|
||||
with CompleteCodeMenuItem do begin
|
||||
Name := 'CompleteCodeMenuItem';
|
||||
Caption := uemCompleteCode;
|
||||
OnClick :=@CompleteCodeMenuItemClick;
|
||||
end;
|
||||
RefactorMenuItem.Add(CompleteCodeMenuItem);
|
||||
|
||||
EncloseSelectionMenuItem := TMenuItem.Create(Self);
|
||||
with EncloseSelectionMenuItem do begin
|
||||
Name := 'EncloseSelectionMenuItem';
|
||||
Caption := uemEncloseSelection;
|
||||
OnClick :=@EncloseSelectionMenuItemClick;
|
||||
end;
|
||||
RefactorMenuItem.Add(EncloseSelectionMenuItem);
|
||||
|
||||
ExtractProcMenuItem := TMenuItem.Create(Self);
|
||||
with ExtractProcMenuItem do begin
|
||||
Name := 'ExtractProcMenuItem';
|
||||
Caption := uemExtractProc;
|
||||
OnClick :=@ExtractProcMenuItemClick;
|
||||
end;
|
||||
RefactorMenuItem.Add(ExtractProcMenuItem);
|
||||
|
||||
InvertAssignmentMenuItem := TMenuItem.Create(Self);
|
||||
with InvertAssignmentMenuItem do begin
|
||||
Name := 'InvertAssignment';
|
||||
Caption := uemInvertAssignment;
|
||||
OnClick :=@InvertAssignmentMenuItemClick;
|
||||
end;
|
||||
RefactorMenuItem.Add(InvertAssignmentMenuItem);
|
||||
|
||||
FindIdentifierReferencesMenuItem := TMenuItem.Create(Self);
|
||||
with FindIdentifierReferencesMenuItem do begin
|
||||
Name := 'FindIdentifierReferencesMenuItem';
|
||||
Caption := lisMenuFindIdentifierRefs;
|
||||
OnClick :=@FindIdentifierReferencesMenuItemClick;
|
||||
end;
|
||||
RefactorMenuItem.Add(FindIdentifierReferencesMenuItem);
|
||||
|
||||
RenameIdentifierMenuItem := TMenuItem.Create(Self);
|
||||
with RenameIdentifierMenuItem do begin
|
||||
Name := 'RenameIdentifierMenuItem';
|
||||
Caption := lisMenuRenameIdentifier;
|
||||
OnClick :=@RenameIdentifierMenuItemClick;
|
||||
end;
|
||||
RefactorMenuItem.Add(RenameIdentifierMenuItem);
|
||||
|
||||
SrcPopupMenu.Items.Add(Seperator);
|
||||
|
||||
EditorPropertiesMenuItem := TMenuItem.Create(Self);
|
||||
with EditorPropertiesMenuItem do begin
|
||||
Name := 'EditorPropertiesMenuItem';
|
||||
Caption := uemEditorproperties;
|
||||
OnClick :=@EditorPropertiesClicked;
|
||||
end;
|
||||
SrcPopupMenu.Items.Add(EditorPropertiesMenuItem);
|
||||
}
|
||||
// register the Flags section
|
||||
SrcEditMenuSectionFlags:=RegisterIDEMenuSection(Path,'Flags section');
|
||||
SubPath:=SrcEditMenuSectionFlags.GetPath;
|
||||
SrcEditMenuReadOnly:=RegisterIDEMenuCommand(SubPath,'ReadOnly',uemReadOnly);
|
||||
SrcEditMenuReadOnly.ShowAlwaysCheckable:=true;
|
||||
SrcEditMenuShowLineNumbers:=RegisterIDEMenuCommand(SubPath,'ShowLineNumbers',
|
||||
uemShowLineNumbers);
|
||||
SrcEditMenuShowLineNumbers.ShowAlwaysCheckable:=true;
|
||||
SrcEditMenuShowUnitInfo:=RegisterIDEMenuCommand(SubPath,'ShowUnitInfo',
|
||||
uemShowUnitInfo);
|
||||
SrcEditMenuEditorProperties:=RegisterIDEMenuCommand(SubPath,
|
||||
'EditorProperties',uemEditorProperties);
|
||||
end;
|
||||
|
||||
|
||||
{ TSourceEditor }
|
||||
|
||||
{The constructor for @link(TSourceEditor). AOwner is the @link(TSOurceNotebook)
|
||||
and the AParent is usually a page of a @link(TNotebook)
|
||||
}
|
||||
|
||||
{ The constructor for @link(TSourceEditor).
|
||||
AOwner is the @link(TSourceNotebook)
|
||||
and the AParent is usually a page of a @link(TNotebook) }
|
||||
constructor TSourceEditor.Create(AOwner: TComponent; AParent: TWinControl);
|
||||
Begin
|
||||
//writeln('TSourceEditor.Create A ',AOwner.ClassName);
|
||||
inherited Create;
|
||||
FAOwner := AOwner;
|
||||
if (FAOwner<>nil) and (FAOwner is TSourceNotebook) then
|
||||
@ -945,14 +850,11 @@ Begin
|
||||
FErrorColumn:=-1;
|
||||
FExecutionLine:=-1;
|
||||
|
||||
// FControl := nil; //commented out on 11-14-2001
|
||||
//writeln('TSourceEditor.Create B ');
|
||||
CreateEditor(AOwner,AParent);
|
||||
|
||||
FEditPlugin := TSynEditPlugin1.Create(FEditor);
|
||||
FEditPlugin.OnLinesInserted := @LinesInserted;
|
||||
FEditPlugin.OnLinesDeleted := @LinesDeleted;
|
||||
//writeln('TSourceEditor.Create END ');
|
||||
end;
|
||||
|
||||
destructor TSourceEditor.Destroy;
|
||||
@ -2539,8 +2441,13 @@ begin
|
||||
end;
|
||||
|
||||
destructor TSourceNotebook.Destroy;
|
||||
var i: integer;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
{$IFDEF UseMenuIntf}
|
||||
SourceEditorMenuRoot.MenuItem:=nil;
|
||||
{$ENDIF}
|
||||
|
||||
FProcessingCommand:=false;
|
||||
for i:=FSourceEditorList.Count-1 downto 0 do
|
||||
Editors[i].Free;
|
||||
@ -3038,6 +2945,117 @@ begin
|
||||
end;
|
||||
|
||||
procedure TSourceNotebook.SrcPopUpMenuPopup(Sender: TObject);
|
||||
{$IFDEF UseMenuIntf}
|
||||
var
|
||||
ASrcEdit: TSourceEditor;
|
||||
BookMarkID, BookMarkX, BookMarkY: integer;
|
||||
MarkSrcEdit: TSourceEditor;
|
||||
MarkDesc: String;
|
||||
MarkEditorIndex: Integer;
|
||||
MarkMenuItem: TMenuItem;
|
||||
EditorComp: TSynEdit;
|
||||
Marks: PSourceMark;
|
||||
MarkCount: integer;
|
||||
i: Integer;
|
||||
CurMark: TSourceMark;
|
||||
EditorPopupPoint: TPoint;
|
||||
SelAvail: Boolean;
|
||||
SelAvailAndWritable: Boolean;
|
||||
CurFilename: String;
|
||||
begin
|
||||
//RemoveUserDefinedMenuItems;
|
||||
//RemoveContextMenuItems;
|
||||
|
||||
ASrcEdit:=
|
||||
FindSourceEditorWithEditorComponent(TPopupMenu(Sender).PopupComponent);
|
||||
if ASrcEdit=nil then exit;
|
||||
EditorComp:=ASrcEdit.EditorComponent;
|
||||
|
||||
// readonly
|
||||
SrcEditMenuReadOnly.MenuItem.Checked:=ASrcEdit.ReadOnly;
|
||||
SrcEditMenuShowLineNumbers.MenuItem.Checked:=EditorComp.Gutter.ShowLineNumbers;
|
||||
|
||||
// bookmarks
|
||||
for BookMarkID:=0 to 9 do begin
|
||||
MarkDesc:=' '+IntToStr(BookMarkID);
|
||||
MarkSrcEdit:=FindBookmark(BookMarkID);
|
||||
if (MarkSrcEdit<>nil)
|
||||
and MarkSrcEdit.EditorComponent.GetBookMark(BookMarkID,BookMarkX,BookMarkY)
|
||||
then begin
|
||||
MarkEditorIndex:=FindPageWithEditor(MarkSrcEdit);
|
||||
MarkDesc:=MarkDesc+': '+Notebook.Pages[MarkEditorIndex]
|
||||
+' ('+IntToStr(BookMarkY)+','+IntToStr(BookMarkX)+')';
|
||||
end;
|
||||
// goto book mark item
|
||||
MarkMenuItem:=SrcEditSubMenuGotoBookmarks.MenuItem[BookMarkID];
|
||||
MarkMenuItem.Checked:=(MarkSrcEdit<>nil);
|
||||
MarkMenuItem.Caption:=uemBookmarkN+MarkDesc;
|
||||
// set book mark item
|
||||
MarkMenuItem:=SrcEditSubMenuSetBookmarks.MenuItem[BookMarkID];
|
||||
MarkMenuItem.Checked:=(MarkSrcEdit<>nil);
|
||||
MarkMenuItem.Caption:=uemSetBookmark+MarkDesc;
|
||||
end;
|
||||
|
||||
// editor layout
|
||||
SrcEditMenuMoveEditorLeft.MenuItem.Enabled:=
|
||||
(NoteBook<>nil) and (NoteBook.PageCount>1);
|
||||
SrcEditMenuMoveEditorRight.MenuItem.Enabled:=
|
||||
(NoteBook<>nil) and (NoteBook.PageCount>1);
|
||||
|
||||
EditorPopupPoint:=EditorComp.ScreenToClient(SrcPopUpMenu.PopupPoint);
|
||||
if EditorPopupPoint.X>EditorComp.Gutter.Width then begin
|
||||
// user clicked on text
|
||||
SelAvail:=ASrcEdit.EditorComponent.SelAvail;
|
||||
SelAvailAndWritable:=SelAvail and (not ASrcEdit.ReadOnly);
|
||||
SrcEditMenuEncloseSelection.MenuItem.Enabled := SelAvailAndWritable;
|
||||
SrcEditMenuExtractProc.MenuItem.Enabled := SelAvailAndWritable;
|
||||
SrcEditMenuInvertAssignment.MenuItem.Enabled := SelAvailAndWritable;
|
||||
SrcEditMenuFindIdentifierReferences.MenuItem.Enabled:=
|
||||
IsValidIdent(ASrcEdit.GetWordAtCurrentCaret);
|
||||
SrcEditMenuRenameIdentifier.MenuItem.Enabled:=
|
||||
IsValidIdent(ASrcEdit.GetWordAtCurrentCaret)
|
||||
and (not ASrcEdit.ReadOnly);
|
||||
end else begin
|
||||
// user clicked on gutter
|
||||
SourceEditorMarks.GetMarksForLine(EditorComp,EditorComp.CaretY,
|
||||
Marks,MarkCount);
|
||||
if Marks<>nil then begin
|
||||
for i:=0 to MarkCount-1 do begin
|
||||
CurMark:=Marks[i];
|
||||
//CurMark.CreatePopupMenuItems(@AddUserDefinedPopupMenuItem);
|
||||
end;
|
||||
FreeMem(Marks);
|
||||
end;
|
||||
end;
|
||||
|
||||
// add context specific menu items
|
||||
{CurFilename:=ASrcEdit.FileName;
|
||||
if FilenameIsPascalUnit(CurFilename)
|
||||
and (FilenameIsAbsolute(CurFilename)) then begin
|
||||
if FileExists(ChangeFileExt(CurFilename,'.lfm')) then
|
||||
AddContextPopupMenuItem(
|
||||
'Open '+ChangeFileExt(ExtractFileName(CurFilename),'.lfm'),
|
||||
true,@OnPopupMenuOpenLFMFile);
|
||||
if FileExists(ChangeFileExt(CurFilename,'.lrs')) then
|
||||
AddContextPopupMenuItem(
|
||||
'Open '+ChangeFileExt(ExtractFileName(CurFilename),'.lrs'),
|
||||
true,@OnPopupMenuOpenLRSFile);
|
||||
end;
|
||||
if (CompareFileExt(CurFilename,'.lfm',true)=0)
|
||||
and (FilenameIsAbsolute(CurFilename)) then begin
|
||||
if FileExists(ChangeFileExt(CurFilename,'.pas')) then
|
||||
AddContextPopupMenuItem(
|
||||
'Open '+ChangeFileExt(ExtractFileName(CurFilename),'.pas'),
|
||||
true,@OnPopupMenuOpenPasFile);
|
||||
if FileExists(ChangeFileExt(CurFilename,'.pp')) then
|
||||
AddContextPopupMenuItem(
|
||||
'Open '+ChangeFileExt(ExtractFileName(CurFilename),'.pp'),
|
||||
true,@OnPopupMenuOpenPPFile);
|
||||
end;}
|
||||
|
||||
//if Assigned(OnPopupMenu) then OnPopupMenu(@AddContextPopupMenuItem);
|
||||
end;
|
||||
{$ELSE}
|
||||
var
|
||||
ASrcEdit: TSourceEditor;
|
||||
BookMarkID, BookMarkX, BookMarkY: integer;
|
||||
@ -3147,6 +3165,7 @@ begin
|
||||
|
||||
if Assigned(OnPopupMenu) then OnPopupMenu(@AddContextPopupMenuItem);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TSourceNotebook.NotebookShowTabHint(Sender: TObject;
|
||||
HintInfo: PHintInfo);
|
||||
@ -3180,7 +3199,59 @@ begin
|
||||
end;
|
||||
|
||||
Procedure TSourceNotebook.BuildPopupMenu;
|
||||
{$IFDEF UseMenuIntf}
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
debugln('TSourceNotebook.BuildPopupMenu');
|
||||
|
||||
SrcPopupMenu := TPopupMenu.Create(Self);
|
||||
with SrcPopupMenu do begin
|
||||
AutoPopup := True;
|
||||
OnPopup :=@SrcPopUpMenuPopup;
|
||||
end;
|
||||
|
||||
// assign the root TMenuItem to the registered menu root.
|
||||
// This will automatically create all registered items
|
||||
SourceEditorMenuRoot.MenuItem:=SrcPopupMenu.Items;
|
||||
SrcPopupMenu.Items.WriteDebugReport('TSourceNotebook.BuildPopupMenu ');
|
||||
|
||||
SrcEditMenuFindDeclaration.OnClickMethod:=@FindDeclarationClicked;
|
||||
SrcEditMenuOpenFileAtCursor.OnClickMethod:=@OpenAtCursorClicked;
|
||||
|
||||
SrcEditMenuClosePage.OnClickMethod:=@CloseClicked;
|
||||
SrcEditMenuCut.OnClickMethod:=@CutClicked;
|
||||
SrcEditMenuCopy.OnClickMethod:=@CopyClicked;
|
||||
SrcEditMenuPaste.OnClickMethod:=@PasteClicked;
|
||||
for i:=0 to 9 do begin
|
||||
SrcEditSubMenuGotoBookmarks.FindByName('GotoBookmark'+IntToStr(i))
|
||||
.OnClickMethod:=@BookmarkGotoClicked;
|
||||
SrcEditSubMenuSetBookmarks.FindByName('SetBookmark'+IntToStr(i))
|
||||
.OnClickMethod:=@BookMarkSetClicked;
|
||||
end;
|
||||
|
||||
SrcEditMenuAddBreakpoint.OnClickMethod:=@AddBreakpointClicked;
|
||||
SrcEditMenuAddWatchAtCursor.OnClickMethod:=@AddWatchAtCursor;
|
||||
SrcEditMenuRunToCursor.OnClickMethod:=@RunToClicked;
|
||||
SrcEditMenuViewCallStack.OnClickMethod:=@ViewCallStackClick;
|
||||
|
||||
SrcEditMenuMoveEditorLeft.OnClickMethod:=@MoveEditorLeftClicked;
|
||||
SrcEditMenuMoveEditorRight.OnClickMethod:=@MoveEditorRightClicked;
|
||||
|
||||
SrcEditMenuCompleteCode.OnClickMethod:=@CompleteCodeMenuItemClick;
|
||||
SrcEditMenuEncloseSelection.OnClickMethod:=@EncloseSelectionMenuItemClick;
|
||||
SrcEditMenuExtractProc.OnClickMethod:=@ExtractProcMenuItemClick;
|
||||
SrcEditMenuInvertAssignment.OnClickMethod:=@InvertAssignmentMenuItemClick;
|
||||
SrcEditMenuFindIdentifierReferences.OnClickMethod:=
|
||||
@FindIdentifierReferencesMenuItemClick;
|
||||
SrcEditMenuRenameIdentifier.OnClickMethod:=@RenameIdentifierMenuItemClick;
|
||||
|
||||
SrcEditMenuReadOnly.OnClickMethod:=@ReadOnlyClicked;
|
||||
SrcEditMenuShowLineNumbers.OnClickMethod:=@ToggleLineNumbersClicked;
|
||||
SrcEditMenuShowUnitInfo.OnClickMethod:=@ShowUnitInfo;
|
||||
SrcEditMenuEditorProperties.OnClickMethod:=@EditorPropertiesClicked;
|
||||
end;
|
||||
{$ELSE}
|
||||
Function Seperator: TMenuItem;
|
||||
Begin
|
||||
Result := TMenuItem.Create(Self);
|
||||
@ -3317,7 +3388,7 @@ Begin
|
||||
ShowUnitInfoMenuItem := TMenuItem.Create(Self);
|
||||
with ShowUnitInfoMenuItem do begin
|
||||
Name:='ShowUnitInfoMenuItem';
|
||||
Caption := uemUnitInfo;
|
||||
Caption := uemShowUnitInfo;
|
||||
OnClick:=@ShowUnitInfo;
|
||||
end;
|
||||
SrcPopupMenu.Items.Add(ShowUnitInfoMenuItem);
|
||||
@ -3358,7 +3429,7 @@ Begin
|
||||
ViewCallStackMenuItem := TMenuItem.Create(Self);
|
||||
with ViewCallStackMenuItem do begin
|
||||
Name := 'ViewCallStackMenuItem';
|
||||
Caption := uemViewCallStackCursor;
|
||||
Caption := uemViewCallStack;
|
||||
OnClick := @ViewCallStackClick;
|
||||
end;
|
||||
DebugMenuItem.Add(ViewCallStackMenuItem);
|
||||
@ -3449,6 +3520,7 @@ Begin
|
||||
end;
|
||||
SrcPopupMenu.Items.Add(EditorPropertiesMenuItem);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TSourceNotebook.RemoveUserDefinedMenuItems;
|
||||
var
|
||||
|
||||
@ -264,7 +264,7 @@ begin
|
||||
for i:=0 to NewCount-1 do begin
|
||||
NewDialogLayout:=FItemClass.Create('',Self);
|
||||
FItems.Add(NewDialogLayout);
|
||||
NewDialogLayout.LoadFromConfig(Config,Path+'Dialog/'+IntToStr(i+1));
|
||||
NewDialogLayout.LoadFromConfig(Config,Path+'Dialog'+IntToStr(i+1)+'/');
|
||||
end;
|
||||
Modified:=false;
|
||||
end;
|
||||
@ -275,7 +275,7 @@ var i: integer;
|
||||
begin
|
||||
Config.SetDeleteValue(Path+'Count',Count,0);
|
||||
for i:=0 to Count-1 do
|
||||
Items[i].SaveToConfig(Config,Path+'Dialog/'+IntToStr(i+1));
|
||||
Items[i].SaveToConfig(Config,Path+'Dialog'+IntToStr(i+1)+'/');
|
||||
Modified:=false;
|
||||
end;
|
||||
|
||||
|
||||
@ -224,6 +224,14 @@ var
|
||||
SrcEditSubMenuGotoBookmarks: TIDEMenuSection;
|
||||
// Source Editor: register the Set Bookmarks Submenu
|
||||
SrcEditSubMenuSetBookmarks: TIDEMenuSection;
|
||||
// Source Editor: register the Flags section
|
||||
SrcEditMenuSectionFlags: TIDEMenuSection;
|
||||
// register the Debug submenu
|
||||
SrcEditSubMenuDebug: TIDEMenuSection;
|
||||
// register the Move Page section
|
||||
SrcEditMenuSectionMovePage: TIDEMenuSection;
|
||||
// register the Refactor submenu
|
||||
SrcEditSubMenuRefactor: TIDEMenuSection;
|
||||
|
||||
MessagesMenuRoot: TIDEMenuSection;
|
||||
CodeExplorerMenuRoot: TIDEMenuSection;
|
||||
|
||||
@ -372,6 +372,17 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomComboBox.WMChar(var Message: TLMChar);
|
||||
begin
|
||||
// all normal characters are handled by the ComboBox
|
||||
//debugln('TCustomEdit.WMChar ',DbgSName(Self),' ',dbgs(Message.CharCode));
|
||||
if Message.CharCode in [ord('A')..ord('Z'),ord('a')..ord('z')] then
|
||||
// eat normal keys, so they don't trigger accelerators
|
||||
Message.Result := 1
|
||||
else
|
||||
inherited WMChar(Message);
|
||||
end;
|
||||
|
||||
procedure TCustomComboBox.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
var
|
||||
skip : Boolean;
|
||||
|
||||
@ -328,7 +328,7 @@ end;
|
||||
|
||||
procedure TCustomEdit.WMChar(var Message: TLMChar);
|
||||
begin
|
||||
// all normal characters are handled by the memo
|
||||
// all normal characters are handled by the Edit
|
||||
//debugln('TCustomEdit.WMChar ',DbgSName(Self),' ',dbgs(Message.CharCode));
|
||||
if Message.CharCode in [ord('A')..ord('Z'),ord('a')..ord('z')] then
|
||||
// eat normal keys, so they don't trigger accelerators
|
||||
|
||||
@ -253,6 +253,7 @@ type
|
||||
procedure CNCommand(var TheMessage: TLMCommand); message CN_Command;
|
||||
procedure UpdateSorted;
|
||||
procedure SetArrowKeysTraverseList(Value: Boolean);
|
||||
procedure WMChar(var Message: TLMChar); message LM_CHAR;
|
||||
protected
|
||||
procedure CreateWnd; override;
|
||||
procedure DestroyWnd; override;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user