1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#pragma once
4
5#include "BsPrerequisites.h"
6#include "GUI/BsCGUIWidget.h"
7
8namespace bs
9{
10 /** @addtogroup GUI-Internal
11 * @{
12 */
13
14 /** GUI widget that renders a tooltip overlaid over other GUI elements. */
15 class BS_EXPORT GUITooltip : public CGUIWidget
16 {
17 public:
18 /** Name of the style used for tooltip's background frame. */
19 static String getFrameStyleName();
20
21 /**
22 * Creates a new tooltip widget.
23 *
24 * @param[in] parent Parent scene object to attach the tooltip to.
25 * @param[in] overlaidWidget Widget over which to overlay the tooltip.
26 * @param[in] position Position of the tooltip, relative to the overlaid widget position.
27 * @param[in] text Text to display in the tooltip.
28 */
29 GUITooltip(const HSceneObject& parent, const GUIWidget& overlaidWidget, const Vector2I& position, const String& text);
30 ~GUITooltip() = default;
31
32 private:
33 static const UINT32 TOOLTIP_WIDTH;
34 static const UINT32 CURSOR_SIZE;
35 };
36
37 /** @} */
38}