diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-30 20:17:36 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-30 20:17:36 +0000 |
commit | 2d15eafc63a1384cec02df68708d6df09aace5ca (patch) | |
tree | e53a9578c6626c0b9bfdef40512023453a5c76a5 /plugins/Clist_modern/src/hdr | |
parent | 1c2aef4924fbc71d57b8bd49b0572de9a6a55095 (diff) |
removed not used files
git-svn-id: http://svn.miranda-ng.org/main/trunk@13319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/hdr')
-rw-r--r-- | plugins/Clist_modern/src/hdr/modern_skinned_profile.h | 196 |
1 files changed, 0 insertions, 196 deletions
diff --git a/plugins/Clist_modern/src/hdr/modern_skinned_profile.h b/plugins/Clist_modern/src/hdr/modern_skinned_profile.h deleted file mode 100644 index 87b4498313..0000000000 --- a/plugins/Clist_modern/src/hdr/modern_skinned_profile.h +++ /dev/null @@ -1,196 +0,0 @@ -#ifndef modern_skinned_profile_h__
-#define modern_skinned_profile_h__
-
-//#include "modern_commonheaders.h"
-//#include "modern_commonprototypes.h"
-
-#include <map>
-#include <string>
-//#include <atlstr.h>
-
-class MString
-{
-private:
- TCHAR * _buffer;
-public:
- MString() : _buffer(NULL) {};
- MString(const TCHAR * str) { _buffer = str ? _tcsdup(str) : NULL; }
- MString(const MString& str) { _buffer = str._buffer ? _tcsdup(str._buffer) : NULL; }
- MString& operator=(const MString& str)
- {
- if (_buffer) free(_buffer);
- _buffer = str._buffer ? _tcsdup(str._buffer) : NULL;
- }
- TCHAR* operator()(const MString& str) { return _buffer; }
- ~MString()
- {
- if (_buffer)
- free(_buffer);
- _buffer = NULL;
- }
-
-#ifdef _UNICODE
- MString(const char * str)
- {
- if (!str)
- _buffer = NULL;
- else
- {
- int cbLen = MultiByteToWideChar(0, 0, str, -1, NULL, 0);
- wchar_t* _buffer = (wchar_t*)malloc(sizeof(wchar_t)*(cbLen + 1));
- if (_buffer == NULL) return;
- MultiByteToWideChar(0, 0, str, -1, _buffer, cbLen);
- _buffer[cbLen] = 0;
- }
- }
-#endif
-
-};
-
-class ValueVariant
-{
-public:
- ValueVariant() : _type(VVT_EMPTY) {};
- ValueVariant(BYTE bValue) : _type(VVT_BYTE), _bValue(bValue) {};
- ValueVariant(WORD wValue) : _type(VVT_WORD), _wValue(wValue) {};
- ValueVariant(DWORD dwValue) : _type(VVT_DWORD), _dwValue(dwValue) {};
- ValueVariant(const MString& strValue) : _type(VVT_STRING), _strValue(strValue) {};
- ValueVariant(const char * szValue) : _type(VVT_STRING), _strValue(szValue) {};
-#ifdef _UNICODE
- ValueVariant(const wchar_t * szValue) : _type(VVT_STRING), _strValue(szValue) {};
-#endif
-
- BYTE GetByte()
- {
- switch (_type)
- {
- case VVT_BYTE:
- return (BYTE)_bValue;
- case VVT_WORD:
- case VVT_DWORD:
- DebugBreak();
- return (BYTE)_bValue;
- default:
- DebugBreak();
- }
- return 0;
- }
-
- WORD GetWord()
- {
- switch (_type)
- {
- case VVT_WORD:
- return (WORD)_wValue;
-
- case VVT_BYTE:
- case VVT_DWORD:
- DebugBreak();
- return (WORD)_wValue;
- default:
- DebugBreak();
- }
- return 0;
- }
-
- DWORD GetDword()
- {
- switch (_type)
- {
- case VVT_DWORD:
- return (DWORD)_dwValue;
-
- case VVT_BYTE:
- case VVT_WORD:
- DebugBreak();
- return (DWORD)_dwValue;
- default:
- DebugBreak();
- }
- return 0;
- }
- MString GetString()
- {
- switch (_type)
- {
- case VVT_STRING:
- return _strValue;
-
- default:
- DebugBreak();
- }
- return "";
- }
- const MString& GetStringStatic()
- {
- switch (_type)
- {
- case VVT_STRING:
- return _strValue;
-
- default:
- DebugBreak();
- }
- return _strValue;
- }
- bool IsEmpty() { return _type == VVT_EMPTY; }
-
-private:
- enum
- {
- VVT_EMPTY = 0,
- VVT_BYTE,
- VVT_WORD,
- VVT_DWORD,
- VVT_STRING
- };
- int _type;
- union
- {
- BYTE _bValue;
- WORD _wValue;
- DWORD _dwValue;
- };
- MString _strValue;
-
-};
-
-// this is single tone class to represent some profile settings to be skinned
-class CSkinnedProfile
-{
-private:
- static CSkinnedProfile _me;
- CSkinnedProfile();
- ~CSkinnedProfile();
-
-private:
- // Skinned profile holded attributes
- MString _strSkinFilename;
- bool _bLoadedFonts;
- bool _bLoadedOthers;
-
- typedef std::map<HashStringKeyNoCase, ValueVariant> ValueList_t;
- typedef std::map<HashStringKeyNoCase, ValueList_t> KeyList_t;
-
- KeyList_t SkinnedProfile;
-
- ValueVariant* _GetValue(const char * szSection, const char * szKey);
-
- mir_cs _Lock; // critical section to matable skinned profile access
-
-public:
- static CSkinnedProfile* SkinProfile() { return &_me; }
-
- HRESULT Init();
- HRESULT Clear();
-
- static BYTE SpiGetSkinByte(MCONTACT hContact, const char * szSection, const char * szKey, const BYTE defValue);
- static WORD SpiGetSkinWord(MCONTACT hContact, const char * szSection, const char * szKey, const WORD defValue);
- static DWORD SpiGetSkinDword(MCONTACT hContact, const char * szSection, const char * szKey, const DWORD defValue);
- static BOOL SpiCheckSkinned(MCONTACT hContact, const char * szSection, const char * szKey);
-
-};
-
-
-
-#endif // modern_skinned_profile_h__
\ No newline at end of file |