Skip to content

Instantly share code, notes, and snippets.

@petrstepanov
Last active July 22, 2019 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petrstepanov/2ee1502963f744100e49662c9d533430 to your computer and use it in GitHub Desktop.
Save petrstepanov/2ee1502963f744100e49662c9d533430 to your computer and use it in GitHub Desktop.
CERN ROOT MVP View souce
#include "__View.h"
#include "__Presenter.h"
__View::__View(const TGWindow *w) : AbstractView<__Presenter>(w){
// Build UI
initUI();
// Instantinate presenter and connect slots
presenter = instantinatePresenter();
connectSignalsToPresenter();
}
__View::~__View(){};
__Presenter* __View::instantinatePresenter(){
return new __Presenter(this);
}
void __View::initUI(){
SetLayoutManager(new TGHorizontalLayout(this));
// Layout UI elements
}
void __View::connectSignalsToPresenter(){
// button->Connect("Clicked()", "__Presenter", presenter, "onViewButtonClicked()");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment