1 #pragma once 2 3 #include "post/Analysis.h" 4 #include "quantities/Storage.h" 5 #include <thread> 6 #include <wx/grid.h> 7 #include <wx/panel.h> 8 9 NAMESPACE_SPH_BEGIN 10 11 enum class CheckFlag; 12 13 class GridPage : public wxPanel { 14 private: 15 wxGrid* grid = nullptr; 16 std::thread thread; 17 const Storage& storage; 18 19 wxSpinCtrl* countSpinner; 20 21 public: 22 GridPage(wxWindow* parent, const wxSize size, const Storage& storage); 23 24 ~GridPage(); 25 26 private: 27 struct Config { 28 Float moonLimit = 0.1f; 29 Float radiiLimit = 2.f; 30 }; 31 32 void update(const Storage& storage, const Config& config); 33 34 void updateAsync(const Storage& storage, 35 const Size fragmentCnt, 36 const Flags<CheckFlag> checks, 37 const Config& config); 38 39 template <typename T> 40 void updateCell(const Size rowIdx, const Size colIdx, const T& value); 41 42 wxCheckBox* getCheck(const CheckFlag check) const; 43 44 Size getCheckedCount() const; 45 }; 46 47 NAMESPACE_SPH_END 48