lazdoc: added xml cache, added inherited page

git-svn-id: trunk@9729 -
This commit is contained in:
mattias 2006-08-18 09:17:37 +00:00
parent c5aba043ed
commit 71e5337167
15 changed files with 1153 additions and 538 deletions

3
.gitattributes vendored
View File

@ -1303,6 +1303,9 @@ ide/lazdoc.pas svneol=native#text/plain
ide/lazdocfrm.lfm svneol=native#text/plain
ide/lazdocfrm.lrs svneol=native#text/plain
ide/lazdocfrm.pas svneol=native#text/plain
ide/lazdocselectinherited.lfm svneol=native#text/plain
ide/lazdocselectinherited.lrs svneol=native#text/plain
ide/lazdocselectinherited.pas svneol=native#text/plain
ide/lrtpotools.pas svneol=native#text/pascal
ide/macropromptdlg.pas svneol=native#text/pascal
ide/main.pp svneol=native#text/pascal

View File

@ -390,8 +390,8 @@ Constructors allocate memory and system resources needed by the object. They als
</element>
<!-- property Visibility: published -->
<element name="TButton.Align">
<short>Is used to align a button to a border of a parent control.</short>
<descr>Align is used to align a control to a border of a parent control, even if the parent control is resized.<br/><br/>
<short></short>
<descr><br/><br/>
Possible values fo Allign are:<br/>
alTop: Places the control at the top, using the full clientwidth of its parent control.<br/>
alBottom: Places the control at the bottom, using the full clientwidth of its parent control.<br/>
@ -399,6 +399,9 @@ alLeft: Places the control at the left side of its parent and uses the available
alRight: Like alLeft but on the right side of the parent control.<br/>
alNone: The control can be placed anywhere on the parent control.<br/>
alClient: The control takes al available space on parent control next to controls aligned to the top, bottom, right or left.</descr>
<errors></errors>
<seealso></seealso>
<example file=""/>
</element>
<!-- property Visibility: published -->
<element name="TButton.Anchors">

View File

@ -6986,9 +6986,11 @@
</element>
<!-- property Visibility: public -->
<element name="TControl.Align">
<short/>
<descr/>
<seealso/>
<short>Used to align the control in one of four directions.</short>
<descr></descr>
<seealso></seealso>
<errors></errors>
<example file=""/>
</element>
<!-- property Visibility: public -->
<element name="TControl.Anchors">
@ -10585,8 +10587,10 @@ paint requests received by the parent control.</p>
<!-- property Visibility: public -->
<element name="TGraphicControl.Canvas">
<short>A clipping window to the parent canvas.</short>
<descr><p>The TGraphicsControl.Canvas is a clipping window to the parent
canvas.</p><p>If you ask for the Canvas.Width or Canvas.Height, you are actually
<descr>
<p>The TGraphicsControl.Canvas is a clipping window to the parent
canvas.</p>
<p>If you ask for the Canvas.Width or Canvas.Height, you are actually
getting the parent control's Canvas dimensions. To get the dimensions of the
TGraphicControl, you must query the ClientRect.</p>
</descr>

View File

