Source cleaning.
authorWłodzimierz Skiba <abx@abx.art.pl>
Wed, 26 Oct 2005 12:44:28 +0000 (12:44 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Wed, 26 Oct 2005 12:44:28 +0000 (12:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/notebmac.cpp
src/mac/classic/notebmac.cpp
src/os2/notebook.cpp
src/palmos/notebook.cpp
src/univ/notebook.cpp
utils/configtool/src/settingsdialog.cpp

index c8b4969a43fc52dbd43e8f79fc3f1b7e19b2d207..27f5e30b912b6c0aa78aed5b982bec82c56d3c72 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        notebook.cpp
+// Name:        src/mac/carbon/notebmac.cpp
 // Purpose:     implementation of wxNotebook
 // Author:      Stefan Csomor
 // Modified by:
@@ -43,7 +43,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
 
 BEGIN_EVENT_TABLE(wxNotebook, wxControl)
-    EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange)
+    EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange)
 
     EVT_SIZE(wxNotebook::OnSize)
     EVT_SET_FOCUS(wxNotebook::OnSetFocus)
@@ -94,8 +94,8 @@ bool wxNotebook::Create(wxWindow *parent,
                         long style,
                         const wxString& name)
 {
-    m_macIsUserPane = FALSE ;
-    
+    m_macIsUserPane = false ;
+
     if ( !wxNotebookBase::Create(parent, id, pos, size, style, name) )
         return false;
 
@@ -107,31 +107,31 @@ bool wxNotebook::Create(wxWindow *parent,
         bounds.bottom = bounds.top + 100 ;
 
     UInt16 tabstyle = kControlTabDirectionNorth ;
-    if ( HasFlag(wxNB_LEFT) )
+    if ( HasFlag(wxBK_LEFT) )
         tabstyle = kControlTabDirectionWest ;
-    else if ( HasFlag( wxNB_RIGHT ) )
+    else if ( HasFlag( wxBK_RIGHT ) )
         tabstyle = kControlTabDirectionEast ;
-    else if ( HasFlag( wxNB_BOTTOM ) )
+    else if ( HasFlag( wxBK_BOTTOM ) )
         tabstyle = kControlTabDirectionSouth ;
-        
+
     ControlTabSize tabsize = kControlTabSizeLarge ;
     if ( GetWindowVariant() == wxWINDOW_VARIANT_SMALL )
         tabsize = kControlTabSizeSmall ;
     else if ( GetWindowVariant() == wxWINDOW_VARIANT_MINI )
     {
         if (UMAGetSystemVersion() >= 0x1030 )
-            tabsize = 3 ; 
+            tabsize = 3 ;
         else
-            tabsize = kControlSizeSmall; 
+            tabsize = kControlSizeSmall;
     }
 
     m_peer = new wxMacControl(this) ;
     verify_noerr ( CreateTabsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
-     tabsize , tabstyle, 0, NULL,  m_peer->GetControlRefAddr() ) );
-    
-    
+                   tabsize , tabstyle, 0, NULL,  m_peer->GetControlRefAddr() ) );
+
+
     MacPostControlCreate(pos,size) ;
-    return TRUE ;
+    return true ;
 }
 
 // dtor
@@ -165,7 +165,7 @@ wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
 
 int wxNotebook::SetSelection(size_t nPage)
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
 
     if ( int(nPage) != m_nSelection )
     {
@@ -207,16 +207,16 @@ wxString wxNotebook::GetPageText(size_t nPage) const
 
 int wxNotebook::GetPageImage(size_t nPage) const
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, _T("invalid notebook page") );
 
     return m_images[nPage];
 }
 
 bool wxNotebook::SetPageImage(size_t nPage, int nImage)
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), false, _T("invalid notebook page") );
 
-    wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), FALSE,
+    wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), false,
         _T("invalid image index in SetPageImage()") );
 
     if ( nImage != m_images[nPage] )
@@ -229,7 +229,7 @@ bool wxNotebook::SetPageImage(size_t nPage, int nImage)
         MacSetupTabs() ;
     }
 
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
@@ -262,7 +262,7 @@ bool wxNotebook::DeleteAllPages()
     MacSetupTabs();
     m_nSelection = -1 ;
     InvalidateBestSize();
