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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
/*
* $Id$
*
* (C) 2006-2010 see AUTHORS
*
* This file is part of mplayerc.
*
* Mplayerc is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Mplayerc is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "PlayerListCtrl.h"
class CClip
{
private :
REFERENCE_TIME m_rtIn;
REFERENCE_TIME m_rtOut;
CString m_strName;
public :
CClip();
bool HaveIn()
{
return m_rtIn != _I64_MIN;
};
bool HaveOut()
{
return m_rtOut != _I64_MIN;
};
void SetOut (LPCTSTR strVal);
void SetIn (LPCTSTR strVal);
void SetIn (REFERENCE_TIME rtVal);
void SetOut (REFERENCE_TIME rtVal);
void SetName(LPCTSTR strName)
{
m_strName = strName;
};
CString GetIn();
CString GetOut();
CString GetName() const
{
return m_strName;
};
};
class CEditListEditor : public CSizingControlBarG
{
DECLARE_DYNAMIC(CEditListEditor)
enum {COL_INDEX, COL_IN, COL_OUT, COL_NAME, COL_MAX};
CPlayerListCtrl m_list;
CStatic m_stUsers;
CComboBox m_cbUsers;
CStatic m_stHotFolders;
CComboBox m_cbHotFolders;
CImageList m_fakeImageList;
POSITION m_CurPos;
BOOL m_bDragging;
int m_nDragIndex;
int m_nDropIndex;
CPoint m_ptDropPoint;
CImageList* m_pDragImage;
CString m_strFileName;
bool m_bFileOpen;
CList<CClip> m_EditList;
CArray<CString> m_NameList;
void SaveEditListToFile();
void ResizeListColumn();
POSITION InsertClip(POSITION pos, CClip& NewClip);
void DropItemOnList();
int FindIndex(POSITION pos);
int FindNameIndex(LPCTSTR strName);
void FillCombo(LPCTSTR strFileName, CComboBox& Combo, bool bAllowNull);
void SelectCombo(LPCTSTR strValue, CComboBox& Combo);
protected :
DECLARE_MESSAGE_MAP()
public:
CEditListEditor(void);
~CEditListEditor(void);
BOOL Create(CWnd* pParentWnd);
void CloseFile();
void OpenFile(LPCTSTR lpFileName);
void SetIn (REFERENCE_TIME rtIn);
void SetOut (REFERENCE_TIME rtOut);
void NewClip (REFERENCE_TIME rtVal);
void Save();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLvnKeyDown(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
afx_msg void OnLvnItemchanged(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnBeginDrag(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnBeginlabeleditList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDolabeleditList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnEndlabeleditList(NMHDR* pNMHDR, LRESULT* pResult);
};
|