Implement tindependant::set_visible_area.

This commit is contained in:
Mark de Wever 2009-05-30 17:13:42 +00:00
parent 332e2c9e2c
commit fdee062a3b
2 changed files with 16 additions and 6 deletions

View file

@ -299,11 +299,25 @@ void tindependant::set_origin(const tpoint& origin)
for(size_t i = 0; i < get_item_count(); ++i) {
tgrid& grid = get_item(i);
grid.set_origin(origin);
}
}
void tindependant::set_visible_area(const SDL_Rect& area)
{
/*
* Set the visible area for every item.
*
* @todo evaluate whether setting it only for the visible item is better
* and what the consequences are.
*/
for(size_t i = 0; i < get_item_count(); ++i) {
tgrid& grid = get_item(i);
grid.set_visible_area(area);
}
}
} // namespace placement
/***** ***** ***** ***** Select action ***** ***** ***** *****/

View file

@ -365,11 +365,7 @@ struct tindependant
void set_origin(const tpoint& origin);
/** See thorizontal_list::set_visible_area(). */
void set_visible_area(const SDL_Rect& /*area*/)
{
/* DO NOTHING */
/** @todo Evaluate what we need to do here. */
}
void set_visible_area(const SDL_Rect& area);
/** See thorizontal_list::find_widget(). */
twidget* find_widget(const tpoint&, const bool)