No changes, just remove redundant GetControllerSize() definitions.
For some reasons wxBookCtrlBase::GetControllerSize() was redefined in several derived classes even though it did exactly the same thing in all of them. Leave only the base class version and remove the other ones. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -137,6 +137,9 @@ public:
|
|||||||
// resize the notebook so that all pages will have the specified size
|
// resize the notebook so that all pages will have the specified size
|
||||||
virtual void SetPageSize(const wxSize& size);
|
virtual void SetPageSize(const wxSize& size);
|
||||||
|
|
||||||
|
// return the size of the area needed to accommodate the controller
|
||||||
|
wxSize GetControllerSize() const;
|
||||||
|
|
||||||
// calculate the size of the control from the size of its page
|
// calculate the size of the control from the size of its page
|
||||||
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const = 0;
|
virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const = 0;
|
||||||
|
|
||||||
@@ -312,7 +315,6 @@ protected:
|
|||||||
virtual wxRect GetPageRect() const;
|
virtual wxRect GetPageRect() const;
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
virtual wxSize GetControllerSize() const;
|
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
|
||||||
// controller buddy if available, NULL otherwise (usually for native book controls like wxNotebook)
|
// controller buddy if available, NULL otherwise (usually for native book controls like wxNotebook)
|
||||||
|
@@ -91,9 +91,6 @@ protected:
|
|||||||
|
|
||||||
virtual wxWindow *DoRemovePage(size_t page);
|
virtual wxWindow *DoRemovePage(size_t page);
|
||||||
|
|
||||||
// get the size which the choice control should have
|
|
||||||
virtual wxSize GetControllerSize() const;
|
|
||||||
|
|
||||||
void UpdateSelectedPage(size_t newsel)
|
void UpdateSelectedPage(size_t newsel)
|
||||||
{
|
{
|
||||||
m_selection = static_cast<int>(newsel);
|
m_selection = static_cast<int>(newsel);
|
||||||
|
@@ -89,9 +89,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual wxWindow *DoRemovePage(size_t page);
|
virtual wxWindow *DoRemovePage(size_t page);
|
||||||
|
|
||||||
// get the size which the list control should have
|
|
||||||
virtual wxSize GetControllerSize() const;
|
|
||||||
|
|
||||||
void UpdateSelectedPage(size_t newsel);
|
void UpdateSelectedPage(size_t newsel);
|
||||||
|
|
||||||
wxBookCtrlEvent* CreatePageChangingEvent() const;
|
wxBookCtrlEvent* CreatePageChangingEvent() const;
|
||||||
|
@@ -101,9 +101,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual wxWindow *DoRemovePage(size_t page);
|
virtual wxWindow *DoRemovePage(size_t page);
|
||||||
|
|
||||||
// get the size which the list control should have
|
|
||||||
virtual wxSize GetControllerSize() const;
|
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
void OnToolSelected(wxCommandEvent& event);
|
void OnToolSelected(wxCommandEvent& event);
|
||||||
void OnSize(wxSizeEvent& event);
|
void OnSize(wxSizeEvent& event);
|
||||||
|
@@ -289,12 +289,11 @@ void wxBookCtrlBase::OnSize(wxSizeEvent& event)
|
|||||||
|
|
||||||
wxSize wxBookCtrlBase::GetControllerSize() const
|
wxSize wxBookCtrlBase::GetControllerSize() const
|
||||||
{
|
{
|
||||||
if(!m_bookctrl)
|
if ( !m_bookctrl )
|
||||||
return wxSize(0,0);
|
return wxSize(0, 0);
|
||||||
|
|
||||||
const wxSize sizeClient = GetClientSize(),
|
const wxSize sizeClient = GetClientSize(),
|
||||||
sizeBorder = m_bookctrl->GetSize() - m_bookctrl->GetClientSize(),
|
sizeCtrl = m_bookctrl->GetBestSize();
|
||||||
sizeCtrl = m_bookctrl->GetBestSize() + sizeBorder;
|
|
||||||
|
|
||||||
wxSize size;
|
wxSize size;
|
||||||
|
|
||||||
|
@@ -115,26 +115,6 @@ wxChoicebook::Create(wxWindow *parent,
|
|||||||
// wxChoicebook geometry management
|
// wxChoicebook geometry management
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxSize wxChoicebook::GetControllerSize() const
|
|
||||||
{
|
|
||||||
const wxSize sizeClient = GetClientSize(),
|
|
||||||
sizeChoice = m_controlSizer->CalcMin();
|
|
||||||
|
|
||||||
wxSize size;
|
|
||||||
if ( IsVertical() )
|
|
||||||
{
|
|
||||||
size.x = sizeClient.x;
|
|
||||||
size.y = sizeChoice.y;
|
|
||||||
}
|
|
||||||
else // left/right aligned
|
|
||||||
{
|
|
||||||
size.x = sizeChoice.x;
|
|
||||||
size.y = sizeClient.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxSize wxChoicebook::CalcSizeFromPage(const wxSize& sizePage) const
|
wxSize wxChoicebook::CalcSizeFromPage(const wxSize& sizePage) const
|
||||||
{
|
{
|
||||||
// we need to add the size of the choice control and the border between
|
// we need to add the size of the choice control and the border between
|
||||||
|
@@ -155,28 +155,6 @@ long wxListbook::GetListCtrlReportViewFlags() const
|
|||||||
// wxListbook geometry management
|
// wxListbook geometry management
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxSize wxListbook::GetControllerSize() const
|
|
||||||
{
|
|
||||||
const wxSize sizeClient = GetClientSize(),
|
|
||||||
sizeBorder = m_bookctrl->GetSize() - m_bookctrl->GetClientSize(),
|
|
||||||
sizeList = GetListView()->GetViewRect().GetSize() + sizeBorder;
|
|
||||||
|
|
||||||
wxSize size;
|
|
||||||
|
|
||||||
if ( IsVertical() )
|
|
||||||
{
|
|
||||||
size.x = sizeClient.x;
|
|
||||||
size.y = sizeList.y;
|
|
||||||
}
|
|
||||||
else // left/right aligned
|
|
||||||
{
|
|
||||||
size.x = sizeList.x;
|
|
||||||
size.y = sizeClient.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxListbook::OnSize(wxSizeEvent& event)
|
void wxListbook::OnSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
// arrange the icons before calling SetClientSize(), otherwise it wouldn't
|
// arrange the icons before calling SetClientSize(), otherwise it wouldn't
|
||||||
|
@@ -129,27 +129,6 @@ bool wxToolbook::Create(wxWindow *parent,
|
|||||||
// wxToolbook geometry management
|
// wxToolbook geometry management
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxSize wxToolbook::GetControllerSize() const
|
|
||||||
{
|
|
||||||
const wxSize sizeClient = GetClientSize(),
|
|
||||||
sizeToolBar = GetToolBar()->GetBestSize();
|
|
||||||
|
|
||||||
wxSize size;
|
|
||||||
|
|
||||||
if ( IsVertical() )
|
|
||||||
{
|
|
||||||
size.x = sizeClient.x;
|
|
||||||
size.y = sizeToolBar.y;
|
|
||||||
}
|
|
||||||
else // left/right aligned
|
|
||||||
{
|
|
||||||
size.x = sizeToolBar.x;
|
|
||||||
size.y = sizeClient.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxToolbook::OnSize(wxSizeEvent& event)
|
void wxToolbook::OnSize(wxSizeEvent& event)
|
||||||
{
|
{
|
||||||
if (m_needsRealizing)
|
if (m_needsRealizing)
|
||||||
|
Reference in New Issue
Block a user