Class TBufferPanel

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type TBufferPanel = class(TCustomPanel)

Description

TBufferPanel is used by VCL and LCL applications with browsers in OSR mode to draw the browser contents. See the SimpleOSRBrowser demo for more details.

Hierarchy

Overview

Fields

Protected FScanlineSize: integer;
Protected FTransparent: boolean;
Protected FOnPaintParentBkg: TNotifyEvent;
Protected FForcedDeviceScaleFactor: single;
Protected FDeviceScaleFactor: single;
Protected FCopyOriginalBuffer: boolean;
Protected FMustInitBuffer: boolean;
Protected FBuffer: TBitmap;
Protected FOrigBuffer: TCEFBitmapBitBuffer;
Protected FOrigPopupBuffer: TCEFBitmapBitBuffer;
Protected FOrigPopupScanlineSize: integer;
Protected FSyncObj: THandle;
Protected FIMEHandler: TCEFOSRIMEHandler;
Protected FOnIMECancelComposition: TNotifyEvent;
Protected FOnIMECommitText: TOnIMECommitTextEvent;
Protected FOnIMESetComposition: TOnIMESetCompositionEvent;
Protected FOnCustomTouch: TOnHandledMessageEvent;
Protected FOnPointerDown: TOnHandledMessageEvent;
Protected FOnPointerUp: TOnHandledMessageEvent;
Protected FOnPointerUpdate: TOnHandledMessageEvent;

Methods

Protected procedure CreateSyncObj;
Protected procedure DestroySyncObj;
Protected procedure DestroyBuffer;
Protected function GetBufferBits: pointer;
Protected function GetBufferWidth: integer;
Protected function GetBufferHeight: integer;
Protected function GetOrigBufferWidth: integer;
Protected function GetOrigBufferHeight: integer;
Protected function GetScreenScale: single; virtual;
Protected function GetRealScreenScale(var aResultScale : single) : boolean; virtual;
Protected function GetOrigPopupBufferBits: pointer;
Protected function GetOrigPopupBufferWidth: integer;
Protected function GetOrigPopupBufferHeight: integer;
Protected function GetParentFormHandle: TCefWindowHandle;
Protected function GetParentForm: TCustomForm;
Protected procedure SetTransparent(aValue : boolean);
Protected function CopyBuffer: boolean;
Protected function SaveBufferToFile(const aFilename : string) : boolean;
Protected procedure Paint; override;
Protected procedure CreateParams(var Params: TCreateParams); override;
Protected procedure WndProc(var aMessage: TMessage); override;
Protected procedure WMCEFInvalidate(var aMessage: TMessage); message CEF_INVALIDATE;
Protected procedure WMEraseBkgnd(var aMessage : TWMEraseBkgnd); message WM_ERASEBKGND;
Protected procedure WMTouch(var aMessage: TMessage); message WM_TOUCH;
Protected procedure WMPointerDown(var aMessage: TMessage); message WM_POINTERDOWN;
Protected procedure WMPointerUpdate(var aMessage: TMessage); message WM_POINTERUPDATE;
Protected procedure WMPointerUp(var aMessage: TMessage); message WM_POINTERUP;
Protected procedure WMIMEStartComp(var aMessage: TMessage);
Protected procedure WMIMEEndComp(var aMessage: TMessage);
Protected procedure WMIMESetContext(var aMessage: TMessage);
Protected procedure WMIMEComposition(var aMessage: TMessage);
Protected procedure DoOnIMECancelComposition; virtual;
Protected procedure DoOnIMECommitText(const aText : ustring; const replacement_range : PCefRange; relative_cursor_pos : integer); virtual;
Protected procedure DoOnIMESetComposition(const aText : ustring; const underlines : TCefCompositionUnderlineDynArray; const replacement_range, selection_range : TCefRange); virtual;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure AfterConstruction; override;
Public function SaveToFile(const aFilename : string) : boolean;
Public function InvalidatePanel: boolean;
Public function BeginBufferDraw: boolean;
Public procedure EndBufferDraw;
Public procedure BufferDraw(x, y : integer; const aBitmap : TBitmap); overload;
Public procedure BufferDraw(const aBitmap : TBitmap; const aSrcRect, aDstRect : TRect); overload;
Public function UpdateBufferDimensions(aWidth, aHeight : integer) : boolean;
Public function UpdateOrigBufferDimensions(aWidth, aHeight : integer) : boolean;
Public function UpdateOrigPopupBufferDimensions(aWidth, aHeight : integer) : boolean;
Public procedure UpdateDeviceScaleFactor;
Public function BufferIsResized(aUseMutex : boolean = True) : boolean;
Public procedure CreateIMEHandler;
Public procedure ChangeCompositionRange(const selection_range : TCefRange; const character_bounds : TCefRectDynArray);
Public procedure DrawOrigPopupBuffer(const aSrcRect, aDstRect : TRect);

