|
@@ -100,8 +100,9 @@ type
|
|
CurOutputNode: TDOMNode;
|
|
CurOutputNode: TDOMNode;
|
|
InsideHeadRow, DoPasHighlighting: Boolean;
|
|
InsideHeadRow, DoPasHighlighting: Boolean;
|
|
HighlighterFlags: Byte;
|
|
HighlighterFlags: Byte;
|
|
-
|
|
|
|
- FooterFile: string;
|
|
|
|
|
|
+ HeaderHTML,
|
|
|
|
+ NavigatorHTML,
|
|
|
|
+ FooterHTML: TStringStream;
|
|
FIDF : Boolean;
|
|
FIDF : Boolean;
|
|
FDateFormat: String;
|
|
FDateFormat: String;
|
|
FIndexColCount : Integer;
|
|
FIndexColCount : Integer;
|
|
@@ -109,6 +110,7 @@ type
|
|
FBaseImageURL : String;
|
|
FBaseImageURL : String;
|
|
FUseMenuBrackets: Boolean;
|
|
FUseMenuBrackets: Boolean;
|
|
|
|
|
|
|
|
+ procedure AppendFragment(aParentNode: TDOMElement; aStream: TStream);
|
|
Procedure CreateAllocator; virtual;
|
|
Procedure CreateAllocator; virtual;
|
|
procedure CreateCSSFile; virtual;
|
|
procedure CreateCSSFile; virtual;
|
|
function ResolveLinkID(const Name: String; Level : Integer = 0): DOMString;
|
|
function ResolveLinkID(const Name: String; Level : Integer = 0): DOMString;
|
|
@@ -2078,6 +2080,16 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure THTMLWriter.AppendFragment(aParentNode : TDOMElement; aStream : TStream);
|
|
|
|
+
|
|
|
|
+begin
|
|
|
|
+ if (aStream<>Nil) then
|
|
|
|
+ begin
|
|
|
|
+ aStream.Position:=0;
|
|
|
|
+ ReadXMLFragment(aParentNode,aStream);
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure THTMLWriter.AppendMenuBar(ASubpageIndex: Integer);
|
|
procedure THTMLWriter.AppendMenuBar(ASubpageIndex: Integer);
|
|
|
|
|
|
var
|
|
var
|
|
@@ -2111,6 +2123,8 @@ var
|
|
AppendText(ParaEl, ']');
|
|
AppendText(ParaEl, ']');
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
begin
|
|
begin
|
|
TableEl := CreateEl(BodyElement, 'table');
|
|
TableEl := CreateEl(BodyElement, 'table');
|
|
TableEl['cellpadding'] := '4';
|
|
TableEl['cellpadding'] := '4';
|
|
@@ -2137,11 +2151,13 @@ begin
|
|
if Module.InterfaceSection.Variables.Count > 0 then
|
|
if Module.InterfaceSection.Variables.Count > 0 then
|
|
AddLink(VarsSubindex, SDocVariables);
|
|
AddLink(VarsSubindex, SDocVariables);
|
|
AddLink(IndexSubIndex,SDocIdentifierIndex);
|
|
AddLink(IndexSubIndex,SDocIdentifierIndex);
|
|
|
|
+ AppendFragment(ParaEl, NavigatorHTML);
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
AddPackageLink(IndexSubIndex, SDocIdentifierIndex);
|
|
AddPackageLink(IndexSubIndex, SDocIdentifierIndex);
|
|
AddPackageLink(ClassHierarchySubIndex, SDocPackageClassHierarchy);
|
|
AddPackageLink(ClassHierarchySubIndex, SDocPackageClassHierarchy);
|
|
|
|
+ AppendFragment(ParaEl, NavigatorHTML)
|
|
end;
|
|
end;
|
|
|
|
|
|
if Length(SearchPage) > 0 then
|
|
if Length(SearchPage) > 0 then
|
|
@@ -2164,6 +2180,7 @@ begin
|
|
AppendHyperlink(TitleEl, Package);
|
|
AppendHyperlink(TitleEl, Package);
|
|
AppendText(TitleEl, ')');
|
|
AppendText(TitleEl, ')');
|
|
end;
|
|
end;
|
|
|
|
+ AppendFragment(BodyElement,HeaderHTML);
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure THTMLWriter.AppendSourceRef(AElement: TPasElement);
|
|
procedure THTMLWriter.AppendSourceRef(AElement: TPasElement);
|
|
@@ -2301,8 +2318,8 @@ Var
|
|
S : String;
|
|
S : String;
|
|
F : TDomElement;
|
|
F : TDomElement;
|
|
begin
|
|
begin
|
|
- if FooterFile<>'' then
|
|
|
|
- ReadXMLFragment(BodyElement, FooterFile)
|
|
|
|
|
|
+ if Assigned(FooterHTML) then
|
|
|
|
+ AppendFragment(BodyElement, FooterHTML)
|
|
else if IncludeDateInFooter then
|
|
else if IncludeDateInFooter then
|
|
begin
|
|
begin
|
|
CreateEl(BodyElement, 'hr');
|
|
CreateEl(BodyElement, 'hr');
|
|
@@ -3840,13 +3857,35 @@ end;
|
|
|
|
|
|
Function THTMLWriter.InterPretOption(Const Cmd,Arg : String) : boolean;
|
|
Function THTMLWriter.InterPretOption(Const Cmd,Arg : String) : boolean;
|
|
|
|
|
|
|
|
+ Function ReadFile(aFileName : string) : TstringStream;
|
|
|
|
+
|
|
|
|
+ begin
|
|
|
|
+ try
|
|
|
|
+ if copy(aFileName,1,1)<>'@' then
|
|
|
|
+ Result:=TStringStream.Create(aFileName)
|
|
|
|
+ else
|
|
|
|
+ begin
|
|
|
|
+ Delete(aFileName,1,1);
|
|
|
|
+ Result:=TStringStream.Create('');
|
|
|
|
+ Result.LoadFromFile(aFileName);
|
|
|
|
+ Result.Position:=0;
|
|
|
|
+ end;
|
|
|
|
+ except
|
|
|
|
+ Result.Free;
|
|
|
|
+ Raise;
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+
|
|
begin
|
|
begin
|
|
Result:=True;
|
|
Result:=True;
|
|
-
|
|
|
|
if Cmd = '--html-search' then
|
|
if Cmd = '--html-search' then
|
|
SearchPage := Arg
|
|
SearchPage := Arg
|
|
else if Cmd = '--footer' then
|
|
else if Cmd = '--footer' then
|
|
- FooterFile := Arg
|
|
|
|
|
|
+ FooterHTML := ReadFile(Arg)
|
|
|
|
+ else if Cmd = '--header' then
|
|
|
|
+ HeaderHTML := ReadFile(Arg)
|
|
|
|
+ else if Cmd = '--navigator' then
|
|
|
|
+ NavigatorHTML := ReadFile(Arg)
|
|
else if Cmd = '--charset' then
|
|
else if Cmd = '--charset' then
|
|
CharSet := Arg
|
|
CharSet := Arg
|
|
else if Cmd = '--index-colcount' then
|
|
else if Cmd = '--index-colcount' then
|
|
@@ -3874,8 +3913,12 @@ end;
|
|
|
|
|
|
class procedure THTMLWriter.Usage(List: TStrings);
|
|
class procedure THTMLWriter.Usage(List: TStrings);
|
|
begin
|
|
begin
|
|
- List.add('--footer');
|
|
|
|
|
|
+ List.add('--header=file');
|
|
|
|
+ List.Add(SHTMLUsageHeader);
|
|
|
|
+ List.add('--footer=file');
|
|
List.Add(SHTMLUsageFooter);
|
|
List.Add(SHTMLUsageFooter);
|
|
|
|
+ List.add('--navigator=file');
|
|
|
|
+ List.Add(SHTMLUsageNavigator);
|
|
List.Add('--footer-date[=Fmt]');
|
|
List.Add('--footer-date[=Fmt]');
|
|
List.Add(SHTMLUsageFooterDate);
|
|
List.Add(SHTMLUsageFooterDate);
|
|
List.Add('--charset=set');
|
|
List.Add('--charset=set');
|