diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-26 16:43:34 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-26 16:43:34 +0000 |
| commit | 41b7a04cf3dedaa93aaf3c050db7a693281417f7 (patch) | |
| tree | 9d5a2bf36e65dea84f105d5c96e705474020cf26 /src/wx/table_dialog.h | |
| parent | 5dc5a43bf61847cf863b29ef47d0046a9d4fdef0 (diff) | |
Cleanup of various dialogs by inherting TableDialog.
Diffstat (limited to 'src/wx/table_dialog.h')
| -rw-r--r-- | src/wx/table_dialog.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/wx/table_dialog.h b/src/wx/table_dialog.h new file mode 100644 index 000000000..23017c3b6 --- /dev/null +++ b/src/wx/table_dialog.h @@ -0,0 +1,47 @@ +/* + Copyright (C) 2014 Carl Hetherington <cth@carlh.net> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef DCPOMATIC_TABLE_DIALOG_H +#define DCPOMATIC_TABLE_DIALOG_H + +#include <wx/wx.h> + +class TableDialog : public wxDialog +{ +public: + TableDialog (wxWindow* parent, wxString title, int columns, bool cancel); + +protected: + template<class T> + T* add (T* w) { + _table->Add (w, 1, wxEXPAND); + return w; + } + + void add (wxString text, bool label); + void add_spacer (); + + void layout (); + +private: + wxSizer* _overall_sizer; + wxFlexGridSizer* _table; +}; + +#endif |
