-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathToolsDialog.hpp
92 lines (68 loc) · 1.62 KB
/
ToolsDialog.hpp
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
////////////////////////////////////////////////////////////////////////////////
//! \file ToolsDialog.hpp
//! \brief The ToolsDialog class declaration.
//! \author Chris Oldwood
// Check for previous inclusion
#ifndef TOOLSDIALOG_HPP
#define TOOLSDIALOG_HPP
#if _MSC_VER > 1000
#pragma once
#endif
#include <WCL/CommonUI.hpp>
#include "Tools.hpp"
////////////////////////////////////////////////////////////////////////////////
//! The dialog used to edit the set of tools.
class ToolsDialog : public CDialog
{
public:
//! Default constructor.
ToolsDialog();
//
// Members.
//
Tools m_tools; //! The set of tools.
private:
//! The view columns
enum Column
{
TOOL_NAME,
COMMAND_LINE,
};
//
// Controls.
//
CListView m_view; //! The tools view.
//
// Message handlers.
//
//! Dialog initialisation handler.
virtual void OnInitDialog();
//! OK button handler.
virtual bool OnOk();
//! Tool view selection change handler.
LRESULT onToolSelected(NMHDR& header);
//! Tool double-clicked handler.
LRESULT onToolDoubleClicked(NMHDR& header);
//! Add button handler.
void onAddTool();
//! Copy button handler.
void onCopyTool();
//! Edit button handler.
void onEditTool();
//! Delete button handler.
void onDeleteTool();
//! Up button handler.
void onMoveToolUp();
//! Down button handler.
void onMoveToolDown();
//
// Internal methods.
//
//! Update the state of the UI.
void updateUi();
//! Add an item to the view.
void addItemToView(ConstToolPtr tool, bool select = false);
//! Update an item in the view.
void updateViewItem(size_t row, ConstToolPtr tool);
};
#endif // TOOLSDIALOG_HPP