Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#ifndef _CPA_MECA_ALLOC_
#define _CPA_MECA_ALLOC_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
class CPA_Meca_Card;
//Unallocation functions
void fn_vUnalloc1(CPA_Meca_Card *);
void fn_vUnalloc2(CPA_Meca_Card *);
void fn_vUnalloc3(CPA_Meca_Card *);
void fn_vUnalloc4(CPA_Meca_Card *);
void fn_vUnalloc5(CPA_Meca_Card *);
void fn_vUnalloc6(CPA_Meca_Card *);
void fn_vUnalloc7(CPA_Meca_Card *);
void fn_vUnalloc8(CPA_Meca_Card *);
void fn_vUnalloc9(CPA_Meca_Card *);
void fn_vUnalloc10(CPA_Meca_Card *);
void fn_vUnalloc11(CPA_Meca_Card *);
void fn_vUnalloc12(CPA_Meca_Card *);
void fn_vUnalloc13(CPA_Meca_Card *);
void fn_vUnalloc14(CPA_Meca_Card *);
//ANNECY jt {
void fn_vUnallocRay2Egypte1(CPA_Meca_Card *); // base
//ENDANNECY jt }
#endif //_CPA_MECA_ALLOC

View File

@@ -0,0 +1,14 @@
// Constant strings defintion for Controls and Data customization
//
// YB
///////////////////////////////////////////////////////////////////
#ifndef _TME_CONSTANT_STRINGS_FOR_CONTROLS_
#define _TME_CONSTANT_STRINGS_FOR_CONTROLS_
//For Controls
const CString TME_g_c_cs_ControlOwnerData_ParentCardType = "Parent_Card_Type";
//For Data
const CString TME_g_c_cs_DataOwnerData_ParentCard = "Parent_Card";
#endif //_TME_CONSTANT_STRINGS_FOR_CONTROLS_

View File

@@ -0,0 +1,24 @@
// CallBacks
//
// YB
///////////////////////
#ifndef _TME_CALLBACKS_
#define _TME_CALLBACKS_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
//External Modules
#include "CTL.h"
//End of External Modules
BOOL TME_fn_bControlCanBeDisplayedCallBack(CTL_Editor_Control *_pclSenderControl);
void TME_fn_vCallBackWhenADataHasChanged(CTL_Editor_Data *_pclChangedData,
CTL_tdeUpdateReason _eReason,
long _lUserDefinedReason = 0);
#endif //_TME_CALLBACKS_

View File

@@ -0,0 +1,101 @@
// Constants definition for the Charactersitics Editor
////////////////////////////////////////////////////////
#ifndef _EDCAR_CONST_HPP_
#define _EDCAR_CONST_HPP_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
//Definitions for Editor
#define C_EDITOR_SUBSTRACTED_HEIGHT 0
#define C_EDITOR_WIDTH 250
#define C_SCROLLBAR_WIDTH 7
//Definitions for MS placing
#define C_SPACE_FOR_BORDER 2
#define C_MS_LINE_HEIGHT 20
#define C_MS_SPACING 3
//Definitions for MS internal controls
#define C_TABULATION 0
#define C_ALLOC_BUTTON_PERCENT_WIDTH 20
//Definitions for special tool tips windows
#define C_TTIPS_SPACING 4
//Definitions for Actors' View
//Defines for next/prev buttons display
#define C_BUTTON_SIZE 20 //square buttons
//Defines for direct acces buttons display
#define C_BUTTON_SPACING 2
#define C_BUTTON_HEIGHT 20
#define C_BUTTONS_COLUMNS 3 //Number of direct access buttons per line
//Definitions for Main View
#define C_MAIN_VIEW_SPACING 2
//Definitions for Buttons
#define C_BUTTON_MARGIN 3
//Definitions for Spin Buttons
#define C_SPIN_PRECISION 3
#define C_ACCEL_NB 5
//Global definitions for control
#define C_SPACE_BETWEEN_CONTROLS 2
#define C_EDIT_HEIGHT 15
//Definitions for Boolean control
#define C_BOOL_NAME_BOX_PERCENT_WIDTH 70
#define C_BOOL_NAME_BOX_MIN_WIDTH 40
#define C_BOOL_BUTTON_PERCENT_WIDTH 30
#define C_BUTTON_HEIGHT 20
#define C_BUTTON_WIDTH 40
//Definitions for Enum control
#define C_ENUM_BOX_TOTAL_HEIGHT 100
#define C_ENUM_COMBO_BOX_HEIGHT 20
#define C_ENUM_BOX_PERCENT_WIDTH 50
#define C_ENUM_BOX_MIN_WIDTH 90
#define C_ENUM_NAME_PERCENT_WIDTH 50
//Definitions for Float control
#define C_DECIMAL_NAME_BOX_PERCENT_WIDTH 60
#define C_DECIMAL_CURRENT_VALUE_PERCENT_WIDTH 35
#define C_DECIMAL_CURRENT_VALUE_MIN_WIDTH 50 //for Auto Spacing
#define C_DECIMAL_SPIN_PERCENT_WIDTH 5
#define C_DECIMAL_SPIN_MIN_WIDTH 10 //for Auto Spacing
#define C_SPIN_HEIGHT 17 //for Auto Spacing
//Definitions for Int control
#define C_INT_NAME_BOX_PERCENT_WIDTH 70
#define C_INT_CURRENT_VALUE_PERCENT_WIDTH 25
#define C_INT_CURRENT_VALUE_MIN_WIDTH 30 //for Auto Spacing
#define C_INT_SPIN_PERCENT_WIDTH 5
#define C_INT_SPIN_MIN_WIDTH 10 //for Auto Spacing
//Definitions for List control
#define C_LIST_NUMBER_OF_CONTROLS 3
#define C_LIST_BUTTON_HEIGHT 20
#define C_LIST_EDIT_BUTTON_PERCENT_WIDTH 15
#define C_LIST_DEV_BUTTON_PERCENT_WIDTH 15
#define C_LIST_NAME_BOX_PERCENT_WIDTH 70
#define C_LIST_ADDING_HEIGHT_WHEN_DEV 70
//Definitions for Matrice control
#define C_MATRICE_NUMBER_OF_CONTROLS 3
#define C_MATRICE_BUTTON_HEIGHT 20
#define C_MATRICE_EDIT_BUTTON_PERCENT_WIDTH 15
#define C_MATRICE_DEV_BUTTON_PERCENT_WIDTH 15
#define C_MATRICE_NAME_BOX_PERCENT_WIDTH 70
#define C_MATRICE_ADDING_HEIGHT_WHEN_DEV 50
//Definitions for Text control
#define C_TEXT_NAME_BOX_PERCENT_WIDTH 70
#define C_TEXT_CURRENT_VALUE_PERCENT_WIDTH 30
#define C_TEXT_CURRENT_VALUE_MIN_WIDTH 30 //for Auto Spacing
#endif //_EDCAR_CONST_HPP_

View File

@@ -0,0 +1,145 @@
// Header for the definition of the class representing a Mechanical Card Type
//////////////////////////////////////////////////////////////////////////////
#ifndef _CPA_MECA_CARD_TYPE_HPP_
#define _CPA_MECA_CARD_TYPE_HPP_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include <afxtempl.h>
#include "_MecCard.hpp"
//External Modules
#include "CTL.h"
//End of External Modules
class CPA_Editor_EnumDescriptor;
class CPA_Meca_MiniStrucView;
class CPA_Meca_CardType
{
public:
CPA_Meca_CardType(CString csName, DNM_tdeMechanicsID tdeMotorID);
~CPA_Meca_CardType();
//---------------------------------------
//Attributes
public:
//The list of data
CTL_Editor_ControlList m_clControlList;
//A rectangle specifying the zone where controls are drown
CRect m_crControlZone;
//A pointer on the Unallocation function
void (*m_p_fn_vUnallocate) (CPA_Meca_Card *);
//A pointer on the Filling function
void (*m_p_fn_vFill) (CPA_Meca_Card *);
//A pointer on the Saving function
void (*m_p_fn_vSave) (SCR_tdst_File_Description *, CPA_Meca_Card *);
//
BOOL m_bAtLeastOneCardOfTheCardTypeHasBeenLoaded;
protected:
private:
//The name of the mini-structure (in the Tree)
CString m_csName;
//The name of the File where this type of Cards are stored
CString m_csFileName;
//The name of the Action for this type of Cards
CString m_csActionName;
CRect m_crDisplayRect;
CPA_Meca_MiniStrucView *m_pclParentView;
//The currently edited Card
CPA_Meca_Card *m_pclCurrentCard;
//The list of Cards
CPA_Meca_CardList m_clCardsList;
//...
BOOL m_bControlsAreHidden;
//The ID of the type of Mechanics (image of Motor ID)
DNM_tdeMechanicsID m_tdeMotorID;
//---------------------------------------
//Functions
public:
CString m_fn_csGetCardTypeName();
void m_fn_vSetCardTypeName(CString csNewName);
CPA_Meca_Card *m_fn_pclGetEditedCard();
void m_fn_vSetEditedCard(CPA_Meca_Card *);
CPA_Meca_CardList *m_fn_pclGetCardsList();
unsigned long m_fn_ulGetCardsNumber();
BOOL m_fn_bControlsAreHidden();
//Get : The ID of the type of Mechanics (image of Motor ID)
DNM_tdeMechanicsID m_fn_tdeGetMotorID();
//The name of the File where this type of Cards are stored
CString m_fn_csGetFileName();
void m_fn_vSetFileName(CString csNewName);
//The name of the Action for this type of Cards
CString m_fn_csGetActionName();
void m_fn_vSetActionName(CString csNewName);
// void m_fn_vAddIntegerControl(CString, long, long, char , BOOL, tdeDataLevel, BOOL, tdeControlSpacingType, BOOL);
void m_fn_vAddDecimalControl(long double, long double, char, BOOL, CString _csControlName);
void m_fn_vAddBooleanControl(BOOL, CString _csControlName);
// void m_fn_vAddEnumControl(CString, CPA_Editor_EnumDescriptor *, tdeDataLevel, BOOL);
// void m_fn_vAddListControl(CString, tdeDataLevel, BOOL);
// void m_fn_vAddMatriceControl(CString, long, long, char, BOOL, tdeDataLevel, BOOL);
// void m_fn_vAddTextControl(CString, tdeDataLevel, BOOL, tdeControlSpacingType, BOOL);
//Creates all controls
virtual long m_fn_lCreateMSControls(CWnd *, CRect);
//Hides all controls
virtual void m_fn_vHideAllControls();
long m_fn_lOpen(CRect crRect);
void m_fn_vOffsetZone(long lOffset);
void m_fn_vClose();
void m_fn_vGetMotorDatas();
protected:
private:
void m_pri_fn_vAddOwnerDataToControl(CTL_Editor_Control *_pclControl);
};
//#####################################################################
// Definition of the class for the list of mini-structures
class CPA_Meca_CardTypeList : public CList<CPA_Meca_CardType *, CPA_Meca_CardType *>
{
public:
CPA_Meca_CardTypeList();
~CPA_Meca_CardTypeList();
CPA_Meca_CardType* m_fn_pclAddElement(CString, DNM_tdeMechanicsID tdeMotorID);
void m_fn_vEmptyList();
//Gets a Type Card from its Motor ID
CPA_Meca_CardType* m_fn_pclGetTypeCardFromID(DNM_tdeMechanicsID tdeMotorID);
};
#endif //_CPA_MECA_CARD_TYPE_HPP_

