From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/Wasabi/bfc/file/filename.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Src/Wasabi/bfc/file/filename.h (limited to 'Src/Wasabi/bfc/file/filename.h') diff --git a/Src/Wasabi/bfc/file/filename.h b/Src/Wasabi/bfc/file/filename.h new file mode 100644 index 00000000..8442f1b8 --- /dev/null +++ b/Src/Wasabi/bfc/file/filename.h @@ -0,0 +1,26 @@ +#ifndef _FILENAME_H +#define _FILENAME_H + +#include +#include +#include + +// a simple class to drag-and-drop filenames around + +#define DD_FILENAME L"DD_Filename v1" + +// another implementation that uses the central playstring table +class FilenamePS : private Playstring +{ +public: + FilenamePS(const wchar_t *str) : Playstring(str) {} + const wchar_t *getFilename() { return getValue(); } + operator const wchar_t *() { return getFilename(); } + static const wchar_t *dragitem_getDatatype() { return DD_FILENAME; } + +protected: + FilenamePS(const FilenamePS &fn) {} + FilenamePS& operator =(const FilenamePS &ps) { return *this; } +}; + +#endif -- cgit