00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef _PMFILTERPANEL_H_
00013 #define _PMFILTERPANEL_H_
00014
00015
00020 #include "wxp/package.h"
00021
00022
00027 #define SYMBOL_WXPACKAGEFILTERPANEL_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
00028 #define SYMBOL_WXPACKAGEFILTERPANEL_TITLE _("Dialog")
00029 #define SYMBOL_WXPACKAGEFILTERPANEL_IDNAME wxID_ANY
00030 #define SYMBOL_WXPACKAGEFILTERPANEL_SIZE wxSize(400, 300)
00031 #define SYMBOL_WXPACKAGEFILTERPANEL_POSITION wxDefaultPosition
00032 #define ID_FILTER_SUPPORTED_WXPORT 10000
00033 #define ID_FILTER_CATEGORY 10001
00034 #define ID_FILTER_KEYWORDS 10002
00035
00036
00037
00038
00039
00040
00041 class wxPackageFilterPanel: public wxPanel
00042 {
00043 DECLARE_DYNAMIC_CLASS( wxPackageFilterPanel )
00044 DECLARE_EVENT_TABLE()
00045
00046 public:
00048 wxPackageFilterPanel( );
00049 wxPackageFilterPanel( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEFILTERPANEL_IDNAME,
00050 const wxPoint& pos = SYMBOL_WXPACKAGEFILTERPANEL_POSITION,
00051 const wxSize& size = SYMBOL_WXPACKAGEFILTERPANEL_SIZE,
00052 long style = SYMBOL_WXPACKAGEFILTERPANEL_STYLE );
00053
00055 bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEFILTERPANEL_IDNAME,
00056 const wxPoint& pos = SYMBOL_WXPACKAGEFILTERPANEL_POSITION,
00057 const wxSize& size = SYMBOL_WXPACKAGEFILTERPANEL_SIZE,
00058 long style = SYMBOL_WXPACKAGEFILTERPANEL_STYLE );
00059
00061 void CreateControls();
00062
00063
00064 public:
00065
00066 void OnFilterUpdate(wxCommandEvent &ev);
00067
00068 public:
00069
00070 void Reset()
00071 {
00072 m_pSupportedPort->Select(0);
00073 m_pCategory->Select(0);
00074 m_pKeywords->SetValue(wxEmptyString);
00075 }
00076
00078 bool IsToPreserve(const wxPackage &pkg) const;
00079
00080 protected:
00081 wxChoice *m_pSupportedPort, *m_pCategory;
00082 wxTextCtrl* m_pKeywords;
00083 };
00084
00085
00086
00087
00088
00089
00090 BEGIN_DECLARE_EVENT_TYPES()
00091
00092 DECLARE_EVENT_TYPE(wxEVT_COMMAND_FILTER_PACKAGES, 12300568)
00093 END_DECLARE_EVENT_TYPES()
00094
00095 #define EVT_FILTER_PACKAGES(id, fn) \
00096 wx__DECLARE_EVT1(wxEVT_COMMAND_FILTER_PACKAGES, id, wxCommandEventHandler(fn))
00097
00098
00099 #endif
00100