{
if (m_pClientWindow && m_pClientWindow->GetSelection() != -1)
{
- int active = m_pClientWindow->GetSelection() + 1;
+ size_t active = m_pClientWindow->GetSelection() + 1;
if (active >= m_pClientWindow->GetPageCount())
active = 0;
wxGenericMDIClientWindow *pClientWindow = pParentFrame->GetClientWindow();
// Remove page if still there
- int pos;
+ size_t pos;
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
if (pClientWindow != NULL)
{
- int pos;
+ size_t pos;
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
if (pClientWindow != NULL)
{
- int pos;
+ size_t pos;
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
{
wxNotebook::OnSize(event);
- int pos;
+ size_t pos;
for (pos = 0; pos < GetPageCount(); pos++)
{
((wxGenericMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect();
{
wxNotebookPageInfoList* list = const_cast< wxNotebookPageInfoList* >( &m_pageInfos ) ;
WX_CLEAR_LIST( wxNotebookPageInfoList , *list ) ;
- for( int i = 0 ; i < GetPageCount() ; ++i )
+ for( size_t i = 0 ; i < GetPageCount() ; ++i )
{
wxNotebookPageInfo *info = new wxNotebookPageInfo() ;
- info->Create( const_cast<wxNotebook*>(this)->GetPage(i) , GetPageText(i) , GetSelection() == i , GetPageImage(i) ) ;
+ info->Create( const_cast<wxNotebook*>(this)->GetPage(i) , GetPageText(i) , GetSelection() == int(i) , GetPageImage(i) ) ;
list->Append( info ) ;
}
return m_pageInfos ;
{
wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
- if ( nPage != m_nSelection )
+ if ( int(nPage) != m_nSelection )
{
wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId);
event.SetSelection(nPage);
{
// change the selected page if it was deleted or became invalid
int selNew;
- if ( m_nSelection == GetPageCount() )
+ if ( m_nSelection == int(GetPageCount()) )
{
// last page deleted, make the new last page the new selection
selNew = m_nSelection - 1;
}
- else if ( nPage <= m_nSelection )
+ else if ( int(nPage) <= m_nSelection )
{
// we must show another page, even if it has the same index
selNew = m_nSelection;
// if the inserted page is before the selected one, we must update the
// index of the selected page
- if ( nPage <= m_nSelection )
+ if ( int(nPage) <= m_nSelection )
{
// one extra page added
m_nSelection++;
// macros
// ----------------------------------------------------------------------------
-#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
+#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((size_t(nPage)) < GetPageCount()))
// ----------------------------------------------------------------------------
// constants
UpdateSpinBtn();
}
- int count = GetPageCount();
+ size_t count = GetPageCount();
if ( count )
{
if ( m_sel == (size_t)nPage )