Properties

Public property ScanlineSize : integer read FScanlineSize;
Public property BufferWidth : integer read GetBufferWidth;
Public property BufferHeight : integer read GetBufferHeight;
Public property BufferBits : pointer read GetBufferBits;
Public property ScreenScale : single read GetScreenScale;
Public property ForcedDeviceScaleFactor : single read FForcedDeviceScaleFactor write FForcedDeviceScaleFactor;
Public property MustInitBuffer : boolean read FMustInitBuffer write FMustInitBuffer;
Public property Buffer : TBitmap read FBuffer;
Public property OrigBuffer : TCEFBitmapBitBuffer read FOrigBuffer;
Public property OrigBufferWidth : integer read GetOrigBufferWidth;
Public property OrigBufferHeight : integer read GetOrigBufferHeight;
Public property OrigPopupBuffer : TCEFBitmapBitBuffer read FOrigPopupBuffer;
Public property OrigPopupBufferWidth : integer read GetOrigPopupBufferWidth;
Public property OrigPopupBufferHeight : integer read GetOrigPopupBufferHeight;
Public property OrigPopupBufferBits : pointer read GetOrigPopupBufferBits;
Public property OrigPopupScanlineSize : integer read FOrigPopupScanlineSize;
Public property ParentFormHandle : TCefWindowHandle read GetParentFormHandle;
Public property ParentForm : TCustomForm read GetParentForm;
Public property DockManager;
Public property Canvas;
Published property OnIMECancelComposition : TNotifyEvent read FOnIMECancelComposition write FOnIMECancelComposition;
Published property OnIMECommitText : TOnIMECommitTextEvent read FOnIMECommitText write FOnIMECommitText;
Published property OnIMESetComposition : TOnIMESetCompositionEvent read FOnIMESetComposition write FOnIMESetComposition;
Published property OnCustomTouch : TOnHandledMessageEvent read FOnCustomTouch write FOnCustomTouch;
Published property OnPointerDown : TOnHandledMessageEvent read FOnPointerDown write FOnPointerDown;
Published property OnPointerUp : TOnHandledMessageEvent read FOnPointerUp write FOnPointerUp;
Published property OnPointerUpdate : TOnHandledMessageEvent read FOnPointerUpdate write FOnPointerUpdate;
Published property OnPaintParentBkg : TNotifyEvent read FOnPaintParentBkg write FOnPaintParentBkg;
Published property Transparent : boolean read FTransparent write SetTransparent default False;
Published property CopyOriginalBuffer : boolean read FCopyOriginalBuffer write FCopyOriginalBuffer default False;
Published property Align;
Published property Alignment;
Published property Anchors;
Published property AutoSize;
Published property OnUTF8KeyPress;
Published property BevelInner;
Published property BevelOuter;
Published property BevelWidth;
Published property BiDiMode;
Published property BorderWidth;
Published property BorderStyle;
Published property Caption;
Published property Color;
Published property Constraints;
Published property UseDockManager default True;
Published property DockSite;
Published property DoubleBuffered;
Published property DragCursor;
Published property DragKind;
Published property DragMode;
Published property Enabled;
Published property FullRepaint;
Published property Font;
Published property ParentBiDiMode;
Published property ParentColor;
Published property ParentFont;
Published property ParentShowHint;
Published property PopupMenu;
Published property ShowHint;
Published property TabOrder;
Published property TabStop;
Published property Visible;
Published property OnClick;
Published property OnConstrainedResize;
Published property OnContextPopup;
Published property OnDockDrop;
Published property OnDockOver;
Published property OnDblClick;
Published property OnDragDrop;
Published property OnDragOver;
Published property OnEndDock;
Published property OnEndDrag;
Published property OnEnter;
Published property OnExit;
Published property OnGetSiteInfo;
Published property OnMouseDown;
Published property OnMouseMove;
Published property OnMouseUp;
Published property OnMouseWheel;
Published property OnKeyDown;
Published property OnKeyPress;
Published property OnKeyUp;
Published property OnResize;
Published property OnStartDock;
Published property OnStartDrag;
Published property OnUnDock;
Published property OnMouseEnter;
Published property OnMouseLeave;

