deprecated wxBookCtrlSizer and wxNotebookSizer, they are no longer needed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
19b44116d5
commit
adbf2d732f
@ -88,10 +88,7 @@ wxObject *wxNotebookXmlHandler::DoCreateResource()
|
||||
m_isInside = old_ins;
|
||||
m_notebook = old_par;
|
||||
|
||||
if (GetBool(wxT("usenotebooksizer"), false))
|
||||
return new wxNotebookSizer(nb);
|
||||
else
|
||||
return nb;
|
||||
return nb;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,6 +59,9 @@ INCOMPATIBLE CHANGES SINCE 2.4.x
|
||||
- Identical functionality of wxFileDialog::ParseWildcard,
|
||||
wxGenericDirCtrl::ParseFilter, Motif and MSW parsing native dialogs
|
||||
is now accessible in ::wxParseCommonDialogsFilter
|
||||
- wxNotebookSizer and wxBookCtrlSizer are now deprecated -- the are no longer
|
||||
needed, you can treat wxNotebook as any other control and put it directly
|
||||
into the sizer that was wxNotebookSizer's parent sizer in old code.
|
||||
|
||||
|
||||
|
||||
|
@ -518,6 +518,11 @@ private:
|
||||
|
||||
#endif // wxUSE_STATBOX
|
||||
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
// NB: wxBookCtrlSizer and wxNotebookSizer are deprecated, they
|
||||
// don't do anything. wxBookCtrl::DoGetBestSize does the job now.
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxBookCtrlSizer
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -531,14 +536,18 @@ class WXDLLEXPORT wxBookCtrl;
|
||||
class WXDLLEXPORT wxBookCtrlSizer : public wxSizer
|
||||
{
|
||||
public:
|
||||
wxBookCtrlSizer(wxBookCtrl *bookctrl);
|
||||
wxDEPRECATED( wxBookCtrlSizer(wxBookCtrl *bookctrl) );
|
||||
|
||||
wxBookCtrl *GetControl() const { return m_bookctrl; }
|
||||
|
||||
virtual void RecalcSizes();
|
||||
virtual wxSize CalcMin();
|
||||
|
||||
wxBookCtrl *GetControl() const { return m_bookctrl; }
|
||||
|
||||
protected:
|
||||
// this protected ctor lets us mark the real one above as deprecated
|
||||
// and still has warning-free build of the library itself:
|
||||
wxBookCtrlSizer() {}
|
||||
|
||||
wxBookCtrl *m_bookctrl;
|
||||
|
||||
private:
|
||||
@ -556,7 +565,7 @@ class WXDLLEXPORT wxNotebook;
|
||||
class WXDLLEXPORT wxNotebookSizer : public wxBookCtrlSizer
|
||||
{
|
||||
public:
|
||||
wxNotebookSizer(wxNotebook *nb);
|
||||
wxDEPRECATED( wxNotebookSizer(wxNotebook *nb) );
|
||||
|
||||
wxNotebook *GetNotebook() const { return (wxNotebook *)m_bookctrl; }
|
||||
|
||||
@ -569,5 +578,8 @@ private:
|
||||
|
||||
#endif // wxUSE_BOOKCTRL
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
|
||||
#endif // __WXSIZER_H__
|
||||
|
||||
|
@ -293,10 +293,11 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||
(unsigned long)nDpy));
|
||||
}
|
||||
|
||||
wxNotebookSizer *notebookSizer = new wxNotebookSizer(m_notebook);
|
||||
panel->SetSizer(notebookSizer);
|
||||
notebookSizer->Fit(this);
|
||||
notebookSizer->SetSizeHints(this);
|
||||
wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add(m_notebook, 1, wxEXPAND);
|
||||
panel->SetSizer(sizer);
|
||||
sizer->Fit(this);
|
||||
sizer->SetSizeHints(this);
|
||||
}
|
||||
|
||||
wxString MyFrame::VideoModeToText(const wxVideoMode& mode)
|
||||
|
@ -326,8 +326,7 @@ MySizerDialog::MySizerDialog(wxWindow *parent, const wxChar *title)
|
||||
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxNotebook *notebook = new wxNotebook( this, wxID_ANY );
|
||||
wxNotebookSizer *nbs = new wxNotebookSizer( notebook );
|
||||
topsizer->Add( nbs, 1, wxGROW );
|
||||
topsizer->Add( notebook, 1, wxGROW );
|
||||
|
||||
wxButton *button = new wxButton( this, wxID_OK, _T("OK") );
|
||||
topsizer->Add( button, 0, wxALIGN_RIGHT | wxALL, 10 );
|
||||
|
@ -253,7 +253,6 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
||||
m_notebook = new wxNotebook(m_panel, wxID_ANY, wxDefaultPosition,
|
||||
wxDefaultSize, wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN);
|
||||
InitNotebook();
|
||||
wxSizer *sizerUp = new wxNotebookSizer(m_notebook);
|
||||
|
||||
// the lower one only has the log listbox and a button to clear it
|
||||
wxSizer *sizerDown = new wxStaticBoxSizer(
|
||||
@ -273,7 +272,7 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
|
||||
sizerDown->Add(sizerBtns, 0, wxALL | wxALIGN_RIGHT, 5);
|
||||
|
||||
// put everything together
|
||||
sizerTop->Add(sizerUp, 1, wxGROW | (wxALL & ~(wxTOP | wxBOTTOM)), 10);
|
||||
sizerTop->Add(m_notebook, 1, wxGROW | (wxALL & ~(wxTOP | wxBOTTOM)), 10);
|
||||
sizerTop->Add(0, 5, 0, wxGROW); // spacer in between
|
||||
sizerTop->Add(sizerDown, 0, wxGROW | (wxALL & ~wxTOP), 10);
|
||||
|
||||
|
@ -24,8 +24,10 @@
|
||||
#include "wx/sizer.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/statbox.h"
|
||||
#include "wx/notebook.h"
|
||||
#include "wx/listimpl.cpp"
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
#include "wx/notebook.h"
|
||||
#endif
|
||||
|
||||
#ifdef __WXMAC__
|
||||
# include "wx/mac/uma.h"
|
||||
@ -41,12 +43,6 @@ IMPLEMENT_CLASS(wxBoxSizer, wxSizer)
|
||||
#if wxUSE_STATBOX
|
||||
IMPLEMENT_CLASS(wxStaticBoxSizer, wxBoxSizer)
|
||||
#endif
|
||||
#if wxUSE_BOOKCTRL
|
||||
IMPLEMENT_CLASS(wxBookCtrlSizer, wxSizer)
|
||||
#if wxUSE_NOTEBOOK
|
||||
IMPLEMENT_CLASS(wxNotebookSizer, wxBookCtrlSizer)
|
||||
#endif // wxUSE_NOTEBOOK
|
||||
#endif // wxUSE_BOOKCTRL
|
||||
|
||||
WX_DEFINE_EXPORTED_LIST( wxSizerItemList );
|
||||
|
||||
@ -1643,10 +1639,20 @@ void wxStaticBoxSizer::ShowItems( bool show )
|
||||
|
||||
#endif // wxUSE_STATBOX
|
||||
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxNotebookSizer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_BOOKCTRL
|
||||
IMPLEMENT_CLASS(wxBookCtrlSizer, wxSizer)
|
||||
#if wxUSE_NOTEBOOK
|
||||
IMPLEMENT_CLASS(wxNotebookSizer, wxBookCtrlSizer)
|
||||
#endif // wxUSE_NOTEBOOK
|
||||
#endif // wxUSE_BOOKCTRL
|
||||
|
||||
#if wxUSE_BOOKCTRL
|
||||
|
||||
wxBookCtrlSizer::wxBookCtrlSizer(wxBookCtrl *bookctrl)
|
||||
@ -1698,14 +1704,15 @@ wxSize wxBookCtrlSizer::CalcMin()
|
||||
return wxSize( maxX, maxY ) + sizeBorder;
|
||||
}
|
||||
|
||||
|
||||
#if wxUSE_NOTEBOOK
|
||||
|
||||
wxNotebookSizer::wxNotebookSizer(wxNotebook *nb)
|
||||
: wxBookCtrlSizer(nb)
|
||||
{
|
||||
wxASSERT_MSG( nb, wxT("wxNotebookSizer needs a control") );
|
||||
m_bookctrl = nb;
|
||||
}
|
||||
|
||||
#endif // wxUSE_NOTEBOOOK
|
||||
#endif // wxUSE_BOOKCTRL
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
@ -307,10 +307,9 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
|
||||
m_NavigPan = new wxPanel(m_Splitter, wxID_ANY);
|
||||
m_NavigNotebook = new wxNotebook(m_NavigPan, wxID_HTML_NOTEBOOK,
|
||||
wxDefaultPosition, wxDefaultSize);
|
||||
wxNotebookSizer *nbs = new wxNotebookSizer(m_NavigNotebook);
|
||||
|
||||
navigSizer = new wxBoxSizer(wxVERTICAL);
|
||||
navigSizer->Add(nbs, 1, wxEXPAND);
|
||||
navigSizer->Add(m_NavigNotebook, 1, wxEXPAND);
|
||||
|
||||
m_NavigPan->SetSizer(navigSizer);
|
||||
}
|
||||
|
@ -88,10 +88,7 @@ wxObject *wxNotebookXmlHandler::DoCreateResource()
|
||||
m_isInside = old_ins;
|
||||
m_notebook = old_par;
|
||||
|
||||
if (GetBool(wxT("usenotebooksizer"), false))
|
||||
return new wxNotebookSizer(nb);
|
||||
else
|
||||
return nb;
|
||||
return nb;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user