-    return TRUE;
+    return true;
 }
 
 
@@ -301,13 +301,13 @@ bool wxNotebook::InsertPage(size_t nPage,
     // if the inserted page is before the selected one, we must update the
     // index of the selected page
 
-    if ( int(nPage) <= m_nSelection ) 
+    if ( int(nPage) <= m_nSelection )
     {
         m_nSelection++;
         // while this still is the same page showing, we need to update the tabs
         m_peer->SetValue( m_nSelection + 1 ) ;
     }
-    
+
     // some page should be selected: either this one or the first one if there
     // is still no selection
     int selNew = -1;
@@ -480,13 +480,13 @@ void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
 
 void wxNotebook::SetConstraintSizes(bool WXUNUSED(recurse))
 {
-  // don't set the sizes of the pages - their correct size is not yet known
-  wxControl::SetConstraintSizes(FALSE);
+    // don't set the sizes of the pages - their correct size is not yet known
+    wxControl::SetConstraintSizes(false);
 }
 
 bool wxNotebook::DoPhase(int WXUNUSED(nPhase))
 {
-  return TRUE;
+    return true;
 }
 
 #endif // wxUSE_CONSTRAINTS
@@ -503,26 +503,26 @@ void wxNotebook::Command(wxCommandEvent& event)
 // hide the currently active panel and show the new one
 void wxNotebook::ChangePage(int nOldSel, int nSel)
 {
-    if ( nOldSel != -1 ) 
+    if ( nOldSel != -1 )
     {
-        m_pages[nOldSel]->Show(FALSE);
+        m_pages[nOldSel]->Show(false);
     }
 
     if ( nSel != -1 )
     {
         wxNotebookPage *pPage = m_pages[nSel];
-        pPage->Show(TRUE);
+        pPage->Show(true);
         pPage->SetFocus();
     }
-    
+
     m_nSelection = nSel;
     m_peer->SetValue( m_nSelection + 1 ) ;
 }
 
-wxInt32 wxNotebook::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF WXUNUSED(event) ) 
+wxInt32 wxNotebook::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF WXUNUSED(event) )
 {
     OSStatus status = eventNotHandledErr ;
-    
+
     SInt32 newSel = m_peer->GetValue() - 1 ;
     if ( newSel != m_nSelection )
     {
@@ -549,4 +549,3 @@ wxInt32 wxNotebook::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
 }
 
 #endif
-
index 54741952c702a8f3e2da50d807aac46a31a00214..7edae0f4e6dcee0c872315b1973017213288276c 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        notebook.cpp
+// Name:        src/mac/classic/notebmac.cpp
 // Purpose:     implementation of wxNotebook
 // Author:      Stefan Csomor
 // Modified by:
@@ -39,7 +39,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
 
 BEGIN_EVENT_TABLE(wxNotebook, wxControl)
-    EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange)
+    EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange)
     EVT_MOUSE_EVENTS(wxNotebook::OnMouse)
 
     EVT_SIZE(wxNotebook::OnSize)
@@ -92,10 +92,10 @@ static inline int wxMacTabMargin(long nbStyle, long side)
     }
 
     // If the style matches the side asked for then return the tab margin,