@ -31,21 +31,20 @@ unit LazDoc;
interface
uses
Classes, SysUtils,
LCLProc,
CodeToolManager, CodeCache, FileProcs,
Classes, SysUtils, LCLProc, FileUtil,
CodeToolManager, CodeCache, FileProcs, AvgLvlTree,
Laz_DOM, Laz_XMLRead, Laz_XMLWrite,
LazHelpIntf,
EnvironmentOpts;
MacroIntf, PackageIntf, LazHelpIntf, ProjectIntf, LazIDEIntf,
IDEProcs, PackageDefs, EnvironmentOpts;
type
{ TLazFPDocFile }
TLazFPDocFile = class
public
Doc: TXMLdocument;
Filename: string;
ChangeStep: integer;
Doc: TXMLdocument;
ChangeStep: integer;// the CodeBuffer.ChangeStep value, when Doc was build
CodeBuffer: TCodeBuffer;
destructor Destroy; override;
end;
@ -54,7 +53,7 @@ type
TLazDocManager = class
private
FDocs: TFPList;// list of loaded TLazFPDocFile
FDocs: TAvgLvlTree;// tree of loaded TLazFPDocFile
public
constructor Create;
destructor Destroy; override;
@ -64,12 +63,28 @@ type
out ADocFile: TLazFPDocFile): Boolean;
function GetFPDocFilenameForHelpContext(
Context: TPascalHelpContextList): string;
function GetFPDocFilenameForSource(const SrcFilename: string): string;
function GetFPDocFilenameForSource(SrcFilename: string;
ResolveIncludeFiles: Boolean): string;
procedure FreeDocs;
end;
function CompareLazFPDocFilenames(Data1, Data2: Pointer): integer;
function CompareAnsistringWithLazFPDocFile(Key, Data: Pointer): integer;
implementation
function CompareLazFPDocFilenames(Data1, Data2: Pointer): integer;
begin
Result:=CompareFilenames(TLazFPDocFile(Data1).Filename,
TLazFPDocFile(Data2).Filename);
end;
function CompareAnsistringWithLazFPDocFile(Key, Data: Pointer): integer;
begin
Result:=CompareFilenames(AnsiString(Key),TLazFPDocFile(Data).Filename);
end;
{ TLazFPDocFile }
destructor TLazFPDocFile.Destroy;
@ -80,7 +95,7 @@ end;
constructor TLazDocManager.Create;
begin
FDocs:=TFPList.Create;
FDocs:=TAvgLvlTree.Create(@CompareLazFPDocFilenames);
end;
destructor TLazDocManager.Destroy;
@ -92,13 +107,13 @@ end;
function TLazDocManager.FindFPDocFile(const Filename: string): TLazFPDocFile;
var
i: Integer;
Node: TAvgLvlTreeNode;
begin
for i:=0 to FDocs.Count-1 do begin
Result:=TLazFPDocFile(FDocs[i]);
if CompareFilenames(Result.Filename,Filename)=0 then exit;
end;
Result:=nil;
Node:=FDocs.FindKey(Pointer(Filename),@CompareAnsistringWithLazFPDocFile);
if Node<>nil then
Result:=TLazFPDocFile(Node.Data)
else
Result:=nil;
end;
function TLazDocManager.LoadFPDocFile(const Filename: string; UpdateFromDisk,
@ -125,6 +140,8 @@ begin
// no update needed
exit(true);
end;
DebugLn(['TLazDocManager.LoadFPDocFile parsing ',ADocFile.Filename]);
// parse XML
ADocFile.ChangeStep:=ADocFile.CodeBuffer.ChangeStep;
@ -152,37 +169,111 @@ begin
for i:=0 to Context.Count-1 do begin
if Context.Items[i].Descriptor<>pihcFilename then continue;
SrcFilename:=Context.Items[i].Context;
Result:=GetFPDocFilenameForSource(SrcFilename);
Result:=GetFPDocFilenameForSource(SrcFilename,true);
exit;
end;
end;
function TLazDocManager.GetFPDocFilenameForSource(const SrcFilename: string
): string;
function TLazDocManager.GetFPDocFilenameForSource(SrcFilename: string;
ResolveIncludeFiles: Boolean): string;
var
SrcDir: String;
FPDocName: String;
begin
SrcDir:=ExtractFilePath(SrcFilename);
FPDocName:=lowercase(ExtractFileNameOnly(SrcFilename))+'.xml';
// check if SrcFilename is in one of the project directories
// check if SrcFilename is in one of package directories
// check if SrcFilename is one of the Lazarus sources
// search in the default LazDoc paths
SearchPath: String;
procedure CheckIfInProject(AProject: TLazProject);
var
ProjectDirs: String;
begin
if AProject=nil then exit;
if (AProject.FindFile(SrcFilename,[pfsfOnlyProjectFiles])<>nil) then begin
SearchPath:=SearchPath+';'+AProject.LazDocPaths;
exit;
end;
// search in project directories
if not FilenameIsAbsolute(SrcFilename) then exit;
ProjectDirs:=AProject.LazCompilerOptions.OtherUnitFiles;
if FindPathInSearchPath(PChar(SrcDir),length(SrcDir),
PChar(ProjectDirs),length(ProjectDirs))<>nil
then
SearchPath:=SearchPath+';'+AProject.LazDocPaths;
end;
procedure CheckIfInAPackage;
var
PkgList: TList;
i: Integer;
Dirs: String;
APackage: TLazPackage;
begin
if not FilenameIsAbsolute(SrcFilename) then exit;
PkgList:=PackageEditingInterface.GetOwnersOfUnit(SrcFilename);
if PkgList=nil then exit;
try
for i:=0 to PkgList.Count-1 do begin
if TObject(PkgList[i]) is TLazPackage then begin
APackage:=TLazPackage(PkgList[i]);
Dirs:=APackage.CompilerOptions.OtherUnitFiles;
if FindPathInSearchPath(PChar(SrcDir),length(SrcDir),
PChar(Dirs),length(Dirs))<>nil
then begin
// TODO: add lazdoc paths to package
//SearchPath:=SearchPath+';'+APackage.LazDocPaths;
end;
end;
end;
finally
PkgList.Free;
end;
end;
procedure CheckIfInLazarus;
var
LazDir: String;
begin
if not FilenameIsAbsolute(SrcFilename) then exit;
LazDir:=AppendPathDelim(EnvironmentOptions.LazarusDirectory);
if FileIsInPath(SrcFilename,LazDir+'lcl') then begin
SearchPath:=SearchPath+';'+LazDir+SetDirSeparators('docs/xml/lcl');
end;
end;
var
CodeBuf: TCodeBuffer;
begin
Result:='';
if ResolveIncludeFiles then begin
CodeBuf:=CodeToolBoss.FindFile(SrcFilename);
if CodeBuf<>nil then begin
CodeBuf:=CodeToolBoss.GetMainCode(CodeBuf);
if CodeBuf<>nil then begin
SrcFilename:=CodeBuf.Filename;
end;
end;
end;
if not FilenameIsPascalSource(SrcFilename) then exit;
SrcDir:=ExtractFilePath(SrcFilename);
SearchPath:='';
CheckIfInProject(LazarusIDE.ActiveProject);
CheckIfInAPackage;
CheckIfInLazarus;
// finally add default paths
SearchPath:=SearchPath+';'+EnvironmentOptions.LazDocPaths;
// substitute macros
IDEMacros.SubstituteMacros(SearchPath);
FPDocName:=lowercase(ExtractFileNameOnly(SrcFilename))+'.xml';
DebugLn(['TLazDocManager.GetFPDocFilenameForSource Search ',FPDocName,' in "',SearchPath,'"']);
Result:=SearchFileInPath(FPDocName,'',SearchPath,';',ctsfcAllCase);
end;
procedure TLazDocManager.FreeDocs;
var
i: Integer;
begin
for i:=FDocs.Count-1 downto 0 do
TObject(FDocs[i]).Free;
FDocs.Clear;
FDocs.FreeAndClear;
end;
end.

View File

@ -151,7 +151,6 @@ object LazDocForm: TLazDocForm
end
object InheritedTabSheet: TTabSheet
Caption = 'InheritedTabSheet'
TabVisible = False
object InheritedShortLabel: TLabel
Left = 5
Height = 13
@ -172,9 +171,36 @@ object LazDocForm: TLazDocForm
Width = 732
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 2
ReadOnly = True
TabOrder = 0
Text = 'InheritedShortEdit'
end
object MoveToInheritedButton: TButton
Height = 26
Top = 54
Width = 143
AutoSize = True
BorderSpacing.InnerBorder = 4
Caption = 'MoveToInheritedButton'
OnClick = MoveToInheritedButtonClick
TabOrder = 1
end
object CopyFromInheritedButton: TButton
AnchorSideLeft.Control = MoveToInheritedButton
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = MoveToInheritedButton
AnchorSideTop.Side = asrCenter
Left = 153
Height = 26
Top = 54
Width = 155
AutoSize = True
BorderSpacing.Left = 10
BorderSpacing.InnerBorder = 4
Caption = 'CopyFromInheritedButton'
OnClick = CopyFromInheritedButtonClick
TabOrder = 2
end
end
end
object Panel1: TPanel

View File

@ -47,128 +47,137 @@ LazarusResources.Add('TLazDocForm','FORMDATA',[
+#6'Height'#2#26#3'Top'#2#28#5'Width'#3#137#0#7'Anchors'#11#5'akTop'#7'akRigh'
+'t'#0#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#19'Browse'
+'ExampleButton'#7'OnClick'#7#24'BrowseExampleButtonClick'#8'TabOrder'#2#1#0#0
+#0#9'TTabSheet'#17'InheritedTabSheet'#7'Caption'#6#17'InheritedTabSheet'#10
+'TabVisible'#8#0#6'TLabel'#19'InheritedShortLabel'#4'Left'#2#5#6'Height'#2#13
+#3'Top'#2#4#5'Width'#2'm'#7'Caption'#6#19'InheritedShortLabel'#5'Color'#7#6
+'clNone'#11'ParentColor'#8#0#0#5'TEdit'#18'InheritedShortEdit'#22'AnchorSide'
+'Left.Control'#7#17'InheritedTabSheet'#21'AnchorSideTop.Control'#7#19'Inheri'
+'tedShortLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Con'
+'trol'#7#17'InheritedTabSheet'#20'AnchorSideRight.Side'#7#9'asrBottom'#6'Hei'
+'ght'#2#23#3'Top'#2#19#5'Width'#3#220#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'a'
+'kRight'#0#17'BorderSpacing.Top'#2#2#8'TabOrder'#2#0#4'Text'#6#18'InheritedS'
+'hortEdit'#0#0#0#0#6'TPanel'#6'Panel1'#6'Height'#2'u'#5'Width'#2#17#5'Align'
+#7#6'alLeft'#10'BevelOuter'#7#6'bvNone'#11'FullRepaint'#8#14'ParentShowHint'
+#8#8'ShowHint'#9#8'TabOrder'#2#1#0#12'TSpeedButton'#16'BoldFormatButton'#6'H'
+'eight'#2#17#5'Width'#2#17#5'Align'#7#5'alTop'#5'Color'#7#9'clBtnFace'#10'Gl'
+'yph.Data'#10#182#1#0#0#178#1#0#0'/* XPM */'#10'static char *graphic[] = {'
+#10'"17 17 2 1",'#10'". c None",'#10'", c #000000",'#10'".................",'
+#10'".................",'#10'".................",'#10'".................",'
+#10'"....,,,,,,,,.....",'#10'".....,,,..,,,....",'#10'".....,,,..,,,....",'
+#10'".....,,,..,,,....",'#10'".....,,,,,,,.....",'#10'".....,,,..,,,....",'
,#10'".....,,,..,,,....",'#10'".....,,,..,,,....",'#10'"....,,,,,,,,.....",'
+#10'".................",'#10'".................",'#10'".................",'
+#10'"................."}'#10#9'NumGlyphs'#2#0#7'OnClick'#7#17'FormatButtonCl'
+'ick'#0#0#12'TSpeedButton'#18'ItalicFormatButton'#3'Tag'#2#1#6'Height'#2#17#3
+'Top'#2#17#5'Width'#2#17#5'Align'#7#5'alTop'#5'Color'#7#9'clBtnFace'#10'Glyp'
+'h.Data'#10#197#1#0#0#193#1#0#0'/* XPM */'#10'static char *graphic[] = {'#10
+'"17 17 3 1",'#10'". c None",'#10'", c #000000",'#10'"- c #9696AF",'#10'"...'
+'..............",'#10'".................",'#10'".................",'#10'"...'
+'.....,,,,,....",'#10'".........,,-.....",'#10'"........-,,......",'#10'"...'
+'.....,,-......",'#10'".......-,,.......",'#10'".......,,-.......",'#10'"...'
+'...-,,........",'#10'"......,,-........",'#10'"....,,,,,,.......",'#10'"...'
+#0#9'TTabSheet'#17'InheritedTabSheet'#7'Caption'#6#17'InheritedTabSheet'#0#6
+'TLabel'#19'InheritedShortLabel'#4'Left'#2#5#6'Height'#2#13#3'Top'#2#4#5'Wid'
+'th'#2'm'#7'Caption'#6#19'InheritedShortLabel'#5'Color'#7#6'clNone'#11'Paren'
+'tColor'#8#0#0#5'TEdit'#18'InheritedShortEdit'#22'AnchorSideLeft.Control'#7
+#17'InheritedTabSheet'#21'AnchorSideTop.Control'#7#19'InheritedShortLabel'#18
+'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#17'Inherit'
+'edTabSheet'#20'AnchorSideRight.Side'#7#9'asrBottom'#6'Height'#2#23#3'Top'#2
+#19#5'Width'#3#220#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'Border'
+'Spacing.Top'#2#2#8'ReadOnly'#9#8'TabOrder'#2#0#4'Text'#6#18'InheritedShortE'
+'dit'#0#0#7'TButton'#21'MoveToInheritedButton'#6'Height'#2#26#3'Top'#2'6'#5
+'Width'#3#143#0#8'AutoSize'#9#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6
+#21'MoveToInheritedButton'#7'OnClick'#7#26'MoveToInheritedButtonClick'#8'Tab'
+'Order'#2#1#0#0#7'TButton'#23'CopyFromInheritedButton'#22'AnchorSideLeft.Con'
+'trol'#7#21'MoveToInheritedButton'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21
+'AnchorSideTop.Control'#7#21'MoveToInheritedButton'#18'AnchorSideTop.Side'#7
+#9'asrCenter'#4'Left'#3#153#0#6'Height'#2#26#3'Top'#2'6'#5'Width'#3#155#0#8
+'AutoSize'#9#18'BorderSpacing.Left'#2#10#25'BorderSpacing.InnerBorder'#2#4#7
+'Caption'#6#23'CopyFromInheritedButton'#7'OnClick'#7#28'CopyFromInheritedBut'
,'tonClick'#8'TabOrder'#2#2#0#0#0#0#6'TPanel'#6'Panel1'#6'Height'#2'u'#5'Widt'
+'h'#2#17#5'Align'#7#6'alLeft'#10'BevelOuter'#7#6'bvNone'#11'FullRepaint'#8#14
+'ParentShowHint'#8#8'ShowHint'#9#8'TabOrder'#2#1#0#12'TSpeedButton'#16'BoldF'
+'ormatButton'#6'Height'#2#17#5'Width'#2#17#5'Align'#7#5'alTop'#5'Color'#7#9
+'clBtnFace'#10'Glyph.Data'#10#182#1#0#0#178#1#0#0'/* XPM */'#10'static char '
+'*graphic[] = {'#10'"17 17 2 1",'#10'". c None",'#10'", c #000000",'#10'"...'
+'..............",'#10'".................",'#10'".................",'#10'"...'
+'..............",'#10'"....,,,,,,,,.....",'#10'".....,,,..,,,....",'#10'"...'
+'..,,,..,,,....",'#10'".....,,,..,,,....",'#10'".....,,,,,,,.....",'#10'"...'
+'..,,,..,,,....",'#10'".....,,,..,,,....",'#10'".....,,,..,,,....",'#10'"...'
+'.,,,,,,,,.....",'#10'".................",'#10'".................",'#10'"...'
+'..............",'#10'"................."}'#10#9'NumGlyphs'#2#0#7'OnClick'#7
+#17'FormatButtonClick'#0#0#12'TSpeedButton'#21'UnderlineFormatButton'#3'Tag'
+#2#2#6'Height'#2#17#3'Top'#2'"'#5'Width'#2#17#5'Align'#7#5'alTop'#5'Color'#7
+#9'clBtnFace'#10'Glyph.Data'#10#197#1#0#0#193#1#0#0'/* XPM */'#10'static cha'
+'r *graphic[] = {'#10'"17 17 3 1",'#10'". c None",'#10'", c #000000",'#10'"-'
+' c #848484",'#10'".................",'#10'".................",'#10'".......'
+'..........",'#10'"....,,,,.,,,,....",'#10'".....,,...,,.....",'#10'".....,,'
+'...,,.....",'#10'".....,,...,,.....",'#10'".....,,...,,.....",'#10'".....,,'
+'...,,.....",'#10'".....,,...,,.....",'#10'".....,,-.-,,.....",'#10'"......,'
+',,,,......",'#10'".................",'#10'"....,,,,,,,,,....",'#10'".......'
+'..........",'#10'".................",'#10'"................."}'#10#9'NumGly'
+'phs'#2#0#7'OnClick'#7#17'FormatButtonClick'#0#0#12'TSpeedButton'#19'InsertC'
+'odeTagButton'#3'Tag'#2#3#6'Height'#2#17#3'Top'#2'3'#5'Width'#2#17#5'Align'#7
+#5'alTop'#5'Color'#7#9'clBtnFace'#10'Glyph.Data'#10#253#9#0#0#249#9#0#0'/* X'
+'PM */'#13#10'static char * InsertCodeTag_xpm[] = {'#13#10'"17 15 112 2",'#13
+#10'" '#9'c None",'#13#10'". '#9'c #ECE9D8",'#13#10'"+ '#9'c #FFF0CF",'#13
+#10'"@ '#9'c #FFEDC5",'#13#10'"# '#9'c #FBE8C5",'#13#10'"$ '#9'c #EDDAC5",'
+#13#10'"% '#9'c #F4E8DB",'#13#10'"& '#9'c #FAEDD5",'#13#10'"* '#9'c #F3D49E"'
+','#13#10'"= '#9'c #BF9855",'#13#10'"- '#9'c #C89D55",'#13#10'"; '#9'c #BC8E'
+'5A",'#13#10'"> '#9'c #7C6135",'#13#10'", '#9'c #B18655",'#13#10'"'' '#9'c #'
+'916940",'#13#10'") '#9'c #C3AC93",'#13#10'"! '#9'c #CCA76A",'#13#10'"~ '#9
+'c #80684A",'#13#10'"{ '#9'c #DCAA63",'#13#10'"] '#9'c #A8834A",'#13#10'"^ '
+#9'c #977443",'#13#10'"/ '#9'c #B99052",'#13#10'"( '#9'c #947047",'#13#10'"_'
+' '#9'c #896842",'#13#10'": '#9'c #C4955E",'#13#10'"< '#9'c #87653F",'#13#10
+'"[ '#9'c #A37A4E",'#13#10'"} '#9'c #F0E1CF",'#13#10'"| '#9'c #BD964F",'#13
+#10'"1 '#9'c #977740",'#13#10'"2 '#9'c #7C6038",'#13#10'"3 '#9'c #9C7749",'
+#13#10'"4 '#9'c #866340",'#13#10'"5 '#9'c #BA8D59",'#13#10'"6 '#9'c #634430"'
+','#13#10'"7 '#9'c #8A6542",'#13#10'"8 '#9'c #C99761",'#13#10'"9 '#9'c #CC9B'
+'62",'#13#10'"0 '#9'c #6C5842",'#13#10'"a '#9'c #82705A",'#13#10'"b '#9'c #A'
+'47C4F",'#13#10'"c '#9'c #614A2F",'#13#10'"d '#9'c #906C45",'#13#10'"e '#9'c'
+' #7C513C",'#13#10'"f '#9'c #AD7F54",'#13#10'"g '#9'c #B78858",'#13#10'"h '#9
+'c #A4825B",'#13#10'"i '#9'c #8D7A65",'#13#10'"j '#9'c #927D67",'#13#10'"k '
+#9'c #93705B",'#13#10'"l '#9'c #3F3636",'#13#10'"m '#9'c #D3D3D3",'#13#10'"n'
+' '#9'c #CE9E60",'#13#10'"o '#9'c #755738",'#13#10'"p '#9'c #A77951",'#13#10
+'"q '#9'c #CE9C63",'#13#10'"r '#9'c #3B271D",'#13#10'"s '#9'c #825F4B",'#13
+#10'"t '#9'c #D6D5D3",'#13#10'"u '#9'c #EEEAE0",'#13#10'"v '#9'c #AB7A53",'
+#13#10'"w '#9'c #745438",'#13#10'"x '#9'c #A77B50",'#13#10'"y '#9'c #948B83"'
+','#13#10'"z '#9'c #261313",'#13#10'"A '#9'c #8B6843",'#13#10'"B '#9'c #6347'
+'30",'#13#10'"C '#9'c #4B3924",'#13#10'"D '#9'c #B58757",'#13#10'"E '#9'c #8'
+'16347",'#13#10'"F '#9'c #ECEAE0",'#13#10'"G '#9'c #735438",'#13#10'"H '#9'c'
+' #A2774E",'#13#10'"I '#9'c #C0915C",'#13#10'"J '#9'c #A37B4E",'#13#10'"K '#9
+'c #6D5134",'#13#10'"L '#9'c #7C593C",'#13#10'"M '#9'c #917C63",'#13#10'"N '
+#9'c #99938C",'#13#10'"O '#9'c #B5B1AC",'#13#10'"P '#9'c #E8E8E8",'#13#10'"Q'
+' '#9'c #866B4D",'#13#10'"R '#9'c #8C6D49",'#13#10'"S '#9'c #684F32",'#13#10
+'"T '#9'c #1D130E",'#13#10'"U '#9'c #B58657",'#13#10'"V '#9'c #8E6C44",'#13
+#10'"W '#9'c #A67E50",'#13#10'"X '#9'c #81623E",'#13#10'"Y '#9'c #6D5234",'
+#13#10'"Z '#9'c #5F4D37",'#13#10'"` '#9'c #978E85",'#13#10'" .'#9'c #ECEAE2"'
+','#13#10'"..'#9'c #CAC7C4",'#13#10'"+.'#9'c #8F7658",'#13#10'"@.'#9'c #4A31'
+'24",'#13#10'"#.'#9'c #B98859",'#13#10'"$.'#9'c #885842",'#13#10'"%.'#9'c #4'
+'63222",'#13#10'"&.'#9'c #CB9A62",'#13#10'"*.'#9'c #3D231E",'#13#10'"=.'#9'c'
+' #39271C",'#13#10'"-.'#9'c #876E51",'#13#10'";.'#9'c #938778",'#13#10'">.'#9
+'c #D7D5D3",'#13#10'",.'#9'c #DFDFDF",'#13#10'"''.'#9'c #9E9891",'#13#10'").'
,#9'c #908C87",'#13#10'"!.'#9'c #918A88",'#13#10'"~.'#9'c #8F8B87",'#13#10'"{'
+'.'#9'c #989188",'#13#10'"].'#9'c #BEBAB5",'#13#10'". . . . . . . . . . . . '
+'. . . . . ",'#13#10'". . . . . . . . . . . . . . . . . ",'#13#10'". . . . .'
+' + @ # $ % . . . . . . . ",'#13#10'". . & * = - ; > , '' ) . . . . . . ",'
+#13#10'"! ~ { ] ^ / ( _ : < [ } . . . . . ",'#13#10'"| 1 2 3 4 5 6 7 8 9 0 a'
+' . . . . . ",'#13#10'"b c d e f g h i j k l m . . . . . ",'#13#10'"n o p q '
+'r s t . . . u . . . . . . ",'#13#10'", q v w x y . . . . . . . . . . . ",'
+#13#10'"z A B C D E F . . . . . . . . . . ",'#13#10'"G H I J K L M N N O P .'
+' . . . . . ",'#13#10'"Q R S T U V W X X Y Z ` .. . . . ",'#13#10'". ..+.@.'
+'#.$.%.9 q &.*.=.X -.;.>.. ",'#13#10'". . . ,.''.N ).N N N !.~.{.-.-.].. ",'
+#13#10'". . . . . . . . . . . . . . . . . "};'#13#10#9'NumGlyphs'#2#0#7'OnCl'
+'ick'#7#17'FormatButtonClick'#0#0#12'TSpeedButton'#18'InsertRemarkButton'#3
+'Tag'#2#4#6'Height'#2#17#3'Top'#2'D'#5'Width'#2#17#5'Align'#7#5'alTop'#5'Col'
+'or'#7#9'clBtnFace'#10'Glyph.Data'#10#218#1#0#0#214#1#0#0'/* XPM */'#13#10's'
+'tatic char * InsertRemark_xpm[] = {'#13#10'"17 17 2 1",'#13#10'" '#9'c #ECE'
+'9D8",'#13#10'".'#9'c #0000FF",'#13#10'" ",'#13#10'" '
+' ",'#13#10'" ",'#13#10'" ... ... ",'#13#10
+'" .. .. ",'#13#10'" .. .. ",'#13#10'" .. .. "'
+','#13#10'" .. .. ",'#13#10'" ... ... ",'#13#10'" .. '
+' .. ",'#13#10'" .. .. ",'#13#10'" .. .. ",'#13#10'"'
+' .. .. ",'#13#10'" ... ... ",'#13#10'" ",'
+#13#10'" ",'#13#10'" "};'#13#10#9'NumGlyphs'
+#2#0#7'OnClick'#7#17'FormatButtonClick'#0#0#12'TSpeedButton'#18'InsertVarTag'
+'Button'#3'Tag'#2#5#6'Height'#2#17#3'Top'#2'U'#5'Width'#2#17#5'Align'#7#5'al'
+'Top'#5'Color'#7#9'clBtnFace'#10'Glyph.Data'#10#219#2#0#0#215#2#0#0'/* XPM *'
+'/'#13#10'static char * InsertVarTag_xpm[] = {'#13#10'"17 17 18 1",'#13#10'"'
+' '#9'c #ECE9D8",'#13#10'".'#9'c #D4D4D4",'#13#10'"+'#9'c #AAAAAA",'#13#10'"'
+'@'#9'c #E6E6E6",'#13#10'"#'#9'c #000000",'#13#10'"$'#9'c #CCCCCC",'#13#10'"'
+'%'#9'c #C4C4C4",'#13#10'"&'#9'c #888888",'#13#10'"*'#9'c #444444",'#13#10'"'
+'='#9'c #999999",'#13#10'"-'#9'c #666666",'#13#10'";'#9'c #222222",'#13#10'"'
+'>'#9'c #BBBBBB",'#13#10'",'#9'c #5E5E5E",'#13#10'"'''#9'c #808080",'#13#10
+'")'#9'c #FFFFFF",'#13#10'"!'#9'c #777777",'#13#10'"~'#9'c #4C4C4C",'#13#10
+'" ",'#13#10'" ",'#13#10'" "'
+','#13#10'" ",'#13#10'" ",'#13#10'" '
+' ",'#13#10'" .+++..++ .+++ ",'#13#10'" @#$#@%&*=@-;&> ",'#13#10'"'
+' ,*, ;>,'')'''' ",'#13#10'" .;. -!~~>~~> ",'#13#10'" '
+' ",'#13#10'" ",'#13#10'" ",'#13#10'" '
+' ",'#13#10'" ",'#13#10'" ",'#13#10
+'" "};'#13#10#9'NumGlyphs'#2#0#7'OnClick'#7#17'FormatButtonC'
+'lick'#0#0#0#11'TOpenDialog'#10'OpenDialog'#5'Title'#6#17'Open example file'
+#6'Filter'#6#28'pascal file|*.pas; *.pp; *.p'#11'FilterIndex'#2#0#4'left'#2
+'@'#3'top'#2#24#0#0#0
+#17'FormatButtonClick'#0#0#12'TSpeedButton'#18'ItalicFormatButton'#3'Tag'#2#1
+#6'Height'#2#17#3'Top'#2#17#5'Width'#2#17#5'Align'#7#5'alTop'#5'Color'#7#9'c'
+'lBtnFace'#10'Glyph.Data'#10#197#1#0#0#193#1#0#0'/* XPM */'#10'static char *'
+'graphic[] = {'#10'"17 17 3 1",'#10'". c None",'#10'", c #000000",'#10'"- c '
+'#9696AF",'#10'".................",'#10'".................",'#10'"..........'
+'.......",'#10'"........,,,,,....",'#10'".........,,-.....",'#10'"........-,'
+',......",'#10'"........,,-......",'#10'".......-,,.......",'#10'".......,,-'
+'.......",'#10'"......-,,........",'#10'"......,,-........",'#10'"....,,,,,,'
+'.......",'#10'".................",'#10'".................",'#10'"..........'
+'.......",'#10'".................",'#10'"................."}'#10#9'NumGlyphs'
+#2#0#7'OnClick'#7#17'FormatButtonClick'#0#0#12'TSpeedButton'#21'UnderlineFor'
+'matButton'#3'Tag'#2#2#6'Height'#2#17#3'Top'#2'"'#5'Width'#2#17#5'Align'#7#5
+'alTop'#5'Color'#7#9'clBtnFace'#10'Glyph.Data'#10#197#1#0#0#193#1#0#0'/* XPM'
+' */'#10'static char *graphic[] = {'#10'"17 17 3 1",'#10'". c None",'#10'", '
+'c #000000",'#10'"- c #848484",'#10'".................",'#10'"..............'
+'...",'#10'".................",'#10'"....,,,,.,,,,....",'#10'".....,,...,,..'
+'...",'#10'".....,,...,,.....",'#10'".....,,...,,.....",'#10'".....,,...,,..'
+'...",'#10'".....,,...,,.....",'#10'".....,,...,,.....",'#10'".....,,-.-,,..'
+'...",'#10'"......,,,,,......",'#10'".................",'#10'"....,,,,,,,,,.'
+'...",'#10'".................",'#10'".................",'#10'"..............'
+'..."}'#10#9'NumGlyphs'#2#0#7'OnClick'#7#17'FormatButtonClick'#0#0#12'TSpeed'
+'Button'#19'InsertCodeTagButton'#3'Tag'#2#3#6'Height'#2#17#3'Top'#2'3'#5'Wid'
+'th'#2#17#5'Align'#7#5'alTop'#5'Color'#7#9'clBtnFace'#10'Glyph.Data'#10#253#9
+#0#0#249#9#0#0'/* XPM */'#13#10'static char * InsertCodeTag_xpm[] = {'#13#10
+'"17 15 112 2",'#13#10'" '#9'c None",'#13#10'". '#9'c #ECE9D8",'#13#10'"+ '
+#9'c #FFF0CF",'#13#10'"@ '#9'c #FFEDC5",'#13#10'"# '#9'c #FBE8C5",'#13#10'"$'
+' '#9'c #EDDAC5",'#13#10'"% '#9'c #F4E8DB",'#13#10'"& '#9'c #FAEDD5",'#13#10
+'"* '#9'c #F3D49E",'#13#10'"= '#9'c #BF9855",'#13#10'"- '#9'c #C89D55",'#13
+#10'"; '#9'c #BC8E5A",'#13#10'"> '#9'c #7C6135",'#13#10'", '#9'c #B18655",'
+#13#10'"'' '#9'c #916940",'#13#10'") '#9'c #C3AC93",'#13#10'"! '#9'c #CCA76A'
+'",'#13#10'"~ '#9'c #80684A",'#13#10'"{ '#9'c #DCAA63",'#13#10'"] '#9'c #A88'
+'34A",'#13#10'"^ '#9'c #977443",'#13#10'"/ '#9'c #B99052",'#13#10'"( '#9'c #'
+'947047",'#13#10'"_ '#9'c #896842",'#13#10'": '#9'c #C4955E",'#13#10'"< '#9
+'c #87653F",'#13#10'"[ '#9'c #A37A4E",'#13#10'"} '#9'c #F0E1CF",'#13#10'"| '
+#9'c #BD964F",'#13#10'"1 '#9'c #977740",'#13#10'"2 '#9'c #7C6038",'#13#10'"3'
+' '#9'c #9C7749",'#13#10'"4 '#9'c #866340",'#13#10'"5 '#9'c #BA8D59",'#13#10
+'"6 '#9'c #634430",'#13#10'"7 '#9'c #8A6542",'#13#10'"8 '#9'c #C99761",'#13
+#10'"9 '#9'c #CC9B62",'#13#10'"0 '#9'c #6C5842",'#13#10'"a '#9'c #82705A",'
+#13#10'"b '#9'c #A47C4F",'#13#10'"c '#9'c #614A2F",'#13#10'"d '#9'c #906C45"'
+','#13#10'"e '#9'c #7C513C",'#13#10'"f '#9'c #AD7F54",'#13#10'"g '#9'c #B788'
+'58",'#13#10'"h '#9'c #A4825B",'#13#10'"i '#9'c #8D7A65",'#13#10'"j '#9'c #9'
+'27D67",'#13#10'"k '#9'c #93705B",'#13#10'"l '#9'c #3F3636",'#13#10'"m '#9'c'
+' #D3D3D3",'#13#10'"n '#9'c #CE9E60",'#13#10'"o '#9'c #755738",'#13#10'"p '#9
+'c #A77951",'#13#10'"q '#9'c #CE9C63",'#13#10'"r '#9'c #3B271D",'#13#10'"s '
+#9'c #825F4B",'#13#10'"t '#9'c #D6D5D3",'#13#10'"u '#9'c #EEEAE0",'#13#10'"v'
+' '#9'c #AB7A53",'#13#10'"w '#9'c #745438",'#13#10'"x '#9'c #A77B50",'#13#10
+'"y '#9'c #948B83",'#13#10'"z '#9'c #261313",'#13#10'"A '#9'c #8B6843",'#13
+#10'"B '#9'c #634730",'#13#10'"C '#9'c #4B3924",'#13#10'"D '#9'c #B58757",'
+#13#10'"E '#9'c #816347",'#13#10'"F '#9'c #ECEAE0",'#13#10'"G '#9'c #735438"'
+','#13#10'"H '#9'c #A2774E",'#13#10'"I '#9'c #C0915C",'#13#10'"J '#9'c #A37B'
+'4E",'#13#10'"K '#9'c #6D5134",'#13#10'"L '#9'c #7C593C",'#13#10'"M '#9'c #9'
+'17C63",'#13#10'"N '#9'c #99938C",'#13#10'"O '#9'c #B5B1AC",'#13#10'"P '#9'c'
,' #E8E8E8",'#13#10'"Q '#9'c #866B4D",'#13#10'"R '#9'c #8C6D49",'#13#10'"S '#9
+'c #684F32",'#13#10'"T '#9'c #1D130E",'#13#10'"U '#9'c #B58657",'#13#10'"V '
+#9'c #8E6C44",'#13#10'"W '#9'c #A67E50",'#13#10'"X '#9'c #81623E",'#13#10'"Y'
+' '#9'c #6D5234",'#13#10'"Z '#9'c #5F4D37",'#13#10'"` '#9'c #978E85",'#13#10
+'" .'#9'c #ECEAE2",'#13#10'"..'#9'c #CAC7C4",'#13#10'"+.'#9'c #8F7658",'#13
+#10'"@.'#9'c #4A3124",'#13#10'"#.'#9'c #B98859",'#13#10'"$.'#9'c #885842",'
+#13#10'"%.'#9'c #463222",'#13#10'"&.'#9'c #CB9A62",'#13#10'"*.'#9'c #3D231E"'
+','#13#10'"=.'#9'c #39271C",'#13#10'"-.'#9'c #876E51",'#13#10'";.'#9'c #9387'
+'78",'#13#10'">.'#9'c #D7D5D3",'#13#10'",.'#9'c #DFDFDF",'#13#10'"''.'#9'c #'
+'9E9891",'#13#10'").'#9'c #908C87",'#13#10'"!.'#9'c #918A88",'#13#10'"~.'#9
+'c #8F8B87",'#13#10'"{.'#9'c #989188",'#13#10'"].'#9'c #BEBAB5",'#13#10'". .'
+' . . . . . . . . . . . . . . . ",'#13#10'". . . . . . . . . . . . . . . . .'
+' ",'#13#10'". . . . . + @ # $ % . . . . . . . ",'#13#10'". . & * = - ; > , '
+''' ) . . . . . . ",'#13#10'"! ~ { ] ^ / ( _ : < [ } . . . . . ",'#13#10'"| '
+'1 2 3 4 5 6 7 8 9 0 a . . . . . ",'#13#10'"b c d e f g h i j k l m . . . . '
+'. ",'#13#10'"n o p q r s t . . . u . . . . . . ",'#13#10'", q v w x y . . .'
+' . . . . . . . . ",'#13#10'"z A B C D E F . . . . . . . . . . ",'#13#10'"G '
+'H I J K L M N N O P . . . . . . ",'#13#10'"Q R S T U V W X X Y Z ` .. . . '
+'. ",'#13#10'". ..+.@.#.$.%.9 q &.*.=.X -.;.>.. ",'#13#10'". . . ,.''.N ).N '
+'N N !.~.{.-.-.].. ",'#13#10'". . . . . . . . . . . . . . . . . "};'#13#10#9
+'NumGlyphs'#2#0#7'OnClick'#7#17'FormatButtonClick'#0#0#12'TSpeedButton'#18'I'
+'nsertRemarkButton'#3'Tag'#2#4#6'Height'#2#17#3'Top'#2'D'#5'Width'#2#17#5'Al'
+'ign'#7#5'alTop'#5'Color'#7#9'clBtnFace'#10'Glyph.Data'#10#218#1#0#0#214#1#0
+#0'/* XPM */'#13#10'static char * InsertRemark_xpm[] = {'#13#10'"17 17 2 1",'
+#13#10'" '#9'c #ECE9D8",'#13#10'".'#9'c #0000FF",'#13#10'" "'
+','#13#10'" ",'#13#10'" ",'#13#10'" ... '
+' ... ",'#13#10'" .. .. ",'#13#10'" .. .. ",'#13#10'"'
+' .. .. ",'#13#10'" .. .. ",'#13#10'" ... ... ",'
+#13#10'" .. .. ",'#13#10'" .. .. ",'#13#10'" .. '
+'.. ",'#13#10'" .. .. ",'#13#10'" ... ... ",'#13#10'" '
+' ",'#13#10'" ",'#13#10'" "};'
+#13#10#9'NumGlyphs'#2#0#7'OnClick'#7#17'FormatButtonClick'#0#0#12'TSpeedButt'
+'on'#18'InsertVarTagButton'#3'Tag'#2#5#6'Height'#2#17#3'Top'#2'U'#5'Width'#2
+#17#5'Align'#7#5'alTop'#5'Color'#7#9'clBtnFace'#10'Glyph.Data'#10#219#2#0#0
+#215#2#0#0'/* XPM */'#13#10'static char * InsertVarTag_xpm[] = {'#13#10'"17 '
+'17 18 1",'#13#10'" '#9'c #ECE9D8",'#13#10'".'#9'c #D4D4D4",'#13#10'"+'#9'c '
+'#AAAAAA",'#13#10'"@'#9'c #E6E6E6",'#13#10'"#'#9'c #000000",'#13#10'"$'#9'c '
+'#CCCCCC",'#13#10'"%'#9'c #C4C4C4",'#13#10'"&'#9'c #888888",'#13#10'"*'#9'c '
+'#444444",'#13#10'"='#9'c #999999",'#13#10'"-'#9'c #666666",'#13#10'";'#9'c '
+'#222222",'#13#10'">'#9'c #BBBBBB",'#13#10'",'#9'c #5E5E5E",'#13#10'"'''#9'c'
+' #808080",'#13#10'")'#9'c #FFFFFF",'#13#10'"!'#9'c #777777",'#13#10'"~'#9'c'
+' #4C4C4C",'#13#10'" ",'#13#10'" ",'#13#10'"'
+' ",'#13#10'" ",'#13#10'" ",'
+#13#10'" ",'#13#10'" .+++..++ .+++ ",'#13#10'" @#$#@%&*=@-'
+';&> ",'#13#10'" ,*, ;>,'')'''' ",'#13#10'" .;. -!~~>~~> ",'#13#10'"'
+' ",'#13#10'" ",'#13#10'" ",'
+#13#10'" ",'#13#10'" ",'#13#10'" '
+' ",'#13#10'" "};'#13#10#9'NumGlyphs'#2#0#7'OnClick'#7#17
+'FormatButtonClick'#0#0#0#11'TOpenDialog'#10'OpenDialog'#5'Title'#6#17'Open '
+'example file'#6'Filter'#6#28'pascal file|*.pas; *.pp; *.p'#11'FilterIndex'#2
+#0#4'left'#2'@'#3'top'#2#24#0#0#0
]);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,43 @@
object LazDocSelectInheritedDlg: TLazDocSelectInheritedDlg
Left = 294
Height = 75
Top = 164
Width = 330
HorzScrollBar.Page = 329
VertScrollBar.Page = 74
Caption = 'LazDocSelectInheritedDlg'
OnCreate = FormCreate
object InheritedComboBox: TComboBox
Left = 8
Height = 25
Top = 8
Width = 312
Anchors = [akTop, akLeft, akRight]
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
MaxLength = 0
TabOrder = 0
Text = 'InheritedComboBox'
end
object OkButton: TButton
Left = 24
Height = 25
Top = 40
Width = 75
BorderSpacing.InnerBorder = 4
Caption = 'OkButton'
Default = True
ModalResult = 1
TabOrder = 1
end
object CancelButton: TButton
Left = 136
Height = 25
Top = 40
Width = 75
BorderSpacing.InnerBorder = 4
Cancel = True
Caption = 'CancelButton'
ModalResult = 2
TabOrder = 2
end
end

View File

@ -0,0 +1,17 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TLazDocSelectInheritedDlg','FORMDATA',[
'TPF0'#25'TLazDocSelectInheritedDlg'#24'LazDocSelectInheritedDlg'#4'Left'#3'&'
+#1#6'Height'#2'K'#3'Top'#3#164#0#5'Width'#3'J'#1#18'HorzScrollBar.Page'#3'I'
+#1#18'VertScrollBar.Page'#2'J'#7'Caption'#6#24'LazDocSelectInheritedDlg'#8'O'
+'nCreate'#7#10'FormCreate'#0#9'TComboBox'#17'InheritedComboBox'#4'Left'#2#8#6
+'Height'#2#25#3'Top'#2#8#5'Width'#3'8'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
+'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearc'
+'hAscending'#0#9'MaxLength'#2#0#8'TabOrder'#2#0#4'Text'#6#17'InheritedComboB'
+'ox'#0#0#7'TButton'#8'OkButton'#4'Left'#2#24#6'Height'#2#25#3'Top'#2'('#5'Wi'
+'dth'#2'K'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#8'OkButton'#7'Defa'
+'ult'#9#11'ModalResult'#2#1#8'TabOrder'#2#1#0#0#7'TButton'#12'CancelButton'#4
+'Left'#3#136#0#6'Height'#2#25#3'Top'#2'('#5'Width'#2'K'#25'BorderSpacing.Inn'
+'erBorder'#2#4#6'Cancel'#9#7'Caption'#6#12'CancelButton'#11'ModalResult'#2#2
+#8'TabOrder'#2#2#0#0#0
]);

