Chromium Embedded Framework (CEF)  114.2.1+gd70a0a8+chromium-114.0.5735.45
CefOverlayController Class Referenceabstract

Controller for an overlay that contains a contents View added via CefWindow::AddOverlayView. More...

#include "include/views/cef_overlay_controller.h"

Inheritance diagram for CefOverlayController:
CefBaseRefCounted

Public Member Functions

virtual bool IsValid ()=0
 Returns true if this object is valid. More...
 
virtual bool IsSame (CefRefPtr< CefOverlayController > that)=0
 Returns true if this object is the same as |that| object. More...
 
virtual CefRefPtr< CefViewGetContentsView ()=0
 Returns the contents View for this overlay. More...
 
virtual CefRefPtr< CefWindowGetWindow ()=0
 Returns the top-level Window hosting this overlay. More...
 
virtual cef_docking_mode_t GetDockingMode ()=0
 Returns the docking mode for this overlay. More...
 
virtual void Destroy ()=0
 Destroy this overlay. More...
 
virtual void SetBounds (const CefRect &bounds)=0
 Sets the bounds (size and position) of this overlay. More...
 
virtual CefRect GetBounds ()=0
 Returns the bounds (size and position) of this overlay in parent coordinates. More...
 
virtual CefRect GetBoundsInScreen ()=0
 Returns the bounds (size and position) of this overlay in DIP screen coordinates. More...
 
virtual void SetSize (const CefSize &size)=0
 Sets the size of this overlay without changing the position. More...
 
virtual CefSize GetSize ()=0
 Returns the size of this overlay in parent coordinates. More...
 
virtual void SetPosition (const CefPoint &position)=0
 Sets the position of this overlay without changing the size. More...
 
virtual CefPoint GetPosition ()=0
 Returns the position of this overlay in parent coordinates. More...
 
virtual void SetInsets (const CefInsets &insets)=0
 Sets the insets for this overlay. More...
 
virtual CefInsets GetInsets ()=0
 Returns the insets for this overlay in parent coordinates. More...
 
virtual void SizeToPreferredSize ()=0
 Size this overlay to its preferred size and trigger a re-layout if necessary. More...
 
virtual void SetVisible (bool visible)=0
 Sets whether this overlay is visible. More...
 
virtual bool IsVisible ()=0
 Returns whether this overlay is visible. More...
 
virtual bool IsDrawn ()=0
 Returns whether this overlay is visible and drawn in a Window. 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 ()
 

Detailed Description

Controller for an overlay that contains a contents View added via CefWindow::AddOverlayView.

Methods exposed by this controller should be called in preference to methods of the same name exposed by the contents View unless otherwise indicated. Methods must be called on the browser process UI thread unless otherwise indicated.

Member Function Documentation

◆ Destroy()

virtual void CefOverlayController::Destroy ( )
pure virtual

Destroy this overlay.

◆ GetBounds()

virtual CefRect CefOverlayController::GetBounds ( )
pure virtual

Returns the bounds (size and position) of this overlay in parent coordinates.

◆ GetBoundsInScreen()

virtual CefRect CefOverlayController::GetBoundsInScreen ( )
pure virtual

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

◆ GetContentsView()

virtual CefRefPtr<CefView> CefOverlayController::GetContentsView ( )
pure virtual

Returns the contents View for this overlay.

◆ GetDockingMode()

virtual cef_docking_mode_t CefOverlayController::GetDockingMode ( )
pure virtual

Returns the docking mode for this overlay.

◆ GetInsets()

virtual CefInsets CefOverlayController::GetInsets ( )
pure virtual

Returns the insets for this overlay in parent coordinates.

◆ GetPosition()

virtual CefPoint CefOverlayController::GetPosition ( )
pure virtual

Returns the position of this overlay in parent coordinates.

◆ GetSize()

virtual CefSize CefOverlayController::GetSize ( )
pure virtual

Returns the size of this overlay in parent coordinates.

◆ GetWindow()

virtual CefRefPtr<CefWindow> CefOverlayController::GetWindow ( )
pure virtual

Returns the top-level Window hosting this overlay.

Use this method instead of calling GetWindow() on the contents View.

◆ IsDrawn()

virtual bool CefOverlayController::IsDrawn ( )
pure virtual

Returns whether this overlay is visible and drawn in a Window.

A View is drawn if it and all parent Views are visible. To determine if the containing Window is visible to the user on-screen call IsVisible() on the Window.

◆ IsSame()

virtual bool CefOverlayController::IsSame ( CefRefPtr< CefOverlayController that)
pure virtual

Returns true if this object is the same as |that| object.

◆ IsValid()

virtual bool CefOverlayController::IsValid ( )
pure virtual

Returns true if this object is valid.

◆ IsVisible()

virtual bool CefOverlayController::IsVisible ( )
pure virtual

Returns whether this overlay is visible.

A View may be visible but still not drawn in a Window if any parent Views are hidden. Call IsDrawn() to determine whether this overlay and all parent Views are visible and will be drawn.

◆ SetBounds()

virtual void CefOverlayController::SetBounds ( const CefRect bounds)
pure virtual

Sets the bounds (size and position) of this overlay.

This will set the bounds of the contents View to match and trigger a re-layout if necessary. |bounds| is in parent coordinates and any insets configured on this overlay will be ignored. Use this method only for overlays created with a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the insets of this overlay and/or layout of the contents View and call SizeToPreferredSize() instead to calculate the new size and re-position the overlay if necessary.

◆ SetInsets()

virtual void CefOverlayController::SetInsets ( const CefInsets insets)
pure virtual

Sets the insets for this overlay.

|insets| is in parent coordinates. Use this method only for overlays created with a docking mode value other than CEF_DOCKING_MODE_CUSTOM.

◆ SetPosition()

virtual void CefOverlayController::SetPosition ( const CefPoint position)
pure virtual

Sets the position of this overlay without changing the size.

|position| is in parent coordinates and any insets configured on this overlay will be ignored. Use this method only for overlays created with a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the insets of this overlay and/or layout of the contents View and call SizeToPreferredSize() instead to calculate the new size and re-position the overlay if necessary.

◆ SetSize()

virtual void CefOverlayController::SetSize ( const CefSize size)
pure virtual

Sets the size of this overlay without changing the position.

This will set the size of the contents View to match and trigger a re-layout if necessary. |size| is in parent coordinates and any insets configured on this overlay will be ignored. Use this method only for overlays created with a docking mode value of CEF_DOCKING_MODE_CUSTOM. With other docking modes modify the insets of this overlay and/or layout of the contents View and call SizeToPreferredSize() instead to calculate the new size and re-position the overlay if necessary.

◆ SetVisible()

virtual void CefOverlayController::SetVisible ( bool  visible)
pure virtual

Sets whether this overlay is visible.

Overlays are hidden by default. If this overlay is 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.

◆ SizeToPreferredSize()

virtual void CefOverlayController::SizeToPreferredSize ( )
pure virtual

Size this overlay to its preferred size and trigger a re-layout if necessary.

The position of overlays created with a docking mode value of CEF_DOCKING_MODE_CUSTOM will not be modified by calling this method. With other docking modes this method may re-position the overlay if necessary to accommodate the new size and any insets configured on the contents View.


The documentation for this class was generated from the following file: