]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/os2/notebook.h
Use wxGetTranslation() instead of _() in the public headers.
[wxWidgets.git] / include / wx / os2 / notebook.h
index 4adaa2c64fed766c9f7ee4b876f34ebc4bb01f64..e9df265914b50478242fcd97f5f861b88630099c 100644 (file)
@@ -1,9 +1,8 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        notebook.h
+// Name:        wx/os2/notebook.h
 // Purpose:     MSW/GTK compatible notebook (a.k.a. property sheet)
 // Author:      David Webster
 // Modified by:
-// RCS-ID:      $Id$
 // Copyright:   (c) David Webster
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -23,7 +22,7 @@
 // wxNotebook
 // ----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxNotebook : public wxNotebookBase
+class WXDLLIMPEXP_CORE wxNotebook : public wxNotebookBase
 {
 public:
     //
@@ -41,7 +40,7 @@ public:
                ,const wxPoint&  rPos = wxDefaultPosition
                ,const wxSize&   rSize = wxDefaultSize
                ,long            lStyle = 0
-               ,const wxString& rsName = "notebook"
+               ,const wxString& rsName = wxNotebookNameStr
               );
 
     bool Create( wxWindow*       pParent
@@ -49,7 +48,7 @@ public:
                 ,const wxPoint&  rPos = wxDefaultPosition
                 ,const wxSize&   rSize = wxDefaultSize
                 ,long            lStyle = 0
-                ,const wxString& rsName = "notebook"
+                ,const wxString& rsName = wxNotebookNameStr
                );
 
     //
@@ -57,27 +56,25 @@ public:
     // ---------
     // Get number of pages in the dialog
     //
-           int      GetPageCount(void) const;
+    virtual size_t GetPageCount(void) const;
 
     //
     // Set the currently selected page, return the index of the previously
-    // selected one (or -1 on error)
+    // selected one (or wxNOT_FOUND on error)
     // 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
-    //
-    inline int      GetSelection(void) const { return m_nSelection; }
+    // changes selected page without sending events
+    int ChangeSelection(size_t nPage);
 
     //
     // Set/Get the title of a page
     //
-           bool     SetPageText( int             nPage
-                                ,const wxString& sStrText
-                               );
-           wxString GetPageText(int nPage) const;
+    bool     SetPageText( size_t             nPage
+                         ,const wxString& sStrText
+                        );
+    wxString GetPageText(size_t nPage) const;
 
     //
     // Image list stuff: each page may have an image associated with it. All
@@ -92,10 +89,10 @@ public:
     //
     // Sets/returns item's image index in the current image list
     //
-           int      GetPageImage(int nPage) const;
-           bool     SetPageImage( int nPage
-                                 ,int nImage
-                                );
+    int      GetPageImage(size_t nPage) const;
+    bool     SetPageImage( size_t nPage
+                          ,int nImage
+                         );
 
     //
     // Currently it's always 1 because wxGTK doesn't support multi-row
@@ -127,19 +124,19 @@ public:
     //
            bool     AddPage( wxNotebookPage* pPage
                             ,const wxString& rsStrText
-                            ,bool            bSelect = FALSE
+                            ,bool            bSelect = false
                             ,int             nImageId = -1
                            );
 
     //
     // The same as AddPage(), but adds it at the specified position
     //
-           bool     InsertPage( int nPage
-                               ,wxNotebookPage* pPage
-                               ,const wxString& rsStrText
-                               ,bool            bSelect = FALSE
-                               ,int             nImageId = -1
-                              );
+    bool     InsertPage( size_t nPage
+                        ,wxNotebookPage* pPage
+                        ,const wxString& rsStrText
+                        ,bool            bSelect = false
+                        ,int             nImageId = -1
+                       );
 
     //
     // Windows-only at present. Also, you must use the wxNB_FIXEDWIDTH
@@ -152,7 +149,7 @@ public:
     // ---------
     //
     void OnSize(wxSizeEvent& rEvent);
-    void OnSelChange(wxNotebookEvent& rEvent);
+    void OnSelChange(wxBookCtrlEvent& rEvent);
     void OnSetFocus(wxFocusEvent& rEvent);
     void OnNavigationKey(wxNavigationKeyEvent& rEvent);
 
@@ -165,7 +162,7 @@ public:
                              ,WXWORD wPos
                              ,WXHWND hControl
                             );
-    virtual void SetConstraintSizes(bool bRecurse = TRUE);
+    virtual void SetConstraintSizes(bool bRecurse = true);
     virtual bool DoPhase(int nPhase);
 
 protected:
@@ -184,14 +181,12 @@ protected:
     //
     // Remove one page from the notebook, without deleting
     //
-    virtual wxNotebookPage* DoRemovePage(int nPage);
+    virtual wxNotebookPage* DoRemovePage(size_t nPage);
 
     //
     // Helper functions
     //
 
-    int                     m_nSelection; // The current selection (-1 if none)
-
 private:
     wxArrayLong                     m_alPageId;
     int                             m_nTabSize; // holds the largest tab size
@@ -203,4 +198,3 @@ private:
 #endif // wxUSE_NOTEBOOK
 
 #endif // _NOTEBOOK_H
-