2 * Copyright 2004-2012, Haiku Inc. All rights reserved.
3 * Copyright 2001, Dr. Zoidberg Enterprises. All rights reserved.
4 * Copyright 2011, Clemens Zeidler <haiku@clemens-zeidler.de>
6 * Distributed under the terms of the MIT License.
8 #ifndef CONFIG_WINDOW_H
9 #define CONFIG_WINDOW_H
13 #include <ObjectList.h>
16 #include "MailSettings.h"
26 class CenterContainer
;
37 class AccountItem
: public BStringItem
{
39 AccountItem(const char* label
,
40 BMailAccountSettings
* account
,
43 void Update(BView
* owner
, const BFont
* font
);
44 void DrawItem(BView
* owner
, BRect rect
,
46 BMailAccountSettings
* Account() { return fAccount
; }
47 item_types
Type() { return fType
; }
50 BMailAccountSettings
* fAccount
;
55 class ConfigWindow
: public BWindow
{
61 void MessageReceived(BMessage
* msg
);
63 BMailAccountSettings
* AddAccount();
64 void AccountUpdated(BMailAccountSettings
* account
);
67 BView
* _BuildHowToView();
73 status_t
_SetToGeneralSettings(BMailSettings
*general
);
74 void _RevertToLastSettings();
76 void _AddAccountToView(
77 BMailAccountSettings
* account
);
78 void _RemoveAccount(BMailAccountSettings
* account
);
79 void _RemoveAccountFromListView(
80 BMailAccountSettings
* account
);
81 void _AccountSelected(AccountItem
* item
);
82 void _ReplaceConfigView(BView
* view
);
85 BListView
* fAccountsListView
;
86 BMailAccountSettings
* fLastSelectedAccount
;
88 BButton
* fRemoveButton
;
90 BCheckBox
* fCheckMailCheckBox
;
91 BTextControl
* fIntervalControl
;
92 BMenuField
* fStatusModeField
;
95 BObjectList
<BMailAccountSettings
> fAccounts
;
96 BObjectList
<BMailAccountSettings
> fToDeleteAccounts
;
99 #endif /* CONFIG_WINDOW_H */