00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_CTRLSEARCHPANEL_H__EAFFA7F3_526D_45C3_8C17_17A265ED3240__INCLUDED_)
00023 #define AFX_CTRLSEARCHPANEL_H__EAFFA7F3_526D_45C3_8C17_17A265ED3240__INCLUDED_
00024
00025 #pragma once
00026
00027 #include "CtrlTaskPanel.h"
00028 #include "CtrlSchemaCombo.h"
00029 #include "CtrlNetworkCombo.h"
00030 #include "CtrlSchema.h"
00031 #include "CtrlIconButton.h"
00032
00033 class CManagedSearch;
00034 class CQuerySearch;
00035
00036
00037 class CSearchInputBox : public CTaskBox
00038 {
00039
00040 public:
00041 CSearchInputBox();
00042 virtual ~CSearchInputBox();
00043 DECLARE_DYNAMIC(CSearchInputBox)
00044
00045
00046 public:
00047 CEdit m_wndSearch;
00048 CSchemaCombo m_wndSchemas;
00049 CIconButtonCtrl m_wndStart;
00050 CIconButtonCtrl m_wndStop;
00051
00052
00053 public:
00054 void OnSkinChange();
00055
00056
00057 public:
00058
00059
00060
00061
00062 protected:
00063
00064 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00065 afx_msg void OnSize(UINT nType, int cx, int cy);
00066 afx_msg void OnPaint();
00067 afx_msg void OnSelChangeSchemas();
00068 afx_msg void OnCloseUpSchemas();
00069 afx_msg void OnSearchStart();
00070 afx_msg void OnSearchStop();
00071
00072 DECLARE_MESSAGE_MAP()
00073 };
00074
00075 class CSearchAdvancedBox : public CTaskBox
00076 {
00077
00078 public:
00079 CSearchAdvancedBox();
00080 virtual ~CSearchAdvancedBox();
00081 DECLARE_DYNAMIC(CSearchAdvancedBox)
00082
00083
00084 public:
00085
00086 CComboBox m_wndSizeMin;
00087 CComboBox m_wndSizeMax;
00088 CNetworkCombo m_wndNetworks;
00089
00090
00091 public:
00092 void OnSkinChange();
00093
00094
00095 public:
00096
00097
00098
00099
00100 protected:
00101
00102 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00103 afx_msg void OnSize(UINT nType, int cx, int cy);
00104 afx_msg void OnPaint();
00105
00106 DECLARE_MESSAGE_MAP()
00107 };
00108
00109 class CSearchSchemaBox : public CTaskBox
00110 {
00111
00112 public:
00113 CSearchSchemaBox();
00114 virtual ~CSearchSchemaBox();
00115 DECLARE_DYNAMIC(CSearchSchemaBox)
00116
00117
00118 public:
00119 CSchemaCtrl m_wndSchema;
00120
00121
00122 public:
00123
00124
00125 public:
00126
00127 public:
00128 virtual BOOL PreTranslateMessage(MSG* pMsg);
00129
00130
00131
00132 protected:
00133
00134 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00135 afx_msg void OnSize(UINT nType, int cx, int cy);
00136
00137 DECLARE_MESSAGE_MAP()
00138 };
00139
00140
00141 class CSearchResultsBox : public CTaskBox
00142 {
00143
00144 public:
00145 CSearchResultsBox();
00146 virtual ~CSearchResultsBox();
00147 DECLARE_DYNAMIC(CSearchResultsBox)
00148
00149
00150 public:
00151 BOOL m_bActive;
00152 DWORD m_nFiles;
00153 DWORD m_nHits;
00154 DWORD m_nHubs;
00155 DWORD m_nLeaves;
00156
00157
00158 public:
00159 void Update(BOOL bSearching, DWORD nFiles, DWORD nHits, DWORD nHubs, DWORD nLeaves);
00160 protected:
00161 static void DrawText(CDC* pDC, int nX, int nY, UINT nFlags, LPCTSTR pszText);
00162
00163 virtual void OnExpanded(BOOL bOpen);
00164
00165
00166 public:
00167
00168
00169
00170
00171 protected:
00172
00173 afx_msg void OnPaint();
00174
00175 DECLARE_MESSAGE_MAP()
00176 };
00177
00178
00179 class CSearchPanel : public CTaskPanel
00180 {
00181
00182 public:
00183 CSearchPanel();
00184 virtual ~CSearchPanel();
00185 DECLARE_DYNAMIC(CSearchPanel)
00186
00187
00188 public:
00189 BOOL m_bSendSearch;
00190 protected:
00191 CSearchInputBox m_boxSearch;
00192 CSearchAdvancedBox m_boxAdvanced;
00193 CSearchSchemaBox m_boxSchema;
00194 CSearchResultsBox m_boxResults;
00195 BOOL m_bAdvanced;
00196
00197
00198 public:
00199 void SetSearchFocus();
00200 void ShowSearch(CManagedSearch* pSearch);
00201 void ShowStatus(BOOL bStarted, BOOL bSearching, DWORD nFiles, DWORD nHits, DWORD nHubs, DWORD nLeaves);
00202 void OnSchemaChange();
00203 void ExecuteSearch();
00204 CManagedSearch* GetSearch();
00205 void OnSkinChange();
00206 void Disable();
00207 void Enable();
00208
00209
00210 public:
00211
00212 public:
00213 virtual BOOL Create(CWnd* pParentWnd);
00214 virtual BOOL PreTranslateMessage(MSG* pMsg);
00215
00216
00217
00218 protected:
00219
00220 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00221
00222 DECLARE_MESSAGE_MAP()
00223 };
00224
00225
00226
00227 #define IDC_SEARCH_PANEL 111
00228 #define IDC_SEARCH_START 105
00229 #define IDC_SEARCH_STOP 106
00230 #define IDC_SEARCH_NETWORKS 107
00231 #define IDC_SEARCH_SIZEMIN 108
00232 #define IDC_SEARCH_SIZEMAX 109
00233
00234 #endif // !defined(AFX_CTRLSEARCHPANEL_H__EAFFA7F3_526D_45C3_8C17_17A265ED3240__INCLUDED_)