[02c7c1a] | 1 | // |
---|
| 2 | // stnprefs.cc |
---|
| 3 | // |
---|
| 4 | // Preferences page for stations. |
---|
| 5 | // |
---|
| 6 | // Copyright (C) 2002 Mark R. Shinwell |
---|
| 7 | // |
---|
| 8 | // This program is free software; you can redistribute it and/or modify |
---|
| 9 | // it under the terms of the GNU General Public License as published by |
---|
| 10 | // the Free Software Foundation; either version 2 of the License, or |
---|
| 11 | // (at your option) any later version. |
---|
| 12 | // |
---|
| 13 | // This program is distributed in the hope that it will be useful, |
---|
| 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 16 | // GNU General Public License for more details. |
---|
| 17 | // |
---|
| 18 | // You should have received a copy of the GNU General Public License |
---|
| 19 | // along with this program; if not, write to the Free Software |
---|
| 20 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 21 | // |
---|
| 22 | |
---|
| 23 | #include "message.h" |
---|
| 24 | #include "stnprefs.h" |
---|
| 25 | |
---|
| 26 | static const wxWindowID ID_STN_PREFS = 1001; |
---|
| 27 | static const wxWindowID ID_STN_CROSSES = 2000; |
---|
| 28 | static const wxWindowID ID_STN_HI_ENTS = 2001; |
---|
| 29 | static const wxWindowID ID_STN_HI_FIXED = 2002; |
---|
| 30 | static const wxWindowID ID_STN_HI_XPTS = 2003; |
---|
| 31 | static const wxWindowID ID_STN_NAMES = 2004; |
---|
| 32 | static const wxWindowID ID_STN_OVERLAPPING = 2005; |
---|
| 33 | |
---|
| 34 | StnPrefs::StnPrefs(wxWindow* parent) : PanelDlgPage(parent, ID_STN_PREFS) |
---|
| 35 | { |
---|
| 36 | wxCheckBox* show_crosses = new wxCheckBox(this, ID_STN_CROSSES, msg(/*Mark survey stations with crosses*/350)); |
---|
| 37 | wxCheckBox* hi_ents = new wxCheckBox(this, ID_STN_HI_ENTS, msg(/*Highlight stations marked as entrances*/351)); |
---|
| 38 | wxCheckBox* hi_fixed = new wxCheckBox(this, ID_STN_HI_FIXED, |
---|
| 39 | msg(/*Highlight stations marked as fixed points*/352)); |
---|
| 40 | wxCheckBox* hi_xpts = new wxCheckBox(this, ID_STN_HI_XPTS, msg(/*Highlight stations which are exported*/353)); |
---|
| 41 | wxCheckBox* names = new wxCheckBox(this, ID_STN_NAMES, msg(/*Mark survey stations with their names*/354)); |
---|
| 42 | wxCheckBox* overlapping = new wxCheckBox(this, ID_STN_OVERLAPPING, |
---|
| 43 | msg(/*Allow names to overlap on the display (faster)*/355)); |
---|
| 44 | |
---|
| 45 | wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); |
---|
| 46 | |
---|
| 47 | sizer->Add(show_crosses, 0 /* not vertically stretchable */, wxALIGN_TOP | wxBOTTOM, 16); |
---|
| 48 | sizer->Add(hi_ents, 0, wxALIGN_TOP | wxBOTTOM, 8); |
---|
| 49 | sizer->Add(hi_fixed, 0, wxALIGN_TOP | wxBOTTOM, 8); |
---|
| 50 | sizer->Add(hi_xpts, 0, wxALIGN_TOP | wxBOTTOM, 16); |
---|
| 51 | sizer->Add(names, 0, wxALIGN_TOP | wxBOTTOM, 8); |
---|
| 52 | sizer->Add(overlapping, 0, wxALIGN_TOP | wxLEFT, 32); |
---|
| 53 | |
---|
| 54 | SetAutoLayout(true); |
---|
| 55 | SetSizer(sizer); |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | StnPrefs::~StnPrefs() |
---|
| 59 | { |
---|
| 60 | |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | const wxString StnPrefs::GetName() |
---|
| 64 | { |
---|
| 65 | return "Stations"; |
---|
| 66 | } |
---|
| 67 | |
---|
| 68 | const wxBitmap StnPrefs::GetIcon() |
---|
| 69 | { |
---|
| 70 | return wxGetApp().LoadPreferencesIcon("stations"); |
---|
| 71 | } |
---|
| 72 | |
---|