Add rayman2 source files
This commit is contained in:
71
Rayman_X/cpa/public/CTL/Controls/CTL_BCL.hpp
Normal file
71
Rayman_X/cpa/public/CTL/Controls/CTL_BCL.hpp
Normal file
@@ -0,0 +1,71 @@
|
||||
/* Header for the definition of a base control list*/
|
||||
/*/////////////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_BASE_CONTROL_LIST_
|
||||
#define _CTL_BASE_CONTROL_LIST_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include <afxtempl.h>
|
||||
#include "CTL\Controls\CTL_BCtl.hpp"
|
||||
|
||||
class CTL_Editor_Control;
|
||||
|
||||
/*#########################################################*/
|
||||
/* Definition of the class for the list of base controls*/
|
||||
class CPA_EXPORT CTL_Editor_BaseControlList : public CList<CTL_Editor_BaseControl *, CTL_Editor_BaseControl *>
|
||||
{
|
||||
public:
|
||||
CTL_Editor_BaseControlList(BOOL _bMustDestroyElements = TRUE);
|
||||
~CTL_Editor_BaseControlList();
|
||||
|
||||
private:
|
||||
BOOL m_pri_bMustDestroyElements;
|
||||
|
||||
public:
|
||||
CTL_Editor_BaseControl *m_pub_fn_pclAddControlAtHead(CTL_BaseWindowsControl *_pclBaseWindowsControl,
|
||||
CWnd *_pclWnd,
|
||||
CTL_Editor_Control *_pclParentControl,
|
||||
CTL_tdeBaseControlDisplayType _eDisplayType,
|
||||
unsigned char _ucPercentWidth,
|
||||
unsigned short _uwFixedWidth,
|
||||
unsigned short _uwHeight,
|
||||
BOOL _bSamePlaceAsNext = FALSE,
|
||||
BOOL _bGoToNextLineAfterMe = FALSE);
|
||||
CTL_Editor_BaseControl *m_pub_fn_pclAddControlAtTail(CTL_BaseWindowsControl *_pclBaseWindowsControl,
|
||||
CWnd *_pclWnd,
|
||||
CTL_Editor_Control *_pclParentControl,
|
||||
CTL_tdeBaseControlDisplayType _eDisplayType,
|
||||
unsigned char _ucPercentWidth,
|
||||
unsigned short _uwFixedWidth,
|
||||
unsigned short _uwHeight,
|
||||
BOOL _bSamePlaceAsNext = FALSE,
|
||||
BOOL _bGoToNextLineAfterMe = FALSE);
|
||||
CTL_Editor_BaseControl *m_pub_fn_pclAddControlAtPosition(unsigned char _ucTargettedPosition,
|
||||
CTL_BaseWindowsControl *_pclBaseWindowsControl,
|
||||
CWnd *_pclWnd,
|
||||
CTL_Editor_Control *_pclParentControl,
|
||||
CTL_tdeBaseControlDisplayType _eDisplayType,
|
||||
unsigned char _ucPercentWidth,
|
||||
unsigned short _uwFixedWidth,
|
||||
unsigned short _uwHeight,
|
||||
BOOL _bSamePlaceAsNext = FALSE,
|
||||
BOOL _bGoToNextLineAfterMe = FALSE);
|
||||
|
||||
|
||||
void m_pub_fn_vComputeZoneOfAllBaseControls(long _lTotalWidth,
|
||||
enum CTL_eControlSpacingType _eSpacingType);
|
||||
|
||||
private:
|
||||
void m_pri_fn_vEmptyList();
|
||||
|
||||
short m_pri_fn_wComputeTotalSizeOfFixedSizeControlsAndTheirSize(enum CTL_eControlSpacingType _eSpacingType);
|
||||
short m_pri_fn_wComputeTotalSizeOfSpaces();
|
||||
short m_pri_fn_wComputeTotalOfPercentages();
|
||||
void m_pri_fn_vComputeTruePercentagesAndSizes(long _lTotalWidth);
|
||||
|
||||
BOOL m_pri_fn_bAllBaseControlsPercentagesInitialized();
|
||||
};
|
||||
|
||||
#endif /*_CTL_BASE_CONTROL_LIST_*/
|
111
Rayman_X/cpa/public/CTL/Controls/CTL_BCtl.hpp
Normal file
111
Rayman_X/cpa/public/CTL/Controls/CTL_BCtl.hpp
Normal file
@@ -0,0 +1,111 @@
|
||||
/* Header for the definition of a base control */
|
||||
/*/////////////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_BASE_CONTROL_
|
||||
#define _CTL_BASE_CONTROL_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include "ACP_Base.h" /*For CPA_EXPORT*/
|
||||
#include "CTL\Others\CTL_ClBk.hpp"
|
||||
|
||||
/*#########################################################*/
|
||||
typedef enum CTL_eBaseControlDisplayType
|
||||
{
|
||||
CTL_BASE_CONTROL_DISPLAY_TYPE__NORMAL = 0,
|
||||
CTL_BASE_CONTROL_DISPLAY_TYPE__ALWAYS_FIXED,
|
||||
CTL_BASE_CONTROL_DISPLAY_TYPE__ALWAYS_PERCENTAGED,
|
||||
CTL_BASE_CONTROL_DISPLAY_TYPE__USE_CALLBACK,
|
||||
/*CTL_BASE_CONTROL_DISPLAY_TYPE__*/
|
||||
|
||||
} CTL_tdeBaseControlDisplayType;
|
||||
|
||||
/*#########################################################*/
|
||||
#define CTL_C_BASE_CONTROL_INVALID_PERCENTAGE (-1)
|
||||
|
||||
class CTL_BaseWindowsControl;
|
||||
class CTL_Editor_Control;
|
||||
|
||||
/*#########################################################*/
|
||||
class CPA_EXPORT CTL_Editor_BaseControl
|
||||
{
|
||||
/*Constructor / Destructor*/
|
||||
public:
|
||||
CTL_Editor_BaseControl(CTL_BaseWindowsControl *_pclBaseWindowsControl,
|
||||
CWnd *_pclWnd,
|
||||
CTL_Editor_Control *_pclParentControl,
|
||||
CTL_tdeBaseControlDisplayType _eDisplayType,
|
||||
unsigned char _ucPercentWidth,
|
||||
unsigned short _uwFixedWidth,
|
||||
unsigned short _uwHeight,
|
||||
BOOL _bSamePlaceAsNext,
|
||||
BOOL _bGoToNextLineAfterMe = FALSE);
|
||||
|
||||
~CTL_Editor_BaseControl();
|
||||
|
||||
/*Attributes*/
|
||||
public:
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
long m_pri_lComputedWidth;
|
||||
char m_pri_cComputedPercentage;
|
||||
|
||||
CTL_BaseWindowsControl *m_pri_pclBaseWindowsControl;
|
||||
CWnd *m_pri_pclWnd;
|
||||
|
||||
CRect m_crBaseZoneRect;
|
||||
|
||||
CTL_td_p_fn_bBaseControlCanBeDisplayed m_pri_td_p_fn_vCanBeDisplayedCallBack;
|
||||
CTL_td_p_fn_bBaseControlCanBeDisplayed m_pri_td_p_fn_vMustBeEnabledCallBack;
|
||||
|
||||
CTL_Editor_Control *m_pri_pclParentControl;
|
||||
|
||||
CTL_tdp_fn_lGetSizeOfWindow m_pri_td_p_fn_lGetSize_CallBack;
|
||||
|
||||
CTL_tdeBaseControlDisplayType m_pri_tdeDisplayType;
|
||||
|
||||
unsigned char m_pri_ucPercentWidth;
|
||||
unsigned short m_pri_uwFixedWidth;
|
||||
unsigned short m_pri_uwHeight;
|
||||
|
||||
BOOL m_pri_bSamePlaceAsNext;
|
||||
BOOL m_pri_bBeginsOnNextLine;
|
||||
|
||||
/*Member functions*/
|
||||
public:
|
||||
CRect &m_fn_rcrGetZoneRect();
|
||||
CWnd *m_fn_pclGetWnd();
|
||||
void m_fn_vHideBaseControl();
|
||||
void m_fn_vDisplayBaseControl();
|
||||
void m_fn_vMoveBaseControl();
|
||||
|
||||
BOOL m_pub_fn_bCanBeDisplayed();
|
||||
BOOL m_pub_fn_bMustBeEnabled();
|
||||
|
||||
void m_pub_fn_vMoveInZone(CRect &_r_crNextRectOnSameLine,
|
||||
CRect &_r_crNextRectOnNextLine);
|
||||
|
||||
void m_pub_fn_vComputeBaseControlZone();
|
||||
|
||||
void m_pub_fn_vSetCanBeDisplayedCallBack(CTL_td_p_fn_bBaseControlCanBeDisplayed _p_fn_vCallBack);
|
||||
void m_pub_fn_vSetMustBeEnabledCallBack(CTL_td_p_fn_bBaseControlCanBeDisplayed _p_fn_vCallBack);
|
||||
|
||||
CTL_Editor_Control *m_pub_fn_pclGetParentControl();
|
||||
|
||||
void m_pub_fn_vSetGetSize_CallBack(CTL_tdp_fn_lGetSizeOfWindow _p_fn_lCallBack);
|
||||
|
||||
CTL_tdeBaseControlDisplayType m_pub_fn_tdeGetDisplayType();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
friend class CTL_Editor_Control;
|
||||
friend class CTL_Editor_BaseControlList;
|
||||
};
|
||||
|
||||
#endif /*_CTL_BASE_CONTROL_*/
|
49
Rayman_X/cpa/public/CTL/Controls/CTL_Cnst.hpp
Normal file
49
Rayman_X/cpa/public/CTL/Controls/CTL_Cnst.hpp
Normal file
@@ -0,0 +1,49 @@
|
||||
/* Constants definition for the Charactersitics Editor*/
|
||||
/*//////////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_CONSTANTS_
|
||||
#define _CTL_CONSTANTS_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
/*Definitions for Spin Buttons*/
|
||||
#define C_SPIN_PRECISION 3
|
||||
#define C_ACCEL_NB 5
|
||||
|
||||
/*Global definitions for controls*/
|
||||
#define C_SPACE_BETWEEN_CONTROLS 2
|
||||
#define C_EDIT_HEIGHT 16
|
||||
#define C_SPIN_WIDTH 13
|
||||
#define C_SPIN_HEIGHT 17
|
||||
|
||||
/*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 70
|
||||
#define C_DECIMAL_CURRENT_VALUE_PERCENT_WIDTH 30
|
||||
#define C_DECIMAL_CURRENT_VALUE_MIN_WIDTH 50 /*for Auto Spacing*/
|
||||
|
||||
/*Definitions for Int control*/
|
||||
#define C_INT_NAME_BOX_PERCENT_WIDTH 70
|
||||
#define C_INT_CURRENT_VALUE_PERCENT_WIDTH 30
|
||||
#define C_INT_CURRENT_VALUE_MIN_WIDTH 50 /*for Auto Spacing*/
|
||||
|
||||
/*Definitions for Text control*/
|
||||
#define C_TEXT_NAME_BOX_PERCENT_WIDTH 60
|
||||
#define C_TEXT_CURRENT_VALUE_PERCENT_WIDTH 40
|
||||
#define C_TEXT_CURRENT_VALUE_MIN_WIDTH 50 /*for Auto Spacing*/
|
||||
|
||||
#endif /*_CTL_CONSTANTS_*/
|
230
Rayman_X/cpa/public/CTL/Controls/CTL_Ctl.hpp
Normal file
230
Rayman_X/cpa/public/CTL/Controls/CTL_Ctl.hpp
Normal file
@@ -0,0 +1,230 @@
|
||||
/* Header for the definition of a base control*/
|
||||
/*/////////////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_CONTROL_
|
||||
#define _CTL_CONTROL_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include <afxtempl.h>
|
||||
|
||||
#include "CTL\Data\CTL_Dat.hpp"
|
||||
#include "CTL\Others\CTL_ODat.hpp"
|
||||
#include "CTL\Controls\CTL_BCL.hpp"
|
||||
|
||||
#define CTL_C_SPACE_BETWEEN_CONTROLS 2
|
||||
|
||||
class CTL_Editor_Static;
|
||||
class CTL_Editor_CheckBox;
|
||||
class CTL_Editor_BaseControlList;
|
||||
class CTL_Editor_BaseControl;
|
||||
class CTL_Editor_ControlList;
|
||||
|
||||
/*#########################################################*/
|
||||
typedef enum CTL_eControlSpacingType
|
||||
{
|
||||
CTL_SPACING_TYPE__SINGLE_LINE = 0,
|
||||
CTL_SPACING_TYPE__MULTI_LINE,
|
||||
CTL_SPACING_TYPE__AUTO,
|
||||
CTL_SPACING_TYPE__FIXED_SIZE,
|
||||
|
||||
} CTL_tdeControlSpacingType;
|
||||
|
||||
/*#########################################################*/
|
||||
class CPA_EXPORT CTL_Editor_Control
|
||||
{
|
||||
/*Constructor / Destructor*/
|
||||
public:
|
||||
CTL_Editor_Control( CTL_tdeEditorDataType tdeType,
|
||||
BOOL bIsAlwaysReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
/*ANNECY BBB {*/
|
||||
BOOL _bAcceptNameFromData = TRUE,
|
||||
/*ANNECY BBB }*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair = 0
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
);
|
||||
|
||||
virtual ~CTL_Editor_Control();
|
||||
|
||||
/*Attributes*/
|
||||
public:
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char m_ucInitialCurrentPair; /*indicates whether the control is in a */
|
||||
/*initial/current pair or not*/
|
||||
/* 0 - no pair, 1 - initial, 2 - current*/
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
protected:
|
||||
/*The list of base controls*/
|
||||
CTL_Editor_BaseControlList *m_pclListOfBaseControls;
|
||||
|
||||
/*Type of spacing for the group of controls*/
|
||||
CTL_tdeControlSpacingType m_tdeSpacingType;
|
||||
|
||||
/*Indicates wether the User can modifiy control's aspect or not*/
|
||||
BOOL m_bUserCanChangeAspect;
|
||||
|
||||
/*Indicates wether the group of controls has already been created or not*/
|
||||
BOOL m_bControlCreated;
|
||||
|
||||
/*Indicates wether the group of controls is currently hidden or not*/
|
||||
BOOL m_bHidden;
|
||||
|
||||
/*ANNECY BBB {*/
|
||||
/*Indicates if the control accepts to be renamed when its name does not match the current data's*/
|
||||
BOOL m_bAcceptNameFromData;
|
||||
/*ANNECY BBB }*/
|
||||
|
||||
/*The whole rectangle occupied by the group of controls*/
|
||||
CRect m_crZoneRect;
|
||||
|
||||
/*The name of the Characteristic*/
|
||||
CString m_pro_csControlName;
|
||||
CTL_Editor_Static *m_pclNameStatic;
|
||||
|
||||
/*Indicates a control is always in Read Only mode, by construction*/
|
||||
/* of the Editor*/
|
||||
BOOL m_bIsAlwaysReadOnly;
|
||||
|
||||
/*Indicates wether the control's current state is Read Only or not*/
|
||||
/* (unused member if m_bAlwaysReadOnly is TRUE)*/
|
||||
BOOL m_bIsReadOnly;
|
||||
|
||||
/*The type of the Data edited by this group of controls*/
|
||||
CTL_tdeEditorDataType m_tdeDataType;
|
||||
|
||||
/*The current Data edited by this group of controls*/
|
||||
CTL_Editor_Data *m_pclData;
|
||||
|
||||
/*The Parent Wnd of all controls in the group*/
|
||||
CWnd *m_pclParentWnd;
|
||||
|
||||
private:
|
||||
/*List of OwnerData*/
|
||||
CTL_ListOfOwnerData m_pri_clListOfOwnerData;
|
||||
|
||||
/*The function to call to know if a Control can be displayed*/
|
||||
/*The appliaction will use owner Data or something else to return the right value*/
|
||||
CTL_td_p_fn_bControlCanBeDisplayed m_pri_p_fn_bControlCanBeDisplayedCallBack;
|
||||
|
||||
/*The parent list of controls*/
|
||||
CTL_Editor_ControlList *m_pri_pclParentList;
|
||||
|
||||
/*Member functions*/
|
||||
public:
|
||||
/*The list of base controls*/
|
||||
CTL_Editor_BaseControlList *m_pub_fn_pclGetListOfBaseControls();
|
||||
|
||||
/*The parent list of controls*/
|
||||
CTL_Editor_ControlList *m_pub_fn_pclGetParentList();
|
||||
|
||||
CString m_pub_fn_csGetControlName();
|
||||
/*Returns the old name*/
|
||||
CString m_pub_fn_csSetControlName(CString _csNewName);
|
||||
|
||||
CTL_Editor_Static *m_pub_fn_pclGetNameStatic();
|
||||
|
||||
BOOL m_pub_fn_bHasBeenCreated();
|
||||
BOOL m_fn_bCanUserChangeAspect();
|
||||
BOOL m_fn_bIsAlwaysReadOnly();
|
||||
BOOL m_fn_bIsReadOnly();
|
||||
/*ANNECY BBB {*/
|
||||
BOOL m_fn_bAcceptsToTakeNameFromData() { return m_bAcceptNameFromData; }
|
||||
/*ANNECY BBB }*/
|
||||
|
||||
CRect m_fn_crGetZoneRect();
|
||||
|
||||
CTL_Editor_Data *m_fn_pclGetEditedData();
|
||||
virtual void m_fn_vSetEditedData(CTL_Editor_Data *);
|
||||
|
||||
CTL_tdeEditorDataType m_pub_fn_tdeGetDataType();
|
||||
CTL_tdeControlSpacingType m_fn_tdeGetSpacingType();
|
||||
|
||||
void m_fn_vAskForNewAspect(unsigned short uwAllowedTotalWidth);
|
||||
|
||||
void m_pub_fn_vDisplayInZone( CRect &_r_crSameLineDestinationZone,
|
||||
CRect &_r_crNextLineDestinationZone);
|
||||
|
||||
void m_pub_fn_vSetControlCanBeDisplayedCallBack(CTL_td_p_fn_bControlCanBeDisplayed _p_fn_CallBalck);
|
||||
|
||||
/*Indicates whether this control must be displayed, according to CallBack*/
|
||||
BOOL m_pub_fn_bMustBeDisplayed();
|
||||
|
||||
/*Owner Data*/
|
||||
CTL_OwnerData *m_pub_fn_pclAddOwnerData(void *_pvDataPtr,
|
||||
CString _csName);
|
||||
CTL_OwnerData *m_pub_fn_pclAddOwnerData(long _lData,
|
||||
CString _csName);
|
||||
CTL_OwnerData *m_pub_fn_pclGetOwnerDataWithName(CString _csSearchedName);
|
||||
|
||||
/* Virtual functions*/
|
||||
/*///////////////////*/
|
||||
|
||||
/*Function called to create controls (must be called only once)*/
|
||||
/*(This function is pure virtual)*/
|
||||
virtual BOOL m_fn_bCreateControl(CWnd *) = 0;
|
||||
|
||||
/*Function called to edit complex data (which can not be directly*/
|
||||
/*edited)*/
|
||||
/*(This function is virtual)*/
|
||||
virtual void m_fn_vEditData();
|
||||
|
||||
/*Function called to develop complex data in tree*/
|
||||
/*(This function is virtual)*/
|
||||
virtual void m_fn_vDevelopData();
|
||||
|
||||
/*Function called to display the associated control of the char.*/
|
||||
/*(This function is pure virtual)*/
|
||||
virtual void m_fn_vDisplay() = 0;
|
||||
|
||||
/*Function called to hide the associated control of the char.*/
|
||||
virtual void m_fn_vHide();
|
||||
|
||||
/*Function called to update the associated control of the char.*/
|
||||
/*(This function is pure virtual)*/
|
||||
virtual void m_fn_vUpdate(CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0) = 0;
|
||||
|
||||
/*Function called to update parent window in case of values changes.*/
|
||||
virtual void m_fn_vUpdateParent(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to make control Read Only*/
|
||||
/*(This function is pure virtual)*/
|
||||
virtual void m_fn_vMakeReadOnly() = 0;
|
||||
|
||||
/*Function called to make control Read-Write*/
|
||||
/*(This function is pure virtual)*/
|
||||
virtual void m_fn_vMakeReadWrite() = 0;
|
||||
|
||||
protected:
|
||||
BOOL m_pro_fn_bCreateBaseControls(unsigned char _ucNamePercentWidth,
|
||||
unsigned short _uwNameMinWidth,
|
||||
unsigned short _uwHeight,
|
||||
BOOL _bGoToNextLineAfterName = FALSE);
|
||||
void m_pro_fn_vDisplayBaseControls();
|
||||
void m_pro_fn_vHideBaseControls();
|
||||
|
||||
private:
|
||||
BOOL m_pri_fn_bCanDisplayInWidth(unsigned short uwLeftWidth);
|
||||
|
||||
/*Display of sub_controls in list*/
|
||||
void m_pri_fn_vDisplaySubControlsInZone(BOOL _bUseNextLineZone,
|
||||
CRect &_r_crSameLineDestinationZone,
|
||||
CRect &_r_crNextLineDestinationZone);
|
||||
|
||||
unsigned short m_pri_fn_uwComputeTotalWidth(unsigned short uwAllowedTotalWidth);
|
||||
|
||||
unsigned char m_pri_fn_ucGetBaseControlNumber();
|
||||
|
||||
|
||||
friend class EdActors_ControlDefinitionDialog;
|
||||
};
|
||||
|
||||
#endif /*_CTL_CONTROL_*/
|
177
Rayman_X/cpa/public/CTL/Controls/CTL_CtlA.hpp
Normal file
177
Rayman_X/cpa/public/CTL/Controls/CTL_CtlA.hpp
Normal file
@@ -0,0 +1,177 @@
|
||||
/* Header for the definition of a array characteristic */
|
||||
/*/////////////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_ARRAY_CONTROL_
|
||||
#define _CTL_ARRAY_CONTROL_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include "scr.h"
|
||||
#include "ai/aibase/gsparam.h"
|
||||
#include "ai/aibase/array.h"
|
||||
|
||||
#include "CTL\Controls\CTL_Ctl.hpp"
|
||||
|
||||
class CTL_Editor_Button;
|
||||
class CTL_Editor_ControlList;
|
||||
|
||||
class CPA_EXPORT CTL_Editor_ArrayControl : public CTL_Editor_Control
|
||||
{
|
||||
/*Constructor / Destructor*/
|
||||
public:
|
||||
CTL_Editor_ArrayControl( CTL_tdeEditorDataType tdeType,
|
||||
BOOL bReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
|
||||
~CTL_Editor_ArrayControl();
|
||||
|
||||
/*Attributes*/
|
||||
public:
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
CTL_Editor_Button *m_pclEditButton;
|
||||
|
||||
/*Member functions*/
|
||||
public:
|
||||
/*Function called to create controls (must be called only once)*/
|
||||
BOOL m_fn_bCreateControl(CWnd *pclParentWnd);
|
||||
|
||||
/*Function called to display the associated control of the char.*/
|
||||
void m_fn_vDisplay();
|
||||
|
||||
/*Function called to update the associated control of the char.*/
|
||||
void m_fn_vUpdate(CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update parent window in case of values changes.*/
|
||||
void m_fn_vUpdateParent(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to make control Read Only*/
|
||||
void m_fn_vMakeReadOnly();
|
||||
|
||||
/*Function called to make control Read-Write*/
|
||||
void m_fn_vMakeReadWrite();
|
||||
|
||||
/* Not sure on parameters, do it later*/
|
||||
void m_fn_vSetCurrentValue(tdstArray *_pstNewValue);
|
||||
|
||||
/*Called when button is pressed*/
|
||||
void m_fn_vEditData();
|
||||
|
||||
/* define them in each array flavour class*/
|
||||
virtual CTL_Editor_Control *m_fn_pctrlCreateElementControl (CTL_Editor_ControlList *) = 0;
|
||||
virtual CTL_Editor_Data *m_fn_pdataCreateElementData (CTL_Editor_DataList *, CTL_Editor_Control *) = 0;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
/***************************************************************************************/
|
||||
/* the array flavours*/
|
||||
/***************************************************************************************/
|
||||
/***************************************************************************************/
|
||||
/* Arrray Enum*/
|
||||
/***************************************************************************************/
|
||||
class CPA_EXPORT CTL_Editor_ArrayEnumControl : public CTL_Editor_ArrayControl
|
||||
{
|
||||
private:
|
||||
CTL_td_p_fn_vBuildEnumDescriptor m_td_pri_fn_vBuildEnumDesciptor_CallBack;
|
||||
|
||||
public:
|
||||
CTL_Editor_ArrayEnumControl (BOOL bReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
);
|
||||
|
||||
void m_pub_fn_vSetBuildEnumDesciptor_CallBack(CTL_td_p_fn_vBuildEnumDescriptor _p_fn_vCallBack);
|
||||
/*CTL_td_p_fn_vBuildEnumDescriptor m_fn_pfn_vGetConstructList (void) {return m_td_pri_fn_vBuildEnumDesciptor_CallBack;};*/
|
||||
|
||||
CTL_Editor_Control *m_fn_pctrlCreateElementControl (CTL_Editor_ControlList *);
|
||||
CTL_Editor_Data *m_fn_pdataCreateElementData (CTL_Editor_DataList *, CTL_Editor_Control *);
|
||||
};
|
||||
|
||||
/***************************************************************************************/
|
||||
/* Arrray Vector*/
|
||||
/***************************************************************************************/
|
||||
class CPA_EXPORT CTL_Editor_ArrayVectorControl : public CTL_Editor_ArrayControl
|
||||
{
|
||||
public:
|
||||
CTL_Editor_ArrayVectorControl (BOOL bReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
);
|
||||
|
||||
CTL_Editor_Control *m_fn_pctrlCreateElementControl (CTL_Editor_ControlList *);
|
||||
CTL_Editor_Data *m_fn_pdataCreateElementData (CTL_Editor_DataList *, CTL_Editor_Control *);
|
||||
};
|
||||
|
||||
/***************************************************************************************/
|
||||
/* Arrray Float*/
|
||||
/***************************************************************************************/
|
||||
class CPA_EXPORT CTL_Editor_ArrayFloatControl : public CTL_Editor_ArrayControl
|
||||
{
|
||||
public:
|
||||
CTL_Editor_ArrayFloatControl (BOOL bReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
);
|
||||
|
||||
CTL_Editor_Control *m_fn_pctrlCreateElementControl (CTL_Editor_ControlList *);
|
||||
CTL_Editor_Data *m_fn_pdataCreateElementData (CTL_Editor_DataList *, CTL_Editor_Control *);
|
||||
};
|
||||
|
||||
/***************************************************************************************/
|
||||
/* Arrray Integer*/
|
||||
/***************************************************************************************/
|
||||
class CPA_EXPORT CTL_Editor_ArrayIntegerControl : public CTL_Editor_ArrayControl
|
||||
{
|
||||
public:
|
||||
CTL_Editor_ArrayIntegerControl (BOOL bReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
);
|
||||
|
||||
CTL_Editor_Control *m_fn_pctrlCreateElementControl (CTL_Editor_ControlList *);
|
||||
CTL_Editor_Data *m_fn_pdataCreateElementData (CTL_Editor_DataList *, CTL_Editor_Control *);
|
||||
};
|
||||
|
||||
#endif /*_CTL_ARRAY_CONTROL_*/
|
75
Rayman_X/cpa/public/CTL/Controls/CTL_CtlB.hpp
Normal file
75
Rayman_X/cpa/public/CTL/Controls/CTL_CtlB.hpp
Normal file
@@ -0,0 +1,75 @@
|
||||
/* Header for the definition of a boolean characteristic */
|
||||
/*/////////////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_BOOLEAN_CONTROL_
|
||||
#define _CTL_BOOLEAN_CONTROL_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include "CTL_Ctl.hpp"
|
||||
|
||||
class CTL_Editor_CheckBox;
|
||||
class _pclParentList;
|
||||
|
||||
class CPA_EXPORT CTL_Editor_BooleanControl : public CTL_Editor_Control
|
||||
{
|
||||
/*Constructor / Destructor*/
|
||||
public:
|
||||
CTL_Editor_BooleanControl(BOOL bReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
);
|
||||
|
||||
~CTL_Editor_BooleanControl();
|
||||
|
||||
/*Attributes*/
|
||||
public:
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
CTL_Editor_CheckBox *m_pclCheckBox;
|
||||
|
||||
/*Member functions*/
|
||||
public:
|
||||
/*Function called to create controls (must be called only once)*/
|
||||
BOOL m_fn_bCreateControl(CWnd *pclParentWnd);
|
||||
|
||||
/*Function called to display the associated control of the char.*/
|
||||
void m_fn_vDisplay();
|
||||
|
||||
/*Function called to update the associated control of the char.*/
|
||||
void m_fn_vUpdate(CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update parent window in case of values changes.*/
|
||||
void m_fn_vUpdateParent(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to make control Read Only*/
|
||||
void m_fn_vMakeReadOnly();
|
||||
|
||||
/*Function called to make control Read-Write*/
|
||||
void m_fn_vMakeReadWrite();
|
||||
|
||||
static BOOL s_m_fn_bCheckBoxMustBeEnabled(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
static void s_m_fn_vCheckBoxHasBeenClicked(class CTL_Editor_CheckBox *_pclSenderCheckBox,
|
||||
class CTL_Editor_Control *_pclParentControl,
|
||||
enum CTL_eCarCheckBoxType _tdeType,
|
||||
long _lUserDefinedType,
|
||||
long _lUserDefinedCode);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif /*_CTL_BOOLEAN_CONTROL_*/
|
118
Rayman_X/cpa/public/CTL/Controls/CTL_CtlE.hpp
Normal file
118
Rayman_X/cpa/public/CTL/Controls/CTL_CtlE.hpp
Normal file
@@ -0,0 +1,118 @@
|
||||
/* Header for the definition of an enum characteristic*/
|
||||
/*/////////////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_ENUM_CONTROL_
|
||||
#define _CTL_ENUM_CONTROL_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include "CTL_Ctl.hpp"
|
||||
#include "CTL\Others\CTL_ClBk.hpp"
|
||||
|
||||
class CTL_Editor_EnumDescriptor;
|
||||
class CTL_Editor_ComboBox;
|
||||
class CTL_Editor_Static;
|
||||
class CTL_Editor_ControlList;
|
||||
|
||||
class CPA_EXPORT CTL_Editor_EnumControl : public CTL_Editor_Control
|
||||
{
|
||||
/*Constructor / Destructor*/
|
||||
public:
|
||||
CTL_Editor_EnumControl(BOOL bReadOnly,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
|
||||
~CTL_Editor_EnumControl();
|
||||
|
||||
/*Attributes*/
|
||||
public:
|
||||
CTL_Editor_EnumDescriptor *m_pclEnumDescriptor;
|
||||
|
||||
protected:
|
||||
|
||||
/* CPA2 ASilvescu 98-05-21*/
|
||||
/*private:*/
|
||||
/* End CPA2 ASilvescu 98-05-21*/
|
||||
CTL_Editor_ComboBox *m_pclComboBox;
|
||||
CTL_Editor_Static *m_pclStatic;
|
||||
|
||||
CTL_td_p_fn_vBuildEnumDescriptor m_td_pri_fn_vBuildEnumDesciptor_CallBack;
|
||||
|
||||
BOOL m_pri_bMustSortNamesInComboBox;
|
||||
|
||||
/*Member functions*/
|
||||
public:
|
||||
/*Function called to create associated control*/
|
||||
BOOL m_fn_bCreateControl(CWnd *pclParentWnd);
|
||||
|
||||
/*Function called to display the associated control of the char.*/
|
||||
void m_fn_vDisplay();
|
||||
|
||||
/*Function called to update the associated control of the char.*/
|
||||
void m_fn_vUpdate(CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update parent window in case of values changes.*/
|
||||
void m_fn_vUpdateParent(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*overload of the virtual member of CTL_Editor_Enumerable*/
|
||||
virtual void m_fn_vUpdateCurrentValue();
|
||||
|
||||
/*Function called to make control Read Only*/
|
||||
void m_fn_vMakeReadOnly();
|
||||
|
||||
/*Function called to make control Read-Write*/
|
||||
void m_fn_vMakeReadWrite();
|
||||
|
||||
/**/
|
||||
void m_pub_fn_vMustSortNamesInComboBox(BOOL _bMustSort = TRUE);
|
||||
|
||||
/**/
|
||||
void m_fn_vGetNewEnumDescriptor();
|
||||
|
||||
/*Function called when a "DropDown" message is sent to the ComboBox*/
|
||||
/*Calls the calback m_td_pri_fn_vConstructEnumerableListCallBack if it exists*/
|
||||
void m_pub_fn_vBuildEnumDescriptor();
|
||||
|
||||
virtual void m_fn_vSetEditedData(CTL_Editor_Data *);
|
||||
/*ROMTEAM Selection (Cristian Stegaru 24/03/98)*/
|
||||
int m_fn_iSetCanISelect_CallBack (CTL_tpf_iCheckString pfCheckString);
|
||||
/*ENDROMTEAM Selection (Cristian Stegaru)*/
|
||||
|
||||
/*Call backs*/
|
||||
/*/////////////*/
|
||||
|
||||
void m_pub_fn_vSetBuildEnumDesciptor_CallBack(CTL_td_p_fn_vBuildEnumDescriptor _p_fn_vCallBack);
|
||||
|
||||
static BOOL s_m_fn_bStaticCanBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
static BOOL s_m_fn_bComboBoxCanBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
|
||||
/*When selection has been changed in a Combo box*/
|
||||
static void s_m_fn_vComboBoxSelChanged(class CTL_Editor_ComboBox *_pclSenderComboBox,
|
||||
class CTL_Editor_Control *_pclParentControl,
|
||||
enum CTL_eComboBoxType _tdeType,
|
||||
long _lUserDefinedType,
|
||||
long _lUserDefinedCode);
|
||||
|
||||
/*When Combo box has been dropped down (ie open)*/
|
||||
static void s_m_fn_vComboBoxDroppedDown(class CTL_Editor_ComboBox *_pclSenderComboBox,
|
||||
class CTL_Editor_Control *_pclParentControl,
|
||||
enum CTL_eComboBoxType _tdeType,
|
||||
long _lUserDefinedType,
|
||||
long _lUserDefinedCode);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif /*_CTL_ENUM_CONTROL_*/
|
95
Rayman_X/cpa/public/CTL/Controls/CTL_CtlF.hpp
Normal file
95
Rayman_X/cpa/public/CTL/Controls/CTL_CtlF.hpp
Normal file
@@ -0,0 +1,95 @@
|
||||
/* Header for the definition of a decimal control */
|
||||
/*//////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_DECIMAL_CONTROL_
|
||||
#define _CTL_DECIMAL_CONTROL_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include "CTL_Ctl.hpp"
|
||||
|
||||
class CTL_Editor_Static;
|
||||
class CTL_Editor_SpinButton;
|
||||
class CTL_Editor_Edit;
|
||||
class CTL_Editor_ControlList;
|
||||
|
||||
class CPA_EXPORT CTL_Editor_DecimalControl : public CTL_Editor_Control
|
||||
{
|
||||
/*Constructor / Destructor*/
|
||||
public:
|
||||
CTL_Editor_DecimalControl(long double ldMin,
|
||||
long double ldMax,
|
||||
char cDataLength,
|
||||
BOOL bReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
|
||||
~CTL_Editor_DecimalControl();
|
||||
|
||||
/*Attributes*/
|
||||
public:
|
||||
long double m_ldMaxValue;
|
||||
long double m_ldMinValue;
|
||||
|
||||
/*For Read-Write mode*/
|
||||
CTL_Editor_Edit *m_pclCurrentEdit;
|
||||
CTL_Editor_SpinButton *m_pclSpin;
|
||||
/*For Read Only mode*/
|
||||
CTL_Editor_Static *m_pclCurrentStatic;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
/*Member functions*/
|
||||
public:
|
||||
/*Function called to create associated control*/
|
||||
BOOL m_fn_bCreateControl(CWnd *pclParentWnd);
|
||||
|
||||
/*Function called to display the associated control(s) of the char.*/
|
||||
void m_fn_vDisplay();
|
||||
|
||||
/*Function called to update the associated control of the char.*/
|
||||
void m_fn_vUpdate(CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update parent window in case of values changes.*/
|
||||
void m_fn_vUpdateParent(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update the slider when the edit changes*/
|
||||
void m_fn_vUpdateSpin(long double ldNewValue,
|
||||
CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update the edit when the slider changes*/
|
||||
void m_fn_vUpdateEdit(long double ldNewValue,
|
||||
CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to make control Read Only*/
|
||||
void m_fn_vMakeReadOnly();
|
||||
|
||||
/*Function called to make control Read-Write*/
|
||||
void m_fn_vMakeReadWrite();
|
||||
|
||||
static BOOL s_m_fn_bStaticMustBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
static BOOL s_m_fn_bEditMustBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
static BOOL s_m_fn_bSpinMustBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif /*_CTL_DECIMAL_CONTROL_*/
|
100
Rayman_X/cpa/public/CTL/Controls/CTL_CtlI.hpp
Normal file
100
Rayman_X/cpa/public/CTL/Controls/CTL_CtlI.hpp
Normal file
@@ -0,0 +1,100 @@
|
||||
/* Header for the definition of a boolean control */
|
||||
/*//////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_INTEGER_CONTROL_
|
||||
#define _CTL_INTEGER_CONTROL_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include "CTL_Ctl.hpp"
|
||||
|
||||
class CTL_Editor_Static;
|
||||
class CTL_Editor_SpinButton;
|
||||
class CTL_Editor_Edit;
|
||||
class CTL_Editor_ControlList;
|
||||
|
||||
class CPA_EXPORT CTL_Editor_IntegerControl : public CTL_Editor_Control
|
||||
{
|
||||
/*Constructor / Destructor*/
|
||||
public:
|
||||
CTL_Editor_IntegerControl(/*unsigned */long lMin,
|
||||
/*unsigned */long lMax,
|
||||
char cDataLength,
|
||||
BOOL bSigned,
|
||||
BOOL bReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
|
||||
~CTL_Editor_IntegerControl();
|
||||
|
||||
/*Attributes*/
|
||||
public:
|
||||
/*For Read-Write mode*/
|
||||
CTL_Editor_Edit *m_pclCurrentEdit;
|
||||
CTL_Editor_SpinButton *m_pclSpin;
|
||||
/*For Read Only mode*/
|
||||
CTL_Editor_Static *m_pclCurrentStatic;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
BOOL m_bIsAnUnsignedLong;
|
||||
long m_lMaxValue;
|
||||
long m_lMinValue;
|
||||
/*If the Data is an unsigned long*/
|
||||
unsigned long m_ulMinValue;
|
||||
unsigned long m_ulMaxValue;
|
||||
|
||||
|
||||
/*Member functions*/
|
||||
public:
|
||||
/*Function called to create associated control*/
|
||||
BOOL m_fn_bCreateControl(CWnd *pclParentWnd);
|
||||
|
||||
/*Function called to display the associated control(s) of the char.*/
|
||||
void m_fn_vDisplay();
|
||||
|
||||
/*Function called to update the associated control of the char.*/
|
||||
void m_fn_vUpdate(CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update parent window in case of values changes.*/
|
||||
void m_fn_vUpdateParent(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update the slider when the edit changes*/
|
||||
void m_fn_vUpdateSpin(long lNewValue,
|
||||
CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update the edit when the slider changes*/
|
||||
void m_fn_vUpdateEdit(long lNewValue,
|
||||
CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to make control Read Only*/
|
||||
void m_fn_vMakeReadOnly();
|
||||
|
||||
/*Function called to make control Read-Write*/
|
||||
void m_fn_vMakeReadWrite();
|
||||
|
||||
static BOOL s_m_fn_bStaticMustBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
static BOOL s_m_fn_bEditMustBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
static BOOL s_m_fn_bSpinMustBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif /*_CTL_INTEGER_CONTROL_*/
|
78
Rayman_X/cpa/public/CTL/Controls/CTL_CtlM.hpp
Normal file
78
Rayman_X/cpa/public/CTL/Controls/CTL_CtlM.hpp
Normal file
@@ -0,0 +1,78 @@
|
||||
/* Header for the definition of a boolean characteristic */
|
||||
/*/////////////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_MASKED_CONTROL_
|
||||
#define _CTL_MASKED_CONTROL_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include "CTL\Controls\CTL_Ctl.hpp"
|
||||
|
||||
class CTL_Editor_Button;
|
||||
class CTL_Editor_ControlList;
|
||||
|
||||
class CPA_EXPORT CTL_Editor_MaskedControl : public CTL_Editor_Control
|
||||
{
|
||||
/*Constructor / Destructor*/
|
||||
public:
|
||||
CTL_Editor_MaskedControl( BOOL bReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
|
||||
~CTL_Editor_MaskedControl();
|
||||
|
||||
/*Attributes*/
|
||||
public:
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
CTL_Editor_Button *m_pclEditButton;
|
||||
|
||||
/*Member functions*/
|
||||
public:
|
||||
/*Function called to create controls (must be called only once)*/
|
||||
BOOL m_fn_bCreateControl(CWnd *pclParentWnd);
|
||||
|
||||
/*Function called to display the associated control of the char.*/
|
||||
void m_fn_vDisplay();
|
||||
|
||||
/*Function called to update the associated control of the char.*/
|
||||
void m_fn_vUpdate(CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update parent window in case of values changes.*/
|
||||
void m_fn_vUpdateParent(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to make control Read Only*/
|
||||
void m_fn_vMakeReadOnly();
|
||||
|
||||
/*Function called to make control Read-Write*/
|
||||
void m_fn_vMakeReadWrite();
|
||||
|
||||
/*Specific to this control, overloaded from CTL_Editor_Buttonable*/
|
||||
virtual void m_fn_vSetValue(short wAction);
|
||||
|
||||
/**/
|
||||
void m_fn_vSetCurrentValue(unsigned long _ulNewValue);
|
||||
|
||||
/*Called when button is pressed*/
|
||||
virtual void m_fn_vEditData();
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif /*_CTL_MASKED_CONTROL_*/
|
71
Rayman_X/cpa/public/CTL/Controls/CTL_CtlT.hpp
Normal file
71
Rayman_X/cpa/public/CTL/Controls/CTL_CtlT.hpp
Normal file
@@ -0,0 +1,71 @@
|
||||
/* Header for the definition of a Text control */
|
||||
/*//////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_TEXT_CONTROL_
|
||||
#define _CTL_TEXT_CONTROL_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include "CTL_Ctl.hpp"
|
||||
|
||||
class CTL_Editor_Static;
|
||||
class CTL_Editor_ControlList;
|
||||
|
||||
class CPA_EXPORT CTL_Editor_TextControl : public CTL_Editor_Control
|
||||
{
|
||||
/*Constructor / Destructor*/
|
||||
public:
|
||||
CTL_Editor_TextControl( BOOL bReadOnly,
|
||||
CTL_tdeControlSpacingType tdeSpacingType,
|
||||
BOOL bUserCanChangeAspect,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
|
||||
~CTL_Editor_TextControl();
|
||||
|
||||
/*Attributes*/
|
||||
public:
|
||||
/*For Read Only mode (the only Mode for this control)*/
|
||||
CTL_Editor_Static *m_pclCurrentStatic;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
|
||||
/*Member functions*/
|
||||
public:
|
||||
/*Function called to create associated control*/
|
||||
BOOL m_fn_bCreateControl(CWnd *pclParentWnd);
|
||||
|
||||
/*Function called to display the associated control(s) of the char.*/
|
||||
void m_fn_vDisplay();
|
||||
|
||||
/*Function called to update the associated control of the char.*/
|
||||
void m_fn_vUpdate(CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update parent window in case of values changes.*/
|
||||
void m_fn_vUpdateParent(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to make control Read Only*/
|
||||
void m_fn_vMakeReadOnly();
|
||||
|
||||
/*Function called to make control Read-Write*/
|
||||
void m_fn_vMakeReadWrite();
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif /*_CTL_TEXT_CONTROL_*/
|
115
Rayman_X/cpa/public/CTL/Controls/CTL_CtlV.hpp
Normal file
115
Rayman_X/cpa/public/CTL/Controls/CTL_CtlV.hpp
Normal file
@@ -0,0 +1,115 @@
|
||||
/* Header for the definition of a decimal control */
|
||||
/*//////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_VECTOR_CONTROL_
|
||||
#define _CTL_VECTOR_CONTROL_
|
||||
|
||||
#if _MSC_VER >= 1000
|
||||
#pragma once
|
||||
#endif /* _MSC_VER >= 1000*/
|
||||
|
||||
#include "CTL_Ctl.hpp"
|
||||
|
||||
class CTL_Editor_Static;
|
||||
class CTL_Editor_SpinButton;
|
||||
class CTL_Editor_Edit;
|
||||
|
||||
class CPA_EXPORT CTL_Editor_VectorControl : public CTL_Editor_Control
|
||||
{
|
||||
/*Constructor / Destructor*/
|
||||
public:
|
||||
CTL_Editor_VectorControl(long double ldMin,
|
||||
long double ldMax,
|
||||
char cDataLength,
|
||||
BOOL bReadOnly,
|
||||
CTL_Editor_ControlList *_pclParentList,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptNameFromData, /*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
|
||||
~CTL_Editor_VectorControl();
|
||||
|
||||
/*Attributes*/
|
||||
public:
|
||||
long double m_ldMaxValue;
|
||||
long double m_ldMinValue;
|
||||
|
||||
/*For Read-Write mode*/
|
||||
CTL_Editor_Edit *m_pclCurrentEditX;
|
||||
CTL_Editor_Edit *m_pclCurrentEditY;
|
||||
CTL_Editor_Edit *m_pclCurrentEditZ;
|
||||
CTL_Editor_SpinButton *m_pclSpinX;
|
||||
CTL_Editor_SpinButton *m_pclSpinY;
|
||||
CTL_Editor_SpinButton *m_pclSpinZ;
|
||||
/*For Read Only mode*/
|
||||
CTL_Editor_Static *m_pclCurrentStaticX;
|
||||
CTL_Editor_Static *m_pclCurrentStaticY;
|
||||
CTL_Editor_Static *m_pclCurrentStaticZ;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
enum m_eModifType
|
||||
{
|
||||
eModifType_X = 0,
|
||||
eModifType_Y,
|
||||
eModifType_Z,
|
||||
};
|
||||
|
||||
/*Member functions*/
|
||||
public:
|
||||
/*Function called to create associated control*/
|
||||
BOOL m_fn_bCreateControl(CWnd *pclParentWnd);
|
||||
|
||||
/*Function called to display the associated control(s) of the char.*/
|
||||
void m_fn_vDisplay();
|
||||
|
||||
/*Function called to update the associated control of the char.*/
|
||||
void m_fn_vUpdate(CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update parent window in case of values changes.*/
|
||||
void m_fn_vUpdateParent(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update the slider when the edit changes*/
|
||||
void m_fn_vUpdateSpin(long double ldNewValue,
|
||||
CTL_Editor_Edit *_pclEditSender,
|
||||
CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
void m_fn_vUpdateSpin(long double ldNewValue,
|
||||
m_eModifType _eModifType,
|
||||
CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to update the edit when the slider changes*/
|
||||
void m_fn_vUpdateEdit(long double ldNewValue,
|
||||
CTL_Editor_SpinButton *_pclSpinSender,
|
||||
CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
void m_fn_vUpdateEdit(long double ldNewValue,
|
||||
m_eModifType _eModifType,
|
||||
CTL_tdeUpdateReason _eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
||||
long _lUserDefinedReason = 0);
|
||||
|
||||
/*Function called to make control Read Only*/
|
||||
void m_fn_vMakeReadOnly();
|
||||
|
||||
/*Function called to make control Read-Write*/
|
||||
void m_fn_vMakeReadWrite();
|
||||
|
||||
static BOOL s_m_fn_bStaticMustBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
static BOOL s_m_fn_bEditMustBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
static BOOL s_m_fn_bSpinMustBeDisplayed(class CTL_Editor_BaseControl *_pclSenderBaseControl);
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif /*_CTL_VECTOR_CONTROL_*/
|
138
Rayman_X/cpa/public/CTL/Controls/CTL_LCtl.hpp
Normal file
138
Rayman_X/cpa/public/CTL/Controls/CTL_LCtl.hpp
Normal file
@@ -0,0 +1,138 @@
|
||||
/* Definition of the class for the list of base controls*/
|
||||
/* */
|
||||
/* YB*/
|
||||
/*////////////////////////////////////////////////////////*/
|
||||
#ifndef _CTL_BASE_CONTROLS_LIST_
|
||||
#define _CTL_BASE_CONTROLS_LIST_
|
||||
|
||||
#include "CTL_Ctl.hpp"
|
||||
|
||||
class CPA_EXPORT CTL_Editor_ControlList : public CList<CTL_Editor_Control *, CTL_Editor_Control *>
|
||||
{
|
||||
public:
|
||||
CTL_Editor_ControlList();
|
||||
~CTL_Editor_ControlList();
|
||||
|
||||
/*Members*/
|
||||
private:
|
||||
/*List of OwnerData*/
|
||||
CTL_ListOfOwnerData m_pri_clListOfOwnerData;
|
||||
|
||||
/*Functions*/
|
||||
public:
|
||||
|
||||
/*Controls Handling*/
|
||||
/*///////////////////*/
|
||||
|
||||
/*Will display controls between and under the two given points*/
|
||||
/*The first given point is adjusted so that it gives the height of the list of controls*/
|
||||
void m_pub_fn_vDisplayControlsInZone(CPoint &r_clTopLeft, CPoint clTopRight);
|
||||
|
||||
void m_pub_fn_vHideAllControls();
|
||||
|
||||
/*Updates all controls in list, with the given list of Data*/
|
||||
/* 1) Gets motor data for each Data*/
|
||||
/* 2) */
|
||||
void m_pub_fn_vUpdateControlsWithListOfData(class CTL_Editor_DataList *_pclDataList);
|
||||
|
||||
/*Updates the current value of all controls in the List,according to the currently edited Data of each*/
|
||||
void m_pub_fn_vUpdateControlsWithEditedData(BOOL _bMustReadMotorData);
|
||||
|
||||
/*Owner Data*/
|
||||
/*/////////////////////*/
|
||||
CTL_OwnerData *m_pub_fn_pclAddOwnerData(void *_pvDataPtr,
|
||||
CString _csName);
|
||||
CTL_OwnerData *m_pub_fn_pclAddOwnerData(long _lData,
|
||||
CString _csName);
|
||||
CTL_OwnerData *m_pub_fn_pclGetOwnerDataWithName(CString _csSearchedName);
|
||||
|
||||
|
||||
/*Controls adding*/
|
||||
/*/////////////////////*/
|
||||
|
||||
CTL_Editor_Control *m_fn_pclAddIntegerControl(long,
|
||||
long,
|
||||
char,
|
||||
BOOL,
|
||||
BOOL,
|
||||
CTL_tdeControlSpacingType,
|
||||
BOOL,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptsToTakeNameOfData,/*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
CTL_Editor_Control *m_fn_pclAddDecimalControl(long double,
|
||||
long double,
|
||||
char,
|
||||
BOOL,
|
||||
CTL_tdeControlSpacingType,
|
||||
BOOL,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptsToTakeNameOfData,/*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
CTL_Editor_Control *m_fn_pclAddBooleanControl(BOOL,
|
||||
CTL_tdeControlSpacingType,
|
||||
BOOL,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptsToTakeNameOfData,/*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
);
|
||||
CTL_Editor_Control *m_fn_pclAddMaskedControl( BOOL,
|
||||
CTL_tdeControlSpacingType,
|
||||
BOOL,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptsToTakeNameOfData,/*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
CTL_Editor_Control *m_fn_pclAddEnumControl( BOOL,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptsToTakeNameOfData,/*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
CTL_Editor_Control *m_fn_pclAddTextControl( BOOL,
|
||||
CTL_tdeControlSpacingType,
|
||||
BOOL,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptsToTakeNameOfData,/*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
CTL_Editor_Control *m_fn_pclAddVectorControl( long double,
|
||||
long double,
|
||||
char,
|
||||
BOOL,
|
||||
CString _csControlName,
|
||||
BOOL _bAcceptsToTakeNameOfData,/*ANNECY BBB*/
|
||||
/*Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
unsigned char ucInitialCurrentPair
|
||||
/*End Stefan Dumitrean 20-07-98 ( OAC buttons )*/
|
||||
|
||||
);
|
||||
|
||||
/*User defined Controls adding*/
|
||||
/*///////////////////////////////*/
|
||||
|
||||
void m_fn_vAddElement(CTL_Editor_Control *pclNewElement);
|
||||
|
||||
private:
|
||||
void m_fn_vEmptyList();
|
||||
};
|
||||
|
||||
#endif _CTL_BASE_CONTROLS_LIST_
|
Reference in New Issue
Block a user