Description

Fields

Protected FScanlineSize: integer;

This item has no description.

Protected FTransparent: boolean;

This item has no description.

Protected FOnPaintParentBkg: TNotifyEvent;

This item has no description.

Protected FForcedDeviceScaleFactor: single;

This item has no description.

Protected FDeviceScaleFactor: single;

This item has no description.

Protected FCopyOriginalBuffer: boolean;

This item has no description.

Protected FMustInitBuffer: boolean;

This item has no description.

Protected FBuffer: TBitmap;

This item has no description.

Protected FOrigBuffer: TCEFBitmapBitBuffer;

This item has no description.

Protected FOrigPopupBuffer: TCEFBitmapBitBuffer;

This item has no description.

Protected FOrigPopupScanlineSize: integer;

This item has no description.

Protected FSyncObj: THandle;

This item has no description.

Protected FIMEHandler: TCEFOSRIMEHandler;

This item has no description.

Protected FOnIMECancelComposition: TNotifyEvent;

This item has no description.

Protected FOnIMECommitText: TOnIMECommitTextEvent;

This item has no description.

Protected FOnIMESetComposition: TOnIMESetCompositionEvent;

This item has no description.

Protected FOnCustomTouch: TOnHandledMessageEvent;

This item has no description.

Protected FOnPointerDown: TOnHandledMessageEvent;

This item has no description.

Protected FOnPointerUp: TOnHandledMessageEvent;

This item has no description.

Protected FOnPointerUpdate: TOnHandledMessageEvent;

This item has no description.

Methods

Protected procedure CreateSyncObj;

This item has no description.

Protected procedure DestroySyncObj;

This item has no description.

Protected procedure DestroyBuffer;

This item has no description.

Protected function GetBufferBits: pointer;

This item has no description.

Protected function GetBufferWidth: integer;

This item has no description.

Protected function GetBufferHeight: integer;

This item has no description.

Protected function GetOrigBufferWidth: integer;

This item has no description.

Protected function GetOrigBufferHeight: integer;

This item has no description.

Protected function GetScreenScale: single; virtual;

This item has no description.

Protected function GetRealScreenScale(var aResultScale : single) : boolean; virtual;

This item has no description.

Protected function GetOrigPopupBufferBits: pointer;

This item has no description.

Protected function GetOrigPopupBufferWidth: integer;

This item has no description.

Protected function GetOrigPopupBufferHeight: integer;

This item has no description.

Protected function GetParentFormHandle: TCefWindowHandle;

This item has no description.

Protected function GetParentForm: TCustomForm;

This item has no description.

Protected procedure SetTransparent(aValue : boolean);

This item has no description.

Protected function CopyBuffer: boolean;

This item has no description.

Protected function SaveBufferToFile(const aFilename : string) : boolean;

This item has no description.

Protected procedure Paint; override;

This item has no description.

Protected procedure CreateParams(var Params: TCreateParams); override;

This item has no description.

Protected procedure WndProc(var aMessage: TMessage); override;

This item has no description.

Protected procedure WMCEFInvalidate(var aMessage: TMessage); message CEF_INVALIDATE;

This item has no description.

Protected procedure WMEraseBkgnd(var aMessage : TWMEraseBkgnd); message WM_ERASEBKGND;

This item has no description.

