Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | List of all members
BTwoDimensionalLayout Class Referenceabstract

Abstract BLayout subclass arranging items within rows and columns. More...

Inherits BAbstractLayout.

Inherited by BGridLayout, and BGroupLayout.

Classes

struct  ColumnRowConstraints
 Used by BTwoDimensionalLayout derived classes to communicate the size constraints for a given column or row to the BTwoDimensionalLayout class. More...
 
struct  Dimensions
 Used by BTwoDimensionalLayout derived classes to communicate the positioning and size of a BLayoutItem, in terms of columns and rows to the BTwoDimensionalLayout class. More...
 

Public Member Functions

 BTwoDimensionalLayout ()
 Create an empty layout.
 
 BTwoDimensionalLayout (BMessage *from)
 Unarchive constructor.
 
virtual ~BTwoDimensionalLayout ()
 Destructor.
 
void AlignLayoutWith (BTwoDimensionalLayout *other, orientation orientation)
 Align the BLayoutItem's in the specified orientation within two or more BTwoDimensionalLayout's.
 
virtual status_t Archive (BMessage *into, bool deep=true) const
 Archives this layout into archive. If deep is true, also archives the items in this layout, calling ItemArchived() for each one.
 
virtual BAlignment BaseAlignment ()
 Method to be implemented in derived classes return the preferred alignment for this BAbstractLayout.
 
virtual BSize BaseMaxSize ()
 Method to be implemented in derived classes return the maximum size constraint for this BAbstractLayout.
 
virtual BSize BaseMinSize ()
 Method to be implemented in derived classes return the minimum size constraint for this BAbstractLayout.
 
virtual BSize BasePreferredSize ()
 Method to be implemented in derived classes return the preferred size constraint for this BAbstractLayout.
 
virtual void GetHeightForWidth (float width, float *min, float *max, float *preferred)
 Get this BLayoutItem's height constraints for a given width.
 
void GetInsets (float *left, float *top, float *right, float *bottom) const
 Get the insets for the BTwoDimensionalLayout (in pixels).
 
virtual bool HasHeightForWidth ()
 Returns whether or not this BLayoutItem's height constraints are dependent on its width.
 
virtual status_t Perform (perform_code d, void *arg)
 Perform some action (Internal method defined for binary compatibility purposes).
 
virtual void SetFrame (BRect frame)
 Set the bounding frame of this item.
 
void SetInsets (float horizontal, float vertical)
 Set the insets for this layout.
 
void SetInsets (float insets)
 Set the insets for this layout.
 
void SetInsets (float left, float top, float right, float bottom)
 Set the insets for this layout.
 
- Public Member Functions inherited from BAbstractLayout
virtual BAlignment Alignment ()
 
virtual status_t Archive (BMessage *into, bool deep=true) const
 Archives this layout into archive. If deep is true, also archives the items in this layout, calling ItemArchived() for each one.
 
virtual BRect Frame ()
 Return the bounding frame of this item.
 
virtual bool IsVisible ()
 Return the current local visibility of this item. If an item is not visible, it will not be given space by the BLayout it resides in.
 
virtual BSize MaxSize ()
 
virtual BSize MinSize ()
 
virtual status_t Perform (perform_code d, void *arg)
 Perform some action (Internal method defined for binary compatibility purposes).
 
virtual BSize PreferredSize ()
 
virtual void SetExplicitAlignment (BAlignment alignment)
 Set this item's explicit alignment, to be used in Alignment().
 
virtual void SetExplicitMaxSize (BSize size)
 Set this item's explicit max size, to be used in MaxSize().
 
virtual void SetExplicitMinSize (BSize size)
 Set this item's explicit min size, to be used in MinSize().
 
virtual void SetExplicitPreferredSize (BSize size)
 Set this item's explicit preferred size, to be used in PreferredSize().
 
virtual void SetFrame (BRect frame)
 Set the bounding frame of this item.
 
virtual void SetVisible (bool visible)
 Set the local visibility of this item.
 
 BAbstractLayout ()
 Construct a BAbstractLayout.
 
 BAbstractLayout (BMessage *from)
 Archive constructor.
 
- Public Member Functions inherited from BLayout
 BLayout ()
 Default constructor.
 
 BLayout (BMessage *archive)
 Archive constructor.
 
