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 __DIALOGABOUT_H__
|
|
|
|
#define __DIALOGABOUT_H__
|
2011-08-28 10:58:26 +00:00
|
|
|
|
2012-12-13 09:12:25 +00:00
|
|
|
#include "../Common/Dialog.h"
|
2011-08-28 10:58:26 +00:00
|
|
|
|
|
|
|
class CDialogAbout : public CDialog
|
|
|
|
{
|
|
|
|
public:
|
2012-12-13 09:12:25 +00:00
|
|
|
CDialogAbout();
|
2011-08-28 10:58:26 +00:00
|
|
|
virtual ~CDialogAbout();
|
|
|
|
|
2012-12-13 18:12:37 +00:00
|
|
|
static CDialog* GetDialog() { return c_Dialog; }
|
2011-08-28 10:58:26 +00:00
|
|
|
|
|
|
|
static void Open(int tab = 0);
|
2012-12-13 09:12:25 +00:00
|
|
|
static void Open(const WCHAR* name);
|
2011-09-08 17:05:48 +00:00
|
|
|
static void ShowAboutLog();
|
2011-08-28 10:58:26 +00:00
|
|
|
|
|
|
|
static void AddLogItem(int level, LPCWSTR time, LPCWSTR message);
|
|
|
|
static void UpdateSkins();
|
2011-11-21 12:53:55 +00:00
|
|
|
static void UpdateMeasures(CMeterWindow* meterWindow);
|
2011-08-28 10:58:26 +00:00
|
|
|
|
2012-02-21 09:03:16 +00:00
|
|
|
protected:
|
2012-12-13 09:12:25 +00:00
|
|
|
virtual INT_PTR HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2012-12-13 18:12:37 +00:00
|
|
|
INT_PTR OnInitDialog(WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
2012-02-21 09:03:16 +00:00
|
|
|
|
2011-08-28 10:58:26 +00:00
|
|
|
private:
|
|
|
|
// Log tab
|
|
|
|
class CTabLog : public CTab
|
|
|
|
{
|
|
|
|
public:
|
2012-12-13 09:12:25 +00:00
|
|
|
enum Id
|
|
|
|
{
|
|
|
|
Id_ItemsListView = 100,
|
|
|
|
Id_ErrorCheckBox,
|
|
|
|
Id_WarningCheckBox,
|
|
|
|
Id_NoticeCheckBox,
|
|
|
|
Id_DebugCheckBox
|
|
|
|
};
|
|
|
|
|
|
|
|
CTabLog();
|
|
|
|
|
|
|
|
void Create(HWND owner);
|
2011-08-28 10:58:26 +00:00
|
|
|
virtual void Initialize();
|
|
|
|
virtual void Resize(int w, int h);
|
|
|
|
|
|
|
|
void AddItem(int level, LPCWSTR time, LPCWSTR message);
|
|
|
|
|
2012-12-13 09:12:25 +00:00
|
|
|
protected:
|
|
|
|
virtual INT_PTR HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
2011-08-28 10:58:26 +00:00
|
|
|
private:
|
|
|
|
bool m_Error;
|
|
|
|
bool m_Warning;
|
|
|
|
bool m_Notice;
|
|
|
|
bool m_Debug;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Measures tab
|
2012-02-20 17:27:00 +00:00
|
|
|
class CTabSkins : public CTab
|
2011-08-28 10:58:26 +00:00
|
|
|
{
|
|
|
|
public:
|
2012-12-13 09:12:25 +00:00
|
|
|
enum Id
|
|
|
|
{
|
|
|
|
Id_SkinsListBox = 100,
|
|
|
|
Id_ItemsListView
|
|
|
|
};
|
2011-08-28 10:58:26 +00:00
|
|
|
|
2012-12-13 09:12:25 +00:00
|
|
|
CTabSkins();
|
|
|
|
|
|
|
|
void Create(HWND owner);
|
2011-08-28 10:58:26 +00:00
|
|
|
virtual void Initialize();
|
|
|
|
virtual void Resize(int w, int h);
|
|
|
|
|
|
|
|
void UpdateSkinList();
|
2011-11-21 12:53:55 +00:00
|
|
|
void UpdateMeasureList(CMeterWindow* meterWindow);
|
|
|
|
|
2012-12-13 09:12:25 +00:00
|
|
|
protected:
|
|
|
|
virtual INT_PTR HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
|
|
|
|
|
2011-11-21 12:53:55 +00:00
|
|
|
private:
|
2012-02-23 16:33:05 +00:00
|
|
|
static int CALLBACK ListSortProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
|
|
|
|
|
2011-11-21 12:53:55 +00:00
|
|
|
CMeterWindow* m_SkinWindow;
|
2011-08-28 10:58:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Plugins tab
|
|
|
|
class CTabPlugins : public CTab
|
|
|
|
{
|
|
|
|
public:
|
2012-12-13 09:12:25 +00:00
|
|
|
enum Id
|
|
|
|
{
|
|
|
|
Id_ItemsListView = 100
|
|
|
|
};
|
|
|
|
|
|
|
|
CTabPlugins();
|
2011-08-28 10:58:26 +00:00
|
|
|
|
2012-12-13 09:12:25 +00:00
|
|
|
void Create(HWND owner);
|
2011-08-28 10:58:26 +00:00
|
|
|
virtual void Initialize();
|
|
|
|
virtual void Resize(int w, int h);
|
|
|
|
|
|
|
|
private:
|
|
|
|
typedef LPCTSTR (*GETPLUGINAUTHOR)();
|
|
|
|
typedef UINT (*GETPLUGINVERSION)();
|
|
|
|
};
|
2011-08-28 12:28:00 +00:00
|
|
|
|
|
|
|
// Version tab
|
|
|
|
class CTabVersion : public CTab
|
|
|
|
{
|
|
|
|
public:
|
2012-12-13 09:12:25 +00:00
|
|
|
enum Id
|
|
|
|
{
|
|
|
|
Id_AppIcon = 100,
|
|
|
|
Id_VersionLabel,
|
|
|
|
Id_HomeLink,
|
|
|
|
Id_LicenseLink,
|
|
|
|
Id_PathLabel,
|
|
|
|
Id_IniFileLabel,
|
|
|
|
Id_SkinPathLabel,
|
|
|
|
Id_CopyButton
|
|
|
|
};
|
|
|
|
|
|
|
|
CTabVersion();
|
|
|
|
|
|
|
|
void Create(HWND owner);
|
2011-08-28 12:28:00 +00:00
|
|
|
virtual void Initialize();
|
|
|
|
virtual void Resize(int w, int h);
|
|
|
|
|
2012-12-13 09:12:25 +00:00
|
|
|
protected:
|
|
|
|
virtual INT_PTR HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
2011-08-28 12:28:00 +00:00
|
|
|
INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
|
|
|
|
INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
|
|
|
|
};
|
2011-11-21 12:53:55 +00:00
|
|
|
|
2012-12-13 09:12:25 +00:00
|
|
|
enum Id
|
|
|
|
{
|
|
|
|
Id_CloseButton = IDCLOSE,
|
|
|
|
Id_Tab = 100
|
|
|
|
};
|
|
|
|
|
2012-06-16 18:41:17 +00:00
|
|
|
CTab& GetActiveTab();
|
|
|
|
|
2011-11-21 12:53:55 +00:00
|
|
|
CTabLog m_TabLog;
|
2012-02-20 17:27:00 +00:00
|
|
|
CTabSkins m_TabSkins;
|
2011-11-21 12:53:55 +00:00
|
|
|
CTabPlugins m_TabPlugins;
|
|
|
|
CTabVersion m_TabVersion;
|
2012-12-13 18:12:37 +00:00
|
|
|
|
|
|
|
static WINDOWPLACEMENT c_WindowPlacement;
|
|
|
|
static CDialogAbout* c_Dialog;
|
2011-08-28 10:58:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|