Add a page_grid() to the multi_page.

This commit is contained in:
Mark de Wever 2009-07-10 19:31:38 +00:00
parent 0a26092a47
commit e13258f2f7
2 changed files with 32 additions and 0 deletions

View file

@ -54,6 +54,18 @@ void tmulti_page::select_page(const unsigned page, const bool select)
generator_->select_item(page, select);
}
const tgrid& tmulti_page::page_grid(const unsigned page) const
{
assert(generator_);
return generator_->get_item(page);
}
tgrid& tmulti_page::page_grid(const unsigned page)
{
assert(generator_);
return generator_->get_item(page);
}
namespace {
/**

View file

@ -78,6 +78,26 @@ public:
*/
void select_page(const unsigned page, const bool select = true);
/**
* Returns the grid for the page.
*
* @param page The page to get the grid from, the caller
* has to make sure the page is a valid page.
*
* @returns The grid of the wanted page.
*/
const tgrid& page_grid(const unsigned page) const;
/**
* Returns the grid for the page.
*
* @param page The page to get the grid from, the caller
* has to make sure the page is a valid page.
*
* @returns The grid of the wanted page.
*/
tgrid& page_grid(const unsigned page);
/***** ***** ***** inherited ***** ****** *****/
/** Inherited from tcontrol. */