1d26fee1aSClemens Zeidler /* 2*ecd3b5d5SAxel Dörfler * Copyright 2007-2016, Haiku, Inc. All rights reserved. 3d26fee1aSClemens Zeidler * Copyright 2001-2002 Dr. Zoidberg Enterprises. All rights reserved. 4d26fee1aSClemens Zeidler * Copyright 2011, Clemens Zeidler <haiku@clemens-zeidler.de> 5d26fee1aSClemens Zeidler * Distributed under the terms of the MIT License. 6d26fee1aSClemens Zeidler */ 7d26fee1aSClemens Zeidler #ifndef FILTER_CONFIG_VIEW_H 8d26fee1aSClemens Zeidler #define FILTER_CONFIG_VIEW_H 9d26fee1aSClemens Zeidler 10d26fee1aSClemens Zeidler 11d26fee1aSClemens Zeidler #include <vector> 12d26fee1aSClemens Zeidler 13d26fee1aSClemens Zeidler #include <Button.h> 14*ecd3b5d5SAxel Dörfler #include <GroupView.h> 15d26fee1aSClemens Zeidler #include <ListView.h> 169d8cf1b6SAxel Dörfler #include <MailSettings.h> 17d26fee1aSClemens Zeidler #include <Message.h> 18d26fee1aSClemens Zeidler #include <MenuField.h> 19d26fee1aSClemens Zeidler 209d8cf1b6SAxel Dörfler #include "FilterList.h" 21d26fee1aSClemens Zeidler 22d26fee1aSClemens Zeidler 23ca3341c7SAxel Dörfler class FilterSettingsView; 24d26fee1aSClemens Zeidler 25d26fee1aSClemens Zeidler 26*ecd3b5d5SAxel Dörfler class FiltersConfigView : public BGroupView { 27d26fee1aSClemens Zeidler public: 285faab458SAxel Dörfler FiltersConfigView( 29d26fee1aSClemens Zeidler BMailAccountSettings& account); 30d26fee1aSClemens Zeidler ~FiltersConfigView(); 31d26fee1aSClemens Zeidler 32d26fee1aSClemens Zeidler void AttachedToWindow(); 33d26fee1aSClemens Zeidler void DetachedFromWindow(); 34d26fee1aSClemens Zeidler void MessageReceived(BMessage *msg); 35d26fee1aSClemens Zeidler 36d26fee1aSClemens Zeidler private: 379d8cf1b6SAxel Dörfler BMailProtocolSettings* _MailSettings(); 389d8cf1b6SAxel Dörfler ::FilterList* _FilterList(); 39d26fee1aSClemens Zeidler 40d26fee1aSClemens Zeidler void _SelectFilter(int32 index); 41d26fee1aSClemens Zeidler void _SetDirection(direction direction); 42d26fee1aSClemens Zeidler void _SaveConfig(int32 index); 43d26fee1aSClemens Zeidler 449d8cf1b6SAxel Dörfler private: 45d26fee1aSClemens Zeidler BMailAccountSettings& fAccount; 46d26fee1aSClemens Zeidler direction fDirection; 47d26fee1aSClemens Zeidler 489d8cf1b6SAxel Dörfler ::FilterList fInboundFilters; 499d8cf1b6SAxel Dörfler ::FilterList fOutboundFilters; 50d26fee1aSClemens Zeidler 51d26fee1aSClemens Zeidler BMenuField* fChainsField; 52d26fee1aSClemens Zeidler BListView* fListView; 53d26fee1aSClemens Zeidler BMenuField* fAddField; 54d26fee1aSClemens Zeidler BButton* fRemoveButton; 55ca3341c7SAxel Dörfler FilterSettingsView* fFilterView; 56d26fee1aSClemens Zeidler 57d26fee1aSClemens Zeidler int32 fCurrentIndex; 58d26fee1aSClemens Zeidler }; 59d26fee1aSClemens Zeidler 60ca3341c7SAxel Dörfler 61d26fee1aSClemens Zeidler #endif // FILTER_CONFIG_VIEW_H 62