View File

@@ -0,0 +1,60 @@
// cpacqudg.hpp : header file
/////////////////////////////////////////////////////////////////////////////
#ifndef _CPACINFODG_HPP_
#define _CPACINFODG_HPP_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "Meca_Res.h"
#define C_NUMBER_OF_BITMAPS 5
/////////////////////////////////////////////////////////////////////////////
// CPA_Meca_InformationDialog dialog
class CPA_Meca_InformationDialog : public CDialog
{
// Construction
public:
// standard constructor
CPA_Meca_InformationDialog(CWnd* pParent, CString);
~CPA_Meca_InformationDialog();
// Dialog Data
//{{AFX_DATA(CPA_Meca_InformationDialog)
enum { IDD = IDD_MECA_DIALOG_INFO };
CString m_csMessage;
//}}AFX_DATA
private:
CBitmap m_a_cbBitmaps[C_NUMBER_OF_BITMAPS];
HINSTANCE m_hOldInstance;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPA_Meca_InformationDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
public:
protected:
// Generated message map functions
//{{AFX_MSG(CPA_Meca_InformationDialog)
virtual BOOL OnInitDialog();
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
void OnOK();
DECLARE_MESSAGE_MAP()
};
#endif //_CPACINFODG_HPP_

View File

@@ -0,0 +1,51 @@
// CPAMDgNC.hpp : header file
/////////////////////////////////////////////////////////////////////////////
#ifndef _CPA_NEW_CARD_DIALOG_
#define _CPA_NEW_CARD_DIALOG_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "Meca_Res.h"
/////////////////////////////////////////////////////////////////////////////
// CPA_Meca_NewCardDialog dialog
class CPA_Meca_NewCardDialog : public CDialog
{
// Construction
public:
// standard constructor
CPA_Meca_NewCardDialog( CString csCardName,
CWnd* pParent = NULL);
// Dialog Data
//{{AFX_DATA(CPA_Meca_NewCardDialog)
enum { IDD = IDD_MECA_DIALOG_NEW_CARD };
CString m_csName;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPA_Meca_NewCardDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CPA_Meca_NewCardDialog)
afx_msg void OnDestroy();
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //_CPA_NEW_CARD_DIALOG_

View File

