git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23082
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
if (m_pClientWindow && m_pClientWindow->GetSelection() != -1)
{
{
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;
if (active >= m_pClientWindow->GetPageCount())
active = 0;
wxGenericMDIClientWindow *pClientWindow = pParentFrame->GetClientWindow();
// Remove page if still there
wxGenericMDIClientWindow *pClientWindow = pParentFrame->GetClientWindow();
// Remove page if still there
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
if (pClientWindow != NULL)
{
if (pClientWindow != NULL)
{
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
if (pClientWindow != NULL)
{
if (pClientWindow != NULL)
{
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
for (pos = 0; pos < pClientWindow->GetPageCount(); pos++)
{
if (pClientWindow->GetPage(pos) == this)
{
wxNotebook::OnSize(event);
{
wxNotebook::OnSize(event);
for (pos = 0; pos < GetPageCount(); pos++)
{
((wxGenericMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect();
for (pos = 0; pos < GetPageCount(); pos++)
{
((wxGenericMDIChildFrame *)GetPage(pos))->ApplyMDIChildFrameRect();
{
wxNotebookPageInfoList* list = const_cast< wxNotebookPageInfoList* >( &m_pageInfos ) ;
WX_CLEAR_LIST( wxNotebookPageInfoList , *list ) ;
{
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() ;
{
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 ;
list->Append( info ) ;
}
return m_pageInfos ;
{
wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
{
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);
{
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;
{
// 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;
}
{
// 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;
{
// 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 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++;
{
// one extra page added
m_nSelection++;
// macros
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------
-#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
+#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((size_t(nPage)) < GetPageCount()))
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// constants
- int count = GetPageCount();
+ size_t count = GetPageCount();
if ( count )
{
if ( m_sel == (size_t)nPage )
if ( count )
{
if ( m_sel == (size_t)nPage )