-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDatabasePane.h
58 lines (49 loc) · 1.73 KB
/
DatabasePane.h
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
#pragma once
#include "Data.h"
#include "NonClosableDockablePane.h"
#include "PaneTreeCtrl.h"
#include <memory>
class CDatabasePane : public CNonClosableDockablePane
{
DECLARE_DYNAMIC(CDatabasePane)
public:
CDatabasePane();
~CDatabasePane() override;
CPaneTreeCtrl* GetTreeCtrl() { return m_pTreeCtrl.get(); }
CString GetSelection() const;
CString GetDatabaseSelection() const;
void SetItemAsDatabase(const CString& sDatabase);
void SetDarkMode(const BOOL bSet);
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
void AdjustLayout();
void InitPropList();
COLORREF GetLineColor() const { return m_crLineColor; }
COLORREF GetTextColor() const { return m_crTextColor; }
COLORREF GetBkColor() const { return m_crBkColor; }
void SetLineColor(const COLORREF crLineColor) { m_crLineColor = crLineColor; }
void SetTextColor(const COLORREF crTextColor) { m_crTextColor = crTextColor; }
void SetBkColor(const COLORREF crBkColor) { m_crBkColor = crBkColor; }
// Attributes
protected:
std::unique_ptr<CImageList> m_pIL{};
std::unique_ptr<CPaneTreeCtrl> m_pTreeCtrl{};
private:
COLORREF m_crLineColor{ g_crDummy };
COLORREF m_crTextColor{ g_crDummy };
COLORREF m_crBkColor{ g_crDummy };
HTREEITEM m_hItemSelected{ nullptr };
private:
void SetItemAsDatabase(const HTREEITEM& hItemOld, const HTREEITEM& hItemNew);
protected:
//{{AFX_MSG(CDatabasePane)
afx_msg void OnDestroy();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnSetFocus(CWnd* pOldWnd);
afx_msg void OnTvnSelchangedTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnNMDblclkTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg LRESULT OnPostInit(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};