32 LAZY_PAGE( wxWindow* aParent, std::function<wxWindow*( wxWindow* aParent )> aLazyCtor ) :
33 wxPanel( aParent, wxID_ANY ),
56 bool Show(
bool show )
override
67 return wxPanel::Show( show );
71 std::function<wxWindow*( wxWindow* aParent )>
m_lazyCtor;
79 long style,
const wxString&
name ) :
80 wxTreebook( parent, id, pos, size, style,
name )
86 const wxString&
text,
bool bSelect,
int imageId )
88 return AddPage(
new LAZY_PAGE(
this, std::move( aLazyCtor ) ),
text, bSelect, imageId );
93 const wxString&
text,
bool bSelect,
int imageId )
95 return AddSubPage(
new LAZY_PAGE(
this, std::move( aLazyCtor ) ),
text, bSelect, imageId );
101 wxWindow* page = GetPage( aPage );
104 return lazyPage->Resolve();
LAZY_PAGE(wxWindow *aParent, std::function< wxWindow *(wxWindow *aParent)> aLazyCtor)
bool Show(bool show) override
std::function< wxWindow *(wxWindow *aParent)> m_lazyCtor
wxWindow * ResolvePage(size_t aPage)
WX_TREEBOOK(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxBK_DEFAULT, const wxString &name=wxEmptyString)
bool AddLazyPage(std::function< wxWindow *(wxWindow *aParent)> aLazyCtor, const wxString &text, bool bSelect=false, int imageId=NO_IMAGE)
bool AddLazySubPage(std::function< wxWindow *(wxWindow *aParent)> aLazyCtor, const wxString &text, bool bSelect=false, int imageId=NO_IMAGE)