Interface ICefView

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type ICefView = interface(ICefBaseRefCounted)

Description

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.

UNKNOWN

<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))

Hierarchy

Overview

Methods

Public function AsBrowserView: ICefBrowserView;
Public function AsButton: ICefButton;
Public function AsPanel: ICefPanel;
Public function AsScrollView: ICefScrollView;
Public function AsTextfield: ICefTextfield;
Public function GetTypeString: ustring;
Public function ToStringEx(include_children: boolean): ustring;
Public function IsValid: boolean;
Public function IsAttached: boolean;
Public function IsSame(const that: ICefView): boolean;
Public function GetDelegate: ICefViewDelegate;
Public function GetWindow: ICefWindow;
Public function GetID: Integer;
Public procedure SetID(id_: Integer);
Public function GetGroupID: Integer;
Public procedure SetGroupID(group_id: Integer);
Public function GetParentView: ICefView;
Public function GetViewForID(id_: Integer): ICefView;
Public procedure SetBounds(const bounds_: TCefRect);
Public function GetBounds: TCefRect;
Public function GetBoundsInScreen: TCefRect;
Public procedure SetSize(const size_: TCefSize);
Public function GetSize: TCefSize;
Public procedure SetPosition(const position_: TCefPoint);
Public function GetPosition: TCefPoint;
Public procedure SetInsets(const insets: TCefInsets);
Public function GetInsets: TCefInsets;
Public function GetPreferredSize: TCefSize;
Public procedure SizeToPreferredSize;
Public function GetMinimumSize: TCefSize;
Public function GetMaximumSize: TCefSize;
Public function GetHeightForWidth(width: Integer): Integer;
Public procedure InvalidateLayout;
Public procedure SetVisible(visible_: boolean);
Public function IsVisible: boolean;
Public function IsDrawn: boolean;
Public procedure SetEnabled(enabled_: boolean);
Public function IsEnabled: boolean;
Public procedure SetFocusable(focusable_: boolean);
Public function IsFocusable: boolean;
Public function IsAccessibilityFocusable: boolean;
Public procedure RequestFocus;
Public procedure SetBackgroundColor(color: TCefColor);
Public function GetBackgroundColor: TCefColor;
Public function GetThemeColor(color_id: integer): TCefColor;
Public function ConvertPointToScreen(var point: TCefPoint): boolean;
Public function ConvertPointFromScreen(var point: TCefPoint): boolean;
Public function ConvertPointToWindow(var point: TCefPoint): boolean;
Public function ConvertPointFromWindow(var point: TCefPoint): boolean;
Public function ConvertPointToView(const view : ICefView; var point: TCefPoint): boolean;
Public function ConvertPointFromView(const view : ICefView; var point: TCefPoint): boolean;

Properties

Public property Valid : boolean read IsValid;
Public property Attached : boolean read IsAttached;
Public property Delegate : ICefViewDelegate read GetDelegate;
Public property Window : ICefWindow read GetWindow;
Public property ParentView : ICefView read GetParentView;
Public property BoundsInScreen : TCefRect read GetBoundsInScreen;
Public property PreferredSize : TCefSize read GetPreferredSize;
Public property MinimumSize : TCefSize read GetMinimumSize;
Public property MaximumSize : TCefSize read GetMaximumSize;
Public property Visible : boolean read IsVisible write SetVisible;
Public property Drawn : boolean read IsDrawn;
Public property Enabled : boolean read IsEnabled write SetEnabled;
Public property Focusable : boolean read IsFocusable write SetFocusable;
Public property AccessibilityFocusable : boolean read IsAccessibilityFocusable;
Public property BackgroundColor : TCefColor read GetBackgroundColor write SetBackgroundColor;
Public property ID : integer read GetID write SetID;
Public property GroupID : integer read GetGroupID write SetGroupID;
Public property Bounds : TCefRect read GetBounds write SetBounds;
Public property Size : TCefSize read GetSize write SetSize;
Public property Position : TCefPoint read GetPosition write SetPosition;
Public property Insets : TCefInsets read GetInsets write SetInsets;
Public property TypeString : ustring read GetTypeString;

Description

Methods

Public function AsBrowserView: ICefBrowserView;

Returns this View as a BrowserView or NULL if this is not a BrowserView.

Attributes
GUID['{E9AF950A-F4E8-420C-BD1F-F26F4FDFA48D}']
Public function AsButton: ICefButton;

Returns this View as a Button or NULL if this is not a Button.

