00001 /* 00002 Free Download Manager Copyright (c) 2003-2007 FreeDownloadManager.ORG 00003 Open Download Manager Copyright (c) 2008-2010 OpenDownloadManager.ORG 00004 */ 00005 00006 #if !defined(AFX_DOWNLOADSGROUPSCOMBOBOX_H__6EBB97AC_6FA4_488D_8411_8BC1A862C579__INCLUDED_) 00007 #define AFX_DOWNLOADSGROUPSCOMBOBOX_H__6EBB97AC_6FA4_488D_8411_8BC1A862C579__INCLUDED_ 00008 00009 #include "ComboBoxTreeCtrl.h" 00010 #include "vmsDownloadsGroupsMgr.h" 00011 #include "fsTicksMgr.h" 00012 #if _MSC_VER > 1000 00013 #pragma once 00014 #endif 00015 00016 class CDownloadsGroupsComboBox : public CComboBox 00017 { 00018 00019 public: 00020 CDownloadsGroupsComboBox(); 00021 00022 public: 00023 00024 public: 00025 00026 //{{AFX_VIRTUAL(CDownloadsGroupsComboBox) 00027 //}}AFX_VIRTUAL 00028 00029 public: 00030 00031 bool m_bHasAllGroupsItem; 00032 00033 void Tree_UpdateSelection(BOOL bPostNotificationMsg = TRUE); 00034 00035 void ShowDropDown (BOOL bShow); 00036 00037 BOOL SelectGroupById (UINT nGroupId); 00038 00039 void RememberSelectedGroup(); 00040 00041 vmsDownloadsGroupSmartPtr GetSelectedGroup(); 00042 00043 vmsDownloadsGroupSmartPtr CreateNewGroup(vmsDownloadsGroupSmartPtr pParentGroup); 00044 00045 BOOL SelectGroup (vmsDownloadsGroupSmartPtr grp); 00046 00047 void Fill(); 00048 virtual ~CDownloadsGroupsComboBox(); 00049 00050 protected: 00051 00052 fsTicksMgr m_timeLastHide; 00053 00054 vmsDownloadsGroupSmartPtr m_pSelectedGroup; 00055 00056 void FillGroups (PDLDS_GROUPS_TREE pGroupsTree, HTREEITEM hRoot); 00057 00058 CComboBoxTreeCtrl m_wndTree; 00059 00060 struct _inc_TreeCtrlGroups 00061 { 00062 HTREEITEM hItem; 00063 vmsDownloadsGroupSmartPtr pGroup; 00064 }; 00065 std::vector <_inc_TreeCtrlGroups> m_vGroupItems; 00066 //{{AFX_MSG(CDownloadsGroupsComboBox) 00067 afx_msg void OnDestroy(); 00068 afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 00069 afx_msg void OnLButtonUp(UINT nFlags, CPoint point); 00070 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 00071 afx_msg void OnKillFocus(CWnd* pNewWnd); 00072 afx_msg void OnSetFocus(CWnd* pOldWnd); 00073 afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); 00074 //}}AFX_MSG 00075 00076 DECLARE_MESSAGE_MAP() 00077 }; 00078 00079 //{{AFX_INSERT_LOCATION}//}} 00080 00081 #endif
1.5.6