Skip to content

Commit

Permalink
Apply Guichan's changes from f6cbf9d06a2039e75b2073ba2d4ed514182e9977…
Browse files Browse the repository at this point in the history
… (Apr 16th 2009)

Added TabbedArea::getNumberOfTabs

Can be useful to know.
  • Loading branch information
Jarod42 committed Sep 16, 2024
1 parent daa1391 commit be65083
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* Continue rebasing from efa10744835f7314bfdb2ce42546ae4aaa08e169
* Continue rebasing from 90c8966f6cb153d6ab03e146d3ade33a03b94bdc
* Add a focus listener interface.
* Make focus apply synchronously.
* Graphics and input objects for DirectX.
Expand Down
7 changes: 7 additions & 0 deletions include/guisan/widgets/tabbedarea.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ namespace gcn
*/
virtual void removeTab(Tab* tab);

/**
* Returns the number of tabs in this tabbed area.
*
* @since 1.1.0
*/
int getNumberOfTabs() const;

/**
* Checks if a tab given an index is selected or not.
*
Expand Down
5 changes: 5 additions & 0 deletions src/widgets/tabbedarea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ namespace gcn
adjustTabPositions();
}

int TabbedArea::getNumberOfTabs() const
{
return mTabs.size();
}

bool TabbedArea::isTabSelected(unsigned int index) const
{
if (index >= mTabs.size())
Expand Down

0 comments on commit be65083

Please sign in to comment.