haiku/headers/private/mail/FileConfigView.h
Axel Dörfler 715bf3d17a Work in progress of mail rework.
* Not everything compiles; all protocols, and inbound filters do, though.
* Renamed a few classes to give a better idea what they are for; prefixed
  public classes with the 'B' prefix.
* Moved ProtocolConfigView's classes into the BPrivate namespace.
* Moved BMailFilter into its own file.
* Added BMailFilter::DescriptiveName(). This is now used by the RuleFilter
  in order to give a description of what it's doing (ie. no more dozens of
  "Rule filter" entries in the preferences).
* Removed no longer used MailAddon.h.
* Renamed Addon to AddOn where found, since that is more consistent with the
  rest of the API.
* Merged the former MailProtocol with the former MailProtocolThread; the
  differentiation between those two was pretty messy.
* All configuration views touched so far are now using the layout kit.
* The RuleFilter is currently broken functionality wise; I have not yet decided
  how to solve the stuff it uses (TriggerFileMove() does not exist anymore,
  for example).
* BMailAddOnSettings (formerly known as AddonSettings) now directly subclass
  BMessage; there are no Settings() and EditSettings() method anymore. The
  class uses a copy of itself to determine whether or not it has been changed.
* Lots of cleanup.
2015-01-06 15:21:36 +01:00

71 lines
1.4 KiB
C++

/*
* 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 BTextControl;
class BButton;
namespace BPrivate {
class FileControl : public BView {
public:
FileControl(const char* name, const char* label,
const char* pathOfFile = NULL,
uint32 flavors = B_DIRECTORY_NODE);
virtual ~FileControl();
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage* message);
void SetText(const char* pathOfFile);
const char* Text() const;
void SetEnabled(bool enabled);
private:
BTextControl* fText;
BButton* fButton;
BFilePanel* fPanel;
uint32 _reserved[5];
};
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);
virtual status_t Archive(BMessage* into, bool deep = true) const;
private:
BMessage* fMeta;
bool fUseMeta;
const char* fName;
uint32 _reserved[5];
};
} // namespace BPrivate
#endif // _FILE_CONFIG_VIEW_H