2 * @file DirCompProgressBar.h
4 * @brief Declaration file for Directory compare statusdialog class
9 #include "CompareStats.h"
13 /////////////////////////////////////////////////////////////////////////////
14 // DirCompProgressBar dialog
17 * @brief Class for directory compare statusdialog.
19 * Implements non-modal dialog directory compares. We create this
20 * modeless dialog when we start the compare and destroy it after
21 * compare is ready. Dialog itself shows counts of total found items
22 * and items compared so far. And nice progressbar for user to have some
23 * idea how compare is going.
25 * Status updates are fired by periodic timer events. We have shared
26 * datastructure with compare code. Compare code updates status information
27 * to datastructure during compare. When timer event fires, dialog reads
28 * that datastructure and updates the GUI.
30 * @todo Now we update total count of items with same timer than we update
31 * compared items count. Maybe we should use different timer and bigger
32 * interval for total count updates?
34 class DirCompProgressBar : public CTrDialogBar
38 DirCompProgressBar(); // standard constructor
39 ~DirCompProgressBar();
40 BOOL Create(CWnd* pParentWnd);
41 void SetCompareStat(CompareStats * pCompareStats);
44 void SetPaused(bool paused);
47 //{{AFX_DATA(DirCompProgressBar)
48 enum { IDD = IDD_DIRCOMP_PROGRESS };
54 void SetProgressState(int comparedItems, int totalItems);
56 // Generated message map functions
57 //{{AFX_MSG(DirCompProgressBar)
58 afx_msg void OnTimer(UINT_PTR nIDEvent);
63 CompareStats *m_pCompareStats; /**< Pointer to comparestats */
64 CompareStats::CMP_STATE m_prevState; /**< Previous state for compare (to track changes) */
65 bool m_bCompareReady; /**< Compare ready, waiting for closing? */
66 #ifdef __ITaskbarList3_INTERFACE_DEFINED__
67 ITaskbarList3 *m_pTaskbarList;
72 * @brief Set pointer to compare stats.
73 * @param [in] pCompareStats Pointer to stats.
75 inline void DirCompProgressBar::SetCompareStat(CompareStats * pCompareStats)
77 m_pCompareStats = pCompareStats;