1
#ifndef __FILTER_CONDITIONS_DIALOG_H__
2
#define __FILTER_CONDITIONS_DIALOG_H__
22
class wxCustomHeightListCtrl;
23
class CFilterConditionsDialog : public wxDialogEx
26
CFilterConditionsDialog();
28
// has_foreign_type for attributes on MSW, permissions on *nix
29
// has_foreign_type for attributes on *nix, permissions on MSW
30
bool CreateListControl(int conditions);
32
void EditFilter(const CFilter& filter);
34
void ClearFilter(bool disable);
35
bool ValidateFilter(wxString& error, bool allow_empty = false);
38
void CalcMinListWidth();
40
enum t_filterType GetTypeFromTypeSelection(int selection);
41
void SetSelectionFromType(wxChoice* pChoice, enum t_filterType);
43
void MakeControls(const CFilterCondition& condition, int i = -1);
44
void DestroyControls();
45
void UpdateConditionsClientSize();
47
void SetFilterCtrlState(bool disable);
49
bool m_has_foreign_type;
51
wxCustomHeightListCtrl* m_pListCtrl;
52
wxSize m_lastListSize;
53
int m_choiceBoxHeight;
55
std::vector<CFilterControls> m_filterControls;
57
CFilter m_currentFilter;
59
wxArrayString filterTypes;
60
std::vector<t_filterType> filter_type_map;
66
void OnRemove(int item);
67
void OnRemove(const std::set<int> &selected);
69
void OnListSize(wxSizeEvent& event);
71
DECLARE_EVENT_TABLE();
72
void OnButton(wxCommandEvent& event);
73
void OnFilterTypeChange(wxCommandEvent& event);
74
void OnConditionSelectionChange(wxCommandEvent& event);
75
void OnNavigationKeyEvent(wxNavigationKeyEvent& event);
78
#endif //__FILTER_CONDITIONS_DIALOG_H__