]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fix
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 21 Aug 2003 12:54:31 +0000 (12:54 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 21 Aug 2003 12:54:31 +0000 (12:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/notebook.h
src/msw/notebook.cpp

index 635e8cb571600f8ad857ef27a5ce620eed83b558..318a4e95b054a272b0d7b4faf45855940b38c46f 100644 (file)
@@ -78,7 +78,7 @@ public:
   // accessors
   // ---------
     // get number of pages in the dialog
-  int GetPageCount() const;
+  virtual size_t GetPageCount() const;
 
     // set the currently selected page, return the index of the previously
     // selected one (or -1 on error)
index e30355370b7d55f32c7326fa284640370c9451f5..c5c3aff114973c583ba790aa2877e450afa9c84f 100644 (file)
@@ -73,7 +73,7 @@
 // ----------------------------------------------------------------------------
 
 // check that the page index is valid
-#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
+#define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount())
 
 // hide the ugly cast
 #define m_hwnd    (HWND)GetHWND()
@@ -283,7 +283,7 @@ WXDWORD wxNotebook::MSWGetStyle(long style, WXDWORD *exstyle) const
 // wxNotebook accessors
 // ----------------------------------------------------------------------------
 
-int wxNotebook::GetPageCount() const
+size_t wxNotebook::GetPageCount() const
 {
   // consistency check
   wxASSERT( (int)m_pages.Count() == TabCtrl_GetItemCount(m_hwnd) );
@@ -296,7 +296,7 @@ int wxNotebook::GetRowCount() const
   return TabCtrl_GetRowCount(m_hwnd);
 }
 
-int wxNotebook::SetSelection(int nPage)
+int wxNotebook::SetSelection(size_t nPage)
 {
   wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
 
@@ -319,7 +319,7 @@ int wxNotebook::SetSelection(int nPage)
   return m_nSelection;
 }
 
-bool wxNotebook::SetPageText(int nPage, const wxString& strText)
+bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
 {
   wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, wxT("notebook page out of range") );
 
@@ -330,7 +330,7 @@ bool wxNotebook::SetPageText(int nPage, const wxString& strText)
   return TabCtrl_SetItem(m_hwnd, nPage, &tcItem) != 0;
 }
 
-wxString wxNotebook::GetPageText(int nPage) const
+wxString wxNotebook::GetPageText(size_t nPage) const
 {
   wxCHECK_MSG( IS_VALID_PAGE(nPage), wxEmptyString, wxT("notebook page out of range") );
 
@@ -347,7 +347,7 @@ wxString wxNotebook::GetPageText(int nPage) const
   return str;
 }
 
-int wxNotebook::GetPageImage(int nPage) const
+int wxNotebook::GetPageImage(size_t nPage) const
 {
   wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
 
@@ -357,7 +357,7 @@ int wxNotebook::GetPageImage(int nPage) const
   return TabCtrl_GetItem(m_hwnd, nPage, &tcItem) ? tcItem.iImage : -1;
 }
 
-bool wxNotebook::SetPageImage(int nPage, int nImage)
+bool wxNotebook::SetPageImage(size_t nPage, int nImage)
 {
   wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, wxT("notebook page out of range") );
 
@@ -456,7 +456,7 @@ void wxNotebook::AdjustPageSize(wxNotebookPage *page)
 // ----------------------------------------------------------------------------
 
 // remove one page from the notebook, without deleting
-wxNotebookPage *wxNotebook::DoRemovePage(int nPage)
+wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage)
 {
     wxNotebookPage *pageRemoved = wxNotebookBase::DoRemovePage(nPage);
     if ( !pageRemoved )
@@ -510,8 +510,8 @@ wxNotebookPage *wxNotebook::DoRemovePage(int nPage)
 // remove all pages
 bool wxNotebook::DeleteAllPages()
 {
-  int nPageCount = GetPageCount();
-  int nPage;
+  size_t nPageCount = GetPageCount();
+  size_t nPage;
   for ( nPage = 0; nPage < nPageCount; nPage++ )
     delete m_pages[nPage];
 
@@ -525,7 +525,7 @@ bool wxNotebook::DeleteAllPages()
 }
 
 // same as AddPage() but does it at given position
-bool wxNotebook::InsertPage(int nPage,
+bool wxNotebook::InsertPage(size_t nPage,
                             wxNotebookPage *pPage,
                             const wxString& strText,
                             bool bSelect,