[apps/grpah/list] Make the list controller inherits from header view controller

Change-Id: I1164b53b3cb926108c6cb768eed460fd26963528
This commit is contained in:
Émilie Feral
2016-10-11 17:40:53 +02:00
parent 890f144a4a
commit 0dafbcbd26
2 changed files with 3 additions and 7 deletions

View File

@@ -3,7 +3,7 @@
#include <assert.h>
ListController::ListController(Responder * parentResponder, Graph::FunctionStore * functionStore) :
ViewController(parentResponder),
HeaderViewController(parentResponder, &m_tableView),
m_tableView(TableView(this)),
m_activeCellx(0),
m_activeCelly(-1),
@@ -11,10 +11,7 @@ ListController::ListController(Responder * parentResponder, Graph::FunctionStore
m_functionStore(functionStore),
m_parameterController(ParameterController(this, functionStore))
{
}
View * ListController::view() {
return &m_tableView;
setVisibleHeader(false);
}
const char * ListController::title() const {

View File

@@ -7,13 +7,12 @@
#include "function_expression_view.h"
#include "parameter_controller.h"
class ListController : public ViewController, public TableViewDataSource {
class ListController : public HeaderViewController, public TableViewDataSource {
public:
ListController(Responder * parentResponder, Graph::FunctionStore * functionStore);
void setActiveCell(int i, int j);
View * view() override;
const char * title() const override;
bool handleEvent(Ion::Events::Event event) override;
bool handleEnter();