-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCalques3D.h
executable file
·163 lines (133 loc) · 6.39 KB
/
Calques3D.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
//////////////////////////////////////////////////////////////////////
// Calques 3D - a 3D Dynamic Geometry Learning Environment
// Copyright (c) 1997-2007 Nicolas Van Labeke
//////////////////////////////////////////////////////////////////////
// This file is part of Calques 3D.
//
// Calques 3D is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Calques 3D is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Calques 3D; if not, write to The Free Software Foundation, Inc.,
// 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//////////////////////////////////////////////////////////////////////
/// @file Calques3D.h
/// main header file for the CALQUES 3D application.
///
/// $Date: 2007-10-28 11:49:51+00 $
/// $Revision: 1.18 $
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CALQUES3D_H__1B2AE4A4_D0DE_11D4_A2FA_00D0B71C8709__INCLUDED_)
#define AFX_CALQUES3D_H__1B2AE4A4_D0DE_11D4_A2FA_00D0B71C8709__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
/// @name Notification Messages
/// These messages are send by the framework to all the views currently open in the workspace
/// to notify them of the occurence of a particular event so that, if relevant, they could handle it.
/////////////////////////////////////////////////////////////////////////////
//@{
/// Notify the update of the contextual help associated with a task.
/// This message is sent every time the current task (in the Universe view) needs to update its contextual help,
/// usually in the status bar of the application.
///
/// @param WPARAM The string containing the description (task + step) of the current task (could be NULL).
/// @param LPARAM The command ID (UINT) of the current task - to retrieve its icon (could be 0).
///
/// @see CTask::GetContextualHelp(), CMainFrame::OnSetTaskMessageString()
#define WM_SHOWTASK_CTXTHELP (WM_APP + 10)
/// Notify the update of the view's tooltip when the cursor is hovering over an object (or several).
/// This message is sent
///
/// @param WPARAM The list (CxObject3DSet) of all objects under the cursor (could be NULL).
/// @param LPARAM TRUE if the tooltip is to be displayed, FALSE otherwise.
#define WM_SHOWOBJ_TOOLTIPS (WM_APP + 11)
/// Notify the update of the description of the hovered object.
///
/// @param WPARAM The string containing the description of the object (could be NULL).
/// @param LPARAM The identifier of the object - to retrieve its icon (could be 0).
#define WM_SHOWOBJ_DESCRIPTION (WM_APP + 12)
/// Notify the manual modification of the zoom factor in the Universe view.
///
/// @param WPARAM An integer (UINT) defining the percentage of the zoom factor (cannot be 0).
#define WM_UPDATEZOOM_MANUAL (WM_APP + 15)
/// Notify the end of editing in the in-place editor.
///
/// @param WPARAM The string containing the text in the editor.
#define WM_MATHPAD_ENDEDIT (WM_APP + 16)
#define WM_UPDATEOBJ_ALL (WM_APP + 19) ///< The objects need to be redrawn
#define WM_UPDATEOBJ_ADD (WM_APP + 20) ///< An object has been added to the document
#define WM_UPDATEOBJ_MOD (WM_APP + 21) ///< The properties of an object have been modified
#define WM_UPDATEOBJ_MOV (WM_APP + 22) ///< An object has been moved in one of the view
#define WM_UPDATEOBJ_DEL (WM_APP + 23) ///< An object has been deleted from the document
#define WM_UPDATEOBJ_SEL (WM_APP + 24) ///< An object has been selected in one of the view
#define WM_UPDATEOBJ_EXT (WM_APP + 25) ///< An object has been extracted in a tracing view
#define WM_UPDATEOBJ_RED (WM_APP + 26) ///< An object has been redefined
#define WM_UPDATEOBJ_DEP (WM_APP + 30) ///< The dependence list of an object is recomputed
//@}
#define TIMER_TDXINPUT 1201 ///< Timer for the TdXInput device
/////////////////////////////////////////////////////////////////////////////
/// Extension of the CMultiDocTemplate for accessing view's ID and Runtime class.
/////////////////////////////////////////////////////////////////////////////
class CCalques3DDocTemplate : public CMultiDocTemplate
{
public:
CCalques3DDocTemplate(UINT nIDResource, CRuntimeClass* pDocClass,
CRuntimeClass* pFrameClass, CRuntimeClass* pViewClass) :
CMultiDocTemplate(nIDResource,pDocClass,pFrameClass, pViewClass)
{
}
CRuntimeClass* GetViewRT(){return m_pViewClass;};
UINT GetViewID(){return m_nIDResource;};
DECLARE_DYNAMIC(CCalques3DDocTemplate)
};
/////////////////////////////////////////////////////////////////////////////
/// Main class for the Calques 3D application.
/////////////////////////////////////////////////////////////////////////////
class CCalques3DApp : public CWinApp,
public CBCGPWorkspace
{
private:
HINSTANCE m_hinstC3DRes; ///< Handle for Calques3D resources (NOT YET USED)
HINSTANCE m_hinstBCGCBRes; ///< Handle for BCGContrlBar resources (for i18n purpose)
public:
CCalques3DApp();
// Override from CBCGWorkspace
virtual void OnClosingMainFrame (CBCGPFrameImpl* pFrameImpl);
virtual void PreLoadState();
virtual void LoadCustomState ();
virtual void SaveCustomState ();
BOOL m_bHiColorIcons;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCalques3DApp)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual BOOL InitInstance();
virtual int ExitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CCalques3DApp)
afx_msg void OnAppAbout();
afx_msg void OnFileNew();
afx_msg void OnFileOpen();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
extern CCalques3DApp theApp;
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CALQUES3D_H__1B2AE4A4_D0DE_11D4_A2FA_00D0B71C8709__INCLUDED_)