mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 01:49:11 +02:00
* THTMLCustomPageContentProducer added
git-svn-id: trunk@8038 -
This commit is contained in:
parent
4a649f5b74
commit
7d7080394d
@ -46,6 +46,27 @@ type
|
|||||||
TWriterEvent = procedure (Sender:THTMLContentProducer; aWriter : THTMLWriter) of object;
|
TWriterEvent = procedure (Sender:THTMLContentProducer; aWriter : THTMLWriter) of object;
|
||||||
TBooleanEvent = procedure (Sender:THTMLContentProducer; var flag : boolean) of object;
|
TBooleanEvent = procedure (Sender:THTMLContentProducer; var flag : boolean) of object;
|
||||||
|
|
||||||
|
{ THTMLCustomPagContentProducer }
|
||||||
|
|
||||||
|
{ THTMLCustomPageContentProducer }
|
||||||
|
|
||||||
|
THTMLCustomPageContentProducer = class (THTMLContentProducer)
|
||||||
|
private
|
||||||
|
FOnWritePage: TWriterEvent;
|
||||||
|
protected
|
||||||
|
function WriteContent (aWriter : THTMLWriter) : THTMLCustomElement; override;
|
||||||
|
procedure DoWritePage (aWriter : THTMLWriter); virtual;
|
||||||
|
public
|
||||||
|
Property OnWritePage : TWriterEvent read FOnWritePage write FOnWritePage;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ THTMLCustomPagContentProducer }
|
||||||
|
|
||||||
|
THTMLPageContentProducer = class (THTMLCustomPageContentProducer)
|
||||||
|
published
|
||||||
|
Property OnWritePage;
|
||||||
|
end;
|
||||||
|
|
||||||
{ THTMLCustomDatasetContentProducer }
|
{ THTMLCustomDatasetContentProducer }
|
||||||
|
|
||||||
THTMLCustomDatasetContentProducer = class (THTMLContentProducer)
|
THTMLCustomDatasetContentProducer = class (THTMLContentProducer)
|
||||||
@ -471,5 +492,21 @@ begin
|
|||||||
FOnGetContent(Self,ARequest,HTMLPage,Handled);
|
FOnGetContent(Self,ARequest,HTMLPage,Handled);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ THTMLCustomPageContentProducer }
|
||||||
|
|
||||||
|
function THTMLCustomPageContentProducer.WriteContent(aWriter: THTMLWriter
|
||||||
|
): THTMLCustomElement;
|
||||||
|
begin
|
||||||
|
result := aWriter.Starthtml;
|
||||||
|
DoWritePage(aWriter);
|
||||||
|
aWriter.Endhtml;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure THTMLCustomPageContentProducer.DoWritePage(aWriter: THTMLWriter);
|
||||||
|
begin
|
||||||
|
if assigned (FOnWritePage) then
|
||||||
|
FOnWritePage (self, aWriter);
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user