Rename BLayout::DerivedLayoutItems() to DoLayout(), which is consistent with BView::DoLayout(). Also adjusted child classes and documentation.
This commit is contained in:
@@ -337,7 +337,7 @@ topLayout->AddItem(nestedLayoutWithView);
|
|||||||
/*!
|
/*!
|
||||||
\fn void BLayout::LayoutItems(bool force = false)
|
\fn void BLayout::LayoutItems(bool force = false)
|
||||||
\brief If there is no layout currently ongoing, and \a force is \c false,
|
\brief If there is no layout currently ongoing, and \a force is \c false,
|
||||||
creates a new BLayoutContext and calls the DerivedLayoutItems() method
|
creates a new BLayoutContext and calls the DoLayout() method
|
||||||
of this BLayout and any BLayout s nested in this BLayout.
|
of this BLayout and any BLayout s nested in this BLayout.
|
||||||
|
|
||||||
If method also guarantees that the owner view of this layout (as returned
|
If method also guarantees that the owner view of this layout (as returned
|
||||||
@@ -514,7 +514,7 @@ topLayout->AddItem(nestedLayoutWithView);
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void BLayout::DerivedLayoutItems() = 0
|
\fn void BLayout::DoLayout() = 0
|
||||||
\brief Implemented by derived classes to position and resize the items in
|
\brief Implemented by derived classes to position and resize the items in
|
||||||
this layout.
|
this layout.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public:
|
|||||||
static BArchivable* Instantiate(BMessage* from);
|
static BArchivable* Instantiate(BMessage* from);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void DerivedLayoutItems();
|
virtual void DoLayout();
|
||||||
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
|
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
|
||||||
virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex);
|
virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex);
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ protected:
|
|||||||
// BLayout hook methods
|
// BLayout hook methods
|
||||||
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
|
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
|
||||||
virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex);
|
virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex);
|
||||||
virtual void DerivedLayoutItems() = 0;
|
virtual void DoLayout() = 0;
|
||||||
virtual void OwnerChanged(BView* was);
|
virtual void OwnerChanged(BView* was);
|
||||||
|
|
||||||
// BLayoutItem hook methods
|
// BLayoutItem hook methods
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ protected:
|
|||||||
int32 height;
|
int32 height;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void DerivedLayoutItems();
|
virtual void DoLayout();
|
||||||
|
|
||||||
BSize AddInsets(BSize size);
|
BSize AddInsets(BSize size);
|
||||||
void AddInsets(float* minHeight, float* maxHeight,
|
void AddInsets(float* minHeight, float* maxHeight,
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ BCardLayout::InvalidateLayout(bool children)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BCardLayout::DerivedLayoutItems()
|
BCardLayout::DoLayout()
|
||||||
{
|
{
|
||||||
_ValidateMinMax();
|
_ValidateMinMax();
|
||||||
|
|
||||||
|
|||||||
@@ -400,7 +400,7 @@ BLayout::_LayoutWithinContext(bool force, BLayoutContext* context)
|
|||||||
fOwner->_Layout(force, context);
|
fOwner->_Layout(force, context);
|
||||||
} else {
|
} else {
|
||||||
fState |= B_LAYOUT_IN_PROGRESS;
|
fState |= B_LAYOUT_IN_PROGRESS;
|
||||||
DerivedLayoutItems();
|
DoLayout();
|
||||||
// we must ensure that all items are laid out, layouts with a view will
|
// we must ensure that all items are laid out, layouts with a view will
|
||||||
// have their layout process triggered by their view, but nested
|
// have their layout process triggered by their view, but nested
|
||||||
// view-less layouts must have their layout triggered here (if it hasn't
|
// view-less layouts must have their layout triggered here (if it hasn't
|
||||||
|
|||||||
@@ -553,7 +553,7 @@ BSplitLayout::InvalidateLayout(bool children)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BSplitLayout::DerivedLayoutItems()
|
BSplitLayout::DoLayout()
|
||||||
{
|
{
|
||||||
_ValidateMinMax();
|
_ValidateMinMax();
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public:
|
|||||||
|
|
||||||
virtual void InvalidateLayout(bool children = false);
|
virtual void InvalidateLayout(bool children = false);
|
||||||
|
|
||||||
virtual void DerivedLayoutItems();
|
virtual void DoLayout();
|
||||||
|
|
||||||
// interface for BSplitView
|
// interface for BSplitView
|
||||||
BRect SplitterItemFrame(int32 index) const;
|
BRect SplitterItemFrame(int32 index) const;
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ BTwoDimensionalLayout::AllUnarchived(const BMessage* from)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BTwoDimensionalLayout::DerivedLayoutItems()
|
BTwoDimensionalLayout::DoLayout()
|
||||||
{
|
{
|
||||||
_ValidateMinMax();
|
_ValidateMinMax();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user