Version: 3.3.0
wxAuiNotebookPosition Struct Reference

#include <wx/aui/auibook.h>

Detailed Description

Simple struct combining wxAuiTabCtrl with the position inside it.

This information fully determines the position of the page in wxAuiNotebook, see wxAuiNotebook::GetPagePosition().

Since
3.3.0

Public Member Functions

 operator bool () const
 Check if the position is valid. More...
 

Public Attributes

wxAuiTabCtrl * tabCtrl = nullptr
 Tab control containing the page or nullptr if the position is invalid. More...
 
int tabIdx = wxNOT_FOUND
 Index of the page in this tab control or wxNOT_FOUND if invalid. More...
 

Member Function Documentation

◆ operator bool()

wxAuiNotebookPosition::operator bool ( ) const
explicit

Check if the position is valid.

This overloaded operator allows to use objects of this class in conditional statements, e.g.

if ( const auto pos = book->GetPagePosition(page) )
{
// pos is valid, can use its tabCtrl and tabIdx members here
}

Member Data Documentation

◆ tabCtrl

wxAuiTabCtrl* wxAuiNotebookPosition::tabCtrl = nullptr

Tab control containing the page or nullptr if the position is invalid.

◆ tabIdx

int wxAuiNotebookPosition::tabIdx = wxNOT_FOUND

Index of the page in this tab control or wxNOT_FOUND if invalid.