FolderView.h 870 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // This may look like C code, but it's really -*- C++ -*-
  2. /*
  3. * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
  4. *
  5. * See the LICENSE file for terms of use.
  6. */
  7. #ifndef FOLDER_VIEW_H_
  8. #define FOLDER_VIEW_H_
  9. #include <Wt/WTreeView>
  10. /**
  11. * \addtogroup treeviewdragdrop
  12. */
  13. /*@{*/
  14. /*! \brief A specialized treeview that supports a custom drop event.
  15. */
  16. class FolderView : public Wt::WTreeView
  17. {
  18. public:
  19. /*! \brief Constant that indicates the mime type for a selection of files.
  20. *
  21. * Every kind of dragged data should be identified using a unique mime type.
  22. */
  23. static const char *FileSelectionMimeType;
  24. /*! \brief Constructor.
  25. */
  26. FolderView(Wt::WContainerWidget *parent = 0);
  27. protected:
  28. /*! \brief Drop event.
  29. */
  30. virtual void dropEvent(const Wt::WDropEvent &event,
  31. const Wt::WModelIndex &target);
  32. };
  33. /*@}*/
  34. #endif // FOLDER_VIEW_H_