blob: ebd1e604d019d3e36a74420a6e8154ac96d2c537 (
plain) (
blame)
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
|
/*
* view_com.h
* ----------
* Purpose: Song comments tab, lower panel.
* Notes : (currently none)
* Authors: Olivier Lapicque
* OpenMPT Devs
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#pragma once
#include "openmpt/all/BuildSettings.hpp"
#include "CListCtrl.h"
OPENMPT_NAMESPACE_BEGIN
class CViewComments: public CModScrollView
{
public:
CViewComments() = default;
DECLARE_SERIAL(CViewComments)
protected:
CModControlBar m_ToolBar;
CListCtrlEx m_ItemList;
int m_nCurrentListId = 0, m_nListId = 0;
ModCommand::NOTE m_lastNote = NOTE_NONE;
CHANNELINDEX m_noteChannel = CHANNELINDEX_INVALID;
INSTRUMENTINDEX m_noteInstr = INSTRUMENTINDEX_INVALID;
public:
void RecalcLayout();
void UpdateButtonState();
public:
//{{AFX_VIRTUAL(CViewComments)
void OnInitialUpdate() override;
BOOL PreTranslateMessage(MSG *pMsg) override;
LRESULT OnModViewMsg(WPARAM wParam, LPARAM lParam) override;
void UpdateView(UpdateHint hint, CObject *pObject = nullptr) override;
//}}AFX_VIRTUAL
protected:
bool SwitchToList(int list);
//{{AFX_MSG(CViewGlobals)
afx_msg void OnDestroy();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnShowSamples() { SwitchToList(IDC_LIST_SAMPLES); }
afx_msg void OnShowInstruments() { SwitchToList(IDC_LIST_INSTRUMENTS); }
afx_msg void OnShowPatterns() { SwitchToList(IDC_LIST_PATTERNS); }
afx_msg void OnEndLabelEdit(LPNMHDR pnmhdr, LRESULT *pLResult);
afx_msg void OnBeginLabelEdit(LPNMHDR pnmhdr, LRESULT *pLResult);
afx_msg void OnDblClickListItem(NMHDR *, LRESULT *);
afx_msg void OnRClickListItem(NMHDR *, LRESULT *);
afx_msg void OnCopyNames();
afx_msg LRESULT OnMidiMsg(WPARAM midiData, LPARAM);
afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
OPENMPT_NAMESPACE_END
|