diff --git a/headers/os/interface/AbstractLayout.h b/headers/os/interface/AbstractLayout.h index c24724427f..fdefe1ad64 100644 --- a/headers/os/interface/AbstractLayout.h +++ b/headers/os/interface/AbstractLayout.h @@ -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: diff --git a/headers/os/interface/AbstractLayoutItem.h b/headers/os/interface/AbstractLayoutItem.h index 4ddf0cfd4e..58b13a46ea 100644 --- a/headers/os/interface/AbstractLayoutItem.h +++ b/headers/os/interface/AbstractLayoutItem.h @@ -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(); diff --git a/headers/os/interface/CardLayout.h b/headers/os/interface/CardLayout.h index 26638075ec..67b7d880b8 100644 --- a/headers/os/interface/CardLayout.h +++ b/headers/os/interface/CardLayout.h @@ -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); diff --git a/headers/os/interface/GridLayout.h b/headers/os/interface/GridLayout.h index 4f8dac3900..5073e35e49 100644 --- a/headers/os/interface/GridLayout.h +++ b/headers/os/interface/GridLayout.h @@ -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, diff --git a/headers/os/interface/GroupLayout.h b/headers/os/interface/GroupLayout.h index a64d05058a..69f960c888 100644 --- a/headers/os/interface/GroupLayout.h +++ b/headers/os/interface/GroupLayout.h @@ -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); diff --git a/headers/os/interface/Layout.h b/headers/os/interface/Layout.h index 5586881d99..00a2b1ffc6 100644 --- a/headers/os/interface/Layout.h +++ b/headers/os/interface/Layout.h @@ -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, diff --git a/headers/os/interface/SpaceLayoutItem.h b/headers/os/interface/SpaceLayoutItem.h index a76816c8d1..4ce664df24 100644 --- a/headers/os/interface/SpaceLayoutItem.h +++ b/headers/os/interface/SpaceLayoutItem.h @@ -45,6 +45,8 @@ private: BSize fPreferredSize; BAlignment fAlignment; bool fVisible; + + uint32 _reserved[2]; }; #endif // _SPACE_LAYOUT_ITEM_H diff --git a/headers/os/interface/SplitView.h b/headers/os/interface/SplitView.h index f8a74c536f..5d947b5197 100644 --- a/headers/os/interface/SplitView.h +++ b/headers/os/interface/SplitView.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); diff --git a/headers/os/interface/TwoDimensionalLayout.h b/headers/os/interface/TwoDimensionalLayout.h index 3b340b69c1..bd68fc9c19 100644 --- a/headers/os/interface/TwoDimensionalLayout.h +++ b/headers/os/interface/TwoDimensionalLayout.h @@ -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: diff --git a/src/kits/interface/AbstractLayout.cpp b/src/kits/interface/AbstractLayout.cpp index 7601ae0736..1788b4bec9 100644 --- a/src/kits/interface/AbstractLayout.cpp +++ b/src/kits/interface/AbstractLayout.cpp @@ -419,6 +419,13 @@ BAbstractLayout::Archive(BMessage* into, bool deep) const } +status_t +BAbstractLayout::AllArchived(BMessage* archive) const +{ + return BLayout::AllArchived(archive); +} + + status_t 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 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 BAbstractLayout::AncestorVisibilityChanged(bool shown) { diff --git a/src/kits/interface/AbstractLayoutItem.cpp b/src/kits/interface/AbstractLayoutItem.cpp index 6c471ad640..7d5882f81d 100644 --- a/src/kits/interface/AbstractLayoutItem.cpp +++ b/src/kits/interface/AbstractLayoutItem.cpp @@ -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 BAbstractLayoutItem::Perform(perform_code d, void* arg) { diff --git a/src/kits/interface/CardLayout.cpp b/src/kits/interface/CardLayout.cpp index d5542d50f4..749f4b3a25 100644 --- a/src/kits/interface/CardLayout.cpp +++ b/src/kits/interface/CardLayout.cpp @@ -212,6 +212,13 @@ BCardLayout::Archive(BMessage* into, bool deep) const } +status_t +BCardLayout::AllArchived(BMessage* archive) const +{ + return BAbstractLayout::AllArchived(archive); +} + + status_t BCardLayout::AllUnarchived(const BMessage* from) { diff --git a/src/kits/interface/GridLayout.cpp b/src/kits/interface/GridLayout.cpp index 73834923cb..785835ceff 100644 --- a/src/kits/interface/GridLayout.cpp +++ b/src/kits/interface/GridLayout.cpp @@ -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* BGridLayout::Instantiate(BMessage* from) { diff --git a/src/kits/interface/GroupLayout.cpp b/src/kits/interface/GroupLayout.cpp index 8768a2413f..8c18843302 100644 --- a/src/kits/interface/GroupLayout.cpp +++ b/src/kits/interface/GroupLayout.cpp @@ -198,6 +198,13 @@ BGroupLayout::Archive(BMessage* into, bool deep) const } +status_t +BGroupLayout::AllArchived(BMessage* into) const +{ + return BTwoDimensionalLayout::AllArchived(into); +} + + status_t BGroupLayout::AllUnarchived(const BMessage* from) { diff --git a/src/kits/interface/Layout.cpp b/src/kits/interface/Layout.cpp index f200ac5f21..03a7a515ef 100644 --- a/src/kits/interface/Layout.cpp +++ b/src/kits/interface/Layout.cpp @@ -452,6 +452,13 @@ BLayout::Archive(BMessage* into, bool deep) const } +status_t +BLayout::AllArchived(BMessage* archive) const +{ + return BArchivable::AllArchived(archive); +} + + status_t BLayout::AllUnarchived(const BMessage* from) { diff --git a/src/kits/interface/SplitView.cpp b/src/kits/interface/SplitView.cpp index 21ea1b2532..b28bc93cc8 100644 --- a/src/kits/interface/SplitView.cpp +++ b/src/kits/interface/SplitView.cpp @@ -222,6 +222,13 @@ BSplitView::Draw(BRect updateRect) } +void +BSplitView::DrawAfterChildren(BRect r) +{ + return BView::DrawAfterChildren(r); +} + + void 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 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 BSplitView::AllUnarchived(const BMessage* from) { diff --git a/src/kits/interface/TwoDimensionalLayout.cpp b/src/kits/interface/TwoDimensionalLayout.cpp index 6b9b8c0ffc..6c71fbd805 100644 --- a/src/kits/interface/TwoDimensionalLayout.cpp +++ b/src/kits/interface/TwoDimensionalLayout.cpp @@ -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 BTwoDimensionalLayout::LayoutInvalidated(bool children) {