mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 09:29:26 +02:00
* Added patch from Vincent Snijders to add a footer to each HTML page
This commit is contained in:
parent
7764270152
commit
5d5f1cee3c
@ -96,6 +96,9 @@ resourcestring
|
|||||||
SManUsageNoUnitPrefix = 'Do not prefix man pages with unit name.';
|
SManUsageNoUnitPrefix = 'Do not prefix man pages with unit name.';
|
||||||
SManUsageWriterDescr = 'UNIX man page output.';
|
SManUsageWriterDescr = 'UNIX man page output.';
|
||||||
SManUsagePackageDescription = 'Use descr as the description of man pages';
|
SManUsagePackageDescription = 'Use descr as the description of man pages';
|
||||||
|
|
||||||
|
// HTML usage
|
||||||
|
SHTMLUsageFooter = 'Append xhmtl from file as footer to html page';
|
||||||
|
|
||||||
STitle = 'FPDoc - Free Pascal Documentation Tool';
|
STitle = 'FPDoc - Free Pascal Documentation Tool';
|
||||||
SCopyright = '(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org';
|
SCopyright = '(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org';
|
||||||
@ -1217,7 +1220,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.10 2005-05-04 08:38:58 michael
|
Revision 1.11 2005-05-09 18:50:13 michael
|
||||||
|
* Added patch from Vincent Snijders to add a footer to each HTML page
|
||||||
|
|
||||||
|
Revision 1.10 2005/05/04 08:38:58 michael
|
||||||
+ Added support for opaque types
|
+ Added support for opaque types
|
||||||
|
|
||||||
Revision 1.9 2005/02/14 17:13:38 peter
|
Revision 1.9 2005/02/14 17:13:38 peter
|
||||||
|
@ -104,6 +104,8 @@ type
|
|||||||
CurOutputNode: TDOMNode;
|
CurOutputNode: TDOMNode;
|
||||||
InsideHeadRow, DoPasHighlighting: Boolean;
|
InsideHeadRow, DoPasHighlighting: Boolean;
|
||||||
HighlighterFlags: Byte;
|
HighlighterFlags: Byte;
|
||||||
|
|
||||||
|
FooterFile: string;
|
||||||
|
|
||||||
function ResolveLinkID(const Name: String): DOMString;
|
function ResolveLinkID(const Name: String): DOMString;
|
||||||
function ResolveLinkWithinPackage(AElement: TPasElement;
|
function ResolveLinkWithinPackage(AElement: TPasElement;
|
||||||
@ -206,6 +208,7 @@ type
|
|||||||
procedure FinishElementPage(AElement: TPasElement);
|
procedure FinishElementPage(AElement: TPasElement);
|
||||||
Procedure AppendSeeAlsoSection(AElement : TPasElement;DocNode : TDocNode);
|
Procedure AppendSeeAlsoSection(AElement : TPasElement;DocNode : TDocNode);
|
||||||
Procedure AppendExampleSection(AElement : TPasElement;DocNode : TDocNode);
|
Procedure AppendExampleSection(AElement : TPasElement;DocNode : TDocNode);
|
||||||
|
procedure AppendFooter;
|
||||||
|
|
||||||
procedure CreatePageBody(AElement: TPasElement; ASubpageIndex: Integer); virtual;
|
procedure CreatePageBody(AElement: TPasElement; ASubpageIndex: Integer); virtual;
|
||||||
procedure CreatePackagePageBody;
|
procedure CreatePackagePageBody;
|
||||||
@ -240,6 +243,7 @@ type
|
|||||||
property OnTest: TNotifyEvent read FOnTest write SetOnTest;
|
property OnTest: TNotifyEvent read FOnTest write SetOnTest;
|
||||||
Function InterPretOption(Const Cmd,Arg : String) : boolean; override;
|
Function InterPretOption(Const Cmd,Arg : String) : boolean; override;
|
||||||
Procedure WriteDoc; override;
|
Procedure WriteDoc; override;
|
||||||
|
class procedure Usage(List: TStrings); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
THTMWriter = class(THTMLWriter)
|
THTMWriter = class(THTMLWriter)
|
||||||
@ -250,7 +254,7 @@ type
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses SysUtils, XHTML, XMLWrite, HTMWrite, sh_pas;
|
uses SysUtils, XHTML, XMLRead, XMLWrite, HTMWrite, sh_pas;
|
||||||
|
|
||||||
|
|
||||||
Function FixHTMLpath(S : String) : STring;
|
Function FixHTMLpath(S : String) : STring;
|
||||||
@ -554,6 +558,7 @@ begin
|
|||||||
HTMLEl.AppendChild(BodyElement);
|
HTMLEl.AppendChild(BodyElement);
|
||||||
|
|
||||||
CreatePageBody(AElement, ASubpageIndex);
|
CreatePageBody(AElement, ASubpageIndex);
|
||||||
|
AppendFooter;
|
||||||
|
|
||||||
HeadEl.AppendChild(El);
|
HeadEl.AppendChild(El);
|
||||||
El['rel'] := 'stylesheet';
|
El['rel'] := 'stylesheet';
|
||||||
@ -1798,6 +1803,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure THTMLWriter.AppendFooter;
|
||||||
|
begin
|
||||||
|
if FooterFile<>'' then
|
||||||
|
ReadXMLFragment(BodyElement, FooterFile);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure THTMLWriter.FinishElementPage(AElement: TPasElement);
|
procedure THTMLWriter.FinishElementPage(AElement: TPasElement);
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -2833,6 +2844,8 @@ begin
|
|||||||
Result:=True;
|
Result:=True;
|
||||||
if Cmd = '--html-search' then
|
if Cmd = '--html-search' then
|
||||||
SearchPage := Arg
|
SearchPage := Arg
|
||||||
|
else if Cmd = '--footer' then
|
||||||
|
FooterFile := Arg
|
||||||
else
|
else
|
||||||
Result:=False;
|
Result:=False;
|
||||||
end;
|
end;
|
||||||
@ -2843,6 +2856,12 @@ begin
|
|||||||
WriteHTMLPages;
|
WriteHTMLPages;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure THTMLWriter.Usage(List: TStrings);
|
||||||
|
begin
|
||||||
|
List.add('--footer');
|
||||||
|
List.Add(SHTMLUsageFooter);
|
||||||
|
end;
|
||||||
|
|
||||||
// private methods
|
// private methods
|
||||||
|
|
||||||
function THTMLWriter.GetPageCount: Integer;
|
function THTMLWriter.GetPageCount: Integer;
|
||||||
@ -2879,7 +2898,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.16 2005-05-04 08:38:58 michael
|
Revision 1.17 2005-05-09 18:50:13 michael
|
||||||
|
* Added patch from Vincent Snijders to add a footer to each HTML page
|
||||||
|
|
||||||
|
Revision 1.16 2005/05/04 08:38:58 michael
|
||||||
+ Added support for opaque types
|
+ Added support for opaque types
|
||||||
|
|
||||||
Revision 1.15 2005/02/14 17:13:38 peter
|
Revision 1.15 2005/02/14 17:13:38 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user