-    // but we have to special case wxNB_TOP since it is zero...
-    if ( side == wxNB_TOP)
+    // but we have to special case wxBK_TOP since it is zero...
+    if ( side == wxBK_TOP)
     {
-        if ( nbStyle != 0 && nbStyle & (wxNB_LEFT|wxNB_RIGHT|wxNB_BOTTOM))
+        if ( nbStyle != 0 && nbStyle & (wxBK_LEFT|wxBK_RIGHT|wxBK_BOTTOM))
         {
             return otherMargin;
         }
@@ -112,22 +112,22 @@ static inline int wxMacTabMargin(long nbStyle, long side)
 
 static inline int wxMacTabLeftMargin(long style)
 {
-    return wxMacTabMargin(style, wxNB_LEFT);
+    return wxMacTabMargin(style, wxBK_LEFT);
 }
 
 static inline int wxMacTabTopMargin(long style)
 {
-    return wxMacTabMargin(style, wxNB_TOP);
+    return wxMacTabMargin(style, wxBK_TOP);
 }
 
 static inline int wxMacTabRightMargin(long style)
 {
-    return wxMacTabMargin(style, wxNB_RIGHT);
+    return wxMacTabMargin(style, wxBK_RIGHT);
 }
 
 static inline int wxMacTabBottomMargin(long style)
 {
-    return wxMacTabMargin(style, wxNB_BOTTOM);
+    return wxMacTabMargin(style, wxBK_BOTTOM);
 }
 
 // ----------------------------------------------------------------------------
@@ -183,11 +183,11 @@ bool wxNotebook::Create(wxWindow *parent,
     MacPreControlCreate( parent , id ,  wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ;
 
     int tabstyle = kControlTabSmallNorthProc ;
-    if ( HasFlag(wxNB_LEFT) )
+    if ( HasFlag(wxBK_LEFT) )
         tabstyle = kControlTabSmallWestProc ;
-    else if ( HasFlag( wxNB_RIGHT ) )
+    else if ( HasFlag( wxBK_RIGHT ) )
         tabstyle = kControlTabSmallEastProc ;
-    else if ( HasFlag( wxNB_BOTTOM ) )
+    else if ( HasFlag( wxBK_BOTTOM ) )
         tabstyle = kControlTabSmallSouthProc ;
 
 
@@ -195,7 +195,7 @@ bool wxNotebook::Create(wxWindow *parent,
         tabstyle , (long) this ) ;
 
     MacPostControlCreate() ;
-    return TRUE ;
+    return true ;
 }
 
 // dtor
@@ -225,9 +225,9 @@ void wxNotebook::SetPageSize(const wxSize& size)
 wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
 {
     wxSize sizeTotal = sizePage;
-    sizeTotal.x += 2 * m_macHorizontalBorder + wxMacTabLeftMargin(GetWindowStyle()) + 
+    sizeTotal.x += 2 * m_macHorizontalBorder + wxMacTabLeftMargin(GetWindowStyle()) +
         wxMacTabRightMargin(GetWindowStyle()) ;
-    sizeTotal.y += 2 * m_macVerticalBorder + wxMacTabTopMargin(GetWindowStyle()) + 
+    sizeTotal.y += 2 * m_macVerticalBorder + wxMacTabTopMargin(GetWindowStyle()) +
         wxMacTabBottomMargin(GetWindowStyle()) ;
 
     return sizeTotal;
@@ -263,7 +263,7 @@ wxSize wxNotebook::DoGetBestSize() const
 
 int wxNotebook::SetSelection(size_t nPage)
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
 
     if ( int(nPage) != m_nSelection )
     {
@@ -305,16 +305,16 @@ wxString wxNotebook::GetPageText(size_t nPage) const
 
 int wxNotebook::GetPageImage(size_t nPage) const
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, _T("invalid notebook page") );
 
     return m_images[nPage];
 }
 
 bool wxNotebook::SetPageImage(size_t nPage, int nImage)
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), false, _T("invalid notebook page") );
 
-    wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), FALSE,
+    wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), false,
         _T("invalid image index in SetPageImage()") );
 
     if ( nImage != m_images[nPage] )
@@ -327,7 +327,7 @@ bool wxNotebook::SetPageImage(size_t nPage, int nImage)
         MacSetupTabs() ;
     }
 
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
@@ -360,7 +360,7 @@ bool wxNotebook::DeleteAllPages()
     MacSetupTabs();
     m_nSelection = -1 ;
     InvalidateBestSize();
-    return TRUE;
+    return true;
 }
 
 
@@ -399,13 +399,13 @@ bool wxNotebook::InsertPage(size_t nPage,
     // if the inserted page is before the selected one, we must update the
     // index of the selected page
 
-    if ( int(nPage) <= m_nSelection ) 
+    if ( int(nPage) <= m_nSelection )
     {
         m_nSelection++;
         // while this still is the same page showing, we need to update the tabs
         SetControl32BitValue( (ControlHandle) m_macControl , m_nSelection + 1 ) ;
     }
-    
+
     // some page should be selected: either this one or the first one if there
     // is still no selection
     int selNew = -1;
@@ -476,10 +476,10 @@ void wxNotebook::MacSetupTabs()
                     sizeof( info ), (Ptr)&info );
                 wxASSERT_MSG( err == noErr , wxT("Error when setting icon on tab") ) ;
                 if ( UMAGetSystemVersion() < 0x1030 )
