1 /*
2 BobToolz plugin for GtkRadiant
3 Copyright (C) 2001 Gordon Biggans
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20 // PathPlotterDialog.cpp : implementation file
21 //
22
23 #include "../StdAfx.h"
24 #include "../bobtoolz.h"
25 #include "PathPlotterDialog.h"
26
27 #ifdef _DEBUG
28 #define new DEBUG_NEW
29 #undef THIS_FILE
30 static char THIS_FILE[] = __FILE__;
31 #endif
32
33 /////////////////////////////////////////////////////////////////////////////
34 // CPathPlotterDialog dialog
35
36
CPathPlotterDialog(CWnd * pParent)37 CPathPlotterDialog::CPathPlotterDialog(CWnd* pParent /*=NULL*/)
38 : CDialog(CPathPlotterDialog::IDD, pParent)
39 {
40 //{{AFX_DATA_INIT(CPathPlotterDialog)
41 m_fGravity = -800.0f;
42 m_fMultiplier = 3.0f;
43 m_bNoUpdate = FALSE;
44 m_nPoints = 25;
45 m_bShowExtra = FALSE;
46 //}}AFX_DATA_INIT
47 }
48
49
DoDataExchange(CDataExchange * pDX)50 void CPathPlotterDialog::DoDataExchange(CDataExchange* pDX)
51 {
52 CDialog::DoDataExchange(pDX);
53 //{{AFX_DATA_MAP(CPathPlotterDialog)
54 DDX_Text(pDX, IDC_GRAVITY_EDIT, m_fGravity);
55 DDV_MinMaxFloat(pDX, m_fGravity, -10000.f, -1.f);
56 DDX_Text(pDX, IDC_MULTIPLIER_EDIT, m_fMultiplier);
57 DDV_MinMaxFloat(pDX, m_fMultiplier, 1.f, 10.f);
58 DDX_Check(pDX, IDC_NOUPDATE_CHECK, m_bNoUpdate);
59 DDX_Text(pDX, IDC_POINTCOUNT_EDIT, m_nPoints);
60 DDV_MinMaxInt(pDX, m_nPoints, 1, 1000);
61 DDX_Check(pDX, IDC_SHOWEXTRA_CHECK, m_bShowExtra);
62 //}}AFX_DATA_MAP
63 }
64
65
BEGIN_MESSAGE_MAP(CPathPlotterDialog,CDialog)66 BEGIN_MESSAGE_MAP(CPathPlotterDialog, CDialog)
67 //{{AFX_MSG_MAP(CPathPlotterDialog)
68 ON_BN_CLICKED(IDYES, OnYes)
69 ON_BN_CLICKED(IDNO, OnNo)
70 //}}AFX_MSG_MAP
71 END_MESSAGE_MAP()
72
73 /////////////////////////////////////////////////////////////////////////////
74 // CPathPlotterDialog message handlers
75
76 void CPathPlotterDialog::OnYes()
77 {
78 if(UpdateData())
79 EndModalLoop(IDYES);
80 }
81
OnNo()82 void CPathPlotterDialog::OnNo()
83 {
84 EndModalLoop(IDNO);
85 }
86