| 1703 | enum { IDDD_GRID=wxID_HIGHEST+945, IDDD_CHANGENUMROWS, IDDD_COPY, IDDD_PASTE, IDDD_IMPORT, IDDD_EXPORT }; |
| 1704 | |
| 1705 | class AFDataArrayDialog : public wxDialog |
| 1706 | { |
| 1707 | private: |
| 1708 | wxString mLabel; |
| 1709 | int mMode; |
| 1710 | std::vector<double> mData; |
| 1711 | wxExtGridCtrl *Grid; |
| 1712 | AFFloatArrayTable *GridTable; |
| 1713 | wxStaticText *ModeLabel; |
| 1714 | wxStaticText *Description; |
| 1715 | wxButton *ButtonChangeRows; |
| 1716 | |
| 1717 | public: |
| 1718 | AFDataArrayDialog(wxWindow *parent, const wxString &title, const wxString &desc, const wxString &collabel) |
| 1719 | : wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxScaleSize(430,510), |
| 1720 | wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ) |
| 1721 | { |
| 1722 | mLabel = collabel; |
| 1723 | |
| 1724 | GridTable = NULL; |
| 1725 | mMode = DATA_ARRAY_8760_MULTIPLES; |
| 1726 | |
| 1727 | wxButton *btn = NULL; |
| 1728 | Grid = new wxExtGridCtrl(this, IDDD_GRID); |
| 1729 | Grid->DisableDragCell(); |
| 1730 | //Grid->DisableDragColSize(); |
| 1731 | Grid->DisableDragRowSize(); |
| 1732 | Grid->DisableDragColMove(); |
| 1733 | Grid->DisableDragGridSize(); |
| 1734 | Grid->SetRowLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTER); |
| 1735 | |
| 1736 | wxBoxSizer *szh_top1 = new wxBoxSizer(wxHORIZONTAL); |
| 1737 | btn = new wxButton(this, IDDD_COPY, "Copy"); |
| 1738 | szh_top1->Add(btn, 0, wxALL|wxEXPAND, 1); |
| 1739 | btn = new wxButton(this, IDDD_PASTE, "Paste"); |
| 1740 | szh_top1->Add(btn, 0, wxALL|wxEXPAND, 1); |
| 1741 | btn = new wxButton(this, IDDD_IMPORT, "Import"); |
| 1742 | szh_top1->Add(btn, 0, wxALL|wxEXPAND, 1); |
| 1743 | btn = new wxButton(this, IDDD_EXPORT, "Export"); |
| 1744 | szh_top1->Add(btn, 0, wxALL|wxEXPAND, 1); |
| 1745 | szh_top1->AddStretchSpacer(); |
| 1746 | |
| 1747 | wxBoxSizer *szh_top2 = new wxBoxSizer(wxHORIZONTAL); |
| 1748 | ButtonChangeRows = new wxButton(this, IDDD_CHANGENUMROWS, "Number of Values..."); |
| 1749 | szh_top2->Add(ButtonChangeRows, 0, wxALL|wxEXPAND, 1); |
| 1750 | ModeLabel = new wxStaticText(this,-1,""); |
| 1751 | szh_top2->AddSpacer(3); |
| 1752 | szh_top2->Add(ModeLabel,0,wxALL|wxALIGN_CENTER_VERTICAL,3); |
| 1753 | szh_top2->AddStretchSpacer(); |
| 1754 | |
| 1755 | wxBoxSizer *szv_main = new wxBoxSizer(wxVERTICAL); |
| 1756 | // reverse order per Paul email 2/10/15 |
| 1757 | szv_main->Add(szh_top2, 0, wxALL|wxEXPAND, 4); |
| 1758 | szv_main->Add(szh_top1, 0, wxALL | wxEXPAND, 4); |
| 1759 | szv_main->Add(Grid, 1, wxALL | wxEXPAND, 4); |
| 1760 | Description = 0; |
| 1761 | if ( !desc.IsEmpty() ) |
| 1762 | { |
nothing calls this directly
no outgoing calls
no test coverage detected