haiku/src/servers/registrar/Clipboard.h
Ingo Weinhold 58b5124e46 Replace ClipboardTree by Clipboard, a class just representing a clipboard.
The clipboards are managed in a simple string->Clipboard map.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-13 00:45:55 +00:00

35 lines
623 B
C++

// Clipboard.h
#ifndef CLIPBOARD_H
#define CLIPBOARD_H
#include <String.h>
#include <Message.h>
#include <Messenger.h>
#include "WatchingService.h"
class Clipboard {
public:
Clipboard(const char *name);
~Clipboard();
void SetData(const BMessage *data, BMessenger dataSource);
const BMessage *Data() const;
BMessenger DataSource() const;
int32 Count() const;
bool AddWatcher(BMessenger watcher);
bool RemoveWatcher(BMessenger watcher);
void NotifyWatchers();
private:
BString fName;
BMessage fData;
BMessenger fDataSource;
int32 fCount;
WatchingService fWatchingService;
};
#endif // CLIPBOARD_H