virtual ~BLayout ()
 Destructor, deletes all BLayoutItem's that this layout manages, and detaches from this BLayout's owner view if there is one.
 
virtual status_t Perform (perform_code d, void *arg)
 Perform some action (Internal method defined for binary compatibility purposes).
 
BViewOwner () const
 Returns the Owner of this layout, i.e. the view this layout manages.
 
BViewTargetView () const
 Returns the target view of this layout.
 
virtual BViewView ()
 Returns the same BView* as BLayout::Owner(), this method is inherited from BLayoutItem.
 
virtual BLayoutItemAddView (BView *child)
 Creates a BLayoutItem to represent a BView, and adds that item to this layout.
 
virtual BLayoutItemAddView (int32 index, BView *child)
 Creates a BLayoutItem to represent child, and adds that item at index to this layout. child is added to this BLayout's target view.
 
virtual bool AddItem (BLayoutItem *item)
 Adds a BLayoutItem to this layout, and adds the BView it represents to this BLayout's target view.
 
virtual bool AddItem (int32 index, BLayoutItem *item)
 Adds item to this layout, and adds the BView item represents to this BLayout's target view.
 
virtual bool RemoveView (BView *child)
 Removes and deletes all BLayoutItem representing a BView from this layout.
 
virtual bool RemoveItem (BLayoutItem *item)
 Removes a BLayoutItem from this layout, and also removes the view it represents from this BLayout's target view.
 
virtual BLayoutItemRemoveItem (int32 index)
 Remove the BLayoutItem at index.
 
BLayoutItemItemAt (int32 index) const
 Get the BLayoutItem at index. Returns NULL if index is out of bounds.
 
int32 CountItems () const
 Get the number of BLayoutItem s in this layout.
 
int32 IndexOfItem (const BLayoutItem *item) const
 Get the index of a BLayoutItem in this layout.
 
int32 IndexOfView (BView *child) const
 Get the index of child in this layout.
 
virtual void Relayout (bool immediate=false)
 Request this BLayout to reposition and resize its items as required.
 
void LayoutItems (bool force=false)
 If there is no layout currently ongoing, and force is false, creates a new BLayoutContext and calls the DoLayout() method of this BLayout and any BLayout's nested in this BLayout.
 
BLayoutContext * LayoutContext () const
 Returns the BLayoutContext this BLayout is currently operating in, or NULL.
 
bool AncestorsVisible () const
 Get the visibility of the ancestors of this layout.
 
BRect LayoutArea ()
 Returns the on-screen area this layout has received to lay out its items in.
 
virtual void InvalidateLayout (bool children=false)
 Invalidate this layout and any cached data this layout has relating to positioning and sizing of its items.
 
void RequireLayout ()
 Flag this layout as stale, i.e. any cached data may still be valid, but the items need to be repositioned or resized.
 
