mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps][apps/graph] Move window parameter controller to be used in graph
and regression Change-Id: I469e06bfd0e20fe7d93c66c38a53a9a0189de99b
This commit is contained in:
@@ -30,6 +30,7 @@ app_objs += $(addprefix apps/,\
|
||||
toolbox_node.o\
|
||||
variable_box_controller.o\
|
||||
variable_box_leaf_cell.o\
|
||||
window_parameter_controller.o\
|
||||
)
|
||||
|
||||
# Tracking which source file uses which image is painful. But we need to ensure
|
||||
|
||||
@@ -5,7 +5,6 @@ app_objs += $(addprefix apps/graph/,\
|
||||
function_title_cell.o\
|
||||
graph/banner_view.o\
|
||||
graph/graph_window.o\
|
||||
graph/window_parameter_controller.o\
|
||||
graph/curve_parameter_controller.o\
|
||||
graph/goto_parameter_controller.o\
|
||||
graph/graph_controller.o\
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <escher.h>
|
||||
#include "graph_view.h"
|
||||
#include "graph_window.h"
|
||||
#include "window_parameter_controller.h"
|
||||
#include "../../window_parameter_controller.h"
|
||||
#include "curve_parameter_controller.h"
|
||||
#include "initialisation_parameter_controller.h"
|
||||
#include "zoom_parameter_controller.h"
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
#include "window_parameter_controller.h"
|
||||
#include "../app.h"
|
||||
#include "../../apps_container.h"
|
||||
#include "apps_container.h"
|
||||
#include <assert.h>
|
||||
|
||||
namespace Graph {
|
||||
|
||||
WindowParameterController::WindowParameterController(Responder * parentResponder, GraphWindow * graphWindow) :
|
||||
WindowParameterController::WindowParameterController(Responder * parentResponder, CurveViewWindowWithCursor * graphWindow) :
|
||||
FloatParameterController(parentResponder),
|
||||
m_graphWindow(graphWindow),
|
||||
m_windowCells{EditableTextMenuListCell(&m_selectableTableView, this, m_draftTextBuffer, (char *)"Xmin"), EditableTextMenuListCell(&m_selectableTableView, this, m_draftTextBuffer, (char *)"Xmax"),
|
||||
@@ -126,5 +123,3 @@ TableViewCell * WindowParameterController::reusableCell(int index) {
|
||||
int WindowParameterController::reusableCellCount() {
|
||||
return k_numberOfTextCell+1;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,15 +1,13 @@
|
||||
#ifndef GRAPH_GRAPH_WINDOW_PARAMETER_CONTROLLER_H
|
||||
#define GRAPH_GRAPH_WINDOW_PARAMETER_CONTROLLER_H
|
||||
#ifndef APPS_WINDOW_PARAMETER_CONTROLLER_H
|
||||
#define APPS_WINDOW_PARAMETER_CONTROLLER_H
|
||||
|
||||
#include <escher.h>
|
||||
#include "graph_window.h"
|
||||
#include "graph_view.h"
|
||||
#include "../../float_parameter_controller.h"
|
||||
#include "curve_view_window_with_cursor.h"
|
||||
#include "float_parameter_controller.h"
|
||||
|
||||
namespace Graph {
|
||||
class WindowParameterController : public FloatParameterController {
|
||||
public:
|
||||
WindowParameterController(Responder * parentResponder, GraphWindow * graphWindow);
|
||||
WindowParameterController(Responder * parentResponder, CurveViewWindowWithCursor * graphWindow);
|
||||
const char * title() const override;
|
||||
int numberOfRows() override;
|
||||
TableViewCell * reusableCell(int index) override;
|
||||
@@ -22,12 +20,10 @@ private:
|
||||
float parameterAtIndex(int index) override;
|
||||
void setParameterAtIndex(int parameterIndex, float f) override;
|
||||
constexpr static int k_numberOfTextCell = 4;
|
||||
GraphWindow * m_graphWindow;
|
||||
CurveViewWindowWithCursor * m_graphWindow;
|
||||
char m_draftTextBuffer[EditableTextMenuListCell::k_bufferLength];
|
||||
EditableTextMenuListCell m_windowCells[k_numberOfTextCell];
|
||||
SwitchMenuListCell m_yAutoCell;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user