]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/notebook.cpp
wx.ProgressDialog.Update now returns two values.
[wxWidgets.git] / src / generic / notebook.cpp
index 07eb75b0fcdc6d5096cdfe6e09cf568be7b1d33b..c5e67adbe2749920dca00367a79dcade82248184 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __VMS
-#pragma message disable unscomzer
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
 #endif
 
-#ifndef __WXPALMOS__
+#if wxUSE_NOTEBOOK
+
+#include  "wx/notebook.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/string.h"
+    #include "wx/log.h"
+#endif
 
 
-#include  "wx/string.h"
-#include  "wx/log.h"
 #include  "wx/settings.h"
 #include  "wx/generic/imaglist.h"
 #include  "wx/settings.h"
 #include  "wx/generic/imaglist.h"
-#include  "wx/notebook.h"
 #include  "wx/dcclient.h"
 #include  "wx/generic/tabg.h"
 
 #include  "wx/dcclient.h"
 #include  "wx/generic/tabg.h"
 
@@ -77,16 +77,16 @@ class WXDLLEXPORT wxNotebookTabView: public wxTabView
 {
 DECLARE_DYNAMIC_CLASS(wxNotebookTabView)
 public:
 {
 DECLARE_DYNAMIC_CLASS(wxNotebookTabView)
 public:
-  wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
-  ~wxNotebookTabView(void);
+    wxNotebookTabView(wxNotebook* notebook, long style = wxTAB_STYLE_DRAW_BOX | wxTAB_STYLE_COLOUR_INTERIOR);
+    ~wxNotebookTabView(void);
 
 
-  // Called when a tab is activated
-  virtual void OnTabActivate(int activateId, int deactivateId);
-  // Allows vetoing
-  virtual bool OnTabPreActivate(int activateId, int deactivateId);
+    // Called when a tab is activated
+    virtual void OnTabActivate(int activateId, int deactivateId);
+    // Allows vetoing
+    virtual bool OnTabPreActivate(int activateId, int deactivateId);
 
 protected:
 
 protected:
-   wxNotebook*      m_notebook;
+    wxNotebook*      m_notebook;
 };
 
 // ----------------------------------------------------------------------------
 };
 
 // ----------------------------------------------------------------------------
@@ -207,7 +207,7 @@ wxString wxNotebook::GetPageText(size_t nPage) const
         return wxEmptyString;
 }
 
         return wxEmptyString;
 }
 
-int wxNotebook::GetPageImage(size_t nPage) const
+int wxNotebook::GetPageImage(size_t WXUNUSED_UNLESS_DEBUG(nPage)) const
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
@@ -215,7 +215,8 @@ int wxNotebook::GetPageImage(size_t nPage) const
     return 0;
 }
 
     return 0;
 }
 
-bool wxNotebook::SetPageImage(size_t nPage, int WXUNUSED(nImage))
+bool wxNotebook::SetPageImage(size_t WXUNUSED_UNLESS_DEBUG(nPage),
+                              int WXUNUSED(nImage))
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
 {
     wxASSERT( IS_VALID_PAGE(nPage) );
 
@@ -265,17 +266,17 @@ bool wxNotebook::DeletePage(size_t nPage)
 
     if (m_pages.GetCount() == 0)
     {
 
     if (m_pages.GetCount() == 0)
     {
-      m_nSelection = -1;
-      m_tabView->SetTabSelection(-1, false);
+        m_nSelection = -1;
+        m_tabView->SetTabSelection(-1, false);
     }
     else if (m_nSelection > -1)
     {
     }
     else if (m_nSelection > -1)
     {
-      m_nSelection = -1;
+        m_nSelection = -1;
 
 
-      m_tabView->SetTabSelection((int) (long) GetPage(0), false);
+        m_tabView->SetTabSelection((int) (long) GetPage(0), false);
 
 
-      if (m_nSelection != 0)
-        ChangePage(-1, 0);
+        if (m_nSelection != 0)
+            ChangePage(-1, 0);
     }
 
     RefreshLayout(false);
     }
 
     RefreshLayout(false);
@@ -715,4 +716,4 @@ bool wxNotebookTabView::OnTabPreActivate(int activateId, int deactivateId)
   return retval;
 }
 
   return retval;
 }
 
-#endif // __WXPALMOS__
+#endif // wxUSE_NOTEBOOK