bool IsValid ()
 Returns whether this layout has been invalidated (via BLayout::InvalidateLayout()) and has not yet been validated (by doing a layout, or by its ResetLayoutInvalidation() method.
 
void EnableLayoutInvalidation ()
 Re-enable layout invalidation after a call to DisableLayoutInvalidation().
 
void DisableLayoutInvalidation ()
 Disable layout invalidation notifications, i.e. calls to this object's InvalidateLayout() method.
 
- Public Member Functions inherited from BLayoutItem
 BLayoutItem (BMessage *from)
 Archive constructor.
 
virtual status_t Archive (BMessage *into, bool deep=true) const
 Archive the object into a BMessage.
 
BLayoutLayout () const
 Returns the BLayout this BLayoutItem resides in.
 
virtual status_t Perform (perform_code d, void *arg)
 Perform some action (Internal method defined for binary compatibility purposes).
 
bool RemoveSelf ()
 Remove this layout item from the BLayout it is a part of.
 
virtual BViewView ()
 Return the BView this item is representing, or NULL if it does not represent any view.
 
void SetExplicitSize (BSize size)
 Set the explicity size to size.
 
void AlignInFrame (BRect frame)
 Position this BLayoutItem within frame, given the value returned by Alignment(), and the size constraints for this item.
 
void * LayoutData () const
 Retrieve arbitrary data attached to this BLayoutItem.
 
void SetLayoutData (void *data)
 Attach arbitrary data to this BLayoutItem.
 
- Public Member Functions inherited from BArchivable
 BArchivable ()
 Constructor. Does nothing.
 
 BArchivable (BMessage *from)
 Constructor. Does important behind-the-scenes work in the unarchiving process.
 
virtual ~BArchivable ()
 Destructor. Does nothing.
 
virtual status_t AllArchived (BMessage *archive) const
 Method relating to the use of BArchiver.
 
virtual status_t AllUnarchived (const BMessage *archive)
 Method relating to the use of BUnarchiver.
 
virtual status_t Archive (BMessage *into, bool deep=true) const
 Archive the object into a BMessage.
 
virtual status_t Perform (perform_code d, void *arg)
 Perform some action (Internal method defined for binary compatibility purposes).
 

Protected Member Functions

virtual status_t AllArchived (BMessage *into) const
 Method relating to the use of BArchiver.
 
virtual status_t AllUnarchived (const BMessage *from)
 Unarchives the BLayoutItem's for this layout, calling ItemUnarchived() for each one.
 
virtual void DoLayout ()
 Implemented by derived classes to position and resize the items in this layout.
 
virtual status_t ItemArchived (BMessage *into, BLayoutItem *item, int32 index) const
 Hook for derived classes to add data specific to item to the into BMessage. item resides at index.
 
virtual status_t ItemUnarchived (const BMessage *from, BLayoutItem *item, int32 index)
 Hook for derived classes to retrieve data specific to item from the from BMessage. item resides at index.
 
virtual void LayoutInvalidated (bool children=false)
 
Protected helper methods for inset calculation.
BSize AddInsets (BSize size)
 Add the size to all the insets for this layout.
 
void AddInsets (float *minHeight, float *maxHeight, float *preferredHeight)
 Add to the insets, and store the modified values.
 
BSize SubtractInsets (BSize size)
 Substract the size from all the insets for this layout.
 
Hook Methods

These methods are called automatically as needed during layout, and provide the BTwoDimensionalLayout class with the necessary information to properly layout the BLayoutItem in this BTwoDimensionalLayout.

virtual void PrepareItems (orientation orientation)
 Prepare the BLayoutItem in this BTwoDimensionalLayout subclass for layout within a certain orientation.
 
virtual bool HasMultiColumnItems ()
 Tests whether or not this BTwoDimensionalLayout contains any BLayoutItem's spanning more than one column.
 
virtual bool HasMultiRowItems ()
 Tests whether or not this BTwoDimensionalLayout contains any BLayoutItem's spanning more than one row.
 
virtual int32 InternalCountColumns ()=0
 Get the number of columns in the BTwoDimensionalLayout.
 
virtual int32 InternalCountRows ()=0
 Get the number of rows in the BTwoDimensionalLayout.
 
virtual void GetColumnRowConstraints (orientation orientation, int32 index, ColumnRowConstraints *constraints)=0
 Fill in the ColumnRowConstraints for a certain column or row in the BTwoDimensionalLayout.
 
virtual void GetItemDimensions (BLayoutItem *item, Dimensions *dimensions)=0
 Tell the base class what column and row a BLayoutItem is in as well as how many columns and rows it covers.
 
- Protected Member Functions inherited from BAbstractLayout
virtual status_t AllArchived (BMessage *archive) const
 Method relating to the use of BArchiver.
 
virtual status_t AllUnarchived (const BMessage *from)
 Unarchives the BLayoutItem's for this layout, calling ItemUnarchived() for each one.
 
virtual void AncestorVisibilityChanged (bool shown)
 Hook method inherited from BLayoutItem, classes derived from BLayout must include the BLayout version of this method in their implementation.
 
virtual void AttachedToLayout ()
 Hook method inherited from BLayoutItem, classes derived from BLayout must include the BLayout version of this method in their implementation.
 
virtual void DetachedFromLayout (BLayout *layout)
 Hook method inherited from BLayoutItem, classes derived from BLayout must include the BLayout version of this method in their implementation.
 
virtual bool ItemAdded (BLayoutItem *item, int32 atIndex)
 Hook method called when item is added to this layout.
 
virtual status_t ItemArchived (BMessage *into, BLayoutItem *item, int32 index) const
 Hook for derived classes to add data specific to item to the into BMessage. item resides at index.
 
virtual void ItemRemoved (BLayoutItem *item, int32 fromIndex)
 Hook method called when item is removed from this layout.
 
virtual status_t ItemUnarchived (const BMessage *from, BLayoutItem *item, int32 index)
 Hook for derived classes to retrieve data specific to item from the from BMessage. item resides at index.
 
virtual void LayoutInvalidated (bool children)
 
virtual void OwnerChanged (BView *was)
 Hook method called when this layout is attached to a BView.
 
- Protected Member Functions inherited from BLayout
virtual status_t AllArchived (BMessage *archive) const
 Method relating to the use of BArchiver.
 
void VisibilityChanged (bool show)
 Method to be called by derived classes in their SetVisible() implementation. Calls AncestorVisibilityChanged() on the items in this BLayout.
 
void ResetLayoutInvalidation ()
 Reset layout invalidation, causing InvalidateLayout calls to proceed again. This method should be called once any cached data has been validated, or updated to valid values.
 
virtual status_t AllArchived (BMessage *into) const
 Method relating to the use of BArchiver.
 
virtual status_t AllUnarchived (const BMessage *from)
 Method relating to the use of BUnarchiver.
 
Hook methods

Protected Attributes

Current settings for spacing
float fLeftInset
 The current left inset for this layout.
 
float fRightInset
 The current right inset for this layout.
 
float fTopInset
 The current top inset for this layout.
 
float fBottomInset
 The current bottom inset for this layout.
 
float fHSpacing
 the current horizontal spacing between columns for this layout.
 
float fVSpacing
 The current vertical spacing between rows for this layout.
 

Additional Inherited Members

- Static Public Member Functions inherited from BArchivable
static BArchivableInstantiate (BMessage *archive)
 Static member to restore objects from messages.
 

Detailed Description

Abstract BLayout subclass arranging items within rows and columns.

This class manages all the tricky work of actually positioning/resizing items, as well as calculating size constraints and providing extra features, such as spacing/insets and alignment of multiple BTwoDimensionalLayout's. Derived classes need only implement a few hook methods to get a working layout.

Warning
This class is not yet finalized, if you use it in your software assume that it will break some time in the future.
Since
Haiku R1

Member Function Documentation

◆ AddInsets() [1/2]

BSize BTwoDimensionalLayout::AddInsets ( BSize  size)
protected

Add the size to all the insets for this layout.

Since
Haiku R1

◆ AddInsets() [2/2]

void BTwoDimensionalLayout::AddInsets ( float *  minHeight,
float *  maxHeight,
float *  preferredHeight 
)
protected

Add to the insets, and store the modified values.

Parameters
[out]minHeightThe value to add to the minimum height for this layout. The new minimum height is stored at the variable of this pointer.
[out]maxHeightThe value to add to the maximum height for this layout. The new maximum height is stored at the variable of this pointer.
[out]preferredHeightthe value to add to the preferred height for this layout. The new preferred heifght is stored at the variable of this pointer.
Since
Haiku R1

◆ AlignLayoutWith()

void BTwoDimensionalLayout::AlignLayoutWith ( BTwoDimensionalLayout other,
orientation  orientation 
)

Align the BLayoutItem's in the specified orientation within two or more BTwoDimensionalLayout's.

When two (or more) BTwoDimensionalLayout's are aligned within a certain orientation, then the BLayoutItem's within those BTwoDimensionalLayout's will have identical widths or heights (depending on how the BTwoDimensionalLayout's are aligned.)

