2006-08-26 20:21:15 +04:00
|
|
|
/*
|
2009-08-27 15:12:41 +04:00
|
|
|
* Copyright 2006, Haiku, Inc. All rights reserved.
|
2006-08-26 20:21:15 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _ABSTRACT_LAYOUT_ITEM_H
|
|
|
|
#define _ABSTRACT_LAYOUT_ITEM_H
|
|
|
|
|
|
|
|
#include <Alignment.h>
|
|
|
|
#include <LayoutItem.h>
|
|
|
|
#include <Size.h>
|
|
|
|
|
|
|
|
|
|
|
|
class BAbstractLayoutItem : public BLayoutItem {
|
|
|
|
public:
|
|
|
|
BAbstractLayoutItem();
|
2010-07-16 21:23:15 +04:00
|
|
|
BAbstractLayoutItem(BMessage* from);
|
2006-08-26 20:21:15 +04:00
|
|
|
virtual ~BAbstractLayoutItem();
|
|
|
|
|
|
|
|
virtual BSize MinSize();
|
|
|
|
virtual BSize MaxSize();
|
|
|
|
virtual BSize PreferredSize();
|
|
|
|
virtual BAlignment Alignment();
|
|
|
|
|
|
|
|
virtual void SetExplicitMinSize(BSize size);
|
|
|
|
virtual void SetExplicitMaxSize(BSize size);
|
|
|
|
virtual void SetExplicitPreferredSize(BSize size);
|
|
|
|
virtual void SetExplicitAlignment(BAlignment alignment);
|
|
|
|
|
|
|
|
virtual BSize BaseMinSize();
|
|
|
|
virtual BSize BaseMaxSize();
|
|
|
|
virtual BSize BasePreferredSize();
|
|
|
|
virtual BAlignment BaseAlignment();
|
|
|
|
|
2010-07-16 21:23:15 +04:00
|
|
|
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
|
|
|
|
2011-11-01 00:57:30 +04:00
|
|
|
virtual status_t Perform(perform_code d, void* arg);
|
|
|
|
|
2011-11-06 00:25:06 +04:00
|
|
|
protected:
|
2011-12-02 07:45:50 +04:00
|
|
|
// various hook methods
|
|
|
|
|
|
|
|
virtual status_t AllUnarchived(const BMessage* archive);
|
|
|
|
virtual status_t AllArchived(BMessage* archive) const;
|
|
|
|
|
2011-11-06 00:25:06 +04:00
|
|
|
virtual void LayoutInvalidated(bool children);
|
|
|
|
|
|
|
|
virtual void AttachedToLayout();
|
|
|
|
virtual void DetachedFromLayout(BLayout* layout);
|
|
|
|
|
|
|
|
virtual void AncestorVisibilityChanged(bool shown);
|
|
|
|
|
2006-08-26 20:21:15 +04:00
|
|
|
private:
|
2011-11-02 10:29:33 +04:00
|
|
|
virtual void _ReservedAbstractLayoutItem1();
|
|
|
|
virtual void _ReservedAbstractLayoutItem2();
|
|
|
|
virtual void _ReservedAbstractLayoutItem3();
|
|
|
|
virtual void _ReservedAbstractLayoutItem4();
|
|
|
|
virtual void _ReservedAbstractLayoutItem5();
|
|
|
|
virtual void _ReservedAbstractLayoutItem6();
|
|
|
|
virtual void _ReservedAbstractLayoutItem7();
|
|
|
|
virtual void _ReservedAbstractLayoutItem8();
|
|
|
|
virtual void _ReservedAbstractLayoutItem9();
|
|
|
|
virtual void _ReservedAbstractLayoutItem10();
|
|
|
|
|
2011-11-05 08:23:22 +04:00
|
|
|
// forbidden methods
|
|
|
|
BAbstractLayoutItem(const BAbstractLayoutItem&);
|
|
|
|
void operator =(const BAbstractLayoutItem&);
|
|
|
|
|
2006-08-26 20:21:15 +04:00
|
|
|
BSize fMinSize;
|
|
|
|
BSize fMaxSize;
|
|
|
|
BSize fPreferredSize;
|
|
|
|
BAlignment fAlignment;
|
2011-11-02 10:29:33 +04:00
|
|
|
|
|
|
|
uint32 _reserved[5];
|
2006-08-26 20:21:15 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _ABSTRACT_LAYOUT_ITEM_H
|