You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-11-23 21:34:53 +02:00
Added Views Framework support #244
Added ToolBoxBrowser2 demo Added TCEFBrowserViewComponent. Added TCEFLabelButtonComponent. Added TCEFMenuButtonComponent. Added TCEFPanelComponent. Added TCEFTextfieldComponent. Added TCEFScrollViewComponent. Added TCEFWindowComponent.
This commit is contained in:
@@ -196,6 +196,18 @@ type
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
TCefCreateCustomViewTask = class(TCefTaskOwn)
|
||||
protected
|
||||
FEvents : Pointer;
|
||||
|
||||
procedure Execute; override;
|
||||
|
||||
public
|
||||
constructor Create(const aEvents : ICefViewDelegateEvents); reintroduce;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@@ -595,4 +607,35 @@ begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
||||
// TCefCreateCustomViewTask
|
||||
|
||||
procedure TCefCreateCustomViewTask.Execute;
|
||||
begin
|
||||
try
|
||||
try
|
||||
if (FEvents <> nil) then ICefViewDelegateEvents(FEvents).doCreateCustomView;
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('ICefViewDelegateEvents.Execute', e) then raise;
|
||||
end;
|
||||
finally
|
||||
FEvents := nil;
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TCefCreateCustomViewTask.Create(const aEvents : ICefViewDelegateEvents);
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
FEvents := Pointer(aEvents);
|
||||
end;
|
||||
|
||||
destructor TCefCreateCustomViewTask.Destroy;
|
||||
begin
|
||||
FEvents := nil;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user