If you align two BGroupLayout's horizontally for example, then the BLayoutItem at index 0 in both BGroupLayout's will be given the same horizontal area. The same is true for the BLayoutItem at index 1, 2, etc. Not all BTwoDimensionalLayout's have to have an item at each index for the alignment to proceed.

Parameters
otherThe BTwoDimensionalLayout to be aligned with.
orientationThe orientation on which to be aligned.
Since
Haiku R1

◆ AllArchived()

virtual status_t BTwoDimensionalLayout::AllArchived ( BMessage into) const
protectedvirtual

Method relating to the use of BArchiver.

This hook function is called once the first BArchiver that was created in an archiving session is either destroyed, or has its Finish() method called. Implementations of this method can be used, in conjunction with BArchiver::IsArchived(), to reference objects in your archive that you do not own, depending on whether or not those objects were archived by their owners. Implementations of this method should call the implementation of their parent class, the same as for the Archive() method.

Warning
To guarantee that your AllArchived() method will be called during archival, you must create a BArchiver object in your Archive() implementation.
You should archive any objects you own in your Archive() method implementation, and NOT your AllArchived() method.
See also
BArchiver BArchiver::Finish()
Since
Haiku R1

Reimplemented from BAbstractLayout.

Reimplemented in BGridLayout, and BGroupLayout.

