1/*
2 * Copyright 2006, Haiku Inc.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef	ONE_ELEMENT_LAYOUTER_H
6#define	ONE_ELEMENT_LAYOUTER_H
7
8#include "Layouter.h"
9
10namespace BPrivate {
11namespace Layout {
12
13class OneElementLayouter : public Layouter {
14public:
15								OneElementLayouter();
16	virtual						~OneElementLayouter();
17
18	virtual	void				AddConstraints(int32 element, int32 length,
19									float min, float max, float preferred);
20	virtual	void				SetWeight(int32 element, float weight);
21
22	virtual	float				MinSize();
23	virtual	float				MaxSize();
24	virtual	float				PreferredSize();
25
26	virtual	LayoutInfo*			CreateLayoutInfo();
27
28	virtual	void				Layout(LayoutInfo* layoutInfo, float size);
29
30	virtual	Layouter*			CloneLayouter();
31
32private:
33			class MyLayoutInfo;
34
35			float				fMin;
36			float				fMax;
37			float				fPreferred;
38};
39
40}	// namespace Layout
41}	// namespace BPrivate
42
43using BPrivate::Layout::OneElementLayouter;
44
45#endif	// ONE_ELEMENT_LAYOUTER_H
46