# Class TChromium

Description
Hierarchy
Methods

## Unit

uCEFChromium

## Declaration

`type TChromium = class(TChromiumCore)`

## Description

VCL and LCL version of TChromiumCore that puts together all browser procedures, functions, properties and events in one place. It has all you need to create, modify and destroy a web browser.

## Hierarchy

- TObject
- TPersistent
- TComponent
- TChromiumCore
- TChromium

## Overview

### Methods

Protected | `function GetParentFormHandle: TCefWindowHandle; override;`
Protected | `function GetParentForm: TCustomForm;`
Protected | `procedure InitializeDevToolsWindowInfo(aDevTools : TWinControl); virtual;`
Public | `procedure InitializeDragAndDrop(const aDropTargetCtrl : TWinControl);`
Public | `procedure ShowDevTools(inspectElementAt: TPoint; const aDevTools : TWinControl = nil);`
Public | `procedure CloseDevTools(const aDevTools : TWinControl = nil);`
Public | `procedure MoveFormTo(const x, y: Integer);`
Public | `procedure MoveFormBy(const x, y: Integer);`
Public | `procedure ResizeFormWidthTo(const x : Integer);`
Public | `procedure ResizeFormHeightTo(const y : Integer);`
Public | `procedure SetFormLeftTo(const x : Integer);`
Public | `procedure SetFormTopTo(const y : Integer);`
Public | `function CreateBrowser(const aBrowserParent : TWinControl = nil; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual;`
Public | `function SaveAsBitmapStream(const aStream : TStream) : boolean;`
Public | `function TakeSnapshot(var aBitmap : TBitmap) : boolean;`

## Description

### Methods

Protected | `function GetParentFormHandle: TCefWindowHandle; override;`
This item has no description.

Protected | `function GetParentForm: TCustomForm;`
This item has no description.

Protected | `procedure InitializeDevToolsWindowInfo(aDevTools : TWinControl); virtual;`
This item has no description.

Public | `procedure InitializeDragAndDrop(const aDropTargetCtrl : TWinControl);`
Used with browsers in OSR mode to initialize drag and drop in Windows.

Public | `procedure ShowDevTools(inspectElementAt: TPoint; const aDevTools : TWinControl = nil);`
Open developer tools (DevTools) in its own browser. If inspectElementAt has a valid point with coordinates different than low(integer) then the element at the specified location will be inspected. If the DevTools browser is already open then it will be focused.

Public | `procedure CloseDevTools(const aDevTools : TWinControl = nil);`
Close the developer tools.

Public | `procedure MoveFormTo(const x, y: Integer);`
Move the parent form to the x and y coordinates.

Public | `procedure MoveFormBy(const x, y: Integer);`
Move the parent form adding x and y to the coordinates.

Public | `procedure ResizeFormWidthTo(const x : Integer);`
Add x to the parent form width.

Public | `procedure ResizeFormHeightTo(const y : Integer);`
Add y to the parent form height.

Public | `procedure SetFormLeftTo(const x : Integer);`
Set the parent form left property to x.

Public | `procedure SetFormTopTo(const y : Integer);`
Set the parent form top property to y.

Public | `function CreateBrowser(const aBrowserParent : TWinControl = nil; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual;`
Used to create the browser after the global request context has been initialized. You need to set all properties and events before calling this function because it will only create the internal handlers needed for those events and the property values will be used in the browser initialization. The browser will be fully initialized when the TChromiumCore.OnAfterCreated event is triggered.

Public | `function SaveAsBitmapStream(const aStream : TStream) : boolean;`
Copy the DC to a bitmap stream. Only works on Windows with browsers without GPU acceleration. It's recommended to use the "Page.captureScreenshot" DevTools method instead. )

Public | `function TakeSnapshot(var aBitmap : TBitmap) : boolean;`
Copy the DC to a TBitmap. Only works on Windows with browsers without GPU acceleration. It's recommended to use the "Page.captureScreenshot" DevTools method instead.

Generated by PasDoc 1.0.4.