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 "stnprefs.h" |
---|
24 | #include "message.h" |
---|
25 | |
---|
26 | #include <wx/statline.h> |
---|
27 | |
---|
28 | static const wxWindowID ID_STN_PREFS = 1001; |
---|
29 | static const wxWindowID ID_STN_CROSSES = 2000; |
---|
30 | static const wxWindowID ID_STN_HI_ENTS = 2001; |
---|
31 | static const wxWindowID ID_STN_HI_FIXED = 2002; |
---|
32 | static const wxWindowID ID_STN_HI_XPTS = 2003; |
---|
33 | static const wxWindowID ID_STN_NAMES = 2004; |
---|
34 | static const wxWindowID ID_STN_OVERLAPPING = 2005; |
---|
35 | static const wxWindowID ID_STN_LINE1 = 2006; |
---|
36 | static const wxWindowID ID_STN_LINE2 = 2006; |
---|
37 | |
---|
38 | StnPrefs::StnPrefs(wxWindow* parent) : PanelDlgPage(parent, ID_STN_PREFS) |
---|
39 | { |
---|
40 | wxCheckBox* show_crosses = new wxCheckBox(this, ID_STN_CROSSES, msg(/*Mark survey stations with crosses*/350)); |
---|
41 | wxCheckBox* hi_ents = new wxCheckBox(this, ID_STN_HI_ENTS, msg(/*Highlight stations marked as entrances*/351)); |
---|
42 | wxCheckBox* hi_fixed = new wxCheckBox(this, ID_STN_HI_FIXED, |
---|
43 | msg(/*Highlight stations marked as fixed points*/352)); |
---|
44 | wxCheckBox* hi_xpts = new wxCheckBox(this, ID_STN_HI_XPTS, msg(/*Highlight stations which are exported*/353)); |
---|
45 | wxCheckBox* names = new wxCheckBox(this, ID_STN_NAMES, msg(/*Mark survey stations with their names*/354)); |
---|
46 | wxCheckBox* overlapping = new wxCheckBox(this, ID_STN_OVERLAPPING, |
---|
47 | msg(/*Allow names to overlap on the display (faster)*/355)); |
---|
48 | |
---|
49 | wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); |
---|
50 | |
---|
51 | sizer->Add(show_crosses, 0 /* not vertically stretchable */, wxALIGN_TOP | wxBOTTOM, 0); |
---|
52 | sizer->Add(10, 8); |
---|
53 | sizer->Add(new wxStaticLine(this, ID_STN_LINE1), 0, wxEXPAND | wxRIGHT, 16); |
---|
54 | sizer->Add(10, 8); |
---|
55 | sizer->Add(hi_ents, 0, wxALIGN_TOP | wxBOTTOM, 4); |
---|
56 | sizer->Add(hi_fixed, 0, wxALIGN_TOP | wxBOTTOM, 4); |
---|
57 | sizer->Add(hi_xpts, 0, wxALIGN_TOP | wxBOTTOM, 0); |
---|
58 | sizer->Add(10, 8); |
---|
59 | sizer->Add(new wxStaticLine(this, ID_STN_LINE2), 0, wxEXPAND | wxRIGHT, 16); |
---|
60 | sizer->Add(10, 8); |
---|
61 | sizer->Add(names, 0, wxALIGN_TOP | wxBOTTOM, 4); |
---|
62 | sizer->Add(overlapping, 0, wxALIGN_TOP | wxLEFT, 32); |
---|
63 | |
---|
64 | SetAutoLayout(true); |
---|
65 | SetSizer(sizer); |
---|
66 | } |
---|
67 | |
---|
68 | StnPrefs::~StnPrefs() |
---|
69 | { |
---|
70 | |
---|
71 | } |
---|
72 | |
---|
73 | const wxString StnPrefs::GetName() |
---|
74 | { |
---|
75 | return "Stations"; |
---|
76 | } |
---|
77 | |
---|
78 | const wxBitmap StnPrefs::GetIcon() |
---|
79 | { |
---|
80 | return wxGetApp().LoadPreferencesIcon("stations"); |
---|
81 | } |
---|
82 | |
---|