◆ AllUnarchived()

virtual status_t BTwoDimensionalLayout::AllUnarchived ( const BMessage from)
protectedvirtual

Unarchives the BLayoutItem's for this layout, calling ItemUnarchived() for each one.

Since
Haiku R1

Reimplemented from BAbstractLayout.

Reimplemented in BGridLayout, and BGroupLayout.

◆ Archive()

virtual status_t BTwoDimensionalLayout::Archive ( BMessage archive,
bool  deep = true 
) const
virtual

Archives this layout into archive. If deep is true, also archives the items in this layout, calling ItemArchived() for each one.

Since
Haiku R1

Reimplemented from BAbstractLayout.

Reimplemented in BGridLayout, and BGroupLayout.

◆ BaseMaxSize()

virtual BSize BTwoDimensionalLayout::BaseMaxSize ( )
virtual

Method to be implemented in derived classes return the maximum size constraint for this BAbstractLayout.

Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ BaseMinSize()

virtual BSize BTwoDimensionalLayout::BaseMinSize ( )
virtual

Method to be implemented in derived classes return the minimum size constraint for this BAbstractLayout.

Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ BasePreferredSize()

virtual BSize BTwoDimensionalLayout::BasePreferredSize ( )
virtual

Method to be implemented in derived classes return the preferred size constraint for this BAbstractLayout.

Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ DoLayout()

virtual void BTwoDimensionalLayout::DoLayout ( )
protectedvirtual

Implemented by derived classes to position and resize the items in this layout.

Since
Haiku R1

Implements BLayout.

◆ GetColumnRowConstraints()

void BTwoDimensionalLayout::GetColumnRowConstraints ( orientation  orientation,
int32  index,
ColumnRowConstraints constraints 
)
protectedpure virtual

Fill in the ColumnRowConstraints for a certain column or row in the BTwoDimensionalLayout.

This method is used to communicate the size constraints and weight for a given row/column in the BTwoDimensionalLayout.

Since
Haiku R1

Implemented in BGridLayout, and BGroupLayout.

◆ GetHeightForWidth()

virtual void BTwoDimensionalLayout::GetHeightForWidth ( float  width,
float *  min,
float *  max,
float *  preferred 
)
virtual

Get this BLayoutItem's height constraints for a given width.

If a BLayoutItem does not have height for width constraints (HasHeightForWidth() returns false) it does not need to implement this method.

Note
It is prudent to compare min, max, preferred to NULL before dereferencing them.
Since
Haiku R1

Reimplemented from BLayoutItem.

◆ GetInsets()

void BTwoDimensionalLayout::GetInsets ( float *  left,
float *  top,
float *  right,
float *  bottom 
) const

Get the insets for the BTwoDimensionalLayout (in pixels).

Passing NULL for any parameter is not an error, those parameters will be ignored.

See also
BTwoDimensionalLayout::SetInsets();
Since
Haiku R1

◆ GetItemDimensions()

void BTwoDimensionalLayout::GetItemDimensions ( BLayoutItem item,
Dimensions dimensions 
)
protectedpure virtual

Tell the base class what column and row a BLayoutItem is in as well as how many columns and rows it covers.

Since
Haiku R1

Implemented in BGridLayout, and BGroupLayout.

◆ HasHeightForWidth()

virtual bool BTwoDimensionalLayout::HasHeightForWidth ( )
virtual

Returns whether or not this BLayoutItem's height constraints are dependent on its width.

Note
By default, this method returns false.
Since
Haiku R1

Reimplemented from BLayoutItem.

◆ HasMultiColumnItems()

bool BTwoDimensionalLayout::HasMultiColumnItems ( )
protectedvirtual

Tests whether or not this BTwoDimensionalLayout contains any BLayoutItem's spanning more than one column.

The BTwoDimensionalLayout implementation returns false.

Since
Haiku R1

Reimplemented in BGridLayout.

◆ HasMultiRowItems()

bool BTwoDimensionalLayout::HasMultiRowItems ( )
protectedvirtual