@@ -0,0 +1,59 @@
// cpacqudg.hpp : header file
/////////////////////////////////////////////////////////////////////////////
#ifndef _CPACQUDG_HPP_
#define _CPACQUDG_HPP_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "Meca_Res.h"
/////////////////////////////////////////////////////////////////////////////
// CPA_Meca_QuestionDialog dialog
class CPA_Meca_QuestionDialog : public CDialog
{
// Construction
public:
// standard constructor
CPA_Meca_QuestionDialog(CWnd* pParent, CString);
~CPA_Meca_QuestionDialog();
// Dialog Data
//{{AFX_DATA(CPA_Meca_QuestionDialog)
enum { IDD = IDD_MECA_DIALOG_QUESTION };
CString m_csMessage;
//}}AFX_DATA
private:
CBitmap m_cbBitmap;
HINSTANCE m_hOldInstance;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPA_Meca_QuestionDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
public:
protected:
// Generated message map functions
//{{AFX_MSG(CPA_Meca_QuestionDialog)
afx_msg void OnNo();
afx_msg void OnYes();
virtual BOOL OnInitDialog();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnDestroy();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif //_CPACQUDG_HPP_

View File

@@ -0,0 +1,61 @@
// CPACSetp.hpp : header file
/////////////////////////////////////////////////////////////////////////////
#ifndef _CAPCSETP_HPP_
#define _CAPCSETP_HPP_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "Meca_Res.h"
/////////////////////////////////////////////////////////////////////////////
// CPA_Meca_EditorSetupDialog dialog
class CPA_Meca_EditorSetupDialog : public CDialog
{
// Construction
public:
CPA_Meca_EditorSetupDialog(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CPA_Meca_EditorSetupDialog)
enum { IDD = IDD_MECA_DIALOG_SETUP };
BOOL m_bMustDisplayModelFieldsInInstance;
BOOL m_bMustConfirmSuppressionInWatch;
BOOL m_bKeepPreviousReference;
BOOL m_bMustDisplayUnallocatedMS;
BOOL m_bMustConfirmUnallocation;
BOOL m_bMustConfirmAllocation;
BOOL m_bMustFillWhenInWatch;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPA_Meca_EditorSetupDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
public:
protected:
// Generated message map functions
//{{AFX_MSG(CPA_Meca_EditorSetupDialog)
afx_msg void OnPaint();
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
virtual void OnOK();
//}}AFX_MSG
afx_msg long OnMyHelp(UINT, long);
private:
BOOL m_fn_bEditColor(COLORREF &r_Color);
DECLARE_MESSAGE_MAP()
};
#endif //_CAPCSETP_HPP_

View File

@@ -0,0 +1,126 @@
// Definitions for the class CMyDocument
/////////////////////////////////////////////
#ifndef _EMECDOC_HPP_
#define _EMECDOC_HPP_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "EMECCrdT.hpp"
#include "EditMDef.hpp"
//External Modules
#include "CTL.h"
//End of External Modules
class CPA_Meca_ControlView;
class CPA_Meca_MiniStrucView;
class CPA_Meca_Card;
class CPA_Meca_MyDocument
{
public:
CPA_Meca_MyDocument();
~CPA_Meca_MyDocument();
//Attributes
public:
//The lists of Cards
CPA_Meca_CardTypeList m_clCardTypeList;
//The list fo all Cards
CPA_BaseObjectList m_clListOfCards;
//The current Card Type
CPA_Meca_CardType *m_pclCurrentCardType;
//The current Card
CPA_Meca_Card *m_pclCurrentCard;
//Pointers on the views
CPA_Meca_ControlView *m_pclControlView;
CPA_Meca_MiniStrucView *m_pclMiniStrucView;
CPA_DialogList *m_pclDialogList;
//
// CTL_Editor_Control *m_pclFocusedControl;
//Editor's setup variables
//------------------------
CString m_csIniFileName;
//Editor's Help variables
//------------------------
CString m_csHelpFileNameAndPath;
//Editor's preferences
//------------------------
long m_ulListViewHeight;
long m_ulControlViewHeight;
long m_ulEditorWidth;
protected:
private:
//Functions
public:
CPA_Meca_Card *m_pub_fn_vCreateCopyOfCard(CPA_Meca_Card * _pclSourceCard);
/////////////////////
// Editor's aspect //
/////////////////////
//To display a selected Card
void m_fn_vEditCard(CPA_Meca_Card *pclNewCard);
//To display a Card Tyep (<--> the associated controls)
void m_fn_vDisplayCardType( CPA_Meca_CardType *pclNewCardType,
BOOL bForcesRepaint = FALSE);
//To refresh display when Cards have been loaded
void m_fn_vReInitDisplay();
//Sets the data pointers of the controls in tree to the current card's ones
void m_fn_vSetPointersForSelectedCard();
//Sets the data pointers of the controls in tree to the card's ones
void m_fn_vSetPointersForCard(CPA_Meca_Card *pclCard);
//Removes a Card from a Card Type's list
void m_fn_vRemoveCard(CPA_Meca_Card *);
//
void m_fn_vSearchForLoadedCards();
void m_fn_vLoadUnloadedCards();
void m_fn_vUpdateUnLoadedCards();
//
void m_fn_vCheckSpacesInString(CString &r_csStringToCheck);
//Preferences
BOOL m_pub_fn_bSavePreferences();
BOOL m_pub_fn_bLoadPreferences();
protected:
private:
void m_fn_vFillCardsTypeList();
void m_fn_vConstructListOfEnumDescriptors();
void m_fn_vInitialize();
void m_fn_vChangeSize();
// void m_fn_vSetPointersForActor(CPA_CarEditorActor *pclActor);
BOOL m_fn_bReadIniFile();
BOOL m_fn_bWriteIniFile();
//Preferences
void m_pri_fn_vGetEditorCurrentSettings();
};
#endif //_EMECDOC_HPP_

View File

@@ -0,0 +1,18 @@
// Modification functions for Data
//////////////////////////////////////
#ifndef _EMEC_MODIFICATIONS_FUNCTIONS_
#define _EMEC_MODIFICATIONS_FUNCTIONS_
class CTL_Editor_Data;
void EMEC_fn_vModifFloatFromCosToDegre(CTL_Editor_Data *_pclBaseData);
void EMEC_fn_vModifFloatFromDegreToCos(CTL_Editor_Data *_pclBaseData);
void EMEC_fn_vModifFloatFromRadianPerSecondToDegrePerSecond(CTL_Editor_Data *_pclBaseData);
void EMEC_fn_vModifFloatFromDegrePerSecondToRadianPerSecond(CTL_Editor_Data *_pclBaseData);
void EMEC_fn_vModifFloatFromHertzToSecond(CTL_Editor_Data *_pclBaseData);
void EMEC_fn_vModifFloatFromSecondToHertz(CTL_Editor_Data *_pclBaseData);
#endif //_EMEC_MODIFICATIONS_FUNCTIONS_

View File

@@ -0,0 +1,150 @@
// Definition of Strings used to describe the fields in the Mechanics Editor
////////////////////////////////////////////////////////////////////////////
#ifndef _EMEC_FIELDS_DESCRIPTOR_STRINGS_
#define _EMEC_FIELDS_DESCRIPTOR_STRINGS_
////////////////////
// Walk type cards //
/////////////////////
// also used by Jump type cards
const CString g_c_cs_FieldName_Walk_Mass = "Mass (kg)";
const CString g_c_cs_FieldName_Walk_FatherSonLink = "Father-Son link";
const CString g_c_cs_FieldName_Walk_StairsStepHeight = "Stairs Step Height (m)";
const CString g_c_cs_FieldName_Walk_MinLinearSpeed = "Min Linear Speed (m/s)";
const CString g_c_cs_FieldName_Walk_MaxLinearSpeed = "Max Linear Speed (m/s)";
const CString g_c_cs_FieldName_Walk_MinAngularSpeed = "Min Angular Speed (deg/s)";
const CString g_c_cs_FieldName_Walk_MaxAngularSpeed = "Max Angular Speed (deg/s)";
const CString g_c_cs_FieldName_Walk_GroundLimit = "Ground Limit (deg)";
const CString g_c_cs_FieldName_Walk_SlopeLimit = "Slope Limit (deg)";
const CString g_c_cs_FieldName_Walk_WallLimit = "Wall Limit (deg)";
const CString g_c_cs_FieldName_Walk_AtticLimit = "Attic Limit (deg)";
const CString g_c_cs_FieldName_Walk_StepFrontLimit = "Step Front Limit (deg)";
const CString g_c_cs_FieldName_Walk_StepHighLimit = "Step High Limit (deg)";
const CString g_c_cs_FieldName_Walk_IsOrientationFree = "Is Orientation Free";
const CString g_c_cs_FieldName_Walk_OrientationVelocity = "Orientation Velocity (deg/s)";
const CString g_c_cs_FieldName_Walk_IsDTForced = "Is Dt Forced";
const CString g_c_cs_FieldName_Walk_MechanicsEngineFrequency = "Mechanics Eng. Freq.(Hz)";
const CString g_c_cs_FieldName_Walk_IsAgainstWall = "Is Against Wall";
const CString g_c_cs_FieldName_Walk_WallOrientationVelocity = "Wall Orient. Velocity (deg/s)";
const CString g_c_cs_FieldName_Walk_BringDownHeight = "Bring Down Height";
const CString g_c_cs_FieldName_Walk_AirResistingSurface = "Air Resisting Surface";
const CString g_c_cs_FieldName_Walk_GravityRatio = "Gravity Ratio";
////////////////////
// Ski type cards //
////////////////////
const CString g_c_cs_FieldName_Ski_Mass = "Mass (kg)";
const CString g_c_cs_FieldName_Ski_Factor = "Factor";
const CString g_c_cs_FieldName_Ski_MinLinearSpeed = "Min Linear Speed (m/s)";
const CString g_c_cs_FieldName_Ski_MaxLinearSpeed = "Max Linear Speed (m/s)";
const CString g_c_cs_FieldName_Ski_MinAngularSpeed = "Min Angular Speed (deg/s)";
const CString g_c_cs_FieldName_Ski_MaxAngularSpeed = "Max Angular Speed (deg/s)";
const CString g_c_cs_FieldName_Ski_SlideCoef = "Slide Coef";
const CString g_c_cs_FieldName_Ski_TChaseTimeConstant = "TChase Time Constant";
const CString g_c_cs_FieldName_Ski_HandCoef = "HandCoef";
const CString g_c_cs_FieldName_Ski_ReturnCoeff = "ReturnCoeff";
const CString g_c_cs_FieldName_Ski_EdgeCoeff = "EdgeCoeff";
const CString g_c_cs_FieldName_Ski_PlaquageCoeff = "PlaquageCoeff";
const CString g_c_cs_FieldName_Ski_GravityCoeff = "GravityCoeff";
const CString g_c_cs_FieldName_Ski_AlphaFilter = "AlphaFilter";
const CString g_c_cs_FieldName_Ski_InTheAirControl = "InTheAirControl";
const CString g_c_cs_FieldName_Ski_InTheAirGravity = "InTheAirGravity";
const CString g_c_cs_FieldName_Ski_PlaquageGap = "PlaquageGap";
const CString g_c_cs_FieldName_Ski_PlaquageAngle = "PlaquageAngle (deg)";
const CString g_c_cs_FieldName_Ski_MinSpeedToCompute = "MinSpeedToCompute";
/////////////////////
// Swim type cards //
/////////////////////
const CString g_c_cs_FieldName_Swim_Mass = "Mass";
const CString g_c_cs_FieldName_Swim_TractionScale = "Traction Scale";
const CString g_c_cs_FieldName_Swim_AlphaTimeConstant = "Alpha Time Constant";
const CString g_c_cs_FieldName_Swim_ThetaTimeConstant = "Theta Time Constant";
const CString g_c_cs_FieldName_Swim_TractionScaleTimeConstant = "Traction Scale Time Constant";
const CString g_c_cs_FieldName_Swim_AlphaPas = "Alpha Pas";
const CString g_c_cs_FieldName_Swim_ThetaPas = "Theta Pas";
const CString g_c_cs_FieldName_Swim_TractionScalePas = "Traction Scale Pas";
const CString g_c_cs_FieldName_Swim_ArchimedaRadius = "Archimeda Radius";
const CString g_c_cs_FieldName_Swim_LimitVolumeCoef = "Limit Volume Coef";
const CString g_c_cs_FieldName_Swim_CrossingAirWaterCoef = "Crossing Air Water Coef";
const CString g_c_cs_FieldName_Swim_DepthOfLimitVolume = "Depth Of Limit Volume";
const CString g_c_cs_FieldName_Swim_AlphaDecay = "Alpha Decay";
const CString g_c_cs_FieldName_Swim_AlphaMin = "Alpha Min";
const CString g_c_cs_FieldName_Swim_AlphaMax = "Alpha Max";
const CString g_c_cs_FieldName_Swim_AlphaOffset = "Alpha Offset";
//////////////////////
// Stone type cards //
//////////////////////
const CString g_c_cs_FieldName_Stone_Mass = "Mass (kg)";
const CString g_c_cs_FieldName_Stone_Diameter = "Diameter (m)";
const CString g_c_cs_FieldName_Stone_MechanicsEngineFrequency = "Mechanics Eng. Freq.(Hz)";
const CString g_c_cs_FieldName_Stone_Center_X = "Center X";
const CString g_c_cs_FieldName_Stone_Center_Y = "Center Y";
const CString g_c_cs_FieldName_Stone_Center_Z = "Center Z";
/////////////////////
// Raft type cards //
/////////////////////
const CString g_c_cs_FieldName_Raft_TorqueResistance = "Torque Resistance";
const CString g_c_cs_FieldName_Raft_IAxisModificator = "I Axis Modificator";
const CString g_c_cs_FieldName_Raft_JAxisModificator = "J Axis Modificator";
const CString g_c_cs_FieldName_Raft_SinkCoeff = "Sink Coeff";
const CString g_c_cs_FieldName_Raft_SinkMaxDistance = "Sink Max Distance";
const CString g_c_cs_FieldName_Raft_VerticalSpeedTreshold = "Vertical Speed Treshold (m/s)";
const CString g_c_cs_FieldName_Raft_MaxAngularSpeed = "Max Angular Speed (rad/s)";
const CString g_c_cs_FieldName_Raft_AngularSpeedTreshold = "Angular Speed Treshold (rad/s)";
/////////////////////////
// Platform type cards //
/////////////////////////
const CString g_c_cs_FieldName_Platform_Mass = "Mass (kg)";
const CString g_c_cs_FieldName_Platform_MinLinearSpeed = "Min Linear Speed (m/s)";
const CString g_c_cs_FieldName_Platform_MaxLinearSpeed = "Max Linear Speed (m/s)";
const CString g_c_cs_FieldName_Platform_MinAngularSpeed = "Min Angular Speed (deg/s)";
const CString g_c_cs_FieldName_Platform_MaxAngularSpeed = "Max Angular Speed (deg/s)";
const CString g_c_cs_FieldName_Platform_GravityRatio = "Gravity Ratio";
const CString g_c_cs_FieldName_Platform_ViscosityFactor = "Viscosity Factor";
const CString g_c_cs_FieldName_Platform_StiffnessFactor = "Stiffness Factor";
//ANNECY jt {
/////////////////////
// Base type cards //
/////////////////////
const CString g_c_cs_FieldName_Base_Animation = "Animation";
const CString g_c_cs_FieldName_Base_Collide = "Collide";
const CString g_c_cs_FieldName_Base_Gravity = "Gravity";
const CString g_c_cs_FieldName_Base_Tilt = "Tilt";
const CString g_c_cs_FieldName_Base_Gi = "Gi";
const CString g_c_cs_FieldName_Base_Climb = "Climb";
const CString g_c_cs_FieldName_Base_OnGround = "OnGround";
const CString g_c_cs_FieldName_Base_Spider = "Spider";
const CString g_c_cs_FieldName_Base_Shoot = "Shoot";
const CString g_c_cs_FieldName_Base_Swim = "Swim";
const CString g_c_cs_FieldName_Base_CollisionControl = "Collision control";
const CString g_c_cs_FieldName_Base_KeepSpeedZ = "KeepSpeedZ";
const CString g_c_cs_FieldName_Base_SpeedLimit = "SpeedLimit";
const CString g_c_cs_FieldName_Base_Inertia = "Inertia";
const CString g_c_cs_FieldName_Base_Stream = "Stream";
const CString g_c_cs_FieldName_Base_StickOnPlatform = "StickOnPlatform";
const CString g_c_cs_FieldName_Base_Scale = "Scale";
const CString g_c_cs_FieldName_Base_GravityFactor = "g";
const CString g_c_cs_FieldName_Base_Slide = "Slide";
const CString g_c_cs_FieldName_Base_Rebound = "Rebound";
const CString g_c_cs_FieldName_Base_SlopeLimit = "SlopeLimit";
const CString g_c_cs_FieldName_Base_InertiaFactorX = "Ix";
const CString g_c_cs_FieldName_Base_InertiaFactorY = "Iy";
const CString g_c_cs_FieldName_Base_InertiaFactorZ = "Iz";
const CString g_c_cs_FieldName_Base_TiltIntensity = "TiltIntensity";
const CString g_c_cs_FieldName_Base_TiltInertia = "TiltInertia";
const CString g_c_cs_FieldName_Base_TiltOrigin = "TiltOrigin";
const CString g_c_cs_FieldName_Base_MaxSpeed = "MaxSpeed";
//ENDANNECY jt }
#endif //_EMEC_FIELDS_DESCRIPTOR_STRINGS_

View File

@@ -0,0 +1,81 @@
// MainFrm.h : interface of the CPA_Meca_MainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#ifndef _MAINFRM_H_
#define _MAINFRM_H_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "ACP_Base.h"
#include "ITF.h"
#include "IncMEC.h"
#define D_State_Define
#include "IncGAM.h"
#undef D_State_Define
#include "GLI.h"
#define C_ROW_INDEX_CONTROL 0
#define C_ROW_INDEX_INFO 1
#define C_ROW_INDEX_MINI_STRUC 2
//-----------------IR-------------------------
#ifdef D_ED_IR_ACTIVE
#define C_ROW_INDEX_DES_VAR 3
#endif //D_ED_IR_ACTIVE
//--------------------------------------------
class CPA_Meca_MainFrame : public CSplitFrame
{
public:
CPA_Meca_MainFrame();
protected: // create from serialization only
// DECLARE_DYNCREATE(CFrameWnd)
// Attributes
public:
// CPA_Editor_SplitterWnd m_clSplitter;
private:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPA_Meca_MainFrame)
// public:
// virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
//}}AFX_VIRTUAL
//Attributes
public:
protected: // control bar embedded members
// Generated message map functions
protected:
//{{AFX_MSG(CPA_Meca_MainFrame)
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
// Implementation
public:
virtual ~CPA_Meca_MainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
};
/////////////////////////////////////////////////////////////////////////////
#endif //_MAINFRM_H_

