|
#pragma once
class Options
{
public:
struct ExcludedFile
{
CString Description;
CString Filter;
};
struct HighlightedFile
{
CString Description;
CString Filter;
COLORREF Colour;
};
typedef std::vector<ExcludedFile> ExcludedFileList;
typedef std::vector<HighlightedFile> HighlightedFileList;
public:
Options();
public:
void Load();
void Save();
int GetExcludedFileCount() const;
const ExcludedFile& GetExcludedFile(int i) const;
void AddExcludedFile(const ExcludedFile& file);
void RemoveExcludedFile(int nIndex);
int GetHighlightedFileCount() const;
const HighlightedFile& GetHighlightedFile(int i) const;
void AddHighlightedFile(const HighlightedFile& file);
void RemoveHighlightedFile(int nIndex);
void GetColumnWidths(int* pName, int* pProject, int* pFileName) const;
void SetColumnWidths(int Name, int Project, int FileName);
private:
ExcludedFileList m_ExcludedFileList;
static bool ExcludedFileCompare(const ExcludedFile& a, const ExcludedFile& b);
HighlightedFileList m_HighlightedFileList;
static bool HighlightedFileCompare(const HighlightedFile& a, const HighlightedFile& b);
CString PackHighlightString(const CString& strFilter, COLORREF colour) const;
void UnpackHighlightString(CString s, CString* pFilter, COLORREF* pColour) const;
enum EnumResult { EnumGotString, EnumWrongType, EnumNoMoreItems, EnumOtherError };
EnumResult RegEnumValueString(HKEY hKey, DWORD dwIndex, CString* pName, CString* pValue);
int m_ColumnWidthName;
int m_ColumnWidthProject;
int m_ColumnWidthFileName;
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.