Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply Guichan's changes from f6cbf9d06a2039e75b2073ba2d4ed514182e9977… #94

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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