1
0

filename.h 700 B

1234567891011121314151617181920212223242526
  1. #ifndef _FILENAME_H
  2. #define _FILENAME_H
  3. #include <bfc/string/StringW.h>
  4. #include <bfc/string/playstring.h>
  5. #include <bfc/dispatch.h>
  6. // a simple class to drag-and-drop filenames around
  7. #define DD_FILENAME L"DD_Filename v1"
  8. // another implementation that uses the central playstring table
  9. class FilenamePS : private Playstring
  10. {
  11. public:
  12. FilenamePS(const wchar_t *str) : Playstring(str) {}
  13. const wchar_t *getFilename() { return getValue(); }
  14. operator const wchar_t *() { return getFilename(); }
  15. static const wchar_t *dragitem_getDatatype() { return DD_FILENAME; }
  16. protected:
  17. FilenamePS(const FilenamePS &fn) {}
  18. FilenamePS& operator =(const FilenamePS &ps) { return *this; }
  19. };
  20. #endif