BsGUIDropButton.h 952 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include "BsEditorPrerequisites.h"
  3. #include "BsGUIButtonBase.h"
  4. #include "BsGUIToggleGroup.h"
  5. #include "BsImageSprite.h"
  6. #include "BsTextSprite.h"
  7. #include "BsGUIContent.h"
  8. #include "BsEvent.h"
  9. namespace BansheeEngine
  10. {
  11. class BS_ED_EXPORT GUIDropButton : public GUIButtonBase
  12. {
  13. public:
  14. static const String& getGUITypeName();
  15. static GUIDropButton* create(UINT32 dragType, const String& styleName = StringUtil::BLANK);
  16. static GUIDropButton* create(UINT32 dragType, const GUIOptions& layoutOptions,
  17. const String& styleName = StringUtil::BLANK);
  18. Event<void(void*)> onDataDropped;
  19. protected:
  20. virtual ~GUIDropButton();
  21. protected:
  22. GUIDropButton(UINT32 dragType, const String& styleName, const GUILayoutOptions& layoutOptions);
  23. virtual bool mouseEvent(const GUIMouseEvent& ev);
  24. virtual bool _acceptDragAndDrop(const Vector2I position, UINT32 typeId) const;
  25. UINT32 mDragType;
  26. };
  27. }