Add new methods to BALMLayout for adding multiple x/y tabs at once.

This commit is contained in:
Alex Wilson 2012-01-17 10:37:12 +13:00
parent 8b52747974
commit b50d4ed8bd
2 changed files with 20 additions and 0 deletions

View File

@ -37,7 +37,9 @@ public:
virtual ~BALMLayout();
BReference<XTab> AddXTab();
void AddXTabs(BReference<XTab>* tabs, uint32 count);
BReference<YTab> AddYTab();
void AddYTabs(BReference<YTab>* tabs, uint32 count);
int32 CountXTabs() const;
int32 CountYTabs() const;
@ -192,6 +194,8 @@ private:
} // namespace BALM
using BALM::BALMLayout;
#endif // ALM_LAYOUT_H

View File

@ -85,6 +85,22 @@ BALMLayout::AddXTab()
}
void
BALMLayout::AddXTabs(BReference<XTab>* tabs, uint32 count)
{
for (uint32 i = 0; i < count; i++)
tabs[i] = AddXTab();
}
void
BALMLayout::AddYTabs(BReference<YTab>* tabs, uint32 count)
{
for (uint32 i = 0; i < count; i++)
tabs[i] = AddYTab();
}
/**
* Adds a new y-tab to the specification.
*