1 /* 2 delaboratory - color correction utility 3 Copyright (C) 2011 Jacek Poplawski 4 5 This program is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef _DE_LAYER_GRID_PANEL_H 20 #define _DE_LAYER_GRID_PANEL_H 21 22 #include <wx/wx.h> 23 #include <wx/listctrl.h> 24 #include <vector> 25 26 class deProject; 27 class deLayerProcessor; 28 class deChannelManager; 29 class deGUI; 30 31 class deLayerGridPanel:public wxPanel 32 { 33 class deLayerRow 34 { 35 public: deLayerRow(int _index)36 deLayerRow(int _index) 37 :index(_index) 38 { 39 }; 40 41 int index; 42 wxStaticText* id; 43 wxRadioButton* view; 44 wxButton* action; 45 }; 46 47 private: 48 std::vector<deLayerRow> layerRows; 49 50 deProject& project; 51 deLayerProcessor& layerProcessor; 52 53 wxSizer* mainSizer; 54 55 wxFlexGridSizer* gridSizer; 56 deChannelManager& channelManager; 57 58 int maxRows; 59 60 void select(wxCommandEvent &event); 61 void click(wxCommandEvent &event); 62 63 public: 64 deLayerGridPanel(wxWindow* parent, deProject& _project, deLayerProcessor& _processor, deChannelManager& _channelManager, deGUI& gui); 65 ~deLayerGridPanel(); 66 67 void buildRows(); 68 void clearRows(); 69 70 void update(); 71 72 }; 73 74 #endif 75