View File

@ -0,0 +1,63 @@
{
/***************************************************************************
LazDocFrm.pas
-------------
***************************************************************************/
***************************************************************************
* *
* This source is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This code is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* A copy of the GNU General Public License is available on the World *
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
* obtain it by writing to the Free Software Foundation, *
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
***************************************************************************
}
unit LazDocSelectInherited;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
Buttons;
type
{ TLazDocSelectInheritedDlg }
TLazDocSelectInheritedDlg = class(TForm)
OkButton: TButton;
CancelButton: TButton;
InheritedComboBox: TComboBox;
procedure FormCreate(Sender: TObject);
end;
implementation
{ TLazDocSelectInheritedDlg }
procedure TLazDocSelectInheritedDlg.FormCreate(Sender: TObject);
begin
Caption:='Select an inherited entry';
OkButton.Caption:='Ok';
CancelButton.Caption:='Cancel';
end;
initialization
{$I lazdocselectinherited.lrs}
end.

View File

@ -422,14 +422,6 @@ type
{ TProject }
TProjectFileSearchFlag = (
pfsfResolveFileLinks,
pfsfOnlyEditorFiles,
pfsfOnlyVirtualFiles,
pfsfOnlyProjectFiles
);
TProjectFileSearchFlags = set of TProjectFileSearchFlag;
TEndUpdateProjectEvent =
procedure(Sender: TObject; ProjectChanged: boolean) of object;
@ -590,6 +582,8 @@ type
function UnitWithUnitname(const AnUnitname: string): TUnitInfo;
function SearchFile(const ShortFilename: string;
SearchFlags: TSearchIDEFileFlags): TUnitInfo;
function FindFile(const AFilename: string;
SearchFlags: TProjectFileSearchFlags): TLazProjectFile; override;
// units in editor
procedure CloseEditorIndex(EditorIndex:integer);
@ -3426,6 +3420,12 @@ begin
end;
end;
function TProject.FindFile(const AFilename: string;
SearchFlags: TProjectFileSearchFlags): TLazProjectFile;
begin
Result:=UnitInfoWithFilename(AFilename, SearchFlags);
end;
function TProject.IndexOfFilename(const AFilename: string): integer;
begin
Result:=UnitCount-1;

