Patch by Alex Wilson (with small style changes by myself): Added support for

archiving/unarchiving.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37541 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2010-07-16 18:11:24 +00:00
parent 7ed1644c55
commit 80c2bbd8ae
2 changed files with 195 additions and 3 deletions
+7 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2006, Haiku, Inc. All rights reserved.
* Copyright 2006-2010, Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _TWO_DIMENSIONAL_LAYOUT_H
@@ -14,6 +14,7 @@ class BLayoutContext;
class BTwoDimensionalLayout : public BLayout {
public:
BTwoDimensionalLayout();
BTwoDimensionalLayout(BMessage* from);
virtual ~BTwoDimensionalLayout();
void SetInsets(float left, float top, float right,
@@ -37,6 +38,10 @@ public:
virtual void LayoutView();
virtual status_t Archive(BMessage* into, bool deep = true) const;
virtual status_t AllArchived(BMessage* into) const;
virtual status_t AllUnarchived(const BMessage* from);
protected:
struct ColumnRowConstraints {
float weight;
@@ -66,7 +71,7 @@ protected:
enum orientation orientation,
int32 index,
ColumnRowConstraints* constraints) = 0;
virtual void GetItemDimensions(BLayoutItem* item,
virtual void GetItemDimensions(BLayoutItem* item,
Dimensions* dimensions) = 0;
private: