2012-10-27 03:25:39 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2004-2012, Haiku, Inc. All rights reserved.
|
|
|
|
* Copyright 2001 Dr. Zoidberg Enterprises. All rights reserved.
|
|
|
|
*
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _FILE_CONFIG_VIEW_H
|
|
|
|
#define _FILE_CONFIG_VIEW_H
|
2004-09-21 02:31:50 +04:00
|
|
|
|
|
|
|
|
|
|
|
#include <View.h>
|
|
|
|
#include <FilePanel.h>
|
|
|
|
|
2011-02-20 06:54:28 +03:00
|
|
|
|
2004-09-21 02:31:50 +04:00
|
|
|
class BButton;
|
2012-11-23 02:51:48 +04:00
|
|
|
class BMailAddOnSettings;
|
|
|
|
class BTextControl;
|
2004-09-21 02:31:50 +04:00
|
|
|
|
|
|
|
|
2012-10-27 03:25:39 +04:00
|
|
|
namespace BPrivate {
|
2004-09-21 02:31:50 +04:00
|
|
|
|
|
|
|
|
2012-10-27 03:25:39 +04:00
|
|
|
class FileControl : public BView {
|
|
|
|
public:
|
|
|
|
FileControl(const char* name, const char* label,
|
|
|
|
const char* pathOfFile = NULL,
|
|
|
|
uint32 flavors = B_DIRECTORY_NODE);
|
|
|
|
virtual ~FileControl();
|
2004-09-21 02:31:50 +04:00
|
|
|
|
2012-10-27 03:25:39 +04:00
|
|
|
virtual void AttachedToWindow();
|
|
|
|
virtual void MessageReceived(BMessage* message);
|
2004-09-21 02:31:50 +04:00
|
|
|
|
2012-10-27 03:25:39 +04:00
|
|
|
void SetText(const char* pathOfFile);
|
|
|
|
const char* Text() const;
|
2004-09-21 02:31:50 +04:00
|
|
|
|
2012-10-27 03:25:39 +04:00
|
|
|
void SetEnabled(bool enabled);
|
|
|
|
|
|
|
|
private:
|
|
|
|
BTextControl* fText;
|
|
|
|
BButton* fButton;
|
|
|
|
|
|
|
|
BFilePanel* fPanel;
|
|
|
|
|
|
|
|
uint32 _reserved[5];
|
2004-09-21 02:31:50 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-10-27 03:25:39 +04:00
|
|
|
class MailFileConfigView : public FileControl {
|
|
|
|
public:
|
|
|
|
MailFileConfigView(const char* label,
|
|
|
|
const char* name, bool useMeta = false,
|
|
|
|
const char* defaultPath = NULL,
|
|
|
|
uint32 flavors = B_DIRECTORY_NODE);
|
|
|
|
|
|
|
|
void SetTo(const BMessage* archive,
|
|
|
|
BMessage* metadata);
|
2012-11-23 02:51:48 +04:00
|
|
|
status_t SaveInto(BMailAddOnSettings& settings) const;
|
2004-09-21 02:31:50 +04:00
|
|
|
|
2012-10-27 03:25:39 +04:00
|
|
|
private:
|
|
|
|
BMessage* fMeta;
|
|
|
|
bool fUseMeta;
|
|
|
|
const char* fName;
|
2004-09-21 02:31:50 +04:00
|
|
|
|
2012-10-27 03:25:39 +04:00
|
|
|
uint32 _reserved[5];
|
2004-09-21 02:31:50 +04:00
|
|
|
};
|
|
|
|
|
2012-10-27 03:25:39 +04:00
|
|
|
|
|
|
|
} // namespace BPrivate
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _FILE_CONFIG_VIEW_H
|