Use const overloading on BALMLayout::{X|Y}TabAt().

This commit is contained in:
Alex Wilson 2012-01-26 14:20:44 +13:00
parent d7568eabd2
commit bc7956c7cf
2 changed files with 19 additions and 0 deletions

View File

@ -49,7 +49,10 @@ public:
int32 CountXTabs() const;
int32 CountYTabs() const;
XTab* XTabAt(int32 index, bool ordered = false);
XTab* XTabAt(int32 index) const;
YTab* YTabAt(int32 index, bool ordered = false);
YTab* YTabAt(int32 index) const;
int32 IndexOf(XTab* tab, bool ordered = false);
int32 IndexOf(YTab* tab, bool ordered = false);

View File

@ -267,6 +267,13 @@ BALMLayout::XTabAt(int32 index, bool ordered)
}
XTab*
BALMLayout::XTabAt(int32 index) const
{
return fXTabList.ItemAt(index);
}
YTab*
BALMLayout::YTabAt(int32 index, bool ordered)
{
@ -279,6 +286,13 @@ BALMLayout::YTabAt(int32 index, bool ordered)
}
YTab*
BALMLayout::YTabAt(int32 index) const
{
return fYTabList.ItemAt(index);
}
int32
BALMLayout::IndexOf(XTab* tab, bool ordered)
{
@ -325,6 +339,8 @@ CompareYTabFunc(const YTab* tab1, const YTab* tab2)
}
/**
* Adds a new row to the specification that is glued to the given y-tabs.
*