Protected procedure WMTouch(var aMessage: TMessage); message WM_TOUCH;

This item has no description.

Protected procedure WMPointerDown(var aMessage: TMessage); message WM_POINTERDOWN;

This item has no description.

Protected procedure WMPointerUpdate(var aMessage: TMessage); message WM_POINTERUPDATE;

This item has no description.

Protected procedure WMPointerUp(var aMessage: TMessage); message WM_POINTERUP;

This item has no description.

Protected procedure WMIMEStartComp(var aMessage: TMessage);

This item has no description.

Protected procedure WMIMEEndComp(var aMessage: TMessage);

This item has no description.

Protected procedure WMIMESetContext(var aMessage: TMessage);

This item has no description.

Protected procedure WMIMEComposition(var aMessage: TMessage);

This item has no description.

Protected procedure DoOnIMECancelComposition; virtual;

This item has no description.

Protected procedure DoOnIMECommitText(const aText : ustring; const replacement_range : PCefRange; relative_cursor_pos : integer); virtual;

This item has no description.

Protected procedure DoOnIMESetComposition(const aText : ustring; const underlines : TCefCompositionUnderlineDynArray; const replacement_range, selection_range : TCefRange); virtual;

This item has no description.

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure AfterConstruction; override;

This item has no description.

Public function SaveToFile(const aFilename : string) : boolean;

Save the visible web contents as a bitmap file.

Public function InvalidatePanel: boolean;

Invalidate this panel.

Public function BeginBufferDraw: boolean;

Acquires the synchronization object before drawing into the background bitmap.

Public procedure EndBufferDraw;

Releases the synchronization object after drawing into the background bitmap.

Public procedure BufferDraw(x, y : integer; const aBitmap : TBitmap); overload;

Draws aBitmap into the background bitmap buffer at the specified coordinates.

Parameters
x
x coordinate where the bitmap will be drawn.
y
y coordinate where the bitmap will be drawn.
aBitmap
Bitmap that will be drawn into the background bitmap.
Public procedure BufferDraw(const aBitmap : TBitmap; const aSrcRect, aDstRect : TRect); overload;

Draws a part of aBitmap into the background bitmap buffer at the specified rectangle.

Parameters
aBitmap
Bitmap that will be drawn into the background bitmap.
aSrcRect
Rectangle that defines the area of aBitmap that will be drawn into the background bitmap.
aDstRect
Rectangle that defines the area of the background bitmap where aBitmap will be drawn.
Public function UpdateBufferDimensions(aWidth, aHeight : integer) : boolean;

Update the background bitmap size.

Public function UpdateOrigBufferDimensions(aWidth, aHeight : integer) : boolean;

Update the image size of the original buffer copy.

Public function UpdateOrigPopupBufferDimensions(aWidth, aHeight : integer) : boolean;

Update the popup image size of the original buffer copy.

Public procedure UpdateDeviceScaleFactor;

Update the FDeviceScaleFactor value with the current scale.

Public function BufferIsResized(aUseMutex : boolean = True) : boolean;

Check if the background image buffers have the same dimensions as this panel. Returns true if they have the same size.

Public procedure CreateIMEHandler;

Creates the IME handler.

Public procedure ChangeCompositionRange(const selection_range : TCefRange; const character_bounds : TCefRectDynArray);

Calls ChangeCompositionRange in the IME handler.

Public procedure DrawOrigPopupBuffer(const aSrcRect, aDstRect : TRect);

Copy the contents from the original popup buffer copy to the main buffer copy.

Properties

Public property ScanlineSize : integer read FScanlineSize;

Returns the scanline size.

Public property BufferWidth : integer read GetBufferWidth;

Image width.

Public property BufferHeight : integer read GetBufferHeight;

Image height.

Public property BufferBits : pointer read GetBufferBits;

Returns a pointer to the buffer that stores the image.

Public property ScreenScale : single read GetScreenScale;

Returns the screen scale.

Public property ForcedDeviceScaleFactor : single read FForcedDeviceScaleFactor write FForcedDeviceScaleFactor;

Screen scale value used instead of the real one.

Public property MustInitBuffer : boolean read FMustInitBuffer write FMustInitBuffer;

