1715bf3d1SAxel Dörfler /* 2715bf3d1SAxel Dörfler * Copyright 2004-2012, Haiku, Inc. All rights reserved. 3715bf3d1SAxel Dörfler * Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved. 4715bf3d1SAxel Dörfler * 5715bf3d1SAxel Dörfler * Distributed under the terms of the MIT License. 6f7215ac8SNathan Whitehorn */ 7715bf3d1SAxel Dörfler #ifndef _FILE_CONFIG_VIEW_H 8715bf3d1SAxel Dörfler #define _FILE_CONFIG_VIEW_H 9f7215ac8SNathan Whitehorn 10f7215ac8SNathan Whitehorn 11f7215ac8SNathan Whitehorn #include <View.h> 12f7215ac8SNathan Whitehorn #include <FilePanel.h> 13f7215ac8SNathan Whitehorn 147ab6cb9aSClemens Zeidler 15f7215ac8SNathan Whitehorn class BButton; 16*57b30555SAxel Dörfler class BMailAddOnSettings; 17*57b30555SAxel Dörfler class BTextControl; 18f7215ac8SNathan Whitehorn 19715bf3d1SAxel Dörfler 20715bf3d1SAxel Dörfler namespace BPrivate { 21715bf3d1SAxel Dörfler 22715bf3d1SAxel Dörfler 23715bf3d1SAxel Dörfler class FileControl : public BView { 24f7215ac8SNathan Whitehorn public: 25715bf3d1SAxel Dörfler FileControl(const char* name, const char* label, 26715bf3d1SAxel Dörfler const char* pathOfFile = NULL, 27715bf3d1SAxel Dörfler uint32 flavors = B_DIRECTORY_NODE); 28715bf3d1SAxel Dörfler virtual ~FileControl(); 29f7215ac8SNathan Whitehorn 30f7215ac8SNathan Whitehorn virtual void AttachedToWindow(); 31715bf3d1SAxel Dörfler virtual void MessageReceived(BMessage* message); 32f7215ac8SNathan Whitehorn 33f7215ac8SNathan Whitehorn void SetText(const char* pathOfFile); 34f7215ac8SNathan Whitehorn const char* Text() const; 35f7215ac8SNathan Whitehorn 36f7215ac8SNathan Whitehorn void SetEnabled(bool enabled); 37f7215ac8SNathan Whitehorn 38f7215ac8SNathan Whitehorn private: 39f7215ac8SNathan Whitehorn BTextControl* fText; 40f7215ac8SNathan Whitehorn BButton* fButton; 41f7215ac8SNathan Whitehorn 42f7215ac8SNathan Whitehorn BFilePanel* fPanel; 43f7215ac8SNathan Whitehorn 44f7215ac8SNathan Whitehorn uint32 _reserved[5]; 45f7215ac8SNathan Whitehorn }; 46f7215ac8SNathan Whitehorn 47f7215ac8SNathan Whitehorn 48715bf3d1SAxel Dörfler class MailFileConfigView : public FileControl { 49715bf3d1SAxel Dörfler public: 50715bf3d1SAxel Dörfler MailFileConfigView(const char* label, 51715bf3d1SAxel Dörfler const char* name, bool useMeta = false, 52715bf3d1SAxel Dörfler const char* defaultPath = NULL, 53715bf3d1SAxel Dörfler uint32 flavors = B_DIRECTORY_NODE); 54715bf3d1SAxel Dörfler 55715bf3d1SAxel Dörfler void SetTo(const BMessage* archive, 56715bf3d1SAxel Dörfler BMessage* metadata); 57*57b30555SAxel Dörfler status_t SaveInto(BMailAddOnSettings& settings) const; 58f7215ac8SNathan Whitehorn 59f7215ac8SNathan Whitehorn private: 60f7215ac8SNathan Whitehorn BMessage* fMeta; 61f7215ac8SNathan Whitehorn bool fUseMeta; 62f7215ac8SNathan Whitehorn const char* fName; 63f7215ac8SNathan Whitehorn 64f7215ac8SNathan Whitehorn uint32 _reserved[5]; 65f7215ac8SNathan Whitehorn }; 66f7215ac8SNathan Whitehorn 67715bf3d1SAxel Dörfler 68715bf3d1SAxel Dörfler } // namespace BPrivate 69715bf3d1SAxel Dörfler 70715bf3d1SAxel Dörfler 71715bf3d1SAxel Dörfler #endif // _FILE_CONFIG_VIEW_H 72