# Class TFMXChromium

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFFMXChromium

## Declaration

`type TFMXChromium = class(TChromiumCore, IChromiumEvents)`

## Description

FMX 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
- TFMXChromium

## Overview

### Methods

| `function GetParentFormHandle: TCefWindowHandle; override;`
| `function GetParentForm: TCustomForm;`
| `function GetScreenScale: Single;`
| `procedure InitializeDevToolsWindowInfo; virtual;`
| `procedure ShowDevTools(inspectElementAt: TPoint);`
| `procedure CloseDevTools;`
| `procedure MoveFormTo(const x, y: Integer);`
| `procedure MoveFormBy(const x, y: Integer);`
| `procedure ResizeFormWidthTo(const x : Integer);`
| `procedure ResizeFormHeightTo(const y : Integer);`
| `procedure SetFormLeftTo(const x : Integer);`
| `procedure SetFormTopTo(const y : Integer);`
| `function CreateBrowser(const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual;`
| `function SaveAsBitmapStream(const aStream : TStream; const aRect : System.Types.TRect) : boolean;`
| `function TakeSnapshot(var aBitmap : TBitmap; const aRect : System.Types.TRect) : boolean;`

### Properties

| `property ScreenScale : single read GetScreenScale;`

## Description

### Methods

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

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

| `function GetScreenScale: Single;`
This item has no description.

| `procedure InitializeDevToolsWindowInfo; virtual;`
This item has no description.

| `procedure ShowDevTools(inspectElementAt: TPoint);`
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.

| `procedure CloseDevTools;`
close the developer tools.

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

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

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

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

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

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

| `function CreateBrowser(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.

| `function SaveAsBitmapStream(const aStream : TStream; const aRect : System.Types.TRect) : 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.

| `function TakeSnapshot(var aBitmap : TBitmap; const aRect : System.Types.TRect) : boolean;`
Takes a snapshot into a TBitmap using the SaveAsBitmapStream function.

### Properties

| `property ScreenScale : single read GetScreenScale;`
Returns the screen scale of the monitor where the parent form is located.

Generated by PasDoc 0.17.0.snapshot.