Tests whether or not this BTwoDimensionalLayout contains any BLayoutItem's spanning more than one row.

The BTwoDimensionalLayout implementation returns false.

Since
Haiku R1

Reimplemented in BGridLayout.

◆ InternalCountColumns()

int32 BTwoDimensionalLayout::InternalCountColumns ( )
protectedpure virtual

Get the number of columns in the BTwoDimensionalLayout.

Returns
The number of columns in the BTwoDimensionalLayout.
Since
Haiku R1

Implemented in BGridLayout, and BGroupLayout.

◆ InternalCountRows()

int32 BTwoDimensionalLayout::InternalCountRows ( )
protectedpure virtual

Get the number of rows in the BTwoDimensionalLayout.

Returns
The number of rows in the BTwoDimensionalLayout.
Since
Haiku R1

Implemented in BGridLayout, and BGroupLayout.

◆ ItemArchived()

virtual status_t BTwoDimensionalLayout::ItemArchived ( BMessage into,
BLayoutItem item,
int32  index 
) const
protectedvirtual

Hook for derived classes to add data specific to item to the into BMessage. item resides at index.

Note
The same archive is passed to BLayout::ItemArchived() for all items, so any data added for each item will be stored in an array.
Since
Haiku R1

Reimplemented from BAbstractLayout.

Reimplemented in BGridLayout, and BGroupLayout.

◆ ItemUnarchived()

virtual status_t BTwoDimensionalLayout::ItemUnarchived ( const BMessage from,
BLayoutItem item,
int32  index 
)
protectedvirtual

Hook for derived classes to retrieve data specific to item from the from BMessage. item resides at index.

Note
The same archive is passed to BLayout::ItemArchived() for all items, so any data added for each item will be stored in an array. You should pass index to the BMessage methods you will be using in this method.
Since
Haiku R1

Reimplemented from BAbstractLayout.

Reimplemented in BGridLayout, and BGroupLayout.

◆ LayoutInvalidated()

virtual void BTwoDimensionalLayout::LayoutInvalidated ( bool  children = false)
protectedvirtual

Hook method called when this layout becomes invalid. This is a good place to clear any caches your object might hold.

Parameters
childrenWhether or not child layouts have also been invalidated.
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ Perform()

virtual status_t BTwoDimensionalLayout::Perform ( perform_code  d,
void *  arg 
)
virtual

Perform some action (Internal method defined for binary compatibility purposes).

Reimplemented from BAbstractLayout.

Reimplemented in BGridLayout, and BGroupLayout.

◆ PrepareItems()

void BTwoDimensionalLayout::PrepareItems ( orientation  orientation)
protectedvirtual

Prepare the BLayoutItem in this BTwoDimensionalLayout subclass for layout within a certain orientation.

This is a good place to update cache information that will be used in other hook methods, for example.

Since
Haiku R1

Reimplemented in BGroupLayout.

◆ SetFrame()

virtual void BTwoDimensionalLayout::SetFrame ( BRect  frame)
virtual

Set the bounding frame of this item.

frame is in the coordinate system of the target view of the BLayout that this item belongs to.

Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ SetInsets() [1/3]

void BTwoDimensionalLayout::SetInsets ( float  horizontal,
float  vertical 
)

Set the insets for this layout.

This is a convenience method to easily set similar insets.

Parameters
horizontalThe insets to the left and right of the layout.
verticalThe insets at the top and bottom of the layout.
Since
Haiku R1

◆ SetInsets() [2/3]

void BTwoDimensionalLayout::SetInsets ( float  insets)

Set the insets for this layout.

This is a convenience method that to easily set all the insets of the layout to the same value.

Parameters
insetsThe inset to be applied to left, top, right and bottom of this layout.
Since
Haiku R1

◆ SetInsets() [3/3]

void BTwoDimensionalLayout::SetInsets ( float  left,
float  top,
float  right,
float  bottom 
)

Set the insets for this layout.

Set the spacing around the edges of this layout. If you pass B_USE_DEFAULT_SPACING for a certain parameter, that parameter will be replaced with the value returned by BControlLook::DefaultItemSpacing().

Since
Haiku R1

◆ SubtractInsets()

BSize BTwoDimensionalLayout::SubtractInsets ( BSize  size)
protected

Substract the size from all the insets for this layout.

Since
Haiku R1