Clear the background image before copying the original buffer contents.

Public property Buffer : TBitmap read FBuffer;

Background bitmap.

Public property OrigBuffer : TCEFBitmapBitBuffer read FOrigBuffer;

Copy of the raw main bitmap buffer sent by CEF in the TChromiumCore.OnPaint event. OrigBuffer will be transferred to the bitmap buffer before copying the bitmap buffer to the panel.

Public property OrigBufferWidth : integer read GetOrigBufferWidth;

Image width of the raw main bitmap buffer copy.

Public property OrigBufferHeight : integer read GetOrigBufferHeight;

Image height of the raw main bitmap buffer copy.

Public property OrigPopupBuffer : TCEFBitmapBitBuffer read FOrigPopupBuffer;

Copy of the raw popup bitmap buffer sent by CEF in the TChromiumCore.OnPaint event.

Public property OrigPopupBufferWidth : integer read GetOrigPopupBufferWidth;

Image width of the raw popup bitmap buffer copy.

Public property OrigPopupBufferHeight : integer read GetOrigPopupBufferHeight;

Image height of the raw popup bitmap buffer copy.

Public property OrigPopupBufferBits : pointer read GetOrigPopupBufferBits;

Returns a pointer to the raw popup bitmap buffer copye.

Public property OrigPopupScanlineSize : integer read FOrigPopupScanlineSize;

Returns the scanline size of the raw popup bitmap buffer copy.

Public property ParentFormHandle : TCefWindowHandle read GetParentFormHandle;

Returns the handle of the parent form.

Public property ParentForm : TCustomForm read GetParentForm;

Returns the parent form.

Public property DockManager;

This item has no description.

Public property Canvas;

This item has no description.

Published property OnIMECancelComposition : TNotifyEvent read FOnIMECancelComposition write FOnIMECancelComposition;

Event triggered when a WM_IME_ENDCOMPOSITION message is received because the IME ended composition.

<see href="https://learn.microsoft.com/en-us/windows/win32/intl/wm-ime-endcomposition">See the WM_IME_ENDCOMPOSITION article.)

Published property OnIMECommitText : TOnIMECommitTextEvent read FOnIMECommitText write FOnIMECommitText;

Event triggered when a WM_IME_COMPOSITION message is received because the IME changed composition status as a result of a keystroke. This event is triggered after retrieving a composition result of the ongoing composition if it exists.

<see href="https://learn.microsoft.com/en-us/windows/win32/intl/wm-ime-composition">See the WM_IME_COMPOSITION article.)

Published property OnIMESetComposition : TOnIMESetCompositionEvent read FOnIMESetComposition write FOnIMESetComposition;

Event triggered when a WM_IME_COMPOSITION message is received because the IME changed composition status as a result of a keystroke. This event is triggered after retrieving the current composition status of the ongoing composition.

<see href="https://learn.microsoft.com/en-us/windows/win32/intl/wm-ime-composition">See the WM_IME_COMPOSITION article.)

Published property OnCustomTouch : TOnHandledMessageEvent read FOnCustomTouch write FOnCustomTouch;

Event triggered when a WM_TOUCH message is received. It notifies the window when one or more touch points, such as a finger or pen, touches a touch-sensitive digitizer surface.

<see href="https://learn.microsoft.com/en-us/windows/win32/wintouch/wm-touchdown">See the WM_TOUCH article.)

Published property OnPointerDown : TOnHandledMessageEvent read FOnPointerDown write FOnPointerDown;

Event triggered when a WM_POINTERDOWN message is received. Posted when a pointer makes contact over the client area of a window.

<see href="https://learn.microsoft.com/en-us/windows/win32/inputmsg/wm-pointerdown">See the WM_POINTERDOWN article.)

Published property OnPointerUp : TOnHandledMessageEvent read FOnPointerUp write FOnPointerUp;

Event triggered when a WM_POINTERUP message is received. Posted when a pointer that made contact over the client area of a window breaks contact.

<see href="https://learn.microsoft.com/en-us/windows/win32/inputmsg/wm-pointerup">See the WM_POINTERUP article.)

