Chromium Embedded Framework (CEF)  130.1.2+g48f3ef6+chromium-130.0.6723.44
CefBoxLayout Class Referenceabstract

A Layout manager that arranges child views vertically or horizontally in a side-by-side fashion with spacing around and between the child views. More...

#include "include/views/cef_box_layout.h"

Inheritance diagram for CefBoxLayout:
CefLayout CefBaseRefCounted

Public Member Functions

virtual void SetFlexForView (CefRefPtr< CefView > view, int flex)=0
 Set the flex weight for the given |view|. More...
 
virtual void ClearFlexForView (CefRefPtr< CefView > view)=0
 Clears the flex for the given |view|, causing it to use the default flex specified via CefBoxLayoutSettings.default_flex. More...
 
- Public Member Functions inherited from CefLayout
virtual CefRefPtr< CefBoxLayoutAsBoxLayout ()=0
 Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout. More...
 
virtual CefRefPtr< CefFillLayoutAsFillLayout ()=0
 Returns this Layout as a FillLayout or NULL if this is not a FillLayout. More...
 
virtual bool IsValid ()=0
 Returns true if this Layout is valid. 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

A Layout manager that arranges child views vertically or horizontally in a side-by-side fashion with spacing around and between the child views.

The child views are always sized according to their preferred size. If the host's bounds provide insufficient space, child views will be clamped. Excess space will not be distributed. Methods must be called on the browser process UI thread unless otherwise indicated.

Member Function Documentation

◆ ClearFlexForView()

virtual void CefBoxLayout::ClearFlexForView ( CefRefPtr< CefView view)
pure virtual

Clears the flex for the given |view|, causing it to use the default flex specified via CefBoxLayoutSettings.default_flex.

◆ SetFlexForView()

virtual void CefBoxLayout::SetFlexForView ( CefRefPtr< CefView view,
int  flex 
)
pure virtual

Set the flex weight for the given |view|.

Using the preferred size as the basis, free space along the main axis is distributed to views in the ratio of their flex weights. Similarly, if the views will overflow the parent, space is subtracted in these ratios. A flex of 0 means this view is not resized. Flex values must not be negative.


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