Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
BCardLayout Class Reference

Undocumented class. More...

Inherits BAbstractLayout.

Public Member Functions

 BCardLayout ()
 Undocumented public method. More...
 
 BCardLayout (BMessage *from)
 Undocumented public method. More...
 
virtual ~BCardLayout ()
 Undocumented public method. More...
 
virtual status_t Archive (BMessage *into, bool deep=true) const
 Undocumented public method. More...
 
virtual BAlignment BaseAlignment ()
 Undocumented public method. More...
 
virtual BSize BaseMaxSize ()
 Undocumented public method. More...
 
virtual BSize BaseMinSize ()
 Undocumented public method. More...
 
virtual BSize BasePreferredSize ()
 Undocumented public method. More...
 
virtual void GetHeightForWidth (float width, float *min, float *max, float *preferred)
 Undocumented public method. More...
 
virtual bool HasHeightForWidth ()
 Undocumented public method. More...
 
virtual status_t Perform (perform_code d, void *arg)
 Undocumented public method. More...
 
void SetVisibleItem (int32 index)
 Undocumented public method. More...
 
void SetVisibleItem (BLayoutItem *item)
 Undocumented public method. More...
 
int32 VisibleIndex () const
 Undocumented public method. More...
 
BLayoutItemVisibleItem () const
 Undocumented public method. More...
 
- Public Member Functions inherited from BAbstractLayout
virtual BAlignment Alignment ()
 Returns the requested alignment for this item. More...
 
virtual BRect Frame ()
 Return the bounding frame of this item. More...
 
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. More...
 
virtual BSize MaxSize ()
 Returns the maximum desirable size for this item. More...
 
virtual BSize MinSize ()
 Returns the minimum desirable size for this item. More...
 
virtual BSize PreferredSize ()
 Returns the preferred size for this item. More...
 
virtual void SetExplicitAlignment (BAlignment alignment)
 Set this item's explicit alignment, to be used in Alignment(). More...
 
virtual void SetExplicitMaxSize (BSize size)
 Set this item's explicit max size, to be used in MaxSize(). More...
 
virtual void SetExplicitMinSize (BSize size)
 Set this item's explicit min size, to be used in MinSize(). More...
 
virtual void SetExplicitPreferredSize (BSize size)
 Set this item's explicit preferred size, to be used in PreferredSize(). More...
 
virtual void SetFrame (BRect frame)
 Set the bounding frame of this item. More...
 
virtual void SetVisible (bool visible)
 Set the local visibility of this item. More...
 
 BAbstractLayout ()
 Construct a BAbstractLayout. More...
 
 BAbstractLayout (BMessage *from)
 Archive constructor. More...
 
- Public Member Functions inherited from BLayout
 BLayout ()
 Default constructor. More...
 
 BLayout (BMessage *archive)
 Archive constructor. More...
 
virtual ~BLayout ()
 Destructor, deletes all BLayoutItem's that this layout manages, and detaches from this BLayout's owner view if there is one. More...
 
BViewOwner () const
 Returns the Owner of this layout, i.e. the view this layout manages. More...
 
BViewTargetView () const
 Returns the target view of this layout. More...
 
virtual BViewView ()
 Returns the same BView* as BLayout::Owner(), this method is inherited from BLayoutItem. More...
 
virtual BLayoutItemAddView (BView *child)
 Creates a BLayoutItem to represent a BView, and adds that item to this layout. More...
 
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. More...
 
virtual bool AddItem (BLayoutItem *item)
 Adds a BLayoutItem to this layout, and adds the BView it represents to this BLayout's target view. More...
 
virtual bool AddItem (int32 index, BLayoutItem *item)
 Adds item to this layout, and adds the BView item represents to this BLayout's target view. More...
 
virtual bool RemoveView (BView *child)
 Removes and deletes all BLayoutItem representing a BView from this layout. More...
 
