2021-01-17 03:17:58 +00:00
|
|
|
#pragma once
|
|
|
|
#include <Project64\WTLApp.h>
|
|
|
|
|
|
|
|
class CEditEnhancement;
|
|
|
|
|
|
|
|
class CEnhancementUI :
|
|
|
|
public CDialogImpl<CEnhancementUI>
|
|
|
|
{
|
2021-02-23 09:46:00 +00:00
|
|
|
enum TV_CHECK_STATE
|
|
|
|
{
|
|
|
|
TV_STATE_UNKNOWN,
|
|
|
|
TV_STATE_CLEAR,
|
|
|
|
TV_STATE_CHECKED,
|
|
|
|
TV_STATE_INDETERMINATE
|
2021-01-17 03:17:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
|
|
|
BEGIN_MSG_MAP_EX(CEnhancementUI)
|
|
|
|
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
2021-02-02 02:52:47 +00:00
|
|
|
MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
|
2021-01-17 03:17:58 +00:00
|
|
|
COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
|
2021-02-02 02:52:47 +00:00
|
|
|
COMMAND_ID_HANDLER(ID_POPUP_EDIT, OnEditEnhancement)
|
2021-01-17 03:17:58 +00:00
|
|
|
COMMAND_ID_HANDLER(ID_POPUP_ADDENHANCEMENT, OnAddEnhancement)
|
2021-02-02 02:52:47 +00:00
|
|
|
NOTIFY_HANDLER_EX(IDC_ENHANCEMENTLIST, NM_CLICK, OnEnhancementListClicked)
|
2021-01-17 03:17:58 +00:00
|
|
|
NOTIFY_HANDLER_EX(IDC_ENHANCEMENTLIST, NM_RCLICK, OnEnhancementListRClicked)
|
|
|
|
NOTIFY_HANDLER_EX(IDC_ENHANCEMENTLIST, NM_DBLCLK, OnEnhancementListDClicked)
|
2021-02-23 09:46:00 +00:00
|
|
|
NOTIFY_HANDLER_EX(IDC_ENHANCEMENTLIST, TVN_SELCHANGED, OnEnhancementListSelChanged)
|
2021-01-17 03:17:58 +00:00
|
|
|
END_MSG_MAP()
|
|
|
|
|
|
|
|
enum { IDD = IDD_Enhancement_Config };
|
|
|
|
|
|
|
|
CEnhancementUI();
|
|
|
|
|
|
|
|
void Display(HWND hParent, bool BlockExecution);
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend CEditEnhancement;
|
|
|
|
|
|
|
|
CEnhancementUI(const CEnhancementUI&);
|
|
|
|
CEnhancementUI& operator=(const CEnhancementUI&);
|
|
|
|
|
2021-02-23 09:46:00 +00:00
|
|
|
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & bHandled);
|
2021-02-02 02:52:47 +00:00
|
|
|
LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & bHandled);
|
|
|
|
LRESULT OnEditEnhancement(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & bHandled);
|
|
|
|
LRESULT OnAddEnhancement(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & bHandled );
|
|
|
|
LRESULT OnCloseCmd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & bHandled);
|
2021-02-23 09:46:00 +00:00
|
|
|
LRESULT OnEnhancementListClicked(NMHDR * lpnmh);
|
|
|
|
LRESULT OnEnhancementListRClicked(NMHDR * lpnmh);
|
|
|
|
LRESULT OnEnhancementListDClicked(NMHDR * lpnmh);
|
|
|
|
LRESULT OnEnhancementListSelChanged(NMHDR * lpnmh);
|
2021-01-17 03:17:58 +00:00
|
|
|
|
2021-02-02 02:52:47 +00:00
|
|
|
void AddCodeLayers(LPARAM ListID, const std::wstring & Name, HTREEITEM hParent, bool Active);
|
|
|
|
void ChangeChildrenStatus(HTREEITEM hParent, bool Checked);
|
|
|
|
void CheckParentStatus(HTREEITEM hParent);
|
2021-01-17 03:17:58 +00:00
|
|
|
void RefreshList(void);
|
|
|
|
TV_CHECK_STATE TV_GetCheckState(HTREEITEM hItem);
|
|
|
|
bool TV_SetCheckState(HTREEITEM hItem, TV_CHECK_STATE state);
|
|
|
|
|
|
|
|
CEnhancementList m_Enhancements;
|
|
|
|
CTreeViewCtrl m_TreeList;
|
|
|
|
HTREEITEM m_hSelectedItem;
|
2021-02-02 03:25:28 +00:00
|
|
|
bool m_bModal;
|
2021-01-17 03:17:58 +00:00
|
|
|
};
|