doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DialogAFConstraintFixed.cpp
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 
29 #include "../../idlib/precompiled.h"
30 #pragma hdrstop
31 
32 #include "../../sys/win32/rc/AFEditor_resource.h"
33 
34 #include "DialogAF.h"
35 #include "DialogAFConstraint.h"
37 
38 
39 // DialogAFConstraintFixed dialog
40 
42  { 0, NULL }
43 };
44 
45 IMPLEMENT_DYNAMIC(DialogAFConstraintFixed, CDialog)
46 
47 /*
48 ================
49 DialogAFConstraintFixed::DialogAFConstraintFixed
50 ================
51 */
53  : CDialog(DialogAFConstraintFixed::IDD, pParent)
54  , constraint(NULL)
55  , file(NULL)
56 {
57  Create( IDD_DIALOG_AF_CONSTRAINT_FIXED, pParent );
58  EnableToolTips( TRUE );
59 }
60 
61 /*
62 ================
63 DialogAFConstraintFixed::~DialogAFConstraintFixed
64 ================
65 */
67 }
68 
69 /*
70 ================
71 DialogAFConstraintFixed::DoDataExchange
72 ================
73 */
74 void DialogAFConstraintFixed::DoDataExchange(CDataExchange* pDX) {
75  CDialog::DoDataExchange(pDX);
76  //{{AFX_DATA_MAP(DialogAFConstraintHinge)
77  //}}AFX_DATA_MAP
78 }
79 
80 /*
81 ================
82 DialogAFConstraintFixed::InitJointLists
83 ================
84 */
86 }
87 
88 /*
89 ================
90 DialogAFConstraintFixed::LoadFile
91 ================
92 */
94  file = af;
95  constraint = NULL;
97 }
98 
99 /*
100 ================
101 DialogAFConstraintFixed::SaveFile
102 ================
103 */
105  SaveConstraint();
106 }
107 
108 /*
109 ================
110 DialogAFConstraintFixed::LoadConstraint
111 ================
112 */
114 
115  constraint = c;
116 
117  // update displayed values
118  UpdateData( FALSE );
119 }
120 
121 /*
122 ================
123 DialogAFConstraintFixed::SaveConstraint
124 ================
125 */
127 
128  if ( !file || !constraint ) {
129  return;
130  }
131  UpdateData( TRUE );
132 
134 }
135 
136 /*
137 ================
138 DialogAFConstraintFixed::UpdateFile
139 ================
140 */
142  SaveConstraint();
143  if ( file ) {
145  }
146 }
147 
148 /*
149 ================
150 DialogAFConstraintFixed::OnToolHitTest
151 ================
152 */
153 int DialogAFConstraintFixed::OnToolHitTest( CPoint point, TOOLINFO* pTI ) const {
154  CDialog::OnToolHitTest( point, pTI );
155  return DefaultOnToolHitTest( toolTips, this, point, pTI );
156 }
157 
158 
159 BEGIN_MESSAGE_MAP(DialogAFConstraintFixed, CDialog)
160  ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
161  ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify)
162 END_MESSAGE_MAP()
163 
164 
165 // DialogAFConstraintFixed message handlers
166 
167 BOOL DialogAFConstraintFixed::OnToolTipNotify( UINT id, NMHDR *pNMHDR, LRESULT *pResult ) {
168  return DefaultOnToolTipNotify( toolTips, id, pNMHDR, pResult );
169 }
BOOL DefaultOnToolTipNotify(const toolTip_t *toolTips, UINT id, NMHDR *pNMHDR, LRESULT *pResult)
Definition: StdAfx.cpp:104
virtual void AF_UpdateEntities(const char *fileName)
Definition: AFEntity.cpp:2856
virtual void DoDataExchange(CDataExchange *pDX)
CONST PIXELFORMATDESCRIPTOR UINT
Definition: win_qgl.cpp:47
virtual int OnToolHitTest(CPoint point, TOOLINFO *pTI) const
const char * GetName(void) const
Definition: DeclManager.h:140
void LoadConstraint(idDeclAF_Constraint *c)
#define BOOL
Definition: mprintf.c:71
idGameEdit * gameEdit
Definition: GameEdit.cpp:668
#define IDD_DIALOG_AF_CONSTRAINT_FIXED
const GLubyte * c
Definition: glext.h:4677
#define NULL
Definition: Lib.h:88
int DefaultOnToolHitTest(const toolTip_t *toolTips, const CDialog *dialog, CPoint point, TOOLINFO *pTI)
Definition: StdAfx.cpp:75
void AFDialogSetFileModified(void)
Definition: DialogAF.cpp:613
#define FALSE
Definition: mprintf.c:70
idDeclAF_Constraint * constraint
#define TRUE
Definition: mprintf.c:69