Files
haiku-beta6/headers/private/mail/FileConfigView.h
T

72 lines
1.4 KiB
C++
Raw Normal View History

2012-10-27 01:25:39 +02: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
#include <View.h>
#include <FilePanel.h>
class BButton;
class BMailAddOnSettings;
class BTextControl;
2012-10-27 01:25:39 +02:00
namespace BPrivate {
2012-10-27 01:25:39 +02:00
class FileControl : public BView {
public:
FileControl(const char* name, const char* label,
const char* pathOfFile = NULL,
uint32 flavors = B_DIRECTORY_NODE);
virtual ~FileControl();
2012-10-27 01:25:39 +02:00
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage* message);
2012-10-27 01:25:39 +02:00
void SetText(const char* pathOfFile);
const char* Text() const;
2012-10-27 01:25:39 +02:00
void SetEnabled(bool enabled);
private:
BTextControl* fText;
BButton* fButton;
BFilePanel* fPanel;
uint32 _reserved[5];
};
2012-10-27 01:25:39 +02: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);
status_t SaveInto(BMailAddOnSettings& settings) const;
2012-10-27 01:25:39 +02:00
private:
BMessage* fMeta;
bool fUseMeta;
const char* fName;
2012-10-27 01:25:39 +02:00
uint32 _reserved[5];
};
2012-10-27 01:25:39 +02:00
} // namespace BPrivate
#endif // _FILE_CONFIG_VIEW_H