Public function AsPanel: ICefPanel;

Returns this View as a Panel or NULL if this is not a Panel.

Public function AsScrollView: ICefScrollView;

Returns this View as a ScrollView or NULL if this is not a ScrollView.

Public function AsTextfield: ICefTextfield;

Returns this View as a Textfield or NULL if this is not a Textfield.

Public function GetTypeString: ustring;

Returns the type of this View as a string. Used primarily for testing purposes.

Public 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.

Public function IsValid: boolean;

Returns true (1) if this View is valid.

Public 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.

Public function IsSame(const that: ICefView): boolean;

Returns true (1) if this View is the same as |that| View.

Public function GetDelegate: ICefViewDelegate;

Returns the delegate associated with this View, if any.

Public function GetWindow: ICefWindow;

Returns the top-level Window hosting this View, if any.

Public function GetID: Integer;

Returns the ID for this View.

Public 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.

Public function GetGroupID: Integer;

Returns the group id of this View, or -1 if not set.

Public procedure SetGroupID(group_id: Integer);

A group id is used to tag Views which are part of the same logical group. Focus can be moved between views with the same group using the arrow keys. The group id is immutable once it's set.

Public function GetParentView: ICefView;

Returns the View that contains this View, if any.

Public 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.

Public 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.

Public function GetBounds: TCefRect;

Returns the bounds (size and position) of this View in parent coordinates, or DIP screen coordinates if there is no parent.

Public function GetBoundsInScreen: TCefRect;

Returns the bounds (size and position) of this View in DIP screen coordinates.

Public 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.

Public function GetSize: TCefSize;

Returns the size of this View in parent coordinates, or DIP screen coordinates if there is no parent.

Public 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.

Public function GetPosition: TCefPoint;

Returns the position of this View. Position is in parent coordinates, or DIP screen coordinates if there is no parent.

Public 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.

Public function GetInsets: TCefInsets;

Returns the insets for this View in parent coordinates, or DIP screen coordinates if there is no parent.

Public 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.

Public procedure SizeToPreferredSize;

Size this View to its preferred size. Size is in parent coordinates, or DIP screen coordinates if there is no parent.

Public function GetMinimumSize: TCefSize;

Returns the minimum size for this View. Size is in parent coordinates, or DIP screen coordinates if there is no parent.

Public function GetMaximumSize: TCefSize;

Returns the maximum size for this View. Size is in parent coordinates, or DIP screen coordinates if there is no parent.

Public function GetHeightForWidth(width: Integer): Integer;

Returns the height necessary to display this View with the provided width.

Public procedure InvalidateLayout;

Indicate that this View and all parent Views require a re-layout. This ensures the next call to layout() will propagate to this View even if the bounds of parent Views do not change.

Public procedure SetVisible(visible_: boolean);

Sets whether this View is visible. Windows are hidden by default and other views are visible by default. This View and any parent views must be set as visible for this View to be drawn in a Window. If this View is set as hidden then it and any child views will not be drawn and, if any of those views currently have focus, then focus will also be cleared. Painting is scheduled as needed. If this View is a Window then calling this function is equivalent to calling the Window show() and hide() functions.

Public function IsVisible: boolean;

Returns whether this View is visible. A view may be visible but still not drawn in a Window if any parent views are hidden. If this View is a Window then a return value of true (1) indicates that this Window is currently visible to the user on-screen. If this View is not a Window then call is_drawn() to determine whether this View and all parent views are visible and will be drawn.

Public function IsDrawn: boolean;

Returns whether this View is visible and drawn in a Window. A view is drawn if it and all parent views are visible. If this View is a Window then calling this function is equivalent to calling is_visible(). Otherwise, to determine if the containing Window is visible to the user on-screen call is_visible() on the Window.

Public procedure SetEnabled(enabled_: boolean);

Set whether this View is enabled. A disabled View does not receive keyboard or mouse inputs. If |enabled| differs from the current value the View will be repainted. Also, clears focus if the focused View is disabled.

Public function IsEnabled: boolean;

Returns whether this View is enabled.

Public procedure SetFocusable(focusable_: boolean);

Sets whether this View is capable of taking focus. It will clear focus if the focused View is set to be non-focusable. This is false (0) by default so that a View used as a container does not get the focus.

Public function IsFocusable: boolean;

Returns true (1) if this View is focusable, enabled and drawn.

Public function IsAccessibilityFocusable: boolean;

