124 lines
2.9 KiB
C++
124 lines
2.9 KiB
C++
/*=========================================================================
|
|
*
|
|
* CPAdIns.h : class CPA_DialogInsert
|
|
*
|
|
*
|
|
* Version 1.0
|
|
* Creation date
|
|
* Revision date
|
|
*
|
|
* Shaitan
|
|
*=======================================================================*/
|
|
#ifdef ACTIVE_EDITOR
|
|
|
|
#ifndef __CPA_DIALOGINS_H__
|
|
#define __CPA_DIALOGINS_H__
|
|
|
|
#include "CPARes.h"
|
|
#include "CPAModel.hpp"
|
|
|
|
class CPA_Interface;
|
|
|
|
/****************************************/
|
|
#ifndef CPA_EXPORT
|
|
#if defined(CPA_WANTS_IMPORT)
|
|
#define CPA_EXPORT __declspec(dllimport)
|
|
#elif defined(CPA_WANTS_EXPORT)
|
|
#define CPA_EXPORT __declspec(dllexport)
|
|
#else
|
|
#define CPA_EXPORT
|
|
#endif
|
|
#endif
|
|
/****************************************/
|
|
|
|
typedef enum tdePopupMode_
|
|
{
|
|
E_pm_NoMode,
|
|
E_pm_NewModel,
|
|
E_pm_LoadList
|
|
}
|
|
tdePopupMode;
|
|
|
|
/*///////////////////////////////////////////////////////////////////////////*/
|
|
/* CPA_DialogInsert dialog*/
|
|
/*///////////////////////////////////////////////////////////////////////////*/
|
|
|
|
class CPA_EXPORT CPA_DialogInsert : public CFormView
|
|
{
|
|
protected:
|
|
CPA_Interface *m_p_oInterface;
|
|
EDT_ModelView *m_pListModels;
|
|
BOOL m_bInitialised;
|
|
CString m_csTypeInsert;
|
|
int m_iNumDesc;
|
|
|
|
|
|
long m_lNbValidNew;
|
|
long m_lNbValidLoad;
|
|
tdePopupMode m_ePopupMode;
|
|
|
|
public:
|
|
/* parent editor*/
|
|
CPA_Interface * GetInterface (void) { return m_p_oInterface; }
|
|
|
|
/* view*/
|
|
EDT_ModelView * GetModelView (void) { return m_pListModels; }
|
|
|
|
/* standard constructor*/
|
|
CPA_DialogInsert(CWnd* pParent = NULL);
|
|
|
|
/* dialog*/
|
|
void fn_vInitDialog (CPA_Interface *pInterface, FRMBase *pFrame);
|
|
void fn_vInitComboType (CString csListName = "");
|
|
void fn_vReinitListModel (void);
|
|
void fn_vUpdateListModel (void);
|
|
|
|
void fn_vSetCurrentListModel (CString csListName);
|
|
CString fn_csGetCurrentListModel (void) { return m_csTypeInsert; }
|
|
|
|
void fn_vLoadListModels (CPA_ObjectDLLBase *p_oDLL);
|
|
void fn_vLoadNewModel (CPA_ObjectDLLBase *p_oDLL);
|
|
|
|
CPA_ObjectDLLBase * GetSingleDllForLoad (void);
|
|
CPA_ObjectDLLBase * GetSingleDllForNew (void);
|
|
|
|
/* Dialog Data*/
|
|
/*{{AFX_DATA(CPA_DialogInsert)*/
|
|
enum { IDD = CPA_IDD_DIALOGINSERT };
|
|
CButton m_cNewModel;
|
|
CButton m_cDelModel;
|
|
CButton m_cModelIcon;
|
|
CButton m_cSaveList;
|
|
CButton m_cLoadList;
|
|
CComboBox m_cComboType;
|
|
/*}}AFX_DATA*/
|
|
|
|
/* Overrides*/
|
|
/* ClassWizard generated virtual function overrides*/
|
|
/*{{AFX_VIRTUAL(CPA_DialogInsert)*/
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); /* DDX/DDV support*/
|
|
/*}}AFX_VIRTUAL*/
|
|
|
|
/* Implementation*/
|
|
protected:
|
|
|
|
/* Generated message map functions*/
|
|
/*{{AFX_MSG(CPA_DialogInsert)*/
|
|
afx_msg void OnSelchangeCombotype();
|
|
afx_msg void OnNewModel();
|
|
afx_msg void OnDelModel();
|
|
afx_msg void OnModelIcon();
|
|
afx_msg void OnSaveList();
|
|
afx_msg void OnLoadList();
|
|
afx_msg void OnSize(UINT,int,int);
|
|
afx_msg void OnDestroy();
|
|
BOOL OnCommand(WPARAM, LPARAM);
|
|
/*}}AFX_MSG*/
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
|
|
#endif /*__CPA_DIALOGINS_H__*/
|
|
#endif /* ACTIVE_EDITOR*/
|