Make archiving hooks protected in layout classes.
Furthermore, * remove a stray blank line in Layout.cpp * make BLayoutItem::SetLayout() private, as it should have been
This commit is contained in:
@@ -37,6 +37,11 @@ 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 Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Archiving hook methods
|
||||||
virtual status_t AllArchived(BMessage* archive) const;
|
virtual status_t AllArchived(BMessage* archive) const;
|
||||||
virtual status_t AllUnarchived(const BMessage* from);
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
|
|
||||||
@@ -45,9 +50,6 @@ public:
|
|||||||
virtual status_t ItemUnarchived(const BMessage* from,
|
virtual status_t ItemUnarchived(const BMessage* from,
|
||||||
BLayoutItem* item, int32 index);
|
BLayoutItem* item, int32 index);
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
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 LayoutInvalidated(bool children);
|
virtual void LayoutInvalidated(bool children);
|
||||||
|
|||||||
@@ -32,12 +32,15 @@ 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:
|
protected:
|
||||||
|
// various hook methods
|
||||||
|
|
||||||
|
virtual status_t AllUnarchived(const BMessage* archive);
|
||||||
|
virtual status_t AllArchived(BMessage* archive) const;
|
||||||
|
|
||||||
virtual void LayoutInvalidated(bool children);
|
virtual void LayoutInvalidated(bool children);
|
||||||
|
|
||||||
virtual void AttachedToLayout();
|
virtual void AttachedToLayout();
|
||||||
|
|||||||
@@ -29,13 +29,14 @@ 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);
|
|
||||||
static BArchivable* Instantiate(BMessage* from);
|
static BArchivable* Instantiate(BMessage* from);
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
virtual status_t Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual status_t AllArchived(BMessage* archive) const;
|
||||||
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
|
|
||||||
virtual void LayoutInvalidated(bool children = false);
|
virtual void LayoutInvalidated(bool children = false);
|
||||||
virtual void DoLayout();
|
virtual void DoLayout();
|
||||||
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
|
virtual bool ItemAdded(BLayoutItem* item, int32 atIndex);
|
||||||
|
|||||||
@@ -59,18 +59,18 @@ 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 Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual status_t AllArchived(BMessage* into) const;
|
||||||
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
virtual status_t ItemArchived(BMessage* into,
|
virtual status_t ItemArchived(BMessage* into,
|
||||||
BLayoutItem* item, int32 index) const;
|
BLayoutItem* item, int32 index) const;
|
||||||
virtual status_t ItemUnarchived(const BMessage* from,
|
virtual status_t ItemUnarchived(const BMessage* from,
|
||||||
BLayoutItem* item, int32 index);
|
BLayoutItem* item, int32 index);
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
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);
|
||||||
|
|
||||||
|
|||||||
@@ -36,18 +36,18 @@ 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);
|
|
||||||
static BArchivable* Instantiate(BMessage* from);
|
static BArchivable* Instantiate(BMessage* from);
|
||||||
|
|
||||||
|
virtual status_t Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual status_t AllArchived(BMessage* into) const;
|
||||||
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
virtual status_t ItemArchived(BMessage* into, BLayoutItem* item,
|
virtual status_t ItemArchived(BMessage* into, BLayoutItem* item,
|
||||||
int32 index) const;
|
int32 index) const;
|
||||||
virtual status_t ItemUnarchived(const BMessage* from,
|
virtual status_t ItemUnarchived(const BMessage* from,
|
||||||
BLayoutItem* item, int32 index);
|
BLayoutItem* item, int32 index);
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
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);
|
||||||
|
|
||||||
|
|||||||
@@ -60,9 +60,12 @@ public:
|
|||||||
BRect LayoutArea();
|
BRect LayoutArea();
|
||||||
BLayoutContext* LayoutContext() const;
|
BLayoutContext* LayoutContext() const;
|
||||||
|
|
||||||
// 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 Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Archiving hook methods
|
||||||
virtual status_t AllArchived(BMessage* archive) const;
|
virtual status_t AllArchived(BMessage* archive) const;
|
||||||
virtual status_t AllUnarchived(const BMessage* from);
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
|
|
||||||
@@ -70,10 +73,6 @@ public:
|
|||||||
int32 index) const;
|
int32 index) const;
|
||||||
virtual status_t ItemUnarchived(const BMessage* from,
|
virtual status_t ItemUnarchived(const BMessage* from,
|
||||||
BLayoutItem* item, int32 index);
|
BLayoutItem* item, int32 index);
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
|
||||||
|
|
||||||
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);
|
||||||
|
|||||||
@@ -55,13 +55,13 @@ public:
|
|||||||
void AlignInFrame(BRect frame);
|
void AlignInFrame(BRect frame);
|
||||||
|
|
||||||
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 Perform(perform_code d, void* arg);
|
virtual status_t Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void SetLayout(BLayout* layout);
|
// archiving methods
|
||||||
|
virtual status_t AllArchived(BMessage* into) const;
|
||||||
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
|
|
||||||
// hook methods
|
// hook methods
|
||||||
virtual void LayoutInvalidated(bool children);
|
virtual void LayoutInvalidated(bool children);
|
||||||
@@ -72,6 +72,8 @@ protected:
|
|||||||
virtual void AncestorVisibilityChanged(bool shown);
|
virtual void AncestorVisibilityChanged(bool shown);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void SetLayout(BLayout* layout);
|
||||||
|
|
||||||
virtual void _ReservedLayoutItem1();
|
virtual void _ReservedLayoutItem1();
|
||||||
virtual void _ReservedLayoutItem2();
|
virtual void _ReservedLayoutItem2();
|
||||||
virtual void _ReservedLayoutItem3();
|
virtual void _ReservedLayoutItem3();
|
||||||
|
|||||||
@@ -34,8 +34,6 @@ public:
|
|||||||
static BArchivable* Instantiate(BMessage* archive);
|
static BArchivable* Instantiate(BMessage* archive);
|
||||||
virtual status_t Archive(BMessage* archive,
|
virtual status_t Archive(BMessage* archive,
|
||||||
bool deep = true) const;
|
bool deep = true) const;
|
||||||
virtual status_t AllArchived(BMessage* into) const;
|
|
||||||
virtual status_t AllUnarchived(const BMessage* from);
|
|
||||||
|
|
||||||
virtual void Draw(BRect update);
|
virtual void Draw(BRect update);
|
||||||
virtual void AttachedToWindow();
|
virtual void AttachedToWindow();
|
||||||
@@ -89,6 +87,9 @@ public:
|
|||||||
virtual status_t Perform(perform_code d, void* arg);
|
virtual status_t Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual status_t AllArchived(BMessage* into) const;
|
||||||
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
|
|
||||||
virtual void LayoutInvalidated(bool descendants);
|
virtual void LayoutInvalidated(bool descendants);
|
||||||
virtual void DoLayout();
|
virtual void DoLayout();
|
||||||
|
|
||||||
|
|||||||
@@ -71,13 +71,14 @@ public:
|
|||||||
// 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);
|
|
||||||
static BArchivable* Instantiate(BMessage* from);
|
static BArchivable* Instantiate(BMessage* from);
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
virtual status_t Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual status_t AllArchived(BMessage* into) const;
|
||||||
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
|
|
||||||
virtual void DrawSplitter(BRect frame,
|
virtual void DrawSplitter(BRect frame,
|
||||||
const BRect& updateRect,
|
const BRect& updateRect,
|
||||||
enum orientation orientation,
|
enum orientation orientation,
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ public:
|
|||||||
static BArchivable* Instantiate(BMessage* archive);
|
static BArchivable* Instantiate(BMessage* archive);
|
||||||
virtual status_t Archive(BMessage* archive,
|
virtual status_t Archive(BMessage* archive,
|
||||||
bool deep = true) const;
|
bool deep = true) const;
|
||||||
virtual status_t AllArchived(BMessage* into) const;
|
|
||||||
virtual status_t AllUnarchived(const BMessage* from);
|
|
||||||
|
|
||||||
virtual void SetText(const char* text);
|
virtual void SetText(const char* text);
|
||||||
const char* Text() const;
|
const char* Text() const;
|
||||||
@@ -92,6 +90,9 @@ public:
|
|||||||
BLayoutItem* CreateTextViewLayoutItem();
|
BLayoutItem* CreateTextViewLayoutItem();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual status_t AllArchived(BMessage* into) const;
|
||||||
|
virtual status_t AllUnarchived(const BMessage* from);
|
||||||
|
|
||||||
virtual void LayoutInvalidated(bool descendants);
|
virtual void LayoutInvalidated(bool descendants);
|
||||||
virtual void DoLayout();
|
virtual void DoLayout();
|
||||||
|
|
||||||
|
|||||||
@@ -39,13 +39,6 @@ public:
|
|||||||
virtual void SetFrame(BRect frame);
|
virtual void SetFrame(BRect frame);
|
||||||
|
|
||||||
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 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);
|
||||||
|
|
||||||
@@ -63,7 +56,15 @@ protected:
|
|||||||
int32 height;
|
int32 height;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 void LayoutInvalidated(bool children = false);
|
virtual void LayoutInvalidated(bool children = false);
|
||||||
|
|
||||||
virtual void DoLayout();
|
virtual void DoLayout();
|
||||||
|
|
||||||
BSize AddInsets(BSize size);
|
BSize AddInsets(BSize size);
|
||||||
|
|||||||
@@ -381,7 +381,6 @@ BLayout::Relayout(bool immediate)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BLayout::_LayoutWithinContext(bool force, BLayoutContext* context)
|
BLayout::_LayoutWithinContext(bool force, BLayoutContext* context)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user