From 182e2ee973b7cd577fb24ba5a186eba235c1fa55 Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Thu, 1 Dec 2011 22:47:46 -0700 Subject: [PATCH] Add a bit more FBC stuff for the Layout API, which I missed before. --- headers/os/interface/CardLayout.h | 9 +++++++++ headers/os/interface/LayoutItem.h | 4 ++++ headers/os/interface/SpaceLayoutItem.h | 16 ++++++++++++++++ src/kits/interface/CardLayout.cpp | 16 ++++++++++++++++ src/kits/interface/SpaceLayoutItem.cpp | 12 ++++++++++++ 5 files changed, 57 insertions(+) diff --git a/headers/os/interface/CardLayout.h b/headers/os/interface/CardLayout.h index 8a2ed0fe5d..09636225f4 100644 --- a/headers/os/interface/CardLayout.h +++ b/headers/os/interface/CardLayout.h @@ -37,6 +37,11 @@ protected: 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 void LayoutInvalidated(bool children = false); virtual void DoLayout(); virtual bool ItemAdded(BLayoutItem* item, int32 atIndex); @@ -58,6 +63,10 @@ private: virtual void _ReservedCardLayout9(); virtual void _ReservedCardLayout10(); + // forbidden methods + BCardLayout(const BCardLayout&); + void operator =(const BCardLayout&); + BSize fMin; BSize fMax; BSize fPreferred; diff --git a/headers/os/interface/LayoutItem.h b/headers/os/interface/LayoutItem.h index aba36a9d3d..b0d5302581 100644 --- a/headers/os/interface/LayoutItem.h +++ b/headers/os/interface/LayoutItem.h @@ -85,6 +85,10 @@ private: virtual void _ReservedLayoutItem9(); virtual void _ReservedLayoutItem10(); + // forbidden methods + BLayoutItem(const BLayoutItem&); + void operator =(const BLayoutItem&); + friend class BLayout; BLayout* fLayout; diff --git a/headers/os/interface/SpaceLayoutItem.h b/headers/os/interface/SpaceLayoutItem.h index 4ce664df24..893da4b99e 100644 --- a/headers/os/interface/SpaceLayoutItem.h +++ b/headers/os/interface/SpaceLayoutItem.h @@ -39,6 +39,22 @@ public: static BArchivable* Instantiate(BMessage* from); private: + // FBC padding + virtual void _ReservedSpaceLayoutItem1(); + virtual void _ReservedSpaceLayoutItem2(); + virtual void _ReservedSpaceLayoutItem3(); + virtual void _ReservedSpaceLayoutItem4(); + virtual void _ReservedSpaceLayoutItem5(); + virtual void _ReservedSpaceLayoutItem6(); + virtual void _ReservedSpaceLayoutItem7(); + virtual void _ReservedSpaceLayoutItem8(); + virtual void _ReservedSpaceLayoutItem9(); + virtual void _ReservedSpaceLayoutItem10(); + + // forbidden methods + BSpaceLayoutItem(const BSpaceLayoutItem&); + void operator =(const BSpaceLayoutItem&); + BRect fFrame; BSize fMinSize; BSize fMaxSize; diff --git a/src/kits/interface/CardLayout.cpp b/src/kits/interface/CardLayout.cpp index 749f4b3a25..01844f2ea1 100644 --- a/src/kits/interface/CardLayout.cpp +++ b/src/kits/interface/CardLayout.cpp @@ -235,6 +235,22 @@ BCardLayout::AllUnarchived(const BMessage* from) } +status_t +BCardLayout::ItemArchived(BMessage* into, BLayoutItem* item, int32 index) const +{ + return BAbstractLayout::ItemArchived(into, item, index); +} + + +status_t +BCardLayout::ItemUnarchived(const BMessage* from, BLayoutItem* item, + int32 index) +{ + return BAbstractLayout::ItemUnarchived(from, item, index); +} + + + BArchivable* BCardLayout::Instantiate(BMessage* from) { diff --git a/src/kits/interface/SpaceLayoutItem.cpp b/src/kits/interface/SpaceLayoutItem.cpp index 361e674032..ceadb8cf6e 100644 --- a/src/kits/interface/SpaceLayoutItem.cpp +++ b/src/kits/interface/SpaceLayoutItem.cpp @@ -226,3 +226,15 @@ BSpaceLayoutItem::Instantiate(BMessage* from) return NULL; } + +void BSpaceLayoutItem::_ReservedSpaceLayoutItem1() {} +void BSpaceLayoutItem::_ReservedSpaceLayoutItem2() {} +void BSpaceLayoutItem::_ReservedSpaceLayoutItem3() {} +void BSpaceLayoutItem::_ReservedSpaceLayoutItem4() {} +void BSpaceLayoutItem::_ReservedSpaceLayoutItem5() {} +void BSpaceLayoutItem::_ReservedSpaceLayoutItem6() {} +void BSpaceLayoutItem::_ReservedSpaceLayoutItem7() {} +void BSpaceLayoutItem::_ReservedSpaceLayoutItem8() {} +void BSpaceLayoutItem::_ReservedSpaceLayoutItem9() {} +void BSpaceLayoutItem::_ReservedSpaceLayoutItem10() {} +