View File

@@ -0,0 +1,24 @@
// Mechanics Editor constant Strings
////////////////////////////////////////
#ifndef _EDMECA_STRINGS_
#define _EDMECA_STRINGS_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "x:\cpa\Main\inc\_EditId.h"
//Used for Errors
const CString g_c_csMecaModuleNameForErrors = "Mechanics Editor";
//DLL Name
const CString g_c_csDLLMecaName = C_szDLLMecaName;
//Objects Names
const CString g_c_csMecaCardTypeName = C_szMecaCardTypeName;
#define M_MAKECHAR(a) ((char *)LPCSTR(a))
#endif //_EDMECA_STRINGS_

View File

@@ -0,0 +1,103 @@
// cpacvwms.hpp : header file
/////////////////////////////////////////////////////////////////////////////
#ifndef _CPACVWMS_HPP_
#define _CPACVWMS_HPP_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "Meca_Res.h"
//External Modules
#include "CTL.h"
//End of External Modules
class CPA_Meca_MyDocument;
class CPA_Meca_Card;
class CPA_Meca_CardType;
class CPA_Meca_CardTypeList;
/////////////////////////////////////////////////////////////////////////////
// CPA_Meca_MiniStrucView form view
#ifndef __AFXEXT_H__
#include <afxext.h>
#endif
class CPA_Meca_MiniStrucView : public CTL_Editor_BaseFormView
{
public:
CPA_Meca_MiniStrucView();
protected:
DECLARE_DYNCREATE(CPA_Meca_MiniStrucView)
// Attributes
public:
CRect m_crEditionRect;
protected:
private:
CPA_Meca_CardType *m_pclOldCardType;
// Implementation
public:
void m_fn_vDisplaySelectedCard();
void m_fn_vUpdateAllDatas();
//To display a Card (<--> Datas)
void m_fn_vEditCard(CPA_Meca_Card *pclNewCard);
//To display a Card Type (<--> the associated controls)
void m_fn_vDisplayCardType( CPA_Meca_CardType *pclNewCardType,
BOOL bMustRepaint = FALSE);
CPA_Meca_MyDocument* m_fn_pclGetDocument();
protected:
private:
void m_fn_vCreateAllMS();
void m_fn_vCreateMS(CPA_Meca_CardTypeList *pclList);
// Form Data
public:
//{{AFX_DATA(CPA_Meca_MiniStrucView)
enum { IDD = IDD_MECA_DIALOG_MS_VIEW };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPA_Meca_MiniStrucView)
//protected:
public:
// virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual void OnInitialUpdate();
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CPA_Meca_MiniStrucView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
//{{AFX_MSG(CPA_Meca_MiniStrucView)
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
#endif //_CPACVWMS_HPP_

View File

@@ -0,0 +1,82 @@
// Interface of the CPA_Meca_ControlView class
/////////////////////////////////////////////////////////////////////////////
#ifndef _ED_MECA_CONTROL_VIEW_HPP_
#define _ED_MECA_CONTROL_VIEW_HPP_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
class CPA_Meca_MyDocument;
class CPA_Meca_Card;
class CPA_Meca_CardType;
//###########################################################################
class CPA_Meca_ControlView : public CFormView
{
public:
CPA_Meca_ControlView();
virtual ~CPA_Meca_ControlView();
protected: // create from serialization only
DECLARE_DYNCREATE(CPA_Meca_ControlView)
// Attributes
public:
protected:
private:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPA_Meca_ControlView)
public:
virtual void OnInitialUpdate();
//}}AFX_VIRTUAL
// Implementation
public:
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
CPA_Meca_MyDocument* m_fn_pclGetDocument();
void m_fn_vUpdateCardsNumber(CPA_Meca_CardType *_pclCardType);
void m_fn_vUpdateCardsName();
protected:
private:
// Generated message map functions
protected:
//{{AFX_MSG(CPA_Meca_ControlView)
afx_msg void OnButtonCreate();
afx_msg void OnButtonDelete();
afx_msg void OnButtonRename();
afx_msg void OnSelchangeComboCardTypes();
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnButtonCopy();
afx_msg void OnDestroy();
//}}AFX_MSG
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR * pTTTStruct, LRESULT * pResult);
DECLARE_MESSAGE_MAP()
friend class CPA_Meca_MyDocument;
};
/////////////////////////////////////////////////////////////////////////////
#endif //_ED_MECA_CONTROL_VIEW_HPP_

Binary file not shown.

View File

