X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/716dc24570f542fd68df9edf5c54e178a7c58bdd..f45fac95d6067ed7d08b890b98e9bc6033bbb05e:/src/generic/listbkg.cpp diff --git a/src/generic/listbkg.cpp b/src/generic/listbkg.cpp index 34d726efe7..e9b4baa656 100644 --- a/src/generic/listbkg.cpp +++ b/src/generic/listbkg.cpp @@ -62,7 +62,7 @@ const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING = wxNewEventType(); const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED = wxNewEventType(); const int wxID_LISTBOOKLISTVIEW = wxNewId(); -BEGIN_EVENT_TABLE(wxListbook, wxBookCtrl) +BEGIN_EVENT_TABLE(wxListbook, wxBookCtrlBase) EVT_SIZE(wxListbook::OnSize) EVT_LIST_ITEM_SELECTED(wxID_LISTBOOKLISTVIEW, wxListbook::OnListSelected) END_EVENT_TABLE() @@ -134,7 +134,7 @@ wxListbook::Create(wxWindow *parent, #ifdef __WXMSW__ // On XP with themes enabled the GetViewRect used in GetListSize to // determine the space needed for the list view will incorrectly return - // (0,0,0,0) the first time. So send a pending event so OnSize wiull be + // (0,0,0,0) the first time. So send a pending event so OnSize will be // called again after the window is ready to go. Technically we don't // need to do this on non-XP windows, but if things are already sized // correctly then nothing changes and so there is no harm. @@ -172,7 +172,8 @@ wxRect wxListbook::GetPageRect() const { const wxSize sizeList = m_list->GetSize(); - wxRect rectPage(wxPoint(0, 0), GetClientSize()); + wxPoint pt; + wxRect rectPage(pt, GetClientSize()); switch ( GetWindowStyle() & wxLB_ALIGN_MASK ) { default: @@ -240,7 +241,7 @@ void wxListbook::OnSize(wxSizeEvent& event) #if wxUSE_LINE_IN_LISTBOOK if ( m_line ) { - wxRect rectLine(wxPoint(0, 0), sizeClient); + wxRect rectLine(sizeClient); switch ( GetWindowStyle() & wxLB_ALIGN_MASK ) { @@ -333,7 +334,7 @@ void wxListbook::SetImageList(wxImageList *imageList) { m_list->SetImageList(imageList, wxIMAGE_LIST_NORMAL); - wxBookCtrl::SetImageList(imageList); + wxBookCtrlBase::SetImageList(imageList); } // ---------------------------------------------------------------------------- @@ -392,7 +393,7 @@ wxListbook::InsertPage(size_t n, bool bSelect, int imageId) { - if ( !wxBookCtrl::InsertPage(n, page, text, bSelect, imageId) ) + if ( !wxBookCtrlBase::InsertPage(n, page, text, bSelect, imageId) ) return false; m_list->InsertItem(n, text, imageId); @@ -401,7 +402,7 @@ wxListbook::InsertPage(size_t n, // index of the selected page if ( int(n) <= m_selection ) { - // one extra page added + // one extra page added m_selection++; m_list->Select(m_selection); m_list->Focus(m_selection); @@ -428,7 +429,7 @@ wxListbook::InsertPage(size_t n, wxWindow *wxListbook::DoRemovePage(size_t page) { const int page_count = GetPageCount(); - wxWindow *win = wxBookCtrl::DoRemovePage(page); + wxWindow *win = wxBookCtrlBase::DoRemovePage(page); if ( win ) { @@ -458,7 +459,7 @@ wxWindow *wxListbook::DoRemovePage(size_t page) bool wxListbook::DeleteAllPages() { m_list->DeleteAllItems(); - return wxBookCtrl::DeleteAllPages(); + return wxBookCtrlBase::DeleteAllPages(); } // ----------------------------------------------------------------------------