From b00b306de1140cb7b759ed0f639e8210fd7dffa6 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sun, 18 Apr 2021 22:29:10 -0700 Subject: Initial work on evaluation --- core/src/UI/UI_Workflows.cpp | 70 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'core/src/UI') diff --git a/core/src/UI/UI_Workflows.cpp b/core/src/UI/UI_Workflows.cpp index 2b0368e..101fa7b 100644 --- a/core/src/UI/UI_Workflows.cpp +++ b/core/src/UI/UI_Workflows.cpp @@ -1,8 +1,78 @@ #include "UI.hpp" +#include "Model/Workflow.hpp" +#include "Model/WorkflowNodes.hpp" #include "UI/Localization.hpp" #include +#include +#include + +namespace { +class WorkflowCreationMenu { +private: + using WorkflowNodeConstructor = std::unique_ptr (*)(); + + struct Candidate { + WorkflowNodeConstructor Constructor; + }; + + std::vector mCandidates; + +public: + WorkflowCreationMenu() { + SetupCandidates(); + } + +private: + void SetupCandidates() { + mCandidates.push_back(Candidate{ + .Constructor = []() -> std::unique_ptr { return std::make_unique(NumericOperationNode::Addition); }, + }); + + mCandidates.push_back(Candidate{ + .Constructor = []() -> std::unique_ptr { return std::make_unique(NumericOperationNode::Subtraction); }, + }); + + mCandidates.push_back(Candidate{ + .Constructor = []() -> std::unique_ptr { return std::make_unique(NumericOperationNode::Multiplication); }, + }); + + mCandidates.push_back(Candidate{ + .Constructor = []() -> std::unique_ptr { return std::make_unique(NumericOperationNode::Division); }, + }); + +// mCandidates.push_back(Candidate{ +// .Constructor = []() -> std::unique_ptr { return std::make_unique(); }, +// }); + + mCandidates.push_back(Candidate{ + .Constructor = []() -> std::unique_ptr { return std::make_unique(); }, + }); + +// mCandidates.push_back(Candidate{ +// .Constructor = []() -> std::unique_ptr { return std::make_unique(); }, +// }); + +// mCandidates.push_back(Candidate{ +// .Constructor = []() -> std::unique_ptr { return std::make_unique(); }, +// }); + +// mCandidates.push_back(Candidate{ +// .Constructor = []() -> std::unique_ptr { return std::make_unique(); }, +// }); + } +}; + +class WorkflowUI { +private: + Workflow* mWorkflow; + +public: + void Draw() { + } +}; +} // namespace void UI::WorkflowsTab() { // TODO -- cgit v1.2.3-70-g09d2