Forward all layout functions to the grid.

The container does nothing regarding resizing so forward everything.
This commit is contained in:
Mark de Wever 2009-04-30 12:14:45 +00:00
parent 395d79dafb
commit 48d5a20b1a
2 changed files with 32 additions and 0 deletions

View File

@ -49,11 +49,31 @@ void tcontainer_::NEW_reduce_width(const unsigned maximum_width)
grid_.NEW_reduce_width(maximum_width - border_space().x);
}
void tcontainer_::NEW_request_reduce_width(const unsigned maximum_width)
{
grid_.NEW_request_reduce_width(maximum_width - border_space().x);
}
void tcontainer_::NEW_demand_reduce_width(const unsigned maximum_width)
{
grid_.NEW_demand_reduce_width(maximum_width - border_space().x);
}
void tcontainer_::NEW_reduce_height(const unsigned maximum_height)
{
grid_.NEW_reduce_height(maximum_height - border_space().y);
}
void tcontainer_::NEW_request_reduce_height(const unsigned maximum_height)
{
grid_.NEW_request_reduce_height(maximum_height - border_space().y);
}
void tcontainer_::NEW_demand_reduce_height(const unsigned maximum_height)
{
grid_.NEW_demand_reduce_height(maximum_height - border_space().y);
}
void tcontainer_::layout_wrap(const unsigned maximum_width)
{
// Inherited.

View File

@ -61,6 +61,12 @@ public:
*/
void NEW_reduce_width(const unsigned maximum_width);
/** Inherited from tcontrol. */
void NEW_request_reduce_width(const unsigned maximum_width);
/** Inherited from twidget. */
void NEW_demand_reduce_width(const unsigned maximum_width);
/**
* Tries to reduce the height of a container.
*
@ -70,6 +76,12 @@ public:
*/
void NEW_reduce_height(const unsigned maximum_height);
/** Inherited from twidget. */
void NEW_request_reduce_height(const unsigned maximum_height);
/** Inherited from twidget. */
void NEW_demand_reduce_height(const unsigned maximum_height);
private:
/** Inherited from twidget. */
tpoint calculate_best_size() const;