-                {                      
-                       UnregisterIconRef( 'WXNG' , (OSType) 1 ) ;
+                {
+                    UnregisterIconRef( 'WXNG' , (OSType) 1 ) ;
                 }
-       
+
                 ReleaseIconRef( iconRef ) ;
                 DisposeHandle( (Handle) iconFamily ) ;
             }
@@ -496,12 +496,12 @@ wxRect wxNotebook::GetPageRect() const
     // fit the notebook page to the tab control's display area
     int w, h;
     GetSize(&w, &h);
-    
-    return wxRect( 
-        wxMacTabLeftMargin(GetWindowStyle()) + m_macHorizontalBorder, 
+
+    return wxRect(
+        wxMacTabLeftMargin(GetWindowStyle()) + m_macHorizontalBorder,
         wxMacTabTopMargin(GetWindowStyle()) + m_macVerticalBorder,
         w - wxMacTabLeftMargin(GetWindowStyle()) - wxMacTabRightMargin(GetWindowStyle()) - 2*m_macHorizontalBorder,
-        h - wxMacTabTopMargin(GetWindowStyle()) - wxMacTabBottomMargin(GetWindowStyle()) - 2*m_macVerticalBorder);    
+        h - wxMacTabTopMargin(GetWindowStyle()) - wxMacTabBottomMargin(GetWindowStyle()) - 2*m_macVerticalBorder);
 }
 // ----------------------------------------------------------------------------
 // wxNotebook callbacks
@@ -610,13 +610,13 @@ void wxNotebook::OnNavigationKey(wxNavigationKeyEvent& event)
 
 void wxNotebook::SetConstraintSizes(bool WXUNUSED(recurse))
 {
-  // don't set the sizes of the pages - their correct size is not yet known
-  wxControl::SetConstraintSizes(FALSE);
+    // don't set the sizes of the pages - their correct size is not yet known
+    wxControl::SetConstraintSizes(false);
 }
 
 bool wxNotebook::DoPhase(int WXUNUSED(nPhase))
 {
-  return TRUE;
+    return true;
 }
 
 #endif // wxUSE_CONSTRAINTS
@@ -633,18 +633,18 @@ void wxNotebook::Command(wxCommandEvent& event)
 // hide the currently active panel and show the new one
 void wxNotebook::ChangePage(int nOldSel, int nSel)
 {
-    if ( nOldSel != -1 ) 
+    if ( nOldSel != -1 )
     {
-        m_pages[nOldSel]->Show(FALSE);
+        m_pages[nOldSel]->Show(false);
     }
 
     if ( nSel != -1 )
     {
         wxNotebookPage *pPage = m_pages[nSel];
-        pPage->Show(TRUE);
+        pPage->Show(true);
         pPage->SetFocus();
     }
-    
+
     m_nSelection = nSel;
     SetControl32BitValue( (ControlHandle) m_macControl , m_nSelection + 1 ) ;
 }
@@ -725,4 +725,3 @@ void wxNotebook::MacHandleControlClick( WXWidget control , wxInt16 controlpart ,
     ProcessEvent(event);
 #endif
 }
-
index 89f0f9d6fd3513bf532393a4ffbefc5b8db48587..35513ca1e97dd1c29deb68ee79e271fee34da029 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        notebook.cpp
+// Name:        src/os2/notebook.cpp
 // Purpose:     implementation of wxNotebook
 // Author:      David Webster
 // Modified by:
@@ -56,7 +56,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
 
 BEGIN_EVENT_TABLE(wxNotebook, wxControl)
-    EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange)
+    EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange)
     EVT_SIZE(wxNotebook::OnSize)
     EVT_SET_FOCUS(wxNotebook::OnSetFocus)
     EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