Return whether this View is focusable when the user requires full keyboard access, even though it may not be normally focusable.

Public procedure RequestFocus;

Request keyboard focus. If this View is focusable it will become the focused View.

Public procedure SetBackgroundColor(color: TCefColor);

Sets the background color for this View. The background color will be automatically reset when ICefViewDelegate.OnThemeChanged is called.

Public function GetBackgroundColor: TCefColor;

Returns the background color for this View. If the background color is unset then the current `GetThemeColor(CEF_ColorPrimaryBackground)` value will be returned. If this View belongs to an overlay (created with ICefWindow.AddOverlayView), and the background color is unset, then a value of transparent (0) will be returned.

Public function GetThemeColor(color_id: integer): TCefColor;

Returns the current theme color associated with |color_id|, or the placeholder color (red) if unset. See cef_color_ids.h for standard ID values. Standard colors can be overridden and custom colors can be added using ICefWindow.SetThemeColor.

Public 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.

Public 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.

Public 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.

Public 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.

Public 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.

Public 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.

Properties

Public property Valid : boolean read IsValid;

Returns true (1) if this View is valid.

Public property Attached : boolean read IsAttached;

Returns true (1) if this View is currently attached to another View. A View can only be attached to one View at a time.

Public property Delegate : ICefViewDelegate read GetDelegate;

Returns the delegate associated with this View, if any.

Public property Window : ICefWindow read GetWindow;

Returns the top-level Window hosting this View, if any.

Public property ParentView : ICefView read GetParentView;

Returns the View that contains this View, if any.

Public property BoundsInScreen : TCefRect read GetBoundsInScreen;

Returns the bounds (size and position) of this View in DIP screen coordinates.

Public property PreferredSize : TCefSize read GetPreferredSize;

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.

Public property MinimumSize : TCefSize read GetMinimumSize;

Returns the minimum size for this View. Size is in parent coordinates, or DIP screen coordinates if there is no parent.

Public property MaximumSize : TCefSize read GetMaximumSize;

Returns the maximum size for this View. Size is in parent coordinates, or DIP screen coordinates if there is no parent.

Public property Visible : boolean read IsVisible write SetVisible;

Returns whether this View is visible. A view may be visible but still not drawn in a Window if any parent views are hidden. If this View is a Window then a return value of true (1) indicates that this Window is currently visible to the user on-screen. If this View is not a Window then call is_drawn() to determine whether this View and all parent views are visible and will be drawn.

Public property Drawn : boolean read IsDrawn;

Returns whether this View is visible and drawn in a Window. A view is drawn if it and all parent views are visible. If this View is a Window then calling this function is equivalent to calling is_visible(). Otherwise, to determine if the containing Window is visible to the user on-screen call is_visible() on the Window.

Public property Enabled : boolean read IsEnabled write SetEnabled;

Returns whether this View is enabled.

Public property Focusable : boolean read IsFocusable write SetFocusable;

Returns true (1) if this View is focusable, enabled and drawn.

Public property AccessibilityFocusable : boolean read IsAccessibilityFocusable;

Return whether this View is focusable when the user requires full keyboard access, even though it may not be normally focusable.

Public property BackgroundColor : TCefColor read GetBackgroundColor write SetBackgroundColor;

Returns the background color for this View. If the background color is unset then the current `GetThemeColor(CEF_ColorPrimaryBackground)` value will be returned. If this View belongs to an overlay (created with ICefWindow.AddOverlayView), and the background color is unset, then a value of transparent (0) will be returned.

Public property ID : integer read GetID write SetID;

Returns the ID for this View.

Public property GroupID : integer read GetGroupID write SetGroupID;

Returns the group id of this View, or -1 if not set.

Public property Bounds : TCefRect read GetBounds write SetBounds;

Returns the bounds (size and position) of this View in parent coordinates, or DIP screen coordinates if there is no parent.

Public property Size : TCefSize read GetSize write SetSize;

Returns the size of this View in parent coordinates, or DIP screen coordinates if there is no parent.

Public property Position : TCefPoint read GetPosition write SetPosition;

Returns the position of this View. Position is in parent coordinates, or DIP screen coordinates if there is no parent.

Public property Insets : TCefInsets read GetInsets write SetInsets;

Returns the insets for this View in parent coordinates, or DIP screen coordinates if there is no parent.

Public property TypeString : ustring read GetTypeString;

Returns the type of this View as a string. Used primarily for testing purposes.


Generated by PasDoc 0.16.0-snapshot.