/* 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_*/