95 lines
2.6 KiB
C++
95 lines
2.6 KiB
C++
/* Header for the definition of an enum characteristic */
|
|
/*/////////////////////////////////////////////////////////*/
|
|
#ifndef _CTL_ENUM_DATA_
|
|
#define _CTL_ENUM_DATA_
|
|
|
|
#if _MSC_VER >= 1000
|
|
#pragma once
|
|
#endif /* _MSC_VER >= 1000*/
|
|
|
|
#include "CTL_Dat.hpp"
|
|
|
|
class CTL_Editor_EnumElement;
|
|
class CTL_Editor_EnumDescriptor;
|
|
class EdActors_EditorActor;
|
|
|
|
class CPA_EXPORT CTL_Editor_EnumData : public CTL_Editor_Data
|
|
{
|
|
/*Constructor / Destructor*/
|
|
public:
|
|
CTL_Editor_EnumData(CTL_Editor_EnumDescriptor *pclEnumDescriptor,
|
|
CString,
|
|
CTL_Editor_DataList *_pclParentList,
|
|
CTL_Editor_Data *pclCurrentBaseData = NULL);
|
|
|
|
~CTL_Editor_EnumData();
|
|
|
|
/*Attributes*/
|
|
public:
|
|
CTL_Editor_EnumElement *m_pclCurrentValue;
|
|
CTL_Editor_EnumElement *m_pclOldValue;
|
|
|
|
CTL_Editor_EnumElement *m_pclKeepedValueForUndo;
|
|
|
|
protected:
|
|
|
|
private:
|
|
CTL_Editor_EnumDescriptor *m_pclEnumDescriptor;
|
|
|
|
/*Member functions*/
|
|
public:
|
|
/*Function called to get a string representing the value of the data*/
|
|
CStringList *m_fn_pcslFormatDataValueString();
|
|
/*Function called to set the value of the data acoording to a string representing it*/
|
|
void m_fn_vSetValueWithString(CStringList *);
|
|
|
|
/*Function called to Init the data*/
|
|
void m_fn_vInitData();
|
|
|
|
/*Function called to read associated motor's data*/
|
|
void m_fn_vGetMotorData();
|
|
|
|
/*Function called to update associated motor's data*/
|
|
void m_fn_vUpdateMotorData(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
|
long _lUserDefinedReason = 0);
|
|
|
|
/*Function called to update data with another one*/
|
|
void m_fn_vUpdateData(CTL_Editor_Data *pclSourceData,
|
|
CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
|
|
long _lUserDefinedReason = 0);
|
|
|
|
/*Function called to look if data has been modified (by motor for example)*/
|
|
void m_fn_vLookIfDataHasBeenModified();
|
|
|
|
/*Undo*/
|
|
/*Function called to save the current Value (for Undo)*/
|
|
void m_fn_vKeepCurrentValue();
|
|
|
|
/*Function called to validate Undo for the current change*/
|
|
void m_fn_vRegisterUndoAction();
|
|
|
|
/*CPA2 Stegaru Cristian 98/06/24*/
|
|
virtual BOOL mfn_bEqualsModifiedDataOldValue (CTL_Editor_Data *pModifiedData);
|
|
CTL_Editor_EnumElement *mfn_pSetCurrentValue (CTL_Editor_EnumElement *pEnumValue)
|
|
{
|
|
if (m_pclCurrentValue != pEnumValue)
|
|
{
|
|
m_pclOldValue = m_pclCurrentValue;
|
|
m_pclCurrentValue = pEnumValue;
|
|
}
|
|
return m_pclOldValue;
|
|
}
|
|
CTL_Editor_EnumElement *mfn_pGetCurrentValue () { return m_pclCurrentValue;}
|
|
/*End CPA2 Stegaru Cristian 98/06/24*/
|
|
|
|
/**/
|
|
CTL_Editor_EnumDescriptor *m_fn_pclGetEnumDescriptor();
|
|
|
|
protected:
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
#endif /*_CTL_ENUM_DATA_*/
|