]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/notebook.cpp
Get rid of wxFontMapper in wxBase library.
[wxWidgets.git] / src / univ / notebook.cpp
index 29f728072dc22156a8af5afbbc2d2804e3c30cbe..8326d62016b091ace422445237dfdd5b8afc9f8d 100644 (file)
@@ -144,7 +144,7 @@ bool wxNotebook::Create(wxWindow *parent,
 
 wxString wxNotebook::GetPageText(size_t nPage) const
 {
-    wxCHECK_MSG( IS_VALID_PAGE(nPage), _T(""), _T("invalid notebook page") );
+    wxCHECK_MSG( IS_VALID_PAGE(nPage), wxEmptyString, _T("invalid notebook page") );
 
     return m_titles[nPage];
 }
@@ -473,7 +473,7 @@ void wxNotebook::DoDrawTab(wxDC& dc, const wxRect& rect, size_t n)
         m_imageList->Draw(image, dc, 0, 0, wxIMAGELIST_DRAW_NORMAL, true);
         dc.SelectObject(wxNullBitmap);
 #else
-        bmp = *m_imageList->GetBitmap(image);
+        bmp = m_imageList->GetBitmap(image);
 #endif
     }
 
@@ -745,8 +745,16 @@ wxRect wxNotebook::GetTabsPart() const
     const wxSize indent = GetRenderer()->GetTabIndent();
     if ( IsVertical() )
     {
-        rect.x += indent.y;
         rect.y += indent.x;
+        if ( dir == wxLEFT )
+        {
+            rect.x += indent.y;
+            rect.width -= indent.y;
+        }
+        else // wxRIGHT
+        {
+            rect.width -= indent.y;
+        }
     }
     else // horz
     {
@@ -1245,7 +1253,7 @@ void wxNotebook::ScrollLastTo(int page)
 wxSize wxNotebook::DoGetBestClientSize() const
 {
     // calculate the max page size
-    wxSize size(0, 0);
+    wxSize size;
 
     size_t count = GetPageCount();
     if ( count )