Published property OnPointerUpdate : TOnHandledMessageEvent read FOnPointerUpdate write FOnPointerUpdate;

Event triggered when a WM_POINTERUPDATE message is received. Posted to provide an update on a pointer that made contact over the client area of a window or on a hovering uncaptured pointer over the client area of a window.

<see href="https://learn.microsoft.com/en-us/windows/win32/inputmsg/wm-pointerupdate">See the WM_POINTERUPDATE article.)

Published property OnPaintParentBkg : TNotifyEvent read FOnPaintParentBkg write FOnPaintParentBkg;

Event triggered before the AlphaBlend call that transfer the web contents from the bitmap buffer to the panel when the Transparent property is True.

Published property Transparent : boolean read FTransparent write SetTransparent default False;

Set Transparent to True to use a WS_EX_TRANSPARENT window style in the panel and to call AlphaBlend in order to transfer the web contents from the bitmap buffer to the panel. If this property is False then BitBlt is used to transfer the web contents from the bitmap buffer to the panel.

Published property CopyOriginalBuffer : boolean read FCopyOriginalBuffer write FCopyOriginalBuffer default False;

When CopyOriginalBuffer is True then OrigBuffer will be used internally to copy of the raw main bitmap buffer sent by CEF in the TChromiumCore.OnPaint event. OrigBuffer will be transferred to the bitmap buffer before copying the buffer to the panel. This is necessary in GTK applications in order to avoid handling bitmaps in background threads.

Published property Align;

This item has no description.

Published property Alignment;

This item has no description.

Published property Anchors;

This item has no description.

Published property AutoSize;

This item has no description.

Published property OnUTF8KeyPress;

This item has no description.

Published property BevelInner;

This item has no description.

Published property BevelOuter;

This item has no description.

Published property BevelWidth;

This item has no description.

Published property BiDiMode;

This item has no description.

Published property BorderWidth;

This item has no description.

Published property BorderStyle;

This item has no description.

Published property Caption;

This item has no description.

Published property Color;

This item has no description.

Published property Constraints;

This item has no description.

Published property UseDockManager default True;

This item has no description.

Published property DockSite;

This item has no description.

Published property DoubleBuffered;

This item has no description.

Published property DragCursor;

This item has no description.

Published property DragKind;

This item has no description.

Published property DragMode;

This item has no description.

Published property Enabled;

This item has no description.

Published property FullRepaint;

This item has no description.

Published property Font;

This item has no description.

Published property ParentBiDiMode;

This item has no description.

Published property ParentColor;

This item has no description.

Published property ParentFont;

This item has no description.

Published property ParentShowHint;

This item has no description.

Published property PopupMenu;

This item has no description.

Published property ShowHint;

This item has no description.

Published property TabOrder;

This item has no description.

Published property TabStop;

This item has no description.

Published property Visible;

This item has no description.

Published property OnClick;

This item has no description.

Published property OnConstrainedResize;

This item has no description.

Published property OnContextPopup;

This item has no description.

Published property OnDockDrop;

This item has no description.

Published property OnDockOver;

This item has no description.

Published property OnDblClick;

This item has no description.

Published property OnDragDrop;

This item has no description.

Published property OnDragOver;

This item has no description.

Published property OnEndDock;

This item has no description.

Published property OnEndDrag;

This item has no description.

Published property OnEnter;

This item has no description.

Published property OnExit;

This item has no description.

Published property OnGetSiteInfo;

This item has no description.

Published property OnMouseDown;

This item has no description.

Published property OnMouseMove;

This item has no description.

Published property OnMouseUp;

This item has no description.

Published property OnMouseWheel;

This item has no description.

Published property OnKeyDown;

This item has no description.

Published property OnKeyPress;

This item has no description.

Published property OnKeyUp;

This item has no description.

Published property OnResize;

This item has no description.

Published property OnStartDock;

This item has no description.

Published property OnStartDrag;

This item has no description.

Published property OnUnDock;

This item has no description.

Published property OnMouseEnter;

This item has no description.

Published property OnMouseLeave;

This item has no description.


Generated by PasDoc 0.16.0-snapshot.