project64/Source/Project64/UserInterface/EnhancementUI.h

71 lines
2.5 KiB
C
Raw Normal View History

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)
2022-09-26 02:31:54 +00:00
{
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog);
MESSAGE_HANDLER(WM_DESTROY, OnDestroy);
COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd);
COMMAND_ID_HANDLER(ID_POPUP_EDIT, OnEditEnhancement);
COMMAND_ID_HANDLER(ID_POPUP_ADDENHANCEMENT, OnAddEnhancement);
COMMAND_ID_HANDLER(ID_POPUP_DELETE, OnPopupDelete);
NOTIFY_HANDLER_EX(IDC_ENHANCEMENTLIST, NM_CLICK, OnEnhancementListClicked);
NOTIFY_HANDLER_EX(IDC_ENHANCEMENTLIST, NM_RCLICK, OnEnhancementListRClicked);
NOTIFY_HANDLER_EX(IDC_ENHANCEMENTLIST, NM_DBLCLK, OnEnhancementListDClicked);
NOTIFY_HANDLER_EX(IDC_ENHANCEMENTLIST, TVN_SELCHANGED, OnEnhancementListSelChanged);
}
2021-01-17 03:17:58 +00:00
END_MSG_MAP()
2022-09-26 02:31:54 +00:00
enum
{
IDD = IDD_Enhancement_Config
};
2021-01-17 03:17:58 +00:00
CEnhancementUI();
void Display(HWND hParent, bool BlockExecution);
private:
friend CEditEnhancement;
2022-09-26 02:31:54 +00:00
CEnhancementUI(const CEnhancementUI &);
CEnhancementUI & operator=(const CEnhancementUI &);
2021-01-17 03:17:58 +00:00
2021-02-23 09:46:00 +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);
2022-09-26 02:31:54 +00:00
LRESULT OnAddEnhancement(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & bHandled);
LRESULT OnCloseCmd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & bHandled);
2022-09-26 02:31:54 +00:00
LRESULT OnPopupDelete(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
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
};