]> icculus.org git repositories - taylor/freespace2.git/blob - src/fred2/prefsdlg.cpp
The Great Newline Fix
[taylor/freespace2.git] / src / fred2 / prefsdlg.cpp
1 /*
2  * $Logfile: /Freespace2/code/FRED2/PrefsDlg.cpp $
3  * $Revision$
4  * $Date$
5  * $Author$
6  *
7  * Fred Preferences dialog box handling code
8  *
9  * $Log$
10  * Revision 1.2  2002/05/07 03:16:44  theoddone33
11  * The Great Newline Fix
12  *
13  * Revision 1.1.1.1  2002/05/03 03:28:08  root
14  * Initial import.
15  *
16  * 
17  * 2     10/07/98 6:28p Dave
18  * Initial checkin. Renamed all relevant stuff to be Fred2 instead of
19  * Fred. Globalized mission and campaign file extensions. Removed Silent
20  * Threat specific code.
21  * 
22  * 1     10/07/98 3:01p Dave
23  * 
24  * 1     10/07/98 3:00p Dave
25  * 
26  * 3     2/17/97 5:28p Hoffoss
27  * Checked RCS headers, added them were missing, changing description to
28  * something better, etc where needed.
29  *
30  * $NoKeywords: $
31  */
32
33 #include "stdafx.h"
34 #include "fred.h"
35 #include "prefsdlg.h"
36 #include "freddoc.h"
37 #include "fredview.h"
38
39 #ifdef _DEBUG
40 #define new DEBUG_NEW
41 #undef THIS_FILE
42 static char THIS_FILE[] = __FILE__;
43 #endif
44
45 /////////////////////////////////////////////////////////////////////////////
46 // CPrefsDlg dialog
47
48
49
50 CPrefsDlg::CPrefsDlg(CWnd* pParent /*=NULL*/)
51         : CDialog(CPrefsDlg::IDD, pParent)
52 {
53         //{{AFX_DATA_INIT(CPrefsDlg)
54         m_ConfirmDeleting = TRUE;
55         m_ShowCapitalShips = TRUE;
56         m_ShowElevations = TRUE;
57         m_ShowFighters = TRUE;
58         m_ShowGrid = TRUE;
59         m_ShowMiscObjects = TRUE;
60         m_ShowPlanets = TRUE;
61         m_ShowWaypoints = TRUE;
62         m_ShowStarfield = FALSE;
63         //}}AFX_DATA_INIT
64 }
65
66 extern int Show_stars;
67
68 void CPrefsDlg::DoDataExchange(CDataExchange* pDX)
69 {
70         CDialog::DoDataExchange(pDX);
71         //{{AFX_DATA_MAP(CPrefsDlg)
72         DDX_Check(pDX, ID_CONFIRM_DELETING, m_ConfirmDeleting);
73         DDX_Check(pDX, ID_SHOW_CAPITALSHIPS, m_ShowCapitalShips);
74         DDX_Check(pDX, ID_SHOW_ELEVATIONS, m_ShowElevations);
75         DDX_Check(pDX, ID_SHOW_FIGHTERS, m_ShowFighters);
76         DDX_Check(pDX, ID_SHOW_GRID, m_ShowGrid);
77         DDX_Check(pDX, ID_SHOW_MISCOBJECTS, m_ShowMiscObjects);
78         DDX_Check(pDX, ID_SHOW_PLANETS, m_ShowPlanets);
79         DDX_Check(pDX, ID_SHOW_WAYPOINTS, m_ShowWaypoints);
80         DDX_Check(pDX, IDC_PREF_STARFIELD, m_ShowStarfield);
81         //}}AFX_DATA_MAP
82
83         Show_stars = m_ShowStarfield;
84         // CFREDView::SetViewParms(m_ConfirmDeleting);
85 }
86
87
88 BEGIN_MESSAGE_MAP(CPrefsDlg, CDialog)
89         //{{AFX_MSG_MAP(CPrefsDlg)
90         ON_BN_CLICKED(IDC_SAVE_DEFAULT_PREFS, OnSaveDefaultPrefs)
91         ON_WM_CLOSE()
92         //}}AFX_MSG_MAP
93 END_MESSAGE_MAP()
94
95 /////////////////////////////////////////////////////////////////////////////
96 // CPrefsDlg message handlers
97
98 void CPrefsDlg::OnSaveDefaultPrefs() 
99 {
100         // Put code to save user prefs here.
101         
102         m_ConfirmDeleting = 1;
103 }
104
105 void CPrefsDlg::OnClose() 
106 {
107         // MessageBeep((WORD) -1);
108         
109         CDialog::OnClose();
110 }
111
112 BOOL CPrefsDlg::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) 
113 {
114         // MessageBeep((WORD) -1);
115         
116         return CDialog::Create(IDD, pParentWnd);
117 }
118