Big change deriving BLayout from BLayoutItem, and allowing viewless BLayouts.
a few highlights: * BLayout now derives publicly from BLayoutItem * Added BAbstractLayout class, which our layouts now derive from * updated layout builders to avoid creating views when they don't need to * updated layout classes * updated AboutSystem to fix a little regression * more details on #6407 * please tell me about any regressions, I've tried to find them all, but some may have slipped by. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38207 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
#define _TWO_DIMENSIONAL_LAYOUT_H
|
||||
|
||||
|
||||
#include <Layout.h>
|
||||
#include <AbstractLayout.h>
|
||||
|
||||
class BLayoutContext;
|
||||
|
||||
|
||||
class BTwoDimensionalLayout : public BLayout {
|
||||
class BTwoDimensionalLayout : public BAbstractLayout {
|
||||
public:
|
||||
BTwoDimensionalLayout();
|
||||
BTwoDimensionalLayout(BMessage* from);
|
||||
@@ -25,18 +25,18 @@ public:
|
||||
void AlignLayoutWith(BTwoDimensionalLayout* other,
|
||||
enum orientation orientation);
|
||||
|
||||
virtual BSize MinSize();
|
||||
virtual BSize MaxSize();
|
||||
virtual BSize PreferredSize();
|
||||
virtual BAlignment Alignment();
|
||||
virtual BSize BaseMinSize();
|
||||
virtual BSize BaseMaxSize();
|
||||
virtual BSize BasePreferredSize();
|
||||
virtual BAlignment BaseAlignment();
|
||||
|
||||
virtual bool HasHeightForWidth();
|
||||
virtual void GetHeightForWidth(float width, float* min,
|
||||
float* max, float* preferred);
|
||||
|
||||
virtual void InvalidateLayout();
|
||||
virtual void SetFrame(BRect frame);
|
||||
|
||||
virtual void LayoutView();
|
||||
virtual void InvalidateLayout(bool children = false);
|
||||
|
||||
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
||||
virtual status_t AllArchived(BMessage* into) const;
|
||||
@@ -56,6 +56,8 @@ protected:
|
||||
int32 height;
|
||||
};
|
||||
|
||||
virtual void DerivedLayoutItems();
|
||||
|
||||
BSize AddInsets(BSize size);
|
||||
void AddInsets(float* minHeight, float* maxHeight,
|
||||
float* preferredHeight);
|
||||
@@ -82,7 +84,6 @@ private:
|
||||
friend class LocalLayouter;
|
||||
|
||||
void _ValidateMinMax();
|
||||
BLayoutContext* _CurrentLayoutContext();
|
||||
|
||||
protected:
|
||||
float fLeftInset;
|
||||
|
||||
Reference in New Issue
Block a user