SavvyUI C++ UI Library
Loading...
Searching...
No Matches
ToolTip.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Component.h
"
4
14
class
ToolTip
:
public
Component
15
{
19
wstring _text;
20
ButtonType
_color;
21
22
protected
:
23
33
BOOL
getCreateWindowOptions
(wstring& title, UINT& widownStyles, wstring& wndClassName, BOOL& isCustomWndProc);
34
38
void
windowCreated
();
39
40
public
:
41
45
ToolTip
();
46
50
virtual
~ToolTip
();
51
55
void
setInfo
(
const
wstring& text,
const
ButtonType
& color =
ButtonType::INFO
);
56
60
void
show
(
Component
*parent,
int
width = 200,
int
height = 70);
61
65
void
hide
();
66
70
wstring
getText
();
71
72
public
:
// Overridables
73
79
void
onPaint
(
Graphics
*g);
80
84
void
onWindowResized
();
85
96
void
onMousePressed
(
WinHandle
hWnd,
int
x,
int
y,
int
clickCount, BOOL shiftPressed, BOOL ctrlPressed);
97
98
void
onTimer
(
unsigned
int
timerId);
99
};
WinHandle
HWND WinHandle
Definition
Common.h:16
ButtonType
ButtonType
Definition
Common.h:151
INFO
@ INFO
Definition
Common.h:154
Component.h
Component::Component
Component()
Constructs a new Component instance.
Graphics
Definition
Graphics.h:161
ToolTip::~ToolTip
virtual ~ToolTip()
Destroys the ToolTip component.
ToolTip::hide
void hide()
Hides the tooltip.
ToolTip::onMousePressed
void onMousePressed(WinHandle hWnd, int x, int y, int clickCount, BOOL shiftPressed, BOOL ctrlPressed)
Handles mouse press events.
ToolTip::getText
wstring getText()
Gets the text of the tooltip.
ToolTip::show
void show(Component *parent, int width=200, int height=70)
Shows the tooltip at position.
ToolTip::getCreateWindowOptions
BOOL getCreateWindowOptions(wstring &title, UINT &widownStyles, wstring &wndClassName, BOOL &isCustomWndProc)
Retrieves options needed to create the tooltip window.
ToolTip::setInfo
void setInfo(const wstring &text, const ButtonType &color=ButtonType::INFO)
Sets the text and colors of the tooltip.
ToolTip::windowCreated
void windowCreated()
Called after the window has been successfully created.
ToolTip::onWindowResized
void onWindowResized()
Called when the window has been resized.
ToolTip::ToolTip
ToolTip()
Constructs a ToolTip component.
ToolTip::onPaint
void onPaint(Graphics *g)
Paints the tooltip to the provided device context.
ToolTip::onTimer
void onTimer(unsigned int timerId)
Called on timer events.
ToolTip.h
Generated by
1.14.0