@@ -162,11 +162,11 @@ WXDWORD wxNotebook::OS2GetStyle (
 
     dwTabStyle |= WS_TABSTOP | BKS_SOLIDBIND | BKS_ROUNDEDTABS | BKS_TABTEXTCENTER | BKS_TABBEDDIALOG;
 
-    if (lStyle & wxNB_BOTTOM)
+    if (lStyle & wxBK_BOTTOM)
         dwTabStyle |= BKS_MAJORTABBOTTOM | BKS_BACKPAGESBL;
-    else if (lStyle & wxNB_RIGHT)
+    else if (lStyle & wxBK_RIGHT)
         dwTabStyle |= BKS_MAJORTABRIGHT | BKS_BACKPAGESBR;
-    else if (lStyle & wxNB_LEFT)
+    else if (lStyle & wxBK_LEFT)
         dwTabStyle |= BKS_MAJORTABLEFT | BKS_BACKPAGESTL;
     else // default to top
         dwTabStyle |= BKS_MAJORTABTOP | BKS_BACKPAGESTR;
@@ -209,7 +209,7 @@ int wxNotebook::GetRowCount() const
 
 int wxNotebook::SetSelection( size_t nPage )
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
 
     if (nPage != (size_t)m_nSelection)
     {
@@ -243,7 +243,7 @@ int wxNotebook::SetSelection( size_t nPage )
 bool wxNotebook::SetPageText( size_t nPage,
                               const wxString& rsStrText )
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, wxT("notebook page out of range") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("notebook page out of range") );
     return (bool)::WinSendMsg( m_hWnd
                               ,BKM_SETTABTEXT
                               ,MPFROMLONG((ULONG)m_alPageId[nPage])
@@ -258,7 +258,7 @@ wxString wxNotebook::GetPageText ( size_t nPage ) const
     wxString                        sStr;
     ULONG                           ulRc;
 
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxT(""), wxT("notebook page out of range") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxEmptyString, wxT("notebook page out of range") );
 
     memset(&vBookText, '\0', sizeof(BOOKTEXT));
     vBookText.textLen = 0; // This will get the length
@@ -300,7 +300,7 @@ wxString wxNotebook::GetPageText ( size_t nPage ) const
 
 int wxNotebook::GetPageImage ( size_t nPage ) const
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, wxT("notebook page out of range") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
 
     //
     // For OS/2 just return the page
@@ -489,7 +489,7 @@ bool wxNotebook::InsertPage ( size_t          nPage,
     ULONG                           ulApiPage;
 
     wxASSERT( pPage != NULL );
-    wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), FALSE );
+    wxCHECK( IS_VALID_PAGE(nPage) || nPage == GetPageCount(), false );
 
     //
     // Under OS/2 we can only insert FIRST, LAST, NEXT or PREV.  Requires
@@ -515,7 +515,7 @@ bool wxNotebook::InsertPage ( size_t          nPage,
 
             vError = ::WinGetLastError(vHabmain);
             sError = wxPMErrorToStr(vError);
-            return FALSE;
+            return false;
         }
         m_alPageId.Insert((long)ulApiPage, nPage);
     }
@@ -533,7 +533,7 @@ bool wxNotebook::InsertPage ( size_t          nPage,
 
             vError = ::WinGetLastError(vHabmain);
             sError = wxPMErrorToStr(vError);
-            return FALSE;
+            return false;
         }
         m_alPageId.Insert((long)ulApiPage, nPage);
     }
@@ -548,7 +548,7 @@ bool wxNotebook::InsertPage ( size_t          nPage,
                           ,MPFROMLONG((ULONG)m_alPageId[nPage])
                           ,MPFROMHWND(pPage->GetHWND())
                          ))
-            return FALSE;
+            return false;
     }
     //
     // If the inserted page is before the selected one, we must update the
@@ -600,7 +600,7 @@ bool wxNotebook::InsertPage ( size_t          nPage,
         if (!SetPageText( nPage
                          ,rsStrText
                         ))
-            return FALSE;
+            return false;
     }
 
     //
