Override a bunch of methods in layout related classes for FBC stability.
* Especially made sure to override archiving methods, since these are called rarely, so the cost is very minimal * Otherwise, the closer a class is to a base class, the more likely I was to give it all the overrides.
This commit is contained in:
@@ -37,12 +37,25 @@ public:
|
|||||||
virtual void SetVisible(bool visible);
|
virtual void SetVisible(bool visible);
|
||||||
|
|
||||||
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
||||||
|
virtual status_t AllArchived(BMessage* archive) const;
|
||||||
virtual status_t AllUnarchived(const BMessage* from);
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
|
|
||||||
|
virtual status_t ItemArchived(BMessage* into, BLayoutItem* item,
|
||||||
|
int32 index) const;
|
||||||
|
virtual status_t ItemUnarchived(const BMessage* from,
|
||||||
|
BLayoutItem* item, int32 index);
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
virtual status_t Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
|
||||||
|
virtual void ItemRemoved(BLayoutItem* item, int32 fromIndex);
|
||||||
|
virtual void LayoutInvalidated(bool children);
|
||||||
virtual void OwnerChanged(BView* was);
|
virtual void OwnerChanged(BView* was);
|
||||||
|
|
||||||
|
// BLayoutItem hook methods
|
||||||
|
virtual void AttachedToLayout();
|
||||||
|
virtual void DetachedFromLayout(BLayout* layout);
|
||||||
virtual void AncestorVisibilityChanged(bool shown);
|
virtual void AncestorVisibilityChanged(bool shown);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -32,9 +32,19 @@ public:
|
|||||||
virtual BAlignment BaseAlignment();
|
virtual BAlignment BaseAlignment();
|
||||||
|
|
||||||
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
||||||
|
virtual status_t AllUnarchived(const BMessage* archive);
|
||||||
|
virtual status_t AllArchived(BMessage* archive) const;
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
virtual status_t Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void LayoutInvalidated(bool children);
|
||||||
|
|
||||||
|
virtual void AttachedToLayout();
|
||||||
|
virtual void DetachedFromLayout(BLayout* layout);
|
||||||
|
|
||||||
|
virtual void AncestorVisibilityChanged(bool shown);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void _ReservedAbstractLayoutItem1();
|
virtual void _ReservedAbstractLayoutItem1();
|
||||||
virtual void _ReservedAbstractLayoutItem2();
|
virtual void _ReservedAbstractLayoutItem2();
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public:
|
|||||||
float* max, float* preferred);
|
float* max, float* preferred);
|
||||||
|
|
||||||
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
||||||
|
virtual status_t AllArchived(BMessage* archive) const;
|
||||||
virtual status_t AllUnarchived(const BMessage* from);
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
static BArchivable* Instantiate(BMessage* from);
|
static BArchivable* Instantiate(BMessage* from);
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ public:
|
|||||||
int32 rowCount = 1);
|
int32 rowCount = 1);
|
||||||
|
|
||||||
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
||||||
|
virtual status_t AllArchived(BMessage* into) const;
|
||||||
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
static BArchivable* Instantiate(BMessage* from);
|
static BArchivable* Instantiate(BMessage* from);
|
||||||
|
|
||||||
virtual status_t ItemArchived(BMessage* into,
|
virtual status_t ItemArchived(BMessage* into,
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public:
|
|||||||
float weight);
|
float weight);
|
||||||
|
|
||||||
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
||||||
|
virtual status_t AllArchived(BMessage* into) const;
|
||||||
virtual status_t AllUnarchived(const BMessage* from);
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
static BArchivable* Instantiate(BMessage* from);
|
static BArchivable* Instantiate(BMessage* from);
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ public:
|
|||||||
// Archiving methods
|
// Archiving methods
|
||||||
|
|
||||||
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
||||||
|
virtual status_t AllArchived(BMessage* archive) const;
|
||||||
virtual status_t AllUnarchived(const BMessage* from);
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
|
|
||||||
virtual status_t ItemArchived(BMessage* into, BLayoutItem* item,
|
virtual status_t ItemArchived(BMessage* into, BLayoutItem* item,
|
||||||
|
|||||||
@@ -45,6 +45,8 @@ private:
|
|||||||
BSize fPreferredSize;
|
BSize fPreferredSize;
|
||||||
BAlignment fAlignment;
|
BAlignment fAlignment;
|
||||||
bool fVisible;
|
bool fVisible;
|
||||||
|
|
||||||
|
uint32 _reserved[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _SPACE_LAYOUT_ITEM_H
|
#endif // _SPACE_LAYOUT_ITEM_H
|
||||||
|
|||||||
@@ -58,16 +58,20 @@ public:
|
|||||||
float weight);
|
float weight);
|
||||||
|
|
||||||
virtual void Draw(BRect updateRect);
|
virtual void Draw(BRect updateRect);
|
||||||
|
virtual void DrawAfterChildren(BRect updateRect);
|
||||||
virtual void MouseDown(BPoint where);
|
virtual void MouseDown(BPoint where);
|
||||||
virtual void MouseUp(BPoint where);
|
virtual void MouseUp(BPoint where);
|
||||||
virtual void MouseMoved(BPoint where, uint32 transit,
|
virtual void MouseMoved(BPoint where, uint32 transit,
|
||||||
const BMessage* message);
|
const BMessage* message);
|
||||||
|
|
||||||
|
virtual void MessageReceived(BMessage* message);
|
||||||
|
|
||||||
|
|
||||||
virtual void SetLayout(BLayout* layout);
|
virtual void SetLayout(BLayout* layout);
|
||||||
// overridden to avoid use
|
// overridden to avoid use
|
||||||
|
|
||||||
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
||||||
|
virtual status_t AllArchived(BMessage* into) const;
|
||||||
virtual status_t AllUnarchived(const BMessage* from);
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
static BArchivable* Instantiate(BMessage* from);
|
static BArchivable* Instantiate(BMessage* from);
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ public:
|
|||||||
virtual status_t AllArchived(BMessage* into) const;
|
virtual status_t AllArchived(BMessage* into) const;
|
||||||
virtual status_t AllUnarchived(const BMessage* from);
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
|
|
||||||
|
virtual status_t ItemArchived(BMessage* into, BLayoutItem* item,
|
||||||
|
int32 index) const;
|
||||||
|
virtual status_t ItemUnarchived(const BMessage* from,
|
||||||
|
BLayoutItem* item, int32 index);
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
virtual status_t Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -419,6 +419,13 @@ BAbstractLayout::Archive(BMessage* into, bool deep) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BAbstractLayout::AllArchived(BMessage* archive) const
|
||||||
|
{
|
||||||
|
return BLayout::AllArchived(archive);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BAbstractLayout::AllUnarchived(const BMessage* from)
|
BAbstractLayout::AllUnarchived(const BMessage* from)
|
||||||
{
|
{
|
||||||
@@ -430,6 +437,43 @@ BAbstractLayout::AllUnarchived(const BMessage* from)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BAbstractLayout::ItemArchived(BMessage* into, BLayoutItem* item,
|
||||||
|
int32 index) const
|
||||||
|
{
|
||||||
|
return BLayout::ItemArchived(into, item, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BAbstractLayout::ItemUnarchived(const BMessage* from, BLayoutItem* item,
|
||||||
|
int32 index)
|
||||||
|
{
|
||||||
|
return BLayout::ItemUnarchived(from, item, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
BAbstractLayout::ItemAdded(BLayoutItem* item, int32 atIndex)
|
||||||
|
{
|
||||||
|
return BLayout::ItemAdded(item, atIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BAbstractLayout::ItemRemoved(BLayoutItem* item, int32 fromIndex)
|
||||||
|
{
|
||||||
|
BLayout::ItemRemoved(item, fromIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BAbstractLayout::LayoutInvalidated(bool children)
|
||||||
|
{
|
||||||
|
BLayout::LayoutInvalidated(children);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BAbstractLayout::OwnerChanged(BView* was)
|
BAbstractLayout::OwnerChanged(BView* was)
|
||||||
{
|
{
|
||||||
@@ -443,6 +487,20 @@ BAbstractLayout::OwnerChanged(BView* was)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BAbstractLayout::AttachedToLayout()
|
||||||
|
{
|
||||||
|
BLayout::AttachedToLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BAbstractLayout::DetachedFromLayout(BLayout* layout)
|
||||||
|
{
|
||||||
|
BLayout::DetachedFromLayout(layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BAbstractLayout::AncestorVisibilityChanged(bool shown)
|
BAbstractLayout::AncestorVisibilityChanged(bool shown)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -154,6 +154,48 @@ BAbstractLayoutItem::Archive(BMessage* into, bool deep) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BAbstractLayoutItem::AllUnarchived(const BMessage* archive)
|
||||||
|
{
|
||||||
|
return BLayoutItem::AllUnarchived(archive);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BAbstractLayoutItem::AllArchived(BMessage* archive) const
|
||||||
|
{
|
||||||
|
return BLayoutItem::AllArchived(archive);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BAbstractLayoutItem::LayoutInvalidated(bool children)
|
||||||
|
{
|
||||||
|
BLayoutItem::LayoutInvalidated(children);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BAbstractLayoutItem::AttachedToLayout()
|
||||||
|
{
|
||||||
|
BLayoutItem::AttachedToLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BAbstractLayoutItem::DetachedFromLayout(BLayout* layout)
|
||||||
|
{
|
||||||
|
BLayoutItem::DetachedFromLayout(layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BAbstractLayoutItem::AncestorVisibilityChanged(bool shown)
|
||||||
|
{
|
||||||
|
BLayoutItem::AncestorVisibilityChanged(shown);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BAbstractLayoutItem::Perform(perform_code d, void* arg)
|
BAbstractLayoutItem::Perform(perform_code d, void* arg)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -212,6 +212,13 @@ BCardLayout::Archive(BMessage* into, bool deep) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BCardLayout::AllArchived(BMessage* archive) const
|
||||||
|
{
|
||||||
|
return BAbstractLayout::AllArchived(archive);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BCardLayout::AllUnarchived(const BMessage* from)
|
BCardLayout::AllUnarchived(const BMessage* from)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -496,6 +496,20 @@ BGridLayout::Archive(BMessage* into, bool deep) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BGridLayout::AllArchived(BMessage* into) const
|
||||||
|
{
|
||||||
|
return BTwoDimensionalLayout::AllArchived(into);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BGridLayout::AllUnarchived(const BMessage* from)
|
||||||
|
{
|
||||||
|
return BTwoDimensionalLayout::AllUnarchived(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BArchivable*
|
BArchivable*
|
||||||
BGridLayout::Instantiate(BMessage* from)
|
BGridLayout::Instantiate(BMessage* from)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -198,6 +198,13 @@ BGroupLayout::Archive(BMessage* into, bool deep) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BGroupLayout::AllArchived(BMessage* into) const
|
||||||
|
{
|
||||||
|
return BTwoDimensionalLayout::AllArchived(into);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BGroupLayout::AllUnarchived(const BMessage* from)
|
BGroupLayout::AllUnarchived(const BMessage* from)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -452,6 +452,13 @@ BLayout::Archive(BMessage* into, bool deep) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BLayout::AllArchived(BMessage* archive) const
|
||||||
|
{
|
||||||
|
return BArchivable::AllArchived(archive);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BLayout::AllUnarchived(const BMessage* from)
|
BLayout::AllUnarchived(const BMessage* from)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -222,6 +222,13 @@ BSplitView::Draw(BRect updateRect)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BSplitView::DrawAfterChildren(BRect r)
|
||||||
|
{
|
||||||
|
return BView::DrawAfterChildren(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BSplitView::MouseDown(BPoint where)
|
BSplitView::MouseDown(BPoint where)
|
||||||
{
|
{
|
||||||
@@ -269,6 +276,13 @@ BSplitView::MouseMoved(BPoint where, uint32 transit, const BMessage* message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
BSplitView::MessageReceived(BMessage* message)
|
||||||
|
{
|
||||||
|
return BView::MessageReceived(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BSplitView::SetLayout(BLayout* layout)
|
BSplitView::SetLayout(BLayout* layout)
|
||||||
{
|
{
|
||||||
@@ -283,6 +297,13 @@ BSplitView::Archive(BMessage* into, bool deep) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BSplitView::AllArchived(BMessage* archive) const
|
||||||
|
{
|
||||||
|
return BView::AllArchived(archive);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BSplitView::AllUnarchived(const BMessage* from)
|
BSplitView::AllUnarchived(const BMessage* from)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -456,6 +456,24 @@ BTwoDimensionalLayout::AllUnarchived(const BMessage* from)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BTwoDimensionalLayout::ItemArchived(BMessage* into, BLayoutItem* item,
|
||||||
|
int32 index) const
|
||||||
|
{
|
||||||
|
return BAbstractLayout::ItemArchived(into, item, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BTwoDimensionalLayout::ItemUnarchived(const BMessage* from, BLayoutItem* item,
|
||||||
|
int32 index)
|
||||||
|
{
|
||||||
|
return BAbstractLayout::ItemUnarchived(from, item, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BTwoDimensionalLayout::LayoutInvalidated(bool children)
|
BTwoDimensionalLayout::LayoutInvalidated(bool children)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user