View File

@ -1,2 +1,2 @@
// Created by Svn2RevisionInc
const RevisionStr = '9724:9725M';
const RevisionStr = '9728M';

View File

@ -579,7 +579,6 @@ type
procedure ShowLazDoc;
procedure UpdateLazDoc;
procedure LazDocNewPage;
property Editors[Index:integer]:TSourceEditor read GetEditors;
function EditorCount:integer;
@ -2864,99 +2863,19 @@ end;
procedure TSourceNotebook.ShowLazDoc;
begin
DoShowLazDoc;
LazDocNewPage;
end;
function FindLazDocPathFromFile(const AFileName: string): string;
var
i: integer;
fn: string;
SearchPaths: String;
PathList: TStrings;
begin
Result := '';
if not FilenameIsAbsolute(AFileName) then exit;
if not FilenameIsPascalSource(AFileName) then exit;
// add global lazdoc paths
SearchPaths:=EnvironmentOptions.LazDocPaths;
// if this is a project file then add project lazdoc paths
if Project1.UnitInfoWithFilename(AFileName,[pfsfOnlyProjectFiles])<>nil then
SearchPaths:=LazarusIDE.ActiveProject.LazDocPaths+';'+SearchPaths;
// replace macros
IDEMacros.SubstituteMacros(SearchPaths);
SearchPaths:=TrimSearchPath(SearchPaths,'');
//DebugLn('FindLazDocPathFromFile AFileName="',AFileName,'" SearchPaths="',SearchPaths,'"');
// search xml file in all directories
fn := PathDelim + ChangeFileExt(ExtractFileName(AFileName), '.xml');
PathList:=SplitString(SearchPaths,';');
try
for i:=0 to PathList.Count-1 do begin
if FilenameIsAbsolute(PathList[i])
and FileExistsCached(TrimFilename(PathList[i] + fn)) then
begin
Result := PathList[i];
break;
end;
end;
finally
PathList.Free;
end;
//DebugLn('FindLazDocPathFromFile Result="',Result,'"');
end;
procedure TSourceNotebook.LazDocNewPage;
var
SrcEdit: TSourceEditor;
DocPath: string;
NewDocPath: string;
begin
//DebugLn('TSourceNotebook.LazDocNewPage ',dbgs(Assigned(LazDocForm)));
if Assigned(LazDocForm) then
begin
SrcEdit:=GetActiveSE;
if SrcEdit=nil then exit;
DocPath := FindLazDocPathFromFile(SrcEdit.FileName);
if DocPath <> '' then
begin
// load the .xml file
NewDocPath:=DocPath + PathDelim +
ChangeFileExt(ExtractFileName(SrcEdit.FileName),'.xml');
if NewDocPath<>LazDocForm.DocFileName then begin
LazDocForm.DocFileName := NewDocPath;
UpdateLazDoc;
end;
end
else
LazDocForm.Reset;
end;
UpdateLazDoc;
end;
procedure TSourceNotebook.UpdateLazDoc;
var
SrcEdit: TSourceEditor;
DocPath: string;
CaretPos: TPoint;
begin
if LazDocForm = nil then exit;
SrcEdit:=GetActiveSE;
// find a path that contains the .xml file
DocPath := FindLazDocPathFromFile(SrcEdit.FileName);
if DocPath <> '' then
begin
CaretPos := SrcEdit.EditorComponent.CaretXY;
LazDocForm.UpdateLazDoc(SrcEdit.Filename,CaretPos);
end
else
LazDocForm.Reset;
if SrcEdit=nil then exit;
CaretPos := SrcEdit.EditorComponent.CaretXY;
LazDocForm.UpdateLazDoc(SrcEdit.Filename,CaretPos);
end;
function TSourceNotebook.OnSynCompletionPaintItem(const AKey: string;
@ -5274,8 +5193,6 @@ var TempEditor:TSourceEditor;
Begin
TempEditor:=GetActiveSE;
LazDocNewPage;
//writeln('TSourceNotebook.NotebookPageChanged ',Notebook.Pageindex,' ',TempEditor <> nil,' fAutoFocusLock=',fAutoFocusLock);
if TempEditor <> nil then
begin
@ -5298,6 +5215,8 @@ Begin
FOnEditorVisibleChanged(sender);
CheckCurrentCodeBufferChanged;
end;
UpdateLazDoc;
end;
Procedure TSourceNotebook.ProcessParentCommand(Sender: TObject;

View File

@ -498,6 +498,14 @@ type
{ TLazProject - interface class to a Lazarus project }
TProjectFileSearchFlag = (
pfsfResolveFileLinks,
pfsfOnlyEditorFiles,
pfsfOnlyVirtualFiles,
pfsfOnlyProjectFiles
);
TProjectFileSearchFlags = set of TProjectFileSearchFlag;
TLazProject = class(TPersistent)
private
FLazCompilerOptions: TLazCompilerOptions;
@ -535,6 +543,8 @@ type
procedure AddPackageDependency(const PackageName: string); virtual; abstract;
function ShortDescription: string;
procedure ClearModifieds;
function FindFile(const AFilename: string;
SearchFlags: TProjectFileSearchFlags): TLazProjectFile; virtual; abstract;
public
property MainFileID: Integer read GetMainFileID write SetMainFileID;
property Files[Index: integer]: TLazProjectFile read GetFiles;

View File

@ -369,19 +369,6 @@ begin
result := gdk_window_get_colormap(Drawable);
end;
function FormToX11Window(const AForm: TCustomForm): X.TWindow;
var
GdkWindow: PGdkWindowPrivate;
Widget: PGtkWidget;
begin
Result:=0;
if (AForm=nil) or (not AForm.HandleAllocated) then exit;
Widget:=PGtkWidget(AForm.Handle);
GdkWindow := PGdkWindowPrivate(Widget^.window);
if GdkWindow=nil then exit;
Result := GdkWindow^.xwindow;
end;
{$EndIf}
{$Ifdef GTK2}
@ -1097,6 +1084,21 @@ begin
{$ENDIF}
end;
{$IFDEF HasGtkX}
function FormToX11Window(const AForm: TCustomForm): X.TWindow;
var
GdkWindow: PGdkWindowPrivate;
Widget: PGtkWidget;
begin
Result:=0;
if (AForm=nil) or (not AForm.HandleAllocated) then exit;
Widget:=PGtkWidget(AForm.Handle);
GdkWindow := PGdkWindowPrivate(Widget^.window);
if GdkWindow=nil then exit;
Result := GdkWindow^.xwindow;
end;
{$ENDIF}
{------------------------------------------------------------------------------
procedure SetComboBoxText(ComboWidget: PGtkCombo; const NewText: string);