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 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 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);
|
||||
|
||||
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);
|
||||
|
||||
// BLayoutItem hook methods
|
||||
virtual void AttachedToLayout();
|
||||
virtual void DetachedFromLayout(BLayout* layout);
|
||||
virtual void AncestorVisibilityChanged(bool shown);
|
||||
|
||||
private:
|
||||
|
||||
@@ -32,9 +32,19 @@ public:
|
||||
virtual BAlignment BaseAlignment();
|
||||
|
||||
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);
|
||||
|
||||
protected:
|
||||
virtual void LayoutInvalidated(bool children);
|
||||
|
||||
virtual void AttachedToLayout();
|
||||
virtual void DetachedFromLayout(BLayout* layout);
|
||||
|
||||
virtual void AncestorVisibilityChanged(bool shown);
|
||||
|
||||
private:
|
||||
virtual void _ReservedAbstractLayoutItem1();
|
||||
virtual void _ReservedAbstractLayoutItem2();
|
||||
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
float* max, float* preferred);
|
||||
|
||||
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
||||
virtual status_t AllArchived(BMessage* archive) const;
|
||||
virtual status_t AllUnarchived(const BMessage* from);
|
||||
static BArchivable* Instantiate(BMessage* from);
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ public:
|
||||
int32 rowCount = 1);
|
||||
|
||||
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);
|
||||
|
||||
virtual status_t ItemArchived(BMessage* into,
|
||||
|
||||
@@ -36,6 +36,7 @@ public:
|
||||
float weight);
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ public:
|
||||
// Archiving methods
|
||||
|
||||
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 ItemArchived(BMessage* into, BLayoutItem* item,
|
||||
|
||||
@@ -45,6 +45,8 @@ private:
|
||||
BSize fPreferredSize;
|
||||
BAlignment fAlignment;
|
||||
bool fVisible;
|
||||
|
||||
uint32 _reserved[2];
|
||||
};
|
||||
|
||||
#endif // _SPACE_LAYOUT_ITEM_H
|
||||
|
||||
@@ -58,16 +58,20 @@ public:
|
||||
float weight);
|
||||
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void DrawAfterChildren(BRect updateRect);
|
||||
virtual void MouseDown(BPoint where);
|
||||
virtual void MouseUp(BPoint where);
|
||||
virtual void MouseMoved(BPoint where, uint32 transit,
|
||||
const BMessage* message);
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
|
||||
virtual void SetLayout(BLayout* layout);
|
||||
// overridden to avoid use
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@@ -42,6 +42,11 @@ public:
|
||||
virtual status_t AllArchived(BMessage* into) const;
|
||||
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);
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user