@@ -0,0 +1,197 @@
; CLW file contains information for the MFC ClassWizard
[General Info]
Version=1
LastClass=CPA_Meca_InformationDialog
LastTemplate=CDialog
NewFileInclude1=#include "stdafx.h"
NewFileInclude2=#include "edmeca.h"
LastPage=0
ClassCount=15
Class1=CPA_Editor_BaseFormView
Class2=CPA_Editor_MiniStructureButton
Class3=CPA_Editor_EditButton
Class4=CPA_Editor_CheckBox
Class5=CPA_Editor_Edit
Class6=CPA_Editor_SplitterWnd
Class7=CPA_Editor_SpinButton
Class8=CPA_Editor_Static
Class9=CPA_Meca_InformationDialog
Class10=CPA_Meca_NewCardDialog
Class11=CPA_Meca_QuestionDialog
Class12=CPA_Meca_EditorSetupDialog
Class13=CPA_Meca_MainFrame
Class14=CPA_Meca_ControlView
Class15=CPA_Meca_MiniStrucView
ResourceCount=6
Resource1=IDD_MECA_DIALOG_NEW_CARD
Resource2=IDD_MECA_DIALOG_QUESTION
Resource3=IDD_MECA_DIALOG_SETUP
Resource4=IDD_MECA_DIALOG_MS_VIEW
Resource5=IDD_MECA_DIALOG_INFO
Resource6=IDD_MECA_DIALOG_CONTROL
[CLS:CPA_Editor_BaseFormView]
Type=0
BaseClass=CFormView
HeaderFile=CPA_VBas.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\CPA_VBas.cpp
LastObject=CPA_Editor_BaseFormView
[CLS:CPA_Editor_MiniStructureButton]
Type=0
BaseClass=CButton
HeaderFile=CPA_WBuM.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\CPA_WBuM.cpp
[CLS:CPA_Editor_EditButton]
Type=0
BaseClass=CButton
HeaderFile=CPA_WBut.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\CPA_WBut.cpp
[CLS:CPA_Editor_CheckBox]
Type=0
BaseClass=CButton
HeaderFile=CPA_WCkB.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\CPA_WCkB.cpp
[CLS:CPA_Editor_Edit]
Type=0
BaseClass=CEdit
HeaderFile=CPA_WEdt.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\CPA_WEdt.cpp
[CLS:CPA_Editor_SplitterWnd]
Type=0
BaseClass=CSplitterWnd
HeaderFile=CPA_WSpl.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\CPA_WSpl.cpp
[CLS:CPA_Editor_SpinButton]
Type=0
BaseClass=CSpinButtonCtrl
HeaderFile=CPA_WSpn.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\CPA_WSpn.cpp
[CLS:CPA_Editor_Static]
Type=0
BaseClass=CStatic
HeaderFile=CPA_WSta.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\CPA_WSta.cpp
[CLS:CPA_Meca_InformationDialog]
Type=0
BaseClass=CDialog
HeaderFile=EMECDgIf.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\EMECDgIf.cpp
Filter=D
VirtualFilter=dWC
LastObject=CPA_Meca_InformationDialog
[CLS:CPA_Meca_NewCardDialog]
Type=0
BaseClass=CDialog
HeaderFile=EMECDgNC.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\EMECDgNC.cpp
LastObject=CPA_Meca_NewCardDialog
Filter=D
VirtualFilter=dWC
[CLS:CPA_Meca_QuestionDialog]
Type=0
BaseClass=CDialog
HeaderFile=EMECDgQu.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\EMECDgQu.cpp
Filter=D
VirtualFilter=dWC
LastObject=CPA_Meca_QuestionDialog
[CLS:CPA_Meca_EditorSetupDialog]
Type=0
BaseClass=CDialog
HeaderFile=EMECDgSp.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\EMECDgSp.cpp
[CLS:CPA_Meca_MainFrame]
Type=0
BaseClass=CSplitFrame
HeaderFile=EMECFmMn.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\EMECFmMn.cpp
[CLS:CPA_Meca_ControlView]
Type=0
BaseClass=CFormView
HeaderFile=EMECVwMn.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\EMECVwMn.cpp
Filter=D
VirtualFilter=VWC
LastObject=CPA_Meca_ControlView
[CLS:CPA_Meca_MiniStrucView]
Type=0
BaseClass=CPA_Editor_BaseFormView
HeaderFile=EMECVwMS.hpp
ImplementationFile=\Cpa\TempGrp\TME\Src\EMECVwMS.cpp
[DLG:IDD_MECA_DIALOG_INFO]
Type=1
Class=CPA_Meca_InformationDialog
ControlCount=3
Control1=IDOK,button,1342242817
Control2=IDC_STATIC_TEXT,static,1342312449
Control3=IDC_STATIC_IMAGE,static,1342177294
[DLG:IDD_MECA_DIALOG_NEW_CARD]
Type=1
Class=CPA_Meca_NewCardDialog
ControlCount=4
Control1=IDOK,button,1342242817
Control2=IDCANCEL,button,1342242816
Control3=IDC_STATIC,static,1342308352
Control4=IDC_EDIT_NAME,edit,1350631552
[DLG:IDD_MECA_DIALOG_QUESTION]
Type=1
Class=CPA_Meca_QuestionDialog
ControlCount=4
Control1=IDYES,button,1342242817
Control2=IDNO,button,1342242816
Control3=IDC_STATIC_QUESTION,static,1342312449
Control4=IDC_EDIT_BIDON,edit,1350631552
[DLG:IDD_MECA_DIALOG_SETUP]
Type=1
Class=CPA_Meca_EditorSetupDialog
ControlCount=10
Control1=IDOK,button,1342242817
Control2=IDCANCEL,button,1342242816
Control3=IDC_STATIC,button,1342177287
Control4=IDC_STATIC,static,1342308354
Control5=IDC_STATIC,static,1342308352
Control6=IDC_STATIC,static,1342308352
Control7=IDC_RECT_TEXT_FIELD_INST,static,1342177298
Control8=IDC_RECT_BG_FIELD_INST,static,1342177298
Control9=IDC_STATIC,button,1342177287
Control10=IDC_CHECK_KEEP_PREVIOUS_EDITION,button,1476481027
[DLG:IDD_MECA_DIALOG_MS_VIEW]
Type=1
Class=CPA_Meca_MiniStrucView
ControlCount=0
[DLG:IDD_MECA_DIALOG_CONTROL]
Type=1
Class=CPA_Meca_ControlView
ControlCount=8
Control1=IDC_STATIC,static,1342308352
Control2=IDC_BUTTON_CREATE,button,1342242880
Control3=IDC_BUTTON_RENAME,button,1476460608
Control4=IDC_BUTTON_DELETE,button,1476460608
Control5=IDC_STATIC_CARD_NUMBER,static,1342312449
Control6=IDC_LIST_CARD_TYPES,listbox,1352728835
Control7=IDC_TEXT_CARD_NAME,static,1342312449
Control8=IDC_BUTTON_COPY,button,1476460608

View File

