summaryrefslogtreecommitdiff
path: root/win/Libdlg.h
blob: fbc3d45a0c6ad03dad48ae7b9d20367db4b77eea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#if !defined(AFX_LIBDLG_H__BABBE241_AF9C_11D2_8203_DC3ED7F79C17__INCLUDED_)
#define AFX_LIBDLG_H__BABBE241_AF9C_11D2_8203_DC3ED7F79C17__INCLUDED_

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

class PieceInfo;

typedef struct {
	PieceInfo* info;
	unsigned long group;
	unsigned long defgroup;
} PARTGROUPINFO;

#include <afxtempl.h>  // CArray;

/////////////////////////////////////////////////////////////////////////////
// CLibraryDlg dialog

class CLibraryDlg : public CDialog
{
// Construction
public:
	BOOL DoSave(BOOL bAskName);
	CLibraryDlg(CWnd* pParent = NULL);   // standard constructor
	BOOL m_bReload;
	BOOL m_bModified;
	CString m_strFile;

// Dialog Data
	//{{AFX_DATA(CLibraryDlg)
	enum { IDD = IDD_LIBRARY };
	CTreeCtrl	m_Tree;
	CListCtrl	m_List;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLibraryDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

// Implementation
public:
	void EnableControl(UINT nID, BOOL bEnable);
	BOOL ContinueModal();
	void UpdateTree();
	void UpdateList();

	BYTE m_nMaxGroups;
	int m_nBitmaps[32];
	char m_strGroups[32][33];
	CImageList m_ImageList;

	CArray<PARTGROUPINFO, PARTGROUPINFO> m_Parts;
	CToolBar m_wndToolBar;
	CImageList m_TreeImages;

	CImageList* m_pDragImage;
	BOOL		m_bDragging;
	int			m_nDragIndex;
	HTREEITEM	m_hDropItem;

protected:
	// Generated message map functions
	//{{AFX_MSG(CLibraryDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSelChangedTree(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnBeginDragList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	virtual void OnCancel();
	virtual void OnOK();
	//}}AFX_MSG

	afx_msg BOOL OnToolTipText(UINT, NMHDR* pNMHDR, LRESULT* pResult);

	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_LIBDLG_H__BABBE241_AF9C_11D2_8203_DC3ED7F79C17__INCLUDED_)