virtual bool RemoveItem (BLayoutItem *item)
 Removes a BLayoutItem from this layout, and also removes the view it represents from this BLayout's target view. More...
 
virtual BLayoutItemRemoveItem (int32 index)
 Remove the BLayoutItem at index. More...
 
BLayoutItemItemAt (int32 index) const
 Get the BLayoutItem at index. Returns NULL if index is out of bounds. More...
 
int32 CountItems () const
 Get the number of BLayoutItem s in this layout. More...
 
int32 IndexOfItem (const BLayoutItem *item) const
 Get the index of a BLayoutItem in this layout. More...
 
int32 IndexOfView (BView *child) const
 Get the index of child in this layout. More...
 
virtual void Relayout (bool immediate=false)
 Request this BLayout to reposition and resize its items as required. More...
 
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. More...
 
BLayoutContext * LayoutContext () const
 Returns the BLayoutContext this BLayout is currently operating in, or NULL. More...
 
bool AncestorsVisible () const
 Get the visibility of the ancestors of this layout. More...
 
BRect LayoutArea ()
 Returns the on-screen area this layout has received to lay out its items in. More...
 
virtual void InvalidateLayout (bool children=false)
 Invalidate this layout and any cached data this layout has relating to positioning and sizing of its items. More...
 
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. More...
 
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. More...
 
void EnableLayoutInvalidation ()
 Re-enable layout invalidation after a call to DisableLayoutInvalidation(). More...
 
void DisableLayoutInvalidation ()
 Disable layout invalidation notifications, i.e. calls to this object's InvalidateLayout() method. More...
 
- Public Member Functions inherited from BLayoutItem
 BLayoutItem (BMessage *from)
 Archive constructor. More...
 
BLayoutLayout () const
 Returns the BLayout this BLayoutItem resides in. More...
 
void AlignInFrame (BRect frame)
 Position this BLayoutItem within frame, given the value returned by Alignment(), and the size constraints for this item. More...
 
void * LayoutData () const
 Retrieve arbitrary data attached to this BLayoutItem. More...
 
void SetLayoutData (void *data)
 Attach arbitrary data to this BLayoutItem. More...
 
- Public Member Functions inherited from BArchivable
 BArchivable (BMessage *from)
 Constructor. Does important behind-the-scenes work in the unarchiving process. More...
 
 BArchivable ()
 Constructor. Does nothing. More...
 
virtual ~BArchivable ()
 Destructor. Does nothing. More...
 

Static Public Member Functions

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

Protected Member Functions

virtual status_t AllArchived (BMessage *archive) const
 Undocumented protected method. More...
 
virtual status_t AllUnarchived (const BMessage *from)
 Undocumented protected method. More...
 
virtual void DoLayout ()
 Undocumented protected method. More...
 
virtual bool ItemAdded (BLayoutItem *item, int32 atIndex)
 Undocumented protected method. More...
 
virtual status_t ItemArchived (BMessage *into, BLayoutItem *item, int32 index) const
 Undocumented protected method. More...
 
virtual void ItemRemoved (BLayoutItem *item, int32 fromIndex)
 Undocumented protected method. More...
 
virtual status_t ItemUnarchived (const BMessage *from, BLayoutItem *item, int32 index)
 Undocumented protected method. More...
 
virtual void LayoutInvalidated (bool children=false)
 Undocumented protected method. More...
 
- Protected Member Functions inherited from BAbstractLayout
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. More...
 
virtual void AttachedToLayout ()
 Hook method inherited from BLayoutItem, classes derived from BLayout must include the BLayout version of this method in their implementation. More...
 
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. More...
 
virtual void OwnerChanged (BView *was)
 Hook method called when this layout is attached to a BView. More...
 
- Protected Member Functions inherited from BLayout
void VisibilityChanged (bool show)
 Method to be called by derived classes in their SetVisible() implementation. Calls AncestorVisibilityChanged() on the items in this BLayout. More...
 
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. More...
 
