Chromium Embedded Framework (CEF)  114.2.1+gd70a0a8+chromium-114.0.5735.45
CefViewDelegate Class Reference

Implement this interface to handle view events. More...

#include "include/views/cef_view_delegate.h"

Inheritance diagram for CefViewDelegate:
CefBaseRefCounted CefBrowserViewDelegate CefButtonDelegate CefPanelDelegate CefTextfieldDelegate CefMenuButtonDelegate CefWindowDelegate

Public Member Functions

virtual CefSize GetPreferredSize (CefRefPtr< CefView > view)
 Return the preferred size for |view|. More...
 
virtual CefSize GetMinimumSize (CefRefPtr< CefView > view)
 Return the minimum size for |view|. More...
 
virtual CefSize GetMaximumSize (CefRefPtr< CefView > view)
 Return the maximum size for |view|. More...
 
virtual int GetHeightForWidth (CefRefPtr< CefView > view, int width)
 Return the height necessary to display |view| with the provided |width|. More...
 
virtual void OnParentViewChanged (CefRefPtr< CefView > view, bool added, CefRefPtr< CefView > parent)
 Called when the parent of |view| has changed. More...
 
virtual void OnChildViewChanged (CefRefPtr< CefView > view, bool added, CefRefPtr< CefView > child)
 Called when a child of |view| has changed. More...
 
virtual void OnWindowChanged (CefRefPtr< CefView > view, bool added)
 Called when |view| is added or removed from the CefWindow. More...
 
virtual void OnLayoutChanged (CefRefPtr< CefView > view, const CefRect &new_bounds)
 Called when the layout of |view| has changed. More...
 
virtual void OnFocus (CefRefPtr< CefView > view)
 Called when |view| gains focus. More...
 
virtual void OnBlur (CefRefPtr< CefView > view)
 Called when |view| loses focus. 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

Implement this interface to handle view events.

All size and position values are in density independent pixels (DIP) unless otherwise indicated. The methods of this class will be called on the browser process UI thread unless otherwise indicated.

Member Function Documentation

◆ GetHeightForWidth()

virtual int CefViewDelegate::GetHeightForWidth ( CefRefPtr< CefView view,
int  width 
)
inlinevirtual

Return the height necessary to display |view| with the provided |width|.

If not specified the result of GetPreferredSize().height will be used by default. Override if |view|'s preferred height depends upon the width (for example, with Labels).

◆ GetMaximumSize()

virtual CefSize CefViewDelegate::GetMaximumSize ( CefRefPtr< CefView view)
inlinevirtual

Return the maximum size for |view|.

◆ GetMinimumSize()

virtual CefSize CefViewDelegate::GetMinimumSize ( CefRefPtr< CefView view)
inlinevirtual

Return the minimum size for |view|.

◆ GetPreferredSize()

virtual CefSize CefViewDelegate::GetPreferredSize ( CefRefPtr< CefView view)
inlinevirtual

Return the preferred size for |view|.

The Layout will use this information to determine the display size.

◆ OnBlur()

virtual void CefViewDelegate::OnBlur ( CefRefPtr< CefView view)
inlinevirtual

Called when |view| loses focus.

◆ OnChildViewChanged()

virtual void CefViewDelegate::OnChildViewChanged ( CefRefPtr< CefView view,
bool  added,
CefRefPtr< CefView child 
)
inlinevirtual

Called when a child of |view| has changed.

If |child| is being added to |view| then |added| will be true. If |child| is being removed from |view| then |added| will be false. If |child| is being reparented the remove notification will be sent to the old parent before the add notification is sent to the new parent. Do not modify the view hierarchy in this callback.

◆ OnFocus()

virtual void CefViewDelegate::OnFocus ( CefRefPtr< CefView view)
inlinevirtual

Called when |view| gains focus.

◆ OnLayoutChanged()

virtual void CefViewDelegate::OnLayoutChanged ( CefRefPtr< CefView view,
const CefRect new_bounds 
)
inlinevirtual

Called when the layout of |view| has changed.

◆ OnParentViewChanged()

virtual void CefViewDelegate::OnParentViewChanged ( CefRefPtr< CefView view,
bool  added,
CefRefPtr< CefView parent 
)
inlinevirtual

Called when the parent of |view| has changed.

If |view| is being added to |parent| then |added| will be true. If |view| is being removed from |parent| then |added| will be false. If |view| is being reparented the remove notification will be sent before the add notification. Do not modify the view hierarchy in this callback.

◆ OnWindowChanged()

virtual void CefViewDelegate::OnWindowChanged ( CefRefPtr< CefView view,
bool  added 
)
inlinevirtual

Called when |view| is added or removed from the CefWindow.


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