*
* @brief Dialog for testing file filters
*/
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
// $Id$
#include "stdafx.h"
static char THIS_FILE[] = __FILE__;
#endif
-/////////////////////////////////////////////////////////////////////////////
-// CTestFilterDlg dialog
-
-
+/**
+ * @brief Constructor.
+ * @param [in] pParent Parent window.
+ * @param [in] pFileFilter File filter to test.
+ * @param [in] pFilterMgr File filter manager.
+ */
CTestFilterDlg::CTestFilterDlg(CWnd* pParent, FileFilter * pFileFilter, FileFilterMgr *pFilterMgr)
: CDialog(CTestFilterDlg::IDD, pParent)
, m_pFileFilter(pFileFilter)
, m_pFileFilterMgr(pFilterMgr)
{
- //{{AFX_DATA_INIT(CTestFilterDlg)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
}
-
void CTestFilterDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
/////////////////////////////////////////////////////////////////////////////
// CTestFilterDlg message handlers
-BOOL CTestFilterDlg::OnInitDialog()
+/**
+ * @brief Initialize the dialog.
+ * @return FALSE always.
+ */
+BOOL CTestFilterDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// EXCEPTION: OCX Property Pages should return FALSE
}
-/** @brief User pressed Text button */
+/** @brief User pressed Text button. */
void CTestFilterDlg::OnTestBtn()
{
CString text;
AppendResult(text);
}
-/** @brief user pressed <enter> key */
+/** @brief user pressed <enter> key. */
void CTestFilterDlg::OnOK()
{
CWnd *pWnd = GetFocus();
}
}
-/** @brief Return true if specified text passes our filter */
+/**
+ * @brief Test text against filter.
+ * @param [in] text Text to test.
+ * @return TRUE if text passes the filter, FALSE otherwise.
+ */
BOOL CTestFilterDlg::CheckText(CString text) const
{
CButton * IsDirButton = (CButton *)GetDlgItem(IDC_IS_DIRECTORY);
{
return m_pFileFilterMgr->TestFileNameAgainstFilter(m_pFileFilter, text);
}
-
}
-/** @brief Add text to end of edit control */
+/**
+ * @brief Add text to end of edit control.
+ * @param [in] edit Edit contror into which the text is added.
+ * @param [in] text Text to add to edit control.
+ */
void AppendToEditBox(CEdit & edit, LPCTSTR text)
{
int len = edit.GetWindowTextLength();
edit.ReplaceSel(text);
}
-/** @brief Add new result to end of result edit box */
+/**
+ * @brief Add new result to end of result edit box.
+ * @param [in] result Result text to add.
+ */
void CTestFilterDlg::AppendResult(CString result)
{
CEdit * edit = (CEdit *)GetDlgItem(IDC_RESULTS);
* @brief Declaration file for CTestFilterDlg class
*
*/
-// RCS ID line follows -- this is updated by CVS
+// ID line follows -- this is updated by SVN
// $Id$
#if !defined(AFX_TESTFILTERDLG_H__1261AD7A_512F_47BC_882F_2E2D41C5072F__INCLUDED_)
#define AFX_TESTFILTERDLG_H__1261AD7A_512F_47BC_882F_2E2D41C5072F__INCLUDED_
#pragma once
-/////////////////////////////////////////////////////////////////////////////
-// CTestFilterDlg dialog
-
struct FileFilter;
class FileFilterMgr;
-/** @brief Dialog allowing user to test out file filter strings */
+/**
+ * @brief Dialog allowing user to test out file filter strings.
+ * The user can type a text and test if selected file filter matches to it.
+ */
class CTestFilterDlg : public CDialog
{
// Construction
// Implementation data
private:
- FileFilter * m_pFileFilter;
- FileFilterMgr * m_pFileFilterMgr;
+ FileFilter * m_pFileFilter; /**< Selected file filter. */
+ FileFilterMgr * m_pFileFilterMgr; /**< File filter manager. */
// Implementation methods
private: