#if !defined(AFX_CLASSIFIERSYSTEMDLG_H__C50E9CCA_1F07_4AB1_AC94_9FBAF7768C61__INCLUDED_)
#define AFX_CLASSIFIERSYSTEMDLG_H__C50E9CCA_1F07_4AB1_AC94_9FBAF7768C61__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ClassifierSystemDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CClassifierSystemDlg dialog
#include "resource.h"
#include "apl_gui.h"
#include "aplGuiEx.h"
#include "apl_api.h"
//#include <aplFormManagerDlg.h>
#include "afxwin.h"

class CaplFormManagerDlg;

#define InsertObjectString(name_ent,entity) \
pos=m_CmbxTypeControl.AddString(name_ent);m_CmbxTypeControl.SetItemData(pos,(DWORD)entity);\
if(entity->name==m_CurrNameEntity){m_CmbxTypeControl.SetCurSel(pos);}

class CClassifierSystemDlg : public CaplTranslateDialog
{
// Construction
public:

	bool m_bSystem;
	bool m_readonly;
	bool m_can_object;
	
	int m_tab_levels;
	int m_tab_edited_chars;
	int m_tab_esquisse;
	int m_tab_forms;

	CClassifierSystemDlg(CWnd* pParent = NULL);   // standard constructor
	~CClassifierSystemDlg();
	
	CaplAPI *m_api;	
	CaplInstance* m_item;
	CaplInstance* m_system;
	CaplInstance* m_parent;
	CaplInstance* m_selected_char;
	aplExtent m_ext_forms;
	aplExtent m_all_forms;
	
	aplExtent m_list_charact_parent;
	aplExtent m_list_charact_current;

	aplExtent m_list_created;
	aplExtent m_list_deleted;
	CBitmap m_logo_bmp;

	bool m_DeleteEsquisse;

	CString m_NameNewEsquisse;
	CString m_EsquisseDescr;
	CString m_FormDescr;

	CString m_CurrNameEntity;
	bool m_OldTypeControl;

	CaplFormManagerDlg* m_FormManagerDlg;

// Dialog Data
	//{{AFX_DATA(CClassifierSystemDlg)
	enum { IDD = IDD_CLASSIFIER_SYSTEM_DLG };
	CEdit	m_EdtPictProro;
	CaplStaticImage	m_CtrlPicture;
	CStatic	m_StaticTabSize;
	CTabCtrl	m_TabSelect;
	CButton	m_StaticCharactGroup;
	CaplButton	m_BtnCharRemove;
	CaplButton	m_BtnCharProp;
	CaplButton	m_BtnCharAdd;
	CSortListCtrl	m_ListCharact;
	CStatic	m_StaticClassifierName;
	CStatic	m_StaticIdentif;
	CStatic	m_StaticSystem;
	CStatic	m_StaticLevel;
	CStatic	m_StaticConceptGroup;
	CStatic	m_StaticIsConceptLevelControl;
	CaplButton	m_BtnParentConceptControl;
	CStatic	m_StaticConceptLevelSwitch;
	CStatic	m_StaticConceptLevelMin;
	CStatic	m_StaticConceptLevelMax;
	CStatic	m_StaticObjectGroup;
	CStatic	m_StaticIsObject;
	CStatic	m_StaticIsObjectLevelControl;
	CaplButton	m_BtnParentObjectControl;
	CStatic	m_StaticObjectLevelSwitch;
	CStatic	m_StaticObjectLevelMin;
	CStatic	m_StaticObjectLevelMax;
	CStatic	m_StaticObjectTypeGroup;
	CStatic	m_StaticIsTypeControl;
	CStatic	m_StaticListTypeControl;
	CStatic	m_StaticCode;
	CComboBox	m_CmbxIsTypeControl;
	CaplButton	m_BtnParentObjectTypeControl;
	CComboBox	m_CmbxTypeControl;
	CComboBox	m_CmbxIsConceptLevelControl;
	CComboBox	m_CmbxConceptLevelSwitch;
	CComboBox	m_CmbxIsObject;
	CComboBox	m_CmbxIsObjectLevelControl;
	CComboBox	m_CmbxObjectLevelSwitch;
	CEdit	m_EditConceptLevelMin;
	CEdit	m_EditConceptLevelMax;
	CEdit	m_EditObjectLevelMin;
	CEdit	m_EditObjectLevelMax;
	int	m_iConceptLevelMin;
	int	m_iConceptLevelMax;
	int	m_iObjectLevelMin;
	int	m_iObjectLevelMax;
	CEdit	m_EditSystem;
	CEdit	m_EditLevel;
	CEdit	m_EditName;
	CEdit	m_EditId;
	CEdit	m_EditDescr;
	CEdit	m_EditCode;
	CaplButton	m_BtnOk;
	CaplButton	m_BtnCancel;
	CString	m_sDescr;
	CString	m_sId;
	CString	m_sCode;
	CString	m_sName;
	CString	m_SystemName;
	CString	m_LevelName;
	//}}AFX_DATA

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CClassifierSystemDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

	void DrawInTab();
	void ShowGroupControl(bool is_show);
//	void ShowGroupCharactImage(int tab_pos,bool show_img,bool show_prop,bool show_cre_del);
	void FillCharacteristikList();
	void ShowEsquisse();
	void ShowForm();
	void HideSecondControls();


// Implementation
protected:
	CRect m_RectAdd;
	CRect m_RectDel;
	CRect m_RectProp;
	CRect m_RectEdt1,m_RectEdt2;

	// Generated message map functions
	//{{AFX_MSG(CClassifierSystemDlg)
	virtual void OnOK();
	virtual BOOL OnInitDialog();
	afx_msg void OnEditchangeCombo();
	afx_msg void OnButtonShowParentConceptSetting();
	afx_msg void OnButtonShowParentObjectSetting();
	afx_msg void OnButtonShowParentObjectTypeSetting();
	afx_msg void OnButtonAdd();
	afx_msg void OnButtonProperty();
	afx_msg void OnButtonRemove();
	afx_msg void OnSelchangeTabSelect(NMHDR* pNMHDR, LRESULT* pResult);
	virtual void OnCancel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	CButton m_CtrlMultiObject;
	BOOL m_IsMultiObject;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CLASSIFIERSYSTEMDLG_H__C50E9CCA_1F07_4AB1_AC94_9FBAF7768C61__INCLUDED_)