Hook methods

Detailed Description

Undocumented class.

Since
Haiku R1

Constructor & Destructor Documentation

◆ BCardLayout() [1/2]

BCardLayout::BCardLayout ( )

Undocumented public method.

Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

◆ BCardLayout() [2/2]

BCardLayout::BCardLayout ( BMessage from)

Undocumented public method.

Parameters
fromUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

◆ ~BCardLayout()

BCardLayout::~BCardLayout ( )
virtual

Undocumented public method.

Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Member Function Documentation

◆ AllArchived()

status_t BCardLayout::AllArchived ( BMessage archive) const
protectedvirtual

Undocumented protected method.

Parameters
archiveUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ AllUnarchived()

status_t BCardLayout::AllUnarchived ( const BMessage from)
protectedvirtual

Undocumented protected method.

Parameters
fromUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ Archive()

status_t BCardLayout::Archive ( BMessage into,
bool  deep = true 
) const
virtual

Undocumented public method.

Parameters
intoUndocumented
deepUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ BaseAlignment()

BAlignment BCardLayout::BaseAlignment ( )
virtual

Undocumented public method.

Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ BaseMaxSize()

BSize BCardLayout::BaseMaxSize ( )
virtual

Undocumented public method.

Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ BaseMinSize()

BSize BCardLayout::BaseMinSize ( )
virtual

Undocumented public method.

Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ BasePreferredSize()

BSize BCardLayout::BasePreferredSize ( )
virtual

Undocumented public method.

Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ DoLayout()

void BCardLayout::DoLayout ( )
protectedvirtual

Undocumented protected method.

Since
Haiku R1

Implements BLayout.

◆ GetHeightForWidth()

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

Undocumented public method.

Parameters
widthUndocumented
minUndocumented
maxUndocumented
preferredUndocumented
Since
Haiku R1

Reimplemented from BLayoutItem.

◆ HasHeightForWidth()

bool BCardLayout::HasHeightForWidth ( )
virtual

Undocumented public method.

Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BLayoutItem.

◆ Instantiate()

static static BArchivable * BCardLayout::Instantiate ( BMessage from)
static

Undocumented public method.

Parameters
fromUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

◆ ItemAdded()

bool BCardLayout::ItemAdded ( BLayoutItem item,
int32  atIndex 
)
protectedvirtual

Undocumented protected method.

Parameters
itemUndocumented
atIndexUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ ItemArchived()

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

Undocumented protected method.

Parameters
intoUndocumented
itemUndocumented
indexUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ ItemRemoved()

void BCardLayout::ItemRemoved ( BLayoutItem item,
int32  fromIndex 
)
protectedvirtual

Undocumented protected method.

Parameters
itemUndocumented
fromIndexUndocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ ItemUnarchived()

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

Undocumented protected method.

Parameters
fromUndocumented
itemUndocumented
indexUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ LayoutInvalidated()

void BCardLayout::LayoutInvalidated ( bool  children = false)
protectedvirtual

Undocumented protected method.

Parameters
childrenUndocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ Perform()

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

Undocumented public method.

Parameters
dUndocumented
argUndocumented
Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

Reimplemented from BAbstractLayout.

◆ SetVisibleItem() [1/2]

void BCardLayout::SetVisibleItem ( int32  index)

Undocumented public method.

Parameters
indexUndocumented
Since
Haiku R1

◆ SetVisibleItem() [2/2]

void BCardLayout::SetVisibleItem ( BLayoutItem item)

Undocumented public method.

Parameters
itemUndocumented
Since
Haiku R1

◆ VisibleIndex()

int32 BCardLayout::VisibleIndex ( ) const

Undocumented public method.

Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1

◆ VisibleItem()

BLayoutItem * BCardLayout::VisibleItem ( ) const

Undocumented public method.

Returns
Undocumented
Return values
<value>Undocumented
Since
Haiku R1