/*  $Id: layout_generic.h,v 1.3 2004/02/01 20:53:15 mbn Exp $
**
**  ClanLib Game SDK
**  Copyright (C) 2003  The ClanLib Team
**  For a total list of contributers see the file CREDITS.
**
**  This library is free software; you can redistribute it and/or
**  modify it under the terms of the GNU Lesser General Public
**  License as published by the Free Software Foundation; either
**  version 2.1 of the License, or (at your option) any later version.
**
**  This library is distributed in the hope that it will be useful,
**  but WITHOUT ANY WARRANTY; without even the implied warranty of
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
**  Lesser General Public License for more details.
**
**  You should have received a copy of the GNU Lesser General Public
**  License along with this library; if not, write to the Free Software
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
**
*/

#ifndef header_layout_generic
#define header_layout_generic

#include "API/GUI/layout.h"
#include "layout_item.h"

class CL_Layout_Generic
{
//! Construction:
public:
	CL_Layout_Generic(CL_LayoutType type);

	~CL_Layout_Generic();

//! Attributes:
public:
	CL_LayoutType type;

	CL_LayoutItem *parent;

	int grid_columns;

	std::vector<CL_LayoutItem *> elements;

	int margin;

	int spacing;

//! Operations:
public:
	//: Returns the preferred size of this layout.
	CL_Size get_preferred_size() const;

	//: Returns the minimum size of this layout.
	CL_Size get_minimum_size() const;

	//: Returns the maximum size of this layout.
	CL_Size get_maximum_size() const;

	//: Returns the vertical size policy of this layout.
	CL_LayoutPolicy get_vertical_policy() const;

	//: Returns the horizontal size policy of this layout.
	CL_LayoutPolicy get_horizontal_policy() const;

	//: Set layout to use this size and position.
	void set_position(const CL_Rect &pos);

//! Implementation:
private:
};

#endif
