type TCefViewRef = class(TCefBaseRefCountedRef, ICefView)
A View is a rectangle within the views View hierarchy. It is the base interface for all Views. All size and position values are in density independent pixels (DIP) unless otherwise indicated. Methods must be called on the browser process UI thread unless otherwise indicated.
<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/views/cef_view_capi.h">CEF source file: /include/capi/views/cef_view_capi.h (cef_view_t))
function AsBrowserView: ICefBrowserView; |
|
function AsButton: ICefButton; |
|
function AsPanel: ICefPanel; |
|
function AsScrollView: ICefScrollView; |
|
function AsTextfield: ICefTextfield; |
|
function GetTypeString: ustring; |
|
function ToStringEx(include_children: boolean): ustring; |
|
function IsValid: boolean; |
|
function IsAttached: boolean; |
|
function IsSame(const that: ICefView): boolean; |
|
function GetDelegate: ICefViewDelegate; |
|
function GetWindow: ICefWindow; |
|
function GetID: Integer; |
|
procedure SetID(id_: Integer); |
|
function GetGroupID: Integer; |
|
procedure SetGroupID(group_id: Integer); |
|
function GetParentView: ICefView; |
|
function GetViewForID(id_: Integer): ICefView; |
|
procedure SetBounds(const bounds_: TCefRect); |
|
function GetBounds: TCefRect; |
|
function GetBoundsInScreen: TCefRect; |
|
procedure SetSize(const size_: TCefSize); |
|
function GetSize: TCefSize; |
|
procedure SetPosition(const position_: TCefPoint); |
|
function GetPosition: TCefPoint; |
|
procedure SetInsets(const insets: TCefInsets); |
|
function GetInsets: TCefInsets; |
|
function GetPreferredSize: TCefSize; |
|
procedure SizeToPreferredSize; |
|
function GetMinimumSize: TCefSize; |
|
function GetMaximumSize: TCefSize; |
|
function GetHeightForWidth(width: Integer): Integer; |
|
procedure InvalidateLayout; |
|
procedure SetVisible(visible_: boolean); |
|
function IsVisible: boolean; |
|
function IsDrawn: boolean; |
|
procedure SetEnabled(enabled_: boolean); |
|
function IsEnabled: boolean; |
|
procedure SetFocusable(focusable_: boolean); |
|
function IsFocusable: boolean; |
|
function IsAccessibilityFocusable: boolean; |
|
procedure RequestFocus; |
|
procedure SetBackgroundColor(color: TCefColor); |
|
function GetBackgroundColor: TCefColor; |
|
function ConvertPointToScreen(var point: TCefPoint): boolean; |
|
function ConvertPointFromScreen(var point: TCefPoint): boolean; |
|
function ConvertPointToWindow(var point: TCefPoint): boolean; |
|
function ConvertPointFromWindow(var point: TCefPoint): boolean; |
|
function ConvertPointToView(const view : ICefView; var point: TCefPoint): boolean; |
|
function ConvertPointFromView(const view : ICefView; var point: TCefPoint): boolean; |
|
class function UnWrap(data: Pointer): ICefView; |
function AsBrowserView: ICefBrowserView; |
|
Returns this View as a BrowserView or NULL if this is not a BrowserView. |
function AsButton: ICefButton; |
|
Returns this View as a Button or NULL if this is not a Button. |
function AsPanel: ICefPanel; |
|
Returns this View as a Panel or NULL if this is not a Panel. |
function AsScrollView: ICefScrollView; |
|
Returns this View as a ScrollView or NULL if this is not a ScrollView. |
function AsTextfield: ICefTextfield; |
|
Returns this View as a Textfield or NULL if this is not a Textfield. |
function GetTypeString: ustring; |
|
Returns the type of this View as a string. Used primarily for testing purposes. |
function ToStringEx(include_children: boolean): ustring; |
|
Returns a string representation of this View which includes the type and various type-specific identifying attributes. If |include_children| is true (1) any child Views will also be included. Used primarily for testing purposes. |
function IsValid: boolean; |
|
Returns true (1) if this View is valid. |
function IsAttached: boolean; |
|
Returns true (1) if this View is currently attached to another View. A View can only be attached to one View at a time. |
function IsSame(const that: ICefView): boolean; |
|
Returns true (1) if this View is the same as |that| View. |
function GetDelegate: ICefViewDelegate; |
|
Returns the delegate associated with this View, if any. |
function GetWindow: ICefWindow; |
|
Returns the top-level Window hosting this View, if any. |
function GetID: Integer; |
|
Returns the ID for this View. |
procedure SetID(id_: Integer); |
|
Sets the ID for this View. ID should be unique within the subtree that you intend to search for it. 0 is the default ID for views. |
function GetGroupID: Integer; |
|
Returns the group id of this View, or -1 if not set. |
function GetParentView: ICefView; |
|
Returns the View that contains this View, if any. |
function GetViewForID(id_: Integer): ICefView; |
|
Recursively descends the view tree starting at this View, and returns the first child that it encounters with the given ID. Returns NULL if no matching child view is found. |
procedure SetBounds(const bounds_: TCefRect); |
|
Sets the bounds (size and position) of this View. |bounds| is in parent coordinates, or DIP screen coordinates if there is no parent. |
function GetBounds: TCefRect; |
|
Returns the bounds (size and position) of this View in parent coordinates, or DIP screen coordinates if there is no parent. |
function GetBoundsInScreen: TCefRect; |
|
Returns the bounds (size and position) of this View in DIP screen coordinates. |
procedure SetSize(const size_: TCefSize); |
|
Sets the size of this View without changing the position. |size| in parent coordinates, or DIP screen coordinates if there is no parent. |
function GetSize: TCefSize; |
|
Returns the size of this View in parent coordinates, or DIP screen coordinates if there is no parent. |
procedure SetPosition(const position_: TCefPoint); |
|
Sets the position of this View without changing the size. |position| is in parent coordinates, or DIP screen coordinates if there is no parent. |
function GetPosition: TCefPoint; |
|
Returns the position of this View. Position is in parent coordinates, or DIP screen coordinates if there is no parent. |
procedure SetInsets(const insets: TCefInsets); |
|
Sets the insets for this View. |insets| is in parent coordinates, or DIP screen coordinates if there is no parent. |
function GetInsets: TCefInsets; |
|
Returns the insets for this View in parent coordinates, or DIP screen coordinates if there is no parent. |
function GetPreferredSize: TCefSize; |
|
Returns the size this View would like to be if enough space is available. Size is in parent coordinates, or DIP screen coordinates if there is no parent. |
procedure SizeToPreferredSize; |
|
Size this View to its preferred size. Size is in parent coordinates, or DIP screen coordinates if there is no parent. |
function GetMinimumSize: TCefSize; |
|
Returns the minimum size for this View. Size is in parent coordinates, or DIP screen coordinates if there is no parent. |
function GetMaximumSize: TCefSize; |
|
Returns the maximum size for this View. Size is in parent coordinates, or DIP screen coordinates if there is no parent. |
function GetHeightForWidth(width: Integer): Integer; |
|
Returns the height necessary to display this View with the provided width. |
function IsEnabled: boolean; |
|
Returns whether this View is enabled. |
function IsFocusable: boolean; |
|
Returns true (1) if this View is focusable, enabled and drawn. |
function IsAccessibilityFocusable: boolean; |
|
Return whether this View is focusable when the user requires full keyboard access, even though it may not be normally focusable. |
procedure RequestFocus; |
|
Request keyboard focus. If this View is focusable it will become the focused View. |
procedure SetBackgroundColor(color: TCefColor); |
|
Sets the background color for this View. |
function GetBackgroundColor: TCefColor; |
|
Returns the background color for this View. |
function ConvertPointToScreen(var point: TCefPoint): boolean; |
|
Convert |point| from this View's coordinate system to DIP screen coordinates. This View must belong to a Window when calling this function. Returns true (1) if the conversion is successful or false (0) otherwise. Use ICefDisplay.ConvertPointToPixels() after calling this function if further conversion to display-specific pixel coordinates is desired. |
function ConvertPointFromScreen(var point: TCefPoint): boolean; |
|
Convert |point| to this View's coordinate system from DIP screen coordinates. This View must belong to a Window when calling this function. Returns true (1) if the conversion is successful or false (0) otherwise. Use ICefDisplay.ConvertPointFromPixels() before calling this function if conversion from display-specific pixel coordinates is necessary. |
function ConvertPointToWindow(var point: TCefPoint): boolean; |
|
Convert |point| from this View's coordinate system to that of the Window. This View must belong to a Window when calling this function. Returns true (1) if the conversion is successful or false (0) otherwise. |
function ConvertPointFromWindow(var point: TCefPoint): boolean; |
|
Convert |point| to this View's coordinate system from that of the Window. This View must belong to a Window when calling this function. Returns true (1) if the conversion is successful or false (0) otherwise. |
function ConvertPointToView(const view : ICefView; var point: TCefPoint): boolean; |
|
Convert |point| from this View's coordinate system to that of |view|. |view| needs to be in the same Window but not necessarily the same view hierarchy. Returns true (1) if the conversion is successful or false (0) otherwise. |
function ConvertPointFromView(const view : ICefView; var point: TCefPoint): boolean; |
|
Convert |point| to this View's coordinate system from that |view|. |view| needs to be in the same Window but not necessarily the same view hierarchy. Returns true (1) if the conversion is successful or false (0) otherwise. |
class function UnWrap(data: Pointer): ICefView; |
|
Returns a ICefView instance using a PCefView data pointer. |