Chromium Embedded Framework (CEF)
128.4.2+g5c235a2+chromium-128.0.6613.18
|
A View is a rectangle within the views View hierarchy. More...
#include "include/views/cef_view.h"
Public Member Functions | |
virtual CefRefPtr< CefBrowserView > | AsBrowserView ()=0 |
Returns this View as a BrowserView or NULL if this is not a BrowserView. More... | |
virtual CefRefPtr< CefButton > | AsButton ()=0 |
Returns this View as a Button or NULL if this is not a Button. More... | |
virtual CefRefPtr< CefPanel > | AsPanel ()=0 |
Returns this View as a Panel or NULL if this is not a Panel. More... | |
virtual CefRefPtr< CefScrollView > | AsScrollView ()=0 |
Returns this View as a ScrollView or NULL if this is not a ScrollView. More... | |
virtual CefRefPtr< CefTextfield > | AsTextfield ()=0 |
Returns this View as a Textfield or NULL if this is not a Textfield. More... | |
virtual CefString | GetTypeString ()=0 |
Returns the type of this View as a string. More... | |
virtual CefString | ToString (bool include_children)=0 |
Returns a string representation of this View which includes the type and various type-specific identifying attributes. More... | |
virtual bool | IsValid ()=0 |
Returns true if this View is valid. More... | |
virtual bool | IsAttached ()=0 |
Returns true if this View is currently attached to another View. More... | |
virtual bool | IsSame (CefRefPtr< CefView > that)=0 |
Returns true if this View is the same as |that| View. More... | |
virtual CefRefPtr< CefViewDelegate > | GetDelegate ()=0 |
Returns the delegate associated with this View, if any. More... | |
virtual CefRefPtr< CefWindow > | GetWindow ()=0 |
Returns the top-level Window hosting this View, if any. More... | |
virtual int | GetID ()=0 |
Returns the ID for this View. More... | |
virtual void | SetID (int id)=0 |
Sets the ID for this View. More... | |
virtual int | GetGroupID ()=0 |
Returns the group id of this View, or -1 if not set. More... | |
virtual void | SetGroupID (int group_id)=0 |
A group id is used to tag Views which are part of the same logical group. More... | |
virtual CefRefPtr< CefView > | GetParentView ()=0 |
Returns the View that contains this View, if any. More... | |
virtual CefRefPtr< CefView > | GetViewForID (int id)=0 |
Recursively descends the view tree starting at this View, and returns the first child that it encounters with the given ID. More... | |
virtual void | SetBounds (const CefRect &bounds)=0 |
Sets the bounds (size and position) of this View. More... | |
virtual CefRect | GetBounds ()=0 |
Returns the bounds (size and position) of this View in parent coordinates, or DIP screen coordinates if there is no parent. More... | |
virtual CefRect | GetBoundsInScreen ()=0 |
Returns the bounds (size and position) of this View in DIP screen coordinates. More... | |
virtual void | SetSize (const CefSize &size)=0 |
Sets the size of this View without changing the position. More... | |
virtual CefSize | GetSize ()=0 |
Returns the size of this View in parent coordinates, or DIP screen coordinates if there is no parent. More... | |
virtual void | SetPosition (const CefPoint &position)=0 |
Sets the position of this View without changing the size. More... | |
virtual CefPoint | GetPosition ()=0 |
Returns the position of this View. More... | |
virtual void | SetInsets (const CefInsets &insets)=0 |
Sets the insets for this View. More... | |
virtual CefInsets | GetInsets ()=0 |
Returns the insets for this View in parent coordinates, or DIP screen coordinates if there is no parent. More... | |
virtual CefSize | GetPreferredSize ()=0 |
Returns the size this View would like to be if enough space is available. More... | |
virtual void | SizeToPreferredSize ()=0 |
Size this View to its preferred size. More... | |
virtual CefSize | GetMinimumSize ()=0 |
Returns the minimum size for this View. More... | |
virtual CefSize | GetMaximumSize ()=0 |
Returns the maximum size for this View. More... | |
virtual int | GetHeightForWidth (int width)=0 |
Returns the height necessary to display this View with the provided width. More... | |
virtual void | InvalidateLayout ()=0 |
Indicate that this View and all parent Views require a re-layout. More... | |
virtual void | SetVisible (bool visible)=0 |
Sets whether this View is visible. More... | |
virtual bool | IsVisible ()=0 |
Returns whether this View is visible. More... | |
virtual bool | IsDrawn ()=0 |
Returns whether this View is visible and drawn in a Window. More... | |
virtual void | SetEnabled (bool enabled)=0 |
Set whether this View is enabled. More... | |
virtual bool | IsEnabled ()=0 |
Returns whether this View is enabled. More... | |
virtual void | SetFocusable (bool focusable)=0 |
Sets whether this View is capable of taking focus. More... | |
virtual bool | IsFocusable ()=0 |
Returns true if this View is focusable, enabled and drawn. More... | |
virtual bool | IsAccessibilityFocusable ()=0 |
Return whether this View is focusable when the user requires full keyboard access, even though it may not be normally focusable. More... | |
virtual void | RequestFocus ()=0 |
Request keyboard focus. More... | |
virtual void | SetBackgroundColor (cef_color_t color)=0 |
Sets the background color for this View. More... | |
virtual cef_color_t | GetBackgroundColor ()=0 |
Returns the background color for this View. More... | |
virtual cef_color_t | GetThemeColor (int color_id)=0 |
Returns the current theme color associated with |color_id|, or the placeholder color (red) if unset. More... | |
virtual bool | ConvertPointToScreen (CefPoint &point)=0 |
Convert |point| from this View's coordinate system to DIP screen coordinates. More... | |
virtual bool | ConvertPointFromScreen (CefPoint &point)=0 |
Convert |point| to this View's coordinate system from DIP screen coordinates. More... | |
virtual bool | ConvertPointToWindow (CefPoint &point)=0 |
Convert |point| from this View's coordinate system to that of the Window. More... | |
virtual bool | ConvertPointFromWindow (CefPoint &point)=0 |
Convert |point| to this View's coordinate system from that of the Window. More... | |
virtual bool | ConvertPointToView (CefRefPtr< CefView > view, CefPoint &point)=0 |
Convert |point| from this View's coordinate system to that of |view|. More... | |
virtual bool | ConvertPointFromView (CefRefPtr< CefView > view, CefPoint &point)=0 |
Convert |point| to this View's coordinate system from that |view|. More... | |
Public Member Functions inherited from CefBaseRefCounted | |
virtual void | AddRef () const =0 |
Called to increment the reference count for the object. More... | |
virtual bool | Release () const =0 |
Called to decrement the reference count for the object. More... | |
virtual bool | HasOneRef () const =0 |
Returns true if the reference count is 1. More... | |
virtual bool | HasAtLeastOneRef () const =0 |
Returns true if the reference count is at least 1. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CefBaseRefCounted | |
virtual | ~CefBaseRefCounted () |
A View is a rectangle within the views View hierarchy.
It is the base class 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.
|
pure virtual |
Returns this View as a BrowserView or NULL if this is not a BrowserView.
Returns this View as a Button or NULL if this is not a Button.
Returns this View as a Panel or NULL if this is not a Panel.
|
pure virtual |
Returns this View as a ScrollView or NULL if this is not a ScrollView.
|
pure virtual |
Returns this View as a Textfield or NULL if this is not a Textfield.
|
pure virtual |
Convert |point| to this View's coordinate system from DIP screen coordinates.
This View must belong to a Window when calling this method. Returns true if the conversion is successful or false otherwise. Use CefDisplay::ConvertPointFromPixels() before calling this method if conversion from display-specific pixel coordinates is necessary.
|
pure virtual |
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 if the conversion is successful or false otherwise.
|
pure virtual |
Convert |point| to this View's coordinate system from that of the Window.
This View must belong to a Window when calling this method. Returns true if the conversion is successful or false otherwise.
|
pure virtual |
Convert |point| from this View's coordinate system to DIP screen coordinates.
This View must belong to a Window when calling this method. Returns true if the conversion is successful or false otherwise. Use CefDisplay::ConvertPointToPixels() after calling this method if further conversion to display-specific pixel coordinates is desired.
|
pure virtual |
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 if the conversion is successful or false otherwise.
|
pure virtual |
Convert |point| from this View's coordinate system to that of the Window.
This View must belong to a Window when calling this method. Returns true if the conversion is successful or false otherwise.
|
pure virtual |
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 CefWindow::AddOverlayView), and the background color is unset, then a value of transparent (0) will be returned.
|
pure virtual |
Returns the bounds (size and position) of this View in parent coordinates, or DIP screen coordinates if there is no parent.
|
pure virtual |
Returns the bounds (size and position) of this View in DIP screen coordinates.
|
pure virtual |
Returns the delegate associated with this View, if any.
|
pure virtual |
Returns the group id of this View, or -1 if not set.
|
pure virtual |
Returns the height necessary to display this View with the provided width.
|
pure virtual |
Returns the ID for this View.
|
pure virtual |
Returns the insets for this View in parent coordinates, or DIP screen coordinates if there is no parent.
|
pure virtual |
Returns the maximum size for this View.
Size is in parent coordinates, or DIP screen coordinates if there is no parent.
|
pure virtual |
Returns the minimum size for this View.
Size is in parent coordinates, or DIP screen coordinates if there is no parent.
Returns the View that contains this View, if any.
|
pure virtual |
Returns the position of this View.
Position is in parent coordinates, or DIP screen coordinates if there is no parent.
|
pure virtual |
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.
|
pure virtual |
Returns the size of this View in parent coordinates, or DIP screen coordinates if there is no parent.
|
pure virtual |
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 CefWindow::SetThemeColor.
|
pure virtual |
Returns the type of this View as a string.
Used primarily for testing purposes.
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.
Returns the top-level Window hosting this View, if any.
|
pure virtual |
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.
|
pure virtual |
Return whether this View is focusable when the user requires full keyboard access, even though it may not be normally focusable.
|
pure virtual |
Returns true if this View is currently attached to another View.
A View can only be attached to one View at a time.
|
pure virtual |
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 method is equivalent to calling IsVisible(). Otherwise, to determine if the containing Window is visible to the user on-screen call IsVisible() on the Window.
|
pure virtual |
Returns whether this View is enabled.
|
pure virtual |
Returns true if this View is focusable, enabled and drawn.
Returns true if this View is the same as |that| View.
|
pure virtual |
Returns true if this View is valid.
|
pure virtual |
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 indicates that this Window is currently visible to the user on-screen. If this View is not a Window then call IsDrawn() to determine whether this View and all parent views are visible and will be drawn.
|
pure virtual |
Request keyboard focus.
If this View is focusable it will become the focused View.
|
pure virtual |
Sets the background color for this View.
The background color will be automatically reset when CefViewDelegate::OnThemeChanged is called.
|
pure virtual |
Sets the bounds (size and position) of this View.
|bounds| is in parent coordinates, or DIP screen coordinates if there is no parent.
|
pure virtual |
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.
|
pure virtual |
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 by default so that a View used as a container does not get the focus.
|
pure virtual |
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.
|
pure virtual |
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.
|
pure virtual |
Sets the insets for this View.
|insets| is in parent coordinates, or DIP screen coordinates if there is no parent.
|
pure virtual |
Sets the position of this View without changing the size.
|position| is in parent coordinates, or DIP screen coordinates if there is no parent.
|
pure virtual |
Sets the size of this View without changing the position.
|size| in parent coordinates, or DIP screen coordinates if there is no parent.
|
pure virtual |
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 method is equivalent to calling the Window Show() and Hide() methods.
|
pure virtual |
Size this View to its preferred size.
Size is in parent coordinates, or DIP screen coordinates if there is no parent.
|
pure virtual |
Returns a string representation of this View which includes the type and various type-specific identifying attributes.
If |include_children| is true any child Views will also be included. Used primarily for testing purposes.