Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CtrlSearchPanel.h

Go to the documentation of this file.
00001 //
00002 // CtrlSearchPanel.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 // Construction
00040 public:
00041         CSearchInputBox();
00042         virtual ~CSearchInputBox();
00043         DECLARE_DYNAMIC(CSearchInputBox)
00044 
00045 // Attributes
00046 public:
00047         CEdit                   m_wndSearch;
00048         CSchemaCombo    m_wndSchemas;
00049         CIconButtonCtrl m_wndStart;
00050         CIconButtonCtrl m_wndStop;
00051         
00052 // Operations
00053 public:
00054         void    OnSkinChange();
00055 
00056 // Overrides
00057 public:
00058         //{{AFX_VIRTUAL(CSearchInputBox)
00059         //}}AFX_VIRTUAL
00060 
00061 // Implementation
00062 protected:
00063         //{{AFX_MSG(CSearchInputBox)
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         //}}AFX_MSG
00072         DECLARE_MESSAGE_MAP()
00073 };
00074 
00075 class CSearchAdvancedBox : public CTaskBox
00076 {
00077 // Construction
00078 public:
00079         CSearchAdvancedBox();
00080         virtual ~CSearchAdvancedBox();
00081         DECLARE_DYNAMIC(CSearchAdvancedBox)
00082 
00083 // Attributes
00084 public:
00085 
00086         CComboBox               m_wndSizeMin;
00087         CComboBox               m_wndSizeMax;
00088         CNetworkCombo   m_wndNetworks;
00089         
00090 // Operations
00091 public:
00092         void    OnSkinChange();
00093 
00094 // Overrides
00095 public:
00096         //{{AFX_VIRTUAL(CSearchAdvancedBox)
00097         //}}AFX_VIRTUAL
00098 
00099 // Implementation
00100 protected:
00101         //{{AFX_MSG(CSearchAdvancedBox)
00102         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00103         afx_msg void OnSize(UINT nType, int cx, int cy);
00104         afx_msg void OnPaint();
00105         //}}AFX_MSG
00106         DECLARE_MESSAGE_MAP()
00107 };
00108 
00109 class CSearchSchemaBox : public CTaskBox
00110 {
00111 // Construction
00112 public:
00113         CSearchSchemaBox();
00114         virtual ~CSearchSchemaBox();
00115         DECLARE_DYNAMIC(CSearchSchemaBox)
00116         
00117 // Attributes
00118 public:
00119         CSchemaCtrl             m_wndSchema;
00120 
00121 // Operations
00122 public:
00123 
00124 // Overrides
00125 public:
00126         //{{AFX_VIRTUAL(CSearchSchemaBox)
00127         public:
00128         virtual BOOL PreTranslateMessage(MSG* pMsg);
00129         //}}AFX_VIRTUAL
00130 
00131 // Implementation
00132 protected:
00133         //{{AFX_MSG(CSearchSchemaBox)
00134         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00135         afx_msg void OnSize(UINT nType, int cx, int cy);
00136         //}}AFX_MSG
00137         DECLARE_MESSAGE_MAP()
00138 };
00139 
00140 
00141 class CSearchResultsBox : public CTaskBox
00142 {
00143 // Construction
00144 public:
00145         CSearchResultsBox();
00146         virtual ~CSearchResultsBox();
00147         DECLARE_DYNAMIC(CSearchResultsBox)
00148 
00149 // Attributes
00150 public:
00151         BOOL    m_bActive;
00152         DWORD   m_nFiles;
00153         DWORD   m_nHits;
00154         DWORD   m_nHubs;
00155         DWORD   m_nLeaves;
00156 
00157 // Operations
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 // Overrides
00166 public:
00167         //{{AFX_VIRTUAL(CSearchResultsBox)
00168         //}}AFX_VIRTUAL
00169 
00170 // Implementation
00171 protected:
00172         //{{AFX_MSG(CSearchResultsBox)
00173         afx_msg void OnPaint();
00174         //}}AFX_MSG
00175         DECLARE_MESSAGE_MAP()
00176 };
00177 
00178 
00179 class CSearchPanel : public CTaskPanel
00180 {
00181 // Construction
00182 public:
00183         CSearchPanel();
00184         virtual ~CSearchPanel();
00185         DECLARE_DYNAMIC(CSearchPanel)
00186 
00187 // Attributes
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 // Operations
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 // Overrides
00210 public:
00211         //{{AFX_VIRTUAL(CSearchPanel)
00212         public:
00213         virtual BOOL Create(CWnd* pParentWnd);
00214         virtual BOOL PreTranslateMessage(MSG* pMsg);
00215         //}}AFX_VIRTUAL
00216 
00217 // Implementation
00218 protected:
00219         //{{AFX_MSG(CSearchPanel)
00220         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00221         //}}AFX_MSG
00222         DECLARE_MESSAGE_MAP()
00223 };
00224 
00225 //{{AFX_INSERT_LOCATION}}
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_)

Generated on Thu Dec 15 10:39:37 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2