33 LAZY_PAGE( wxWindow* aParent, std::function<wxWindow*( wxWindow* aParent )> aLazyCtor ) :
34 wxPanel( aParent, wxID_ANY ),
54 dlg->SelectAllInTextCtrls( GetChildren() );
60 bool Show(
bool show )
override
71 return wxPanel::Show( show );
75 std::function<wxWindow*( wxWindow* aParent )>
m_lazyCtor;
83 long style,
const wxString&
name ) :
84 wxTreebook( parent, id, pos, size, style,
name )
90 const wxString&
text,
bool bSelect,
int imageId )
92 return AddPage(
new LAZY_PAGE(
this, std::move( aLazyCtor ) ),
text, bSelect, imageId );
97 const wxString&
text,
bool bSelect,
int imageId )
99 return AddSubPage(
new LAZY_PAGE(
this, std::move( aLazyCtor ) ),
text, bSelect, imageId );
105 wxWindow* page = GetPage( aPage );
108 return lazyPage->Resolve();
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
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)