Updated API to current state of wxWindows (int -> size_t).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -57,14 +57,14 @@ public:
|
|||||||
// ---------
|
// ---------
|
||||||
// Get number of pages in the dialog
|
// Get number of pages in the dialog
|
||||||
//
|
//
|
||||||
size_t GetPageCount(void) const;
|
virtual size_t GetPageCount(void) const;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set the currently selected page, return the index of the previously
|
// Set the currently selected page, return the index of the previously
|
||||||
// selected one (or -1 on error)
|
// selected one (or -1 on error)
|
||||||
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
|
// NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
|
||||||
//
|
//
|
||||||
int SetSelection(int nPage);
|
int SetSelection(size_t nPage);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get the currently selected page
|
// Get the currently selected page
|
||||||
@@ -74,10 +74,10 @@ public:
|
|||||||
//
|
//
|
||||||
// Set/Get the title of a page
|
// Set/Get the title of a page
|
||||||
//
|
//
|
||||||
bool SetPageText( int nPage
|
bool SetPageText( size_t nPage
|
||||||
,const wxString& sStrText
|
,const wxString& sStrText
|
||||||
);
|
);
|
||||||
wxString GetPageText(int nPage) const;
|
wxString GetPageText(size_t nPage) const;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Image list stuff: each page may have an image associated with it. All
|
// Image list stuff: each page may have an image associated with it. All
|
||||||
@@ -92,10 +92,10 @@ public:
|
|||||||
//
|
//
|
||||||
// Sets/returns item's image index in the current image list
|
// Sets/returns item's image index in the current image list
|
||||||
//
|
//
|
||||||
int GetPageImage(int nPage) const;
|
int GetPageImage(size_t nPage) const;
|
||||||
bool SetPageImage( int nPage
|
bool SetPageImage( size_t nPage
|
||||||
,int nImage
|
,int nImage
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Currently it's always 1 because wxGTK doesn't support multi-row
|
// Currently it's always 1 because wxGTK doesn't support multi-row
|
||||||
@@ -134,12 +134,12 @@ public:
|
|||||||
//
|
//
|
||||||
// The same as AddPage(), but adds it at the specified position
|
// The same as AddPage(), but adds it at the specified position
|
||||||
//
|
//
|
||||||
bool InsertPage( int nPage
|
bool InsertPage( size_t nPage
|
||||||
,wxNotebookPage* pPage
|
,wxNotebookPage* pPage
|
||||||
,const wxString& rsStrText
|
,const wxString& rsStrText
|
||||||
,bool bSelect = FALSE
|
,bool bSelect = FALSE
|
||||||
,int nImageId = -1
|
,int nImageId = -1
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH
|
// Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH
|
||||||
@@ -184,7 +184,7 @@ protected:
|
|||||||
//
|
//
|
||||||
// Remove one page from the notebook, without deleting
|
// Remove one page from the notebook, without deleting
|
||||||
//
|
//
|
||||||
virtual wxNotebookPage* DoRemovePage(int nPage);
|
virtual wxNotebookPage* DoRemovePage(size_t nPage);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Helper functions
|
// Helper functions
|
||||||
@@ -203,4 +203,3 @@ private:
|
|||||||
#endif // wxUSE_NOTEBOOK
|
#endif // wxUSE_NOTEBOOK
|
||||||
|
|
||||||
#endif // _NOTEBOOK_H
|
#endif // _NOTEBOOK_H
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
// wxWindows
|
// wxWindows
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
|
#include "wx/dcclient.h"
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#endif // WX_PRECOMP
|
#endif // WX_PRECOMP
|
||||||
@@ -208,7 +209,7 @@ int wxNotebook::GetRowCount() const
|
|||||||
} // end of wxNotebook::GetRowCount
|
} // end of wxNotebook::GetRowCount
|
||||||
|
|
||||||
int wxNotebook::SetSelection(
|
int wxNotebook::SetSelection(
|
||||||
int nPage
|
size_t nPage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
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") );
|
||||||
@@ -245,7 +246,7 @@ int wxNotebook::SetSelection(
|
|||||||
} // end of wxNotebook::SetSelection
|
} // end of wxNotebook::SetSelection
|
||||||
|
|
||||||
bool wxNotebook::SetPageText(
|
bool wxNotebook::SetPageText(
|
||||||
int nPage
|
size_t nPage
|
||||||
, const wxString& rsStrText
|
, const wxString& rsStrText
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -262,7 +263,7 @@ bool wxNotebook::SetPageText(
|
|||||||
} // end of wxNotebook::SetPageText
|
} // end of wxNotebook::SetPageText
|
||||||
|
|
||||||
wxString wxNotebook::GetPageText (
|
wxString wxNotebook::GetPageText (
|
||||||
int nPage
|
size_t nPage
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
BOOKTEXT vBookText;
|
BOOKTEXT vBookText;
|
||||||
@@ -314,7 +315,7 @@ wxString wxNotebook::GetPageText (
|
|||||||
} // end of wxNotebook::GetPageText
|
} // end of wxNotebook::GetPageText
|
||||||
|
|
||||||
int wxNotebook::GetPageImage (
|
int wxNotebook::GetPageImage (
|
||||||
int nPage
|
size_t nPage
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
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") );
|
||||||
@@ -326,7 +327,7 @@ int wxNotebook::GetPageImage (
|
|||||||
} // end of wxNotebook::GetPageImage
|
} // end of wxNotebook::GetPageImage
|
||||||
|
|
||||||
bool wxNotebook::SetPageImage (
|
bool wxNotebook::SetPageImage (
|
||||||
int nPage
|
size_t nPage
|
||||||
, int nImage
|
, int nImage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -406,7 +407,7 @@ void wxNotebook::SetTabSize (
|
|||||||
// Remove one page from the notebook, without deleting
|
// Remove one page from the notebook, without deleting
|
||||||
//
|
//
|
||||||
wxNotebookPage* wxNotebook::DoRemovePage (
|
wxNotebookPage* wxNotebook::DoRemovePage (
|
||||||
int nPage
|
size_t nPage
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
wxNotebookPage* pPageRemoved = wxNotebookBase::DoRemovePage(nPage);
|
wxNotebookPage* pPageRemoved = wxNotebookBase::DoRemovePage(nPage);
|
||||||
@@ -518,7 +519,7 @@ bool wxNotebook::AddPage (
|
|||||||
// Same as AddPage() but does it at given position
|
// Same as AddPage() but does it at given position
|
||||||
//
|
//
|
||||||
bool wxNotebook::InsertPage (
|
bool wxNotebook::InsertPage (
|
||||||
int nPage
|
size_t nPage
|
||||||
, wxNotebookPage* pPage
|
, wxNotebookPage* pPage
|
||||||
, const wxString& rsStrText
|
, const wxString& rsStrText
|
||||||
, bool bSelect
|
, bool bSelect
|
||||||
|
Reference in New Issue
Block a user