@@ -0,0 +1,299 @@
//Microsoft Developer Studio generated resource script.
//
#include "Meca_Res.h"
// Generated Help ID header file
#define APSTUDIO_HIDDEN_SYMBOLS
#include "Meca_Res.hm"
#undef APSTUDIO_HIDDEN_SYMBOLS
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"Meca_Res.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 12, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif\r\n"
"#include ""EdMeca.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""l.fra\\afxres.rc"" // Standard components\r\n"
"#endif\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME ICON DISCARDABLE "..\\res\\EdCarac.ico"
IDI_ICON_BUTTON_CREATE ICON DISCARDABLE "..\\res\\icon1.ico"
IDI_ICON_BUTTON_DELETE ICON DISCARDABLE "..\\res\\icon_but.ico"
IDI_ICON_BUTTON_RENAME ICON DISCARDABLE "..\\res\\ico00001.ico"
IDI_ICON_BUTTON_COPY ICON DISCARDABLE "..\\res\\ico00002.ico"
IDI_TME_DLGBAR_ICON ICON DISCARDABLE "..\\res\\tme_dlgb.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_MECA_DIALOG_CONTROL DIALOG DISCARDABLE 0, 0, 170, 114
STYLE DS_MODALFRAME | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Current type of Card :",IDC_STATIC,1,1,67,9
PUSHBUTTON "Cr<43>er",IDC_BUTTON_CREATE,139,0,25,24,BS_ICON
PUSHBUTTON "Renommer",IDC_BUTTON_RENAME,139,25,25,24,BS_ICON |
WS_DISABLED
PUSHBUTTON "Supprimer",IDC_BUTTON_DELETE,139,50,25,24,BS_ICON |
WS_DISABLED
CTEXT "Number of Cards",IDC_STATIC_CARD_NUMBER,74,0,61,10,
SS_SUNKEN
LISTBOX IDC_LIST_CARD_TYPES,0,11,135,89,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
CTEXT "Card's Name",IDC_TEXT_CARD_NAME,0,102,135,11,SS_SUNKEN
PUSHBUTTON "Supprimer",IDC_BUTTON_COPY,139,75,25,24,BS_ICON |
WS_DISABLED
END
IDD_MECA_DIALOG_QUESTION DIALOG DISCARDABLE 0, 0, 277, 67
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Mechanics Editor - Question"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "Yes",IDYES,108,46,50,14
PUSHBUTTON "No",IDNO,170,46,50,14
CTEXT "Static",IDC_STATIC_QUESTION,59,7,211,35,SS_SUNKEN
EDITTEXT IDC_EDIT_BIDON,3,7,40,38,ES_AUTOHSCROLL
END
IDD_MECA_DIALOG_SETUP DIALOGEX 0, 0, 225, 115
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Mechanics Editor - Setup"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,55,98,50,14
PUSHBUTTON "Annuler",IDCANCEL,119,98,50,14
GROUPBOX "Aspect de l'<27>diteur",IDC_STATIC,6,47,211,43
RTEXT "Nom des champs :",IDC_STATIC,22,71,115,8
LTEXT "Fond :",IDC_STATIC,159,58,21,8
LTEXT "Texte :",IDC_STATIC,133,58,23,8
CONTROL "",IDC_RECT_TEXT_FIELD_INST,"Static",SS_ETCHEDFRAME,140,
70,13,12
CONTROL "",IDC_RECT_BG_FIELD_INST,"Static",SS_ETCHEDFRAME,162,70,
13,12
GROUPBOX "G<>n<EFBFBD>ral",IDC_STATIC,6,2,211,41
CONTROL "ESSAI",IDC_CHECK_KEEP_PREVIOUS_EDITION,"Button",
BS_AUTOCHECKBOX | BS_PUSHLIKE | BS_NOTIFY | WS_DISABLED |
WS_TABSTOP,12,11,197,10,0,
HIDC_CHECK_KEEP_PREVIOUS_EDITION
END
IDD_MECA_DIALOG_MS_VIEW DIALOG DISCARDABLE 0, 0, 72, 17
STYLE DS_MODALFRAME | WS_CHILD | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
BEGIN
END
IDD_MECA_DIALOG_INFO DIALOG DISCARDABLE 0, 0, 277, 67
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Mechanics Editor - Information"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "Continue !",IDOK,113,46,50,14
CTEXT "Static",IDC_STATIC_TEXT,59,7,211,35,SS_SUNKEN
CONTROL "",IDC_STATIC_IMAGE,"Static",SS_BITMAP,7,7,37,34
END
IDD_MECA_DIALOG_NEW_CARD DIALOG DISCARDABLE 0, 0, 196, 54
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Mechanics Editor - Card creation"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,45,36,50,14
PUSHBUTTON "Cancel",IDCANCEL,100,36,50,14
LTEXT "Donnez un nom <20> la nouvelle fiche :",IDC_STATIC,0,5,144,
8
EDITTEXT IDC_EDIT_NAME,0,15,196,14,ES_AUTOHSCROLL
END
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "Application ""Editeur de M<>canique""\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "EdMeca\0"
VALUE "LegalCopyright", "Copyright <20> 1996\0"
VALUE "OriginalFilename", "EdMeca.dll\0"
VALUE "ProductName", "Editeur de M<>canique\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_MECA_DIALOG_CONTROL, DIALOG
BEGIN
BOTTOMMARGIN, 113
END
IDD_MECA_DIALOG_QUESTION, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 270
TOPMARGIN, 7
BOTTOMMARGIN, 60
END
IDD_MECA_DIALOG_SETUP, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 218
TOPMARGIN, 7
BOTTOMMARGIN, 108
END
IDD_MECA_DIALOG_MS_VIEW, DIALOG
BEGIN
BOTTOMMARGIN, 16
END
IDD_MECA_DIALOG_INFO, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 270
TOPMARGIN, 7
BOTTOMMARGIN, 60
END
IDD_MECA_DIALOG_NEW_CARD, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 189
TOPMARGIN, 7
BOTTOMMARGIN, 47
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_BITMAP_QUESTION BITMAP DISCARDABLE "..\\res\\bitmap_q.bmp"
IDB_BITMAP_INFO1 BITMAP DISCARDABLE "..\\res\\bitmap_i.bmp"
IDB_BITMAP_INFO2 BITMAP DISCARDABLE "..\\res\\bmp00010.bmp"
IDB_BITMAP_INFO3 BITMAP DISCARDABLE "..\\res\\bmp00011.bmp"
IDB_BITMAP_INFO4 BITMAP DISCARDABLE "..\\res\\bmp00012.bmp"
IDB_BITMAP_INFO5 BITMAP DISCARDABLE "..\\res\\bmp00013.bmp"
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE 12, 1
#pragma code_page(1252)
#endif
#include "EdMeca.rc2" // non-Microsoft Visual C++ edited resources
#include "l.fra\afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,13 @@
//
// EDCARAC.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,82 @@
// Constants and defines for the definition of ths list of MS
///////////////////////////////////////////////////////////////
#ifndef _EDIT_MECA_DEF_HPP_
#define _EDIT_MECA_DEF_HPP_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "SCR.h"
//Include here the header where are defined the motor structures
//#undef extern
//Eventually add here the other motor useful headers
//#include "enum.h"
//...
//Declare here the filling functions for the MS you have created
class CPA_Meca_Card;
void fn_vFillCard1(CPA_Meca_Card *pclCard);
void fn_vFillCard2(CPA_Meca_Card *pclCard);
void fn_vFillCard3(CPA_Meca_Card *pclCard);
void fn_vFillCard4(CPA_Meca_Card *pclCard);
void fn_vFillCard5(CPA_Meca_Card *pclCard);
void fn_vFillCard6(CPA_Meca_Card *pclCard);
void fn_vFillCard7(CPA_Meca_Card *pclCard);
void fn_vFillCard8(CPA_Meca_Card *pclCard);
void fn_vFillCard9(CPA_Meca_Card *pclCard);
void fn_vFillCard10(CPA_Meca_Card *pclCard);
void fn_vFillCard11(CPA_Meca_Card *pclCard);
void fn_vFillCard12(CPA_Meca_Card *pclCard);
void fn_vFillCard13(CPA_Meca_Card *pclCard);
void fn_vFillCard14(CPA_Meca_Card *pclCard);
void fn_vFillCardRay2Egypte1(CPA_Meca_Card *pclCard);
void fn_vSaveCard1(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard2(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard3(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard4(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard5(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard6(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard7(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard8(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard9(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard10(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard11(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard12(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard13(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCard14(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
void fn_vSaveCardRay2Egypte1(SCR_tdst_File_Description *p_tdstFile, CPA_Meca_Card *pclCard);
//*********************************************************************
//Other defines to simplify MS and pointers definitions
#define EDMEC_READ_ONLY TRUE
#define EDMEC_READ_WRITE FALSE
//Controls Spacing
#define EDMEC_AUTO_SPACE EDCAR_SPACING_AUTO
#define EDMEC_SINGLE_LINE EDCAR_SPACING_SINGLE_LINE
#define EDMEC_FIXED_SIZE EDCAR_SPACING_FIXED_SIZE
//Constants for integers declarations
#define EDMEC_SIGNED_INT TRUE
#define EDMEC_UNSIGNED_INT FALSE
#define EDMEC_CHAR_INT 1
#define EDMEC_SHORT_INT 2
#define EDMEC_LONG_INT 4
//Constants for decimal declarations
#define EDMEC_FLOAT 4
#define EDMEC_DOUBLE 8
#define EDMEC_LONG_DOUBLE 10
//Constants for data level declarations
#define LEVEL_1 EDCAR_DATA_LEVEL_1
#define LEVEL_2 EDCAR_DATA_LEVEL_2
#define LEVEL_3 EDCAR_DATA_LEVEL_3
#endif //_EDIT_MECA_DEF_HPP_

Binary file not shown.

View File

@@ -0,0 +1,13 @@
//
// EDCARAC.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,49 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by EdMeca.rc
//
#define IDR_MAINFRAME 128
#define IDD_MECA_DIALOG_CONTROL 130
#define IDD_MECA_DIALOG_SETUP 162
#define IDB_BITMAP_QUESTION 168
#define IDD_MECA_DIALOG_NEW_CARD 170
#define IDI_ICON_BUTTON_CREATE 171
#define IDI_ICON_BUTTON_DELETE 172
#define IDI_ICON_BUTTON_RENAME 173
#define IDI_ICON_BUTTON_COPY 174
#define IDI_TME_DLGBAR_ICON 176
#define IDB_BITMAP_INFO1 178
#define IDB_BITMAP_INFO2 179
#define IDB_BITMAP_INFO3 180
#define IDB_BITMAP_INFO4 181
#define IDB_BITMAP_INFO5 182
#define IDD_MECA_DIALOG_MS_VIEW 311
#define IDC_RECT_TEXT_FIELD_INST 1062
#define IDC_RECT_BG_FIELD_INST 1063
#define IDC_CHECK_KEEP_PREVIOUS_EDITION 1083
#define IDC_STATIC_QUESTION 1091
#define IDD_MECA_DIALOG_QUESTION 1091
#define IDD_MECA_DIALOG_INFO 1092
#define IDC_STATIC_IMAGE 1097
#define IDC_STATIC_TEXT 1100
#define IDC_EDIT_BIDON 1102
#define IDC_BUTTON_CREATE 1105
#define IDC_BUTTON_RENAME 1106
#define IDC_EDIT_NAME 1106
#define IDC_BUTTON_DELETE 1107
#define IDC_BUTTON_COPY 1108
#define IDC_STATIC_CARD_NUMBER 1109
#define IDC_LIST_CARD_TYPES 1110
#define IDC_TEXT_CARD_NAME 1111
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 177
#define _APS_NEXT_COMMAND_VALUE 32785
#define _APS_NEXT_CONTROL_VALUE 1114
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,5 @@
// Microsoft Developer Studio generated Help ID include file.
// Used by EdMeca.rc
//
#define HIDC_CHECK_KEEP_PREVIOUS_EDITION \
0x80a2043b // IDD_MECA_DIALOG_SETUP

View File

@@ -0,0 +1,18 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#ifndef __STDAAFX_H__
#define __STDAAFX_H__
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#endif //__STDAAFX_H__

View File

@@ -0,0 +1,153 @@
// Header for the definition of the class representing a Mechanical Card
//////////////////////////////////////////////////////////////////////////
#ifndef _CPA_MECA_CARD_HPP_
#define _CPA_MECA_CARD_HPP_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include <afxtempl.h>
#include "ACP_Base.h"
#include "ITF.h"
#include "IncMEC.h"
#define D_State_Define
#include "IncGAM.h"
#undef D_State_Define
#include "GLI.h"
//External Modules
#include "CTL.h"
//End of External Modules
class CPA_Meca_CardType;
class CPA_Meca_Card : public CPA_SaveObject
{
public:
CPA_Meca_Card(CString csName,
CPA_Meca_CardType *pclCardType,
CString csEngineFileName,
CString csEngineActionName,
void *pvBaseAddress,
BOOL bCanbBeLoaded = FALSE);
~CPA_Meca_Card();
//---------------------------------------
//Attributes
public:
//The list of data
CTL_Editor_DataList m_clDataList;
BOOL m_bDataCreated;
//Undo Manager
CPA_EditManager m_clUndoManager;
protected:
private:
//The Name of the Card
// CString m_csCardName;
//The Base Address for Data (ie the address where the Structure is located)
void *m_pvBaseAddress;
//The base Card Type
CPA_Meca_CardType *m_pclCardType;
//
CString m_pri_csActionName;
CString m_pri_csCompleteFileName;
CString m_pri_csReferencedFileName;
//
BOOL m_pri_bIsNotified;
//---------------------------------------
//Functions
public:
void *GetEngineStruct();
void *m_fn_pvGetBaseAddress();
void m_fn_vSetBaseAddress(void *);
CString m_fn_csGetCardName();
void m_fn_vSetCardName(CString);
CPA_Meca_CardType *m_fn_pclGetCardType();
void m_fn_pclSetCardType(CPA_Meca_CardType *);
//Virtual functions
virtual long GetDataType(void);
virtual void *GetData(void);
virtual BOOL fn_bCanBeNotified(void);
//For saving
static void s_m_fn_vCallBackSaveMecaCard( SCR_tdst_File_Description *_p_stFile,
char *_p_szSectionName,
void *_p_vData,
SCR_tde_Ntfy_Action _eAction);
void m_fn_vSaveMecaCard(SCR_tdst_File_Description *p_tdstFile,
SCR_tde_Ntfy_Action _eAction);
BOOL m_fn_bLoadIfUnloaded();
//
CString m_pub_fn_csGetActionName();
void m_pub_fn_vSetActionName(CString);
CString m_pub_fn_csGetReferencedFileName();
CString m_pub_fn_csGetCompleteFileName();
void m_pub_fn_vSetCompleteFileName(CString);
//
BOOL m_pub_fn_bIsNotified();
//Notifications
virtual void fn_vNotifySave(void);
virtual void fn_vNotifyUnSave(void);
virtual void fn_vNotifyRestore(void);
virtual void fn_vNotifyRename(void);
//ANNECY jt {
void m_pri_fn_vGetAllMotorValues();
//ENDANNECY jt }
protected:
private:
//ANNECY jt {
// void m_pri_fn_vGetAllMotorValues();
//ENDANNECY jt }
CString m_pri_fn_csComputeReferencedSectionName();
CString m_pri_fn_csComputeCompleteSectionName();
};
//#####################################################################
// Definition of the class for the list of mini-structures
class CPA_Meca_CardList : public CList<CPA_Meca_Card *, CPA_Meca_Card *>
{
public:
CPA_Meca_CardList();
~CPA_Meca_CardList();
CPA_Meca_Card* m_fn_pclAddElement(CString,
CPA_Meca_CardType *,
void *,
CString csFileName = "",
CString csSectionName = "",
BOOL bCanbBeLoaded = FALSE);
void m_fn_vEmptyList();
//Returns the first available (i.e. loaded) Card in the List
CPA_Meca_Card *m_pub_fn_pclGetFirstAvailableCard();
};
#endif //_CPA_MECA_CARD_HPP_

View File

@@ -0,0 +1,298 @@
//**************************************
// This is the base class of your DLL interface
// All methods of CPA_ToolDLLBase are
// present in that class.
//**************************************
#ifndef __MECA_INTERF_HPP__
#define __MECA_INTERF_HPP__
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "ACP_Base.h"
#include "ITF.h"
#include "IncMEC.h"
#define D_State_Define
#include "IncGAM.h"
#undef D_State_Define
#include "GLI.h"
// YB //
// Specific Includes //
#include "EMECDoc.hpp"
#include "EMECFmMn.hpp"
// End YB //
// if you want only one instance of your DLL
// activate the next line
//#define DLL_ONLY_ONE_INSTANCE
//----------------------------------------------------------
// Tool DLL interface class
//----------------------------------------------------------
class CPA_Meca_Interface : public CPA_ToolDLLBase
{
private:
public:
CPA_Meca_Interface(void);
// ~CPA_Meca_Interface(void);
/*===========================================================================
Virtual Functions
=========================================================================*/
public:
// To pre translate all messages
// virtual BOOL fn_bPreTranslateMessage(MSG * /*p_stMsg*/) { return FALSE; };
// Called just after editor has been inserted in list of all editors
virtual void fn_vJustAfterRegistered(void);
// Called just before windows main loop processing
virtual void fn_vConstruct(void);
// Called to refresh datas of DLL if "fn_vCanBeRefresh" returns TRUE
// virtual void fn_vRefreshDatas(void);
// Called when level has changed
// virtual void fn_vLevelHasChanged (void) {};
virtual void fn_vLevelChanges(void);
virtual BOOL fn_bLoadBaseObject (CPA_BaseObject *p_oObject);
virtual void fn_vAfterSaveAll(void);
/*===========================================================================
Current Editor
=========================================================================*/
virtual tdePermission fn_eAcceptNewEditor (CPA_EditorBase *pNewEditor);
virtual BOOL fn_bCanActivateEditor(CPA_List<CPA_BaseObject> *pParams);
virtual void fn_vOnActivateEditor(CPA_List<CPA_BaseObject> *pParams, BOOL bBackActivated=FALSE);
virtual BOOL fn_bCanCloseEditor(void);
virtual void fn_vOnCloseEditor(void);
public:
/*===========================================================================
Messages from Evt_Editor
=========================================================================*/
// for changes
// virtual void fn_vOnChangeDevice (void) { }
// Editor Modifs
// virtual void fn_vOnModifDelete (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus);
// virtual void fn_vOnModifParent (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus) { }
// virtual void fn_vOnModifCopy (CPA_List<EDT_SaveParents> *pListObjects, tdeTypeModif eType, tdeStatus eStatus) { }
// virtual void fn_vOnModifName(CPA_SuperObject *pEdObj, CString csInitalName, CString csFinalName, tdeTypeModif eType, tdeStatus eStatus);
// virtual void fn_vOnSelect(CPA_SuperObject *pEdObj, tdeTypeModif eType, tdeStatus eStatus);
// virtual void fn_vOnModifInsert(CPA_SuperObject *pEdObj, CPA_SuperObject *pParent,
// tdstPosition *p_stPosition, tdeTypeModif eType, tdeStatus eStatus) { }
// Moves
// virtual void fn_vOnModifMove(CPA_List<EDT_SavePos> *pListObjects, CPA_List<EDT_SaveGlobalPos> *pListConcerned, tdeTypeModif eType, tdeStatus eStatus) { }
// virtual void fn_vOnBeginMove(CPA_List<CPA_SuperObject> *pListObjects, CPA_List<CPA_SuperObject> *pListConcerned, tdeStatus eStatus) { }
// virtual void fn_vOnMoving(CPA_List<CPA_SuperObject> *pListObjects, CPA_List<CPA_SuperObject> *pListConcerned, tdeStatus eStatus) { }
// Models
// virtual void fn_vOnAddModelToList(CPA_ObjectDLLBase *pOwnerDLL, CString csListName, CString csModelName, tdeTypeModif eType) { }
// permission
// virtual BOOL fn_bAcceptModifDelete(CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
// virtual BOOL fn_bAcceptModifParent(CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus) { return TRUE; }
// virtual BOOL fn_bAcceptModifCopy(CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus);
// virtual BOOL fn_bAcceptModifTranslate(CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus) { return TRUE; }
// virtual BOOL fn_bAcceptModifRotate(CPA_List<CPA_SuperObject> *pListObjects, tdeStatus eStatus) { return TRUE; }
// virtual BOOL fn_bAcceptModifInsert(CPA_SuperObject *pEdObj, CPA_SuperObject *pParent, tdeStatus eStatus) { return TRUE; }
// virtual BOOL fn_bAcceptModifScale(CPA_SuperObject *pEdObj, tdeStatus eStatus) { return TRUE; }
// virtual BOOL fn_bAcceptModifName(CPA_SuperObject *pEdObj, tdeStatus eStatus);
// virtual BOOL fn_bAcceptMultiSelect(void) { return TRUE; }
// to precise selection
// virtual tdeTypeAnswer fn_bAcceptSelect(CPA_SuperObject *pEdObj, ACP_tdxIndex xIndex, HIE_tdstPickInfo *pPicking, tdeStatus eStatus);
/*===========================================================================
Dialog List
=========================================================================*/
// virtual BOOL fn_bSetCustomTest (CPA_DialogList *pDialog) { return FALSE; }
// virtual BOOL fn_bCustomTestFunction (CString csCurrentType, CString csTestName, CPA_SaveObject *pEdObj) { return TRUE; }
/*===========================================================================
General Purpose
=========================================================================*/
long OnQueryAction (CPA_EditorBase * /*p_oSender*/, WPARAM, LPARAM);
// virtual long OnQueryInfos (CPA_DLLBase * /*p_oSender*/, WPARAM, LPARAM) { return 0; };
// virtual long OnQueryOpen (CPA_DLLBase * /*p_oSender*/, WPARAM, LPARAM) { return 0; };
// virtual long OnQueryClose (CPA_DLLBase * /*p_oSender*/, WPARAM, LPARAM) { return 0; };
/*===========================================================================
Coherence
=========================================================================*/
// virtual BOOL fn_bOnInvalidateLink (CPA_ObjectBase *pOwner, CPA_ObjectBase *pReferencedObject, BOOL bDestroyed) { return FALSE; }
// virtual void fn_vOnRestoreLink (CPA_ObjectBase *pOwner, CPA_ObjectBase *pReferencedObject) { }
/*===========================================================================
Messages
=========================================================================*/
// focus
virtual void fn_vHasLostFocus (void);
virtual BOOL fn_bHasGainedFocus (void);
// engine - editor
virtual void fn_vBeforeEngine (void);
virtual void fn_vBeforeEditor (void);
// engine
// virtual BOOL fn_bAcceptToRunEngine(void) { return TRUE; };
// virtual BOOL fn_bAcceptToRunTimerEngine (void) { return TRUE; };
// end appli
// virtual void fn_vJustBeforeClosing (void) { };
// virtual BOOL fn_bAcceptToExit (void) { return TRUE; };
// keys
// virtual BOOL _OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags) { return FALSE; };
// virtual BOOL _OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags) { return FALSE; };
// mouse
// virtual BOOL _OnMouseMove (UINT nFlags, tdstMousePos *p_stPos, MTH3D_tdstVector *p_stVect) { return FALSE; };
// virtual BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo) { return FALSE; };
// virtual BOOL _OnRButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo) { return FALSE; };
// virtual BOOL _OnLButtonDown (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo) { return FALSE; };
// virtual BOOL _OnRButtonDown (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo) { return FALSE; };
// virtual BOOL _OnLButtonUp (UINT nFlags, tdstMousePos *p_stPos) { return FALSE; };
// virtual BOOL _OnRButtonUp (UINT nFlags, tdstMousePos *p_stPos) { return FALSE; };
// command
// virtual BOOL _OnCommand (UINT IDCmdMsg) { return FALSE; };
// virtual BOOL _OnUpdateCommandUI (UINT uiID, CCmdUI *pCmdUI) { return FALSE; };
// dragdrop
// virtual BOOL _OnDragDropEnd (WPARAM wParam, LPARAM lParam) { return FALSE; };
// virtual BOOL _OnDragDropMove (WPARAM wParam, LPARAM lParam) { return FALSE; };
// virtual BOOL _OnDragDropLooseFocus (WPARAM wParam, LPARAM lParam) { return FALSE; };
// virtual BOOL _OnDragDropGainFocus (WPARAM wParam, LPARAM lParam) { return FALSE; };
// add objects to draw
// virtual void fn_vAddObjectsToDraw (GLD_tdstViewportAttributes *p1, GLI_tdxHandleToLight p2) { };
// virtual void fn_vAddObjectsToDraw2 (GLD_tdstViewportAttributes *p1, GLI_tdxHandleToLight p2) { };
/*===========================================================================
Reinit
=========================================================================*/
// virtual void fn_vOnChangeRoot (void) { };
// virtual void fn_vOnChangeWorld (void) { };
/*===========================================================================
for Dialog List
=========================================================================*/
virtual CPA_BaseObject *GetDialogSelection(CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDrawMode);
virtual void GetListsForDialog (CPA_DialogList *pDialog);
// virtual BOOL fn_bOnSelChangeHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pSelectedObject) { return FALSE; };
// virtual BOOL fn_bOnDblClkHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pSelectedObject) { return FALSE; };
virtual BOOL fn_bOnSelChangeListObjects(CPA_DialogList *pDialog, CString csTypeName, CPA_BaseObject *pSelectedObject, BOOL bUnselect);
// virtual BOOL fn_bOnDblClkListObjects (CPA_DialogList *pDialog, CString csTypeName, CPA_SaveObject *pSelectedObject) { return FALSE; };
// virtual BOOL fn_bCanDragItemInHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pObjectToDrag) { return FALSE; };
// virtual BOOL fn_bCanDropItemInHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pObjectToDrop, CPA_SuperObject *pTarget) { return FALSE; };
// virtual BOOL fn_bOnDragDropInHierarchyTree (CPA_DialogList *pDialog, CString csTypeName, CPA_SuperObject *pObject, CPA_SuperObject *pTarget) { return FALSE; };
virtual BOOL fn_bOnSelChangeComboList(CPA_DialogList *pDialog, CString csTypeName);
virtual BOOL fn_bOnButtonTest(CPA_DialogList *pDialog, CString csTypeName, tdeListDrawMode eDraw);
virtual void fn_vInitDefaultParameters(CPA_DialogList *pDialog);
virtual void fn_vSetANewTest(CPA_DialogList *pDialog, CString csCurrentList);
virtual BOOL fn_bTestFunction(CString csCurrentType, CString csTestName, CPA_BaseObject *pEdObj);
/*===========================================================================
Dialog Bar - Mircea Dunka 31 Aug. 1998
=========================================================================*/
void fn_vDefineDlgBarBtnIcon (tde_DlgBarCategory wCategory, tds_DlgBarBtn *_pDlgBarBtn);
/*===========================================================================
SubMenus and PopupMenu
=========================================================================*/
virtual BOOL fn_bDefineSubMenu(EDT_SubMenu *_p_oEDTSubMenu);
virtual void _OnSubMenuCommand(EDT_SubMenu *_p_oEDTSubMenu,UINT uiMsgID);
virtual BOOL fn_bDefinePopupMenu(EDT_PopUpMenu *pPopup, CPA_List<CPA_SuperObject> *pSelection, BOOL bAsCurrentEditor);
virtual void _OnPopUpMenuCommand(UINT m_IDCmdMsg);
// Hierarchy
// virtual CPA_SuperObject *GetNewEditorInstance(HIE_tdxHandleToSuperObject pEngineInstance);
// virtual void fn_vUpdateEditorInstance(CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject pEngineInstance);
// virtual BOOL fn_bCanHandleThisType(long lEngineType);
// Models & Instances
// virtual void fn_vInitListByType(CPA_World *pWorld);
// virtual void fn_vInitListsOfModels(void);
// virtual void fn_vSaveListModels(CString csListName, CPA_List<EDT_Model> *pListModels);
// virtual CString fn_csLoadListModels(void);
// virtual EDT_Model *GetNewModel(CString csListName);
// virtual BOOL fn_bCanLoadNewModel(CString csListName);
// virtual BOOL fn_bCanDeleteModel(CString csListName) { return FALSE; };
// virtual BOOL fn_bCanSaveListModels(CString csListName);
// virtual BOOL fn_bCanLoadListModels(void);
// virtual void fn_vOnLoadNewModel(CString csListName, EDT_Model *pNewModel);
// virtual CPA_SuperObject *GetNewInstance(CString csTypeName, CString csModelName, CPA_SuperObject *pParent);
// virtual tdeTypeSO GetTypeInstance(CString csTypeName, CString csModelName);
// virtual CPA_SuperObject * GetParentForInsertion (CString csTypeName, CString csModelName, tdstPosition *p_stPosition) { return NULL; }
// virtual BOOL fn_bChooseInsertPosition(CPA_SuperObject *pNewInstance, CPA_SuperObject *pParent, tdstPosition *p_stPosition);
// objects
// virtual CPA_Object * GetNewObject (CString csObjectFile, CString csObjectName, FILE *p_fFile, CPA_MainWorld *p_oMainWorld) { return NULL; }
// virtual CPA_Object *Duplicate(CPA_Object *pObject, CPA_SuperObject *pNewSuperObject);
// virtual CPA_SuperObject *GetCopyOfProtectedChild (CPA_SuperObject *pInitialChild, CPA_SuperObject *pNewOwner);
// permissions for EvtEditor
// virtual BOOL fn_bAcceptAsParent(CPA_Object *pChild, CPA_Object *pParent);
// virtual BOOL fn_bAcceptAsChild(CPA_Object *pParent, CPA_Object *pChild);
// when insertion is canceled
// virtual void fn_vOnCancelInsertion(CPA_SuperObject *pInstance);
////////
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
//(YB) Editor's specific members
//Attributes
public:
//The (one and only) document
CPA_Meca_MyDocument m_clDocument;
//The main frame
CPA_Meca_MainFrame *m_pclMecaMainFrame;
protected:
private:
CString m_csEditorVersion;
CPA_Meca_Card *m_pri_pclSelectedCard;
//Fucntions
public:
CPA_Meca_MyDocument *m_fn_pclGetDocument();
protected:
private:
void m_fn_vShowEditor();
void m_fn_vHideEditor();
//(YB) End of Editor's specific members
//--------------------------------------------------------------------------
};
// YB //
extern CPA_Meca_Interface *g_pclInterface;
// End YB //
extern tdstDLLIdentity g_stMecaDLLIdentity;
#endif // __MECA_INTERF_HPP_

View File

@@ -0,0 +1 @@
#define IDH_GENERAL 10000