BsGUITooltip.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsPrerequisites.h"
  5. #include "GUI/BsCGUIWidget.h"
  6. namespace bs
  7. {
  8. /** @addtogroup GUI-Internal
  9. * @{
  10. */
  11. /** GUI widget that renders a tooltip overlaid over other GUI elements. */
  12. class BS_EXPORT GUITooltip : public CGUIWidget
  13. {
  14. public:
  15. /** Name of the style used for tooltip's background frame. */
  16. static String getFrameStyleName();
  17. /**
  18. * Creates a new tooltip widget.
  19. *
  20. * @param[in] parent Parent scene object to attach the tooltip to.
  21. * @param[in] overlaidWidget Widget over which to overlay the tooltip.
  22. * @param[in] position Position of the tooltip, relative to the overlaid widget position.
  23. * @param[in] text Text to display in the tooltip.
  24. */
  25. GUITooltip(const HSceneObject& parent, const GUIWidget& overlaidWidget, const Vector2I& position, const WString& text);
  26. ~GUITooltip();
  27. private:
  28. static const UINT32 TOOLTIP_WIDTH;
  29. static const UINT32 CURSOR_SIZE;
  30. };
  31. /** @} */
  32. }