2011-08-28 10:58:26 +00:00
|
|
|
/*
|
|
|
|
Copyright (C) 2011 Birunthan Mohanathas
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2012-01-23 06:36:15 +00:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2011-08-28 10:58:26 +00:00
|
|
|
*/
|
|
|
|
|
2011-11-21 12:53:55 +00:00
|
|
|
#ifndef __DIALOGMANAGE_H__
|
|
|
|
#define __DIALOGMANAGE_H__
|
2011-08-28 10:58:26 +00:00
|
|
|
|
|
|
|
#include "Dialog.h"
|
|
|
|
|
|
|
|
class CDialogManage : public CDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CDialogManage(HWND window);
|
|
|
|
virtual ~CDialogManage();
|
|
|
|
|
|
|
|
static INT_PTR CALLBACK DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnInitDialog(WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
2011-10-29 10:36:07 +00:00
|
|
|
static void Open(const WCHAR* name);
|
2011-08-28 10:58:26 +00:00
|
|
|
static void Open(int tab = 0);
|
|
|
|
static void OpenSkin(CMeterWindow* meterWindow);
|
|
|
|
|
|
|
|
static void UpdateSkins(CMeterWindow* meterWindow, bool deleted = false);
|
|
|
|
|
|
|
|
static WINDOWPLACEMENT c_WindowPlacement;
|
|
|
|
static CDialogManage* c_Dialog;
|
|
|
|
|
2012-02-21 09:03:16 +00:00
|
|
|
protected:
|
|
|
|
virtual CTab& GetActiveTab();
|
|
|
|
|
2011-08-28 10:58:26 +00:00
|
|
|
private:
|
|
|
|
// Skins tab
|
|
|
|
class CTabSkins : public CTab
|
|
|
|
{
|
|
|
|
public:
|
2011-11-21 12:53:55 +00:00
|
|
|
CTabSkins(HWND owner);
|
2011-08-28 10:58:26 +00:00
|
|
|
|
|
|
|
virtual void Initialize();
|
|
|
|
|
|
|
|
static INT_PTR CALLBACK DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
|
|
void Update(CMeterWindow* meterWindow, bool deleted);
|
|
|
|
|
|
|
|
static void SelectTreeItem(HWND tree, HTREEITEM item, LPCWSTR name);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void SetControls();
|
|
|
|
void DisableControls(bool clear = false);
|
|
|
|
void ReadSkin();
|
|
|
|
|
2012-06-09 16:56:59 +00:00
|
|
|
static std::wstring GetTreeSelectionPath(HWND tree);
|
2012-06-01 10:05:25 +00:00
|
|
|
static int PopulateTree(HWND tree, TVINSERTSTRUCT& tvi, int index = 0);
|
2011-08-28 10:58:26 +00:00
|
|
|
|
2012-06-01 13:06:36 +00:00
|
|
|
std::wstring m_SkinFileName;
|
|
|
|
std::wstring m_SkinFolderPath;
|
2011-08-28 10:58:26 +00:00
|
|
|
CMeterWindow* m_SkinWindow;
|
|
|
|
bool m_HandleCommands;
|
|
|
|
bool m_IgnoreUpdate;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Themes tab
|
|
|
|
class CTabThemes : public CTab
|
|
|
|
{
|
|
|
|
public:
|
2011-11-21 12:53:55 +00:00
|
|
|
CTabThemes(HWND owner);
|
2011-08-28 10:58:26 +00:00
|
|
|
|
|
|
|
virtual void Initialize();
|
|
|
|
|
|
|
|
static INT_PTR CALLBACK DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
|
|
|
};
|
|
|
|
|
|
|
|
// Settings tab
|
|
|
|
class CTabSettings : public CTab
|
|
|
|
{
|
|
|
|
public:
|
2011-11-21 12:53:55 +00:00
|
|
|
CTabSettings(HWND owner);
|
2011-08-28 10:58:26 +00:00
|
|
|
|
|
|
|
virtual void Initialize();
|
|
|
|
|
|
|
|
static INT_PTR CALLBACK DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
|
|
|
};
|
|
|
|
|
2011-11-21 12:53:55 +00:00
|
|
|
CTabSkins m_TabSkins;
|
|
|
|
CTabThemes m_TabThemes;
|
|
|
|
CTabSettings m_TabSettings;
|
2011-08-28 10:58:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|