2021-01-17 03:17:58 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
|
|
|
* Project64 - A Nintendo 64 emulator. *
|
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include <Project64\WTLApp.h>
|
|
|
|
|
|
|
|
class CEditEnhancement;
|
|
|
|
|
|
|
|
class CEnhancementUI :
|
|
|
|
public CDialogImpl<CEnhancementUI>
|
|
|
|
{
|
|
|
|
enum TV_CHECK_STATE
|
|
|
|
{
|
|
|
|
TV_STATE_UNKNOWN,
|
|
|
|
TV_STATE_CLEAR,
|
|
|
|
TV_STATE_CHECKED,
|
|
|
|
TV_STATE_INDETERMINATE
|
|
|
|
};
|
|
|
|
|
|
|
|
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)
|
|
|
|
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-02 02:52:47 +00:00
|
|
|
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & bHandled);
|
|
|
|
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);
|
|
|
|
LRESULT OnEnhancementListClicked(NMHDR* lpnmh);
|
|
|
|
LRESULT OnEnhancementListRClicked(NMHDR * pNMHDR);
|
|
|
|
LRESULT OnEnhancementListDClicked(NMHDR * pNMHDR);
|
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
|
|
|
};
|