1 /* Reverse Engineer's Hex Editor 2 * Copyright (C) 2019 Daniel Collins <solemnwarning@solemnwarning.net> 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU General Public License version 2 as published by 6 * the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, but WITHOUT 9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 11 * more details. 12 * 13 * You should have received a copy of the GNU General Public License along with 14 * this program; if not, write to the Free Software Foundation, Inc., 51 15 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 */ 17 18 #ifndef REHEX_SELECTRANGEDIALOG_HPP 19 #define REHEX_SELECTRANGEDIALOG_HPP 20 21 #include <wx/dialog.h> 22 #include <wx/radiobut.h> 23 24 #include "DocumentCtrl.hpp" 25 #include "NumericTextCtrl.hpp" 26 27 namespace REHex { 28 class SelectRangeDialog: public wxDialog 29 { 30 public: 31 SelectRangeDialog(wxWindow *parent, Document &document, DocumentCtrl &document_ctrl); 32 virtual ~SelectRangeDialog(); 33 34 private: 35 Document &document; 36 DocumentCtrl &document_ctrl; 37 38 NumericTextCtrl *range_from; 39 40 wxRadioButton *range_to_enable; 41 NumericTextCtrl *range_to; 42 43 wxRadioButton *range_len_enable; 44 NumericTextCtrl *range_len; 45 46 void enable_inputs(); 47 48 void OnOK(wxCommandEvent &event); 49 void OnRadio(wxCommandEvent &event); 50 51 DECLARE_EVENT_TABLE() 52 }; 53 } 54 55 #endif /* !REHEX_SELECTRANGEDIALOG_HPP */ 56