|
/***************************************************************************/
/* NOTE: */
/* This document is copyright (c) by Oz Solomonovich, and is bound by the */
/* MIT open source license (www.opensource.org/licenses/mit-license.html). */
/* See License.txt for more information. */
/***************************************************************************/
// Options.h : header file
//
#if !defined(AFX_OPTIONS_H__23E5E9B8_C14F_11D3_BA8F_0000861DFCE7__INCLUDED_)
#define AFX_OPTIONS_H__23E5E9B8_C14F_11D3_BA8F_0000861DFCE7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "AutoPropPage.h"
/////////////////////////////////////////////////////////////////////////////
// CPageWithList class
class CPageWithList : public CAutoPropPage
{
DECLARE_DYNCREATE(CPageWithList)
CPageWithList() {};
public:
CPageWithList(CListBox& managedList, int iDelButton, int iInsButton,
UINT nIDTemplate, bool bAllowImplicit = true, int iHelpID = -1,
UINT nIDCaption = 0);
void InitPageWithList();
virtual void OnUpdateList() {};
protected:
enum undo_ops {none, ins, del};
void DeleteString(CString str);
void InsertString(CString str);
void SetLastUndo(undo_ops op, CString val);
afx_msg void HandlerImpl_OnSelChange();
afx_msg void HandlerImpl_OnUndo();
afx_msg void HandlerImpl_OnDelete();
afx_msg int HandlerImpl_OnVKeyToItem(UINT nKey, CListBox* pListBox, UINT nIndex);
private:
CListBox* m_pManagedList;
undo_ops m_LastUndoOp;
CString m_sLastUndoVal;
CWnd * m_pUndoWnd;
int m_iDelButton;
int m_iInsButton;
};
/////////////////////////////////////////////////////////////////////////////
// CFilesPage dialog
class CFilesPage : public CPageWithList
{
DECLARE_DYNCREATE(CFilesPage)
// Construction
public:
CFilesPage();
~CFilesPage();
// Dialog Data
//{{AFX_DATA(CFilesPage)
enum { IDD = IDD_OPTPAGE_FILES };
CListBox m_FileList;
//}}AFX_DATA
CString m_sFileList;
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CFilesPage)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CFilesPage)
afx_msg void OnInsertfile();
afx_msg void OnDeletefile();
afx_msg void OnUndo();
afx_msg void OnClearallfiles();
afx_msg void OnSelchangeFileList();
virtual BOOL OnInitDialog();
afx_msg int OnVKeyToItem(UINT nKey, CListBox* pListBox, UINT nIndex);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
virtual void OnUpdateList();
void FillFileList();
};
/////////////////////////////////////////////////////////////////////////////
// CExtensionsPage dialog
class CExtensionsPage : public CPageWithList
{
DECLARE_DYNCREATE(CExtensionsPage)
// Construction
public:
CExtensionsPage();
~CExtensionsPage();
// Dialog Data
//{{AFX_DATA(CExtensionsPage)
enum { IDD = IDD_OPTPAGE_EXTENSIONS };
CListBox m_ExtList;
//}}AFX_DATA
CString m_sExtList;
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CExtensionsPage)
public:
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
void FillExtList();
// Generated message map functions
//{{AFX_MSG(CExtensionsPage)
virtual BOOL OnInitDialog();
afx_msg void OnReset();
afx_msg int OnVKeyToItem(UINT nKey, CListBox* pListBox, UINT nIndex);
afx_msg void OnInsertext();
afx_msg void OnDeleteext();
afx_msg void OnUndo();
afx_msg void OnSelChange();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
virtual void OnUpdateList();
};
/////////////////////////////////////////////////////////////////////////////
// COptionsPage dialog
class COptionsPage : public CAutoPropPage
{
DECLARE_DYNCREATE(COptionsPage)
// Construction
public:
COptionsPage();
~COptionsPage();
// Dialog Data
//{{AFX_DATA(COptionsPage)
enum { IDD = IDD_OPTPAGE_OPTIONS };
CComboBox m_DefFilter;
BOOL m_bCheckComments;
BOOL m_bCountBlanks;
int m_XSLType;
CString m_sXSLName;
//}}AFX_DATA
int m_iDefFilter;
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(COptionsPage)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(COptionsPage)
virtual BOOL OnInitDialog();
afx_msg void DoModified();
afx_msg void OnXSLSel();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
DECLARE_HELP_IDS();
};
/////////////////////////////////////////////////////////////////////////////
// COptionsSheet
class COptionsSheet : public CHHPropSheet
{
DECLARE_DYNAMIC(COptionsSheet)
// Construction
public:
COptionsSheet(CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
// Attributes
public:
CFilesPage m_FilesPage;
CExtensionsPage m_ExtPage;
COptionsPage m_OptionsPage;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(COptionsSheet)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~COptionsSheet();
// Generated message map functions
protected:
//{{AFX_MSG(COptionsSheet)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
enum undo_ops {none, ins, del};
undo_ops m_LastUndoOp;
CString m_sLastUndoVal;
CWnd * m_pUndoWnd;
void DeleteString(CString str);
void InsertString(CString str);
void SetLastUndo(undo_ops op, CString val);
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_OPTIONS_H__23E5E9B8_C14F_11D3_BA8F_0000861DFCE7__INCLUDED_)
|
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