]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/notebook.cpp
moved AppendAppName() from MSW to common code; modified it to not double the trailing...
[wxWidgets.git] / src / os2 / notebook.cpp
index f79c9f0c29eeb4f7229b42615b1f3e3e72855f11..ff60f14a897643832f1c314547d28c0bf1583d4f 100644 (file)
@@ -14,7 +14,7 @@
 
 #if wxUSE_NOTEBOOK
 
-// wxWindows
+// wxWidgets
 #ifndef WX_PRECOMP
   #include "wx/app.h"
   #include "wx/dcclient.h"
@@ -158,7 +158,7 @@ WXDWORD wxNotebook::OS2GetStyle (
                                                                         ,pdwExstyle
                                                                        );
 
-    dwTabStyle |= WS_TABSTOP | BKS_SOLIDBIND | BKS_ROUNDEDTABS | BKS_TABTEXTCENTER;
+    dwTabStyle |= WS_TABSTOP | BKS_SOLIDBIND | BKS_ROUNDEDTABS | BKS_TABTEXTCENTER | BKS_TABBEDDIALOG;
 
     if (lStyle & wxNB_BOTTOM)
         dwTabStyle |= BKS_MAJORTABBOTTOM | BKS_BACKPAGESBL;
@@ -329,12 +329,14 @@ bool wxNotebook::SetPageImage (
 } // end of wxNotebook::SetPageImage
 
 void wxNotebook::SetImageList (
-  wxImageList*                      WXUNUSED(pImageList)
+  wxImageList*                      pImageList
 )
 {
-    //
-    // Does nothing under OS/2
-    //
+    // 
+    // Does not really do anything yet, but at least we need to
+    // update the base class.
+    // 
+    wxNotebookBase::SetImageList(pImageList);
 } // end of wxNotebook::SetImageList
 
 // ----------------------------------------------------------------------------
@@ -344,22 +346,7 @@ void wxNotebook::SetPageSize (
   const wxSize&                     rSize
 )
 {
-    RECTL                           vRect;
-
-    //
-    // Transform the page size into the notebook size
-    //
-    vRect.xLeft   = vRect.yTop = 0;
-    vRect.xRight  = rSize.x;
-    vRect.yBottom = rSize.y;
-
-
-    //
-    // And now set it
-    //
-    SetSize( vRect.xRight - vRect.xLeft
-            ,vRect.yBottom - vRect.yTop
-           );
+    SetSize(rSize);
 } // end of wxNotebook::SetPageSize
 
 void wxNotebook::SetPadding (
@@ -669,6 +656,9 @@ bool wxNotebook::InsertPage (
 
     if (nSelNew != -1)
         SetSelection(nSelNew);
+
+    InvalidateBestSize();
+
     return TRUE;
 } // end of wxNotebook::InsertPage
 
@@ -679,20 +669,6 @@ void wxNotebook::OnSize(
   wxSizeEvent&                      rEvent
 )
 {
-    int                             nPage;
-    int                             nCount = (int)m_pages.Count();
-
-    for (nPage = 0; nPage < nCount; nPage++)
-    {
-        if (m_nSelection == nPage)
-            m_pages[nPage]->Refresh();
-        else
-            ::WinSetWindowPos(m_pages[nPage]->GetHWND()
-                              ,NULLHANDLE
-                              ,0,0,0,0
-                              ,SWP_HIDE
-                             );
-    }
     rEvent.Skip();
 } // end of wxNotebook::OnSize