@@ -611,7 +611,7 @@ bool wxNotebook::InsertPage ( size_t          nPage,
         if (!SetPageImage( nPage
                           ,nImageId
                          ))
-            return FALSE;
+            return false;
     }
 
     if (pPage)
@@ -619,7 +619,7 @@ bool wxNotebook::InsertPage ( size_t          nPage,
         //
         // Don't show pages by default (we'll need to adjust their size first)
         //
-        HWND                        hWnd = GetWinHwnd(pPage);
+        HWND hWnd = GetWinHwnd(pPage);
 
         WinSetWindowULong( hWnd
                           ,QWL_STYLE
@@ -631,14 +631,14 @@ bool wxNotebook::InsertPage ( size_t          nPage,
         //
         // This updates internal flag too - otherwise it will get out of sync
         //
-        pPage->Show(FALSE);
+        pPage->Show(false);
     }
 
     //
     // Some page should be selected: either this one or the first one if there is
     // still no selection
     //
-    int                             nSelNew = -1;
+    int nSelNew = -1;
 
     if (bSelect)
         nSelNew = nPage;
@@ -650,7 +650,7 @@ bool wxNotebook::InsertPage ( size_t          nPage,
 
     InvalidateBestSize();
 
-    return TRUE;
+    return true;
 } // end of wxNotebook::InsertPage
 
 // ----------------------------------------------------------------------------
@@ -672,16 +672,16 @@ void wxNotebook::OnSelChange (
     //
     if (rEvent.GetEventObject() == this)
     {
-        int                         nPageCount = GetPageCount();
-        int                         nSel;
-        ULONG                       ulOS2Sel = (ULONG)rEvent.GetOldSelection();
-        bool                        bFound = FALSE;
+        int   nPageCount = GetPageCount();
+        int   nSel;
+        ULONG ulOS2Sel = (ULONG)rEvent.GetOldSelection();
+        bool  bFound = false;
 
         for (nSel = 0; nSel < nPageCount; nSel++)
         {
             if (ulOS2Sel == (ULONG)m_alPageId[nSel])
             {
-                bFound = TRUE;
+                bFound = true;
                 break;
             }
         }
@@ -689,17 +689,17 @@ void wxNotebook::OnSelChange (
         if (!bFound)
             return;
 
-        m_pages[nSel]->Show(FALSE);
+        m_pages[nSel]->Show(false);
 
         ulOS2Sel = (ULONG)rEvent.GetSelection();
 
-        bFound = FALSE;
+        bFound = false;
 
         for (nSel = 0; nSel < nPageCount; nSel++)
         {
             if (ulOS2Sel == (ULONG)m_alPageId[nSel])
             {
-                bFound = TRUE;
+                bFound = true;
                 break;
             }
         }
@@ -709,7 +709,7 @@ void wxNotebook::OnSelChange (
 
         wxNotebookPage*         pPage = m_pages[nSel];
 
-        pPage->Show(TRUE);
+        pPage->Show(true);
         m_nSelection = nSel;
     }
 
@@ -816,21 +816,17 @@ void wxNotebook::OnNavigationKey (
 //
 // Override these 2 functions to do nothing: everything is done in OnSize
 //
-void wxNotebook::SetConstraintSizes(
-  bool                              WXUNUSED(bRecurse)
-)
+void wxNotebook::SetConstraintSizes( bool WXUNUSED(bRecurse) )
 {
     //
     // Don't set the sizes of the pages - their correct size is not yet known
     //
-    wxControl::SetConstraintSizes(FALSE);
+    wxControl::SetConstraintSizes(false);
 } // end of wxNotebook::SetConstraintSizes
 
-bool wxNotebook::DoPhase (
-  int                               WXUNUSED(nPhase)
-)
+bool wxNotebook::DoPhase ( int WXUNUSED(nPhase) )
 {
-    return TRUE;
+    return true;
 } // end of wxNotebook::DoPhase
 
 // ----------------------------------------------------------------------------
@@ -846,7 +842,7 @@ bool wxNotebook::OS2OnScroll ( int    nOrientation,
     // up-down control
     //
     if (wControl)
-        return FALSE;
+        return false;
     return wxNotebookBase::OS2OnScroll( nOrientation
                                        ,wSBCode
                                        ,wPos
index 9f61c831025bde6059669f78f2d4c5d5b371d982..05a32d9863e52a47248f864bceaef29ed1da4f8d 100644 (file)
@@ -42,7 +42,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
 
 BEGIN_EVENT_TABLE(wxNotebook, wxControl)
-    EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange)
+    EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange)
 
     EVT_SIZE(wxNotebook::OnSize)
 
@@ -81,9 +81,9 @@ wxBEGIN_FLAGS( wxNotebookStyle )
     wxFLAGS_MEMBER(wxHSCROLL)
 
     wxFLAGS_MEMBER(wxNB_FIXEDWIDTH)
-    wxFLAGS_MEMBER(wxNB_LEFT)
-    wxFLAGS_MEMBER(wxNB_RIGHT)
-    wxFLAGS_MEMBER(wxNB_BOTTOM)
+    wxFLAGS_MEMBER(wxBK_LEFT)
+    wxFLAGS_MEMBER(wxBK_RIGHT)
+    wxFLAGS_MEMBER(wxBK_BOTTOM)
 
 wxEND_FLAGS( wxNotebookStyle )
 
index 457ef098d08621188509289b404768e2c2347937..201b435eff727af03d29cdebfd36043439d8e213 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        univ/notebook.cpp
+// Name:        src/univ/notebook.cpp
 // Purpose:     wxNotebook implementation
 // Author:      Vadim Zeitlin
 // Modified by:
@@ -170,7 +170,7 @@ bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
 
 int wxNotebook::GetPageImage(size_t nPage) const
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, _T("invalid notebook page") );
 
     return m_images[nPage];
 }
@@ -209,7 +209,7 @@ wxNotebook::~wxNotebook()
 
 int wxNotebook::SetSelection(size_t nPage)
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("invalid notebook page") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, _T("invalid notebook page") );
 
     if ( (size_t)nPage == m_sel )
     {
@@ -654,14 +654,14 @@ bool wxNotebook::IsVertical() const
 wxDirection wxNotebook::GetTabOrientation() const
 {
     long style = GetWindowStyle();
-    if ( style & wxNB_BOTTOM )
+    if ( style & wxBK_BOTTOM )
         return wxBOTTOM;
-    else if ( style & wxNB_RIGHT )
+    else if ( style & wxBK_RIGHT )
         return wxRIGHT;
-    else if ( style & wxNB_LEFT )
+    else if ( style & wxBK_LEFT )
         return wxLEFT;
 
-    // wxNB_TOP == 0 so we don't have to test for it
+    // wxBK_TOP == 0 so we don't have to test for it
     return wxTOP;
 }
 
@@ -1427,4 +1427,3 @@ void wxStdNotebookInputHandler::HandleFocusChange(wxInputConsumer *consumer)
 }
 
 #endif // wxUSE_NOTEBOOK
-
index 59d9e28e5415439b58b9c8b376fb88e03697d1e3..d379dcc85e36e4c49e7a23b9515ac75f82ff04cc 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        settingsdialog.cpp
+// Name:        utils/configtool/src/settingsdialog.cpp
 // Purpose:     Settings dialog
 // Author:      Julian Smart
 // Modified by:
@@ -88,7 +88,7 @@ void ctSettingsDialog::CreateControls()
     wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
     item1->SetSizer(item2);
 
-    m_notebook = new wxNotebook(item1, wxID_ANY, wxDefaultPosition, wxSize(200, 200), wxNB_TOP);
+    m_notebook = new wxNotebook(item1, wxID_ANY, wxDefaultPosition, wxSize(200, 200), wxBK_TOP);
     ctGeneralSettingsDialog* item4 = new ctGeneralSettingsDialog(m_notebook, ID_GENERAL_SETTINGS_DIALOG, wxDefaultPosition, wxSize(100, 80), 0);
     m_notebook->AddPage(item4, _("General"));
     ctLocationSettingsDialog* item11 = new ctLocationSettingsDialog(m_notebook, ID_LOCATION_SETTINGS_DIALOG, wxDefaultPosition, wxSize(100, 80), 0);