#include <wg_tooltip.h>
Inheritance diagram for wGui::CToolTip:
Definition at line 43 of file wg_tooltip.h.
wGui::CToolTip::CToolTip | ( | CWindow * | pToolWindow, | |
std::wstring | sText, | |||
CRGBColor & | FontColor = DEFAULT_LINE_COLOR , |
|||
CRGBColor & | BackgroundColor = COLOR_WHITE , |
|||
CFontEngine * | pFontEngine = 0 | |||
) |
Construct a new label
pToolWindow | A pointer to the CWindow based object the tooltip is for | |
sText | The label text | |
FontColor | The color of the tooltip text | |
BackgroundColor | The color of the tooltip's background | |
pFontEngine | A pointer to the font engine to use when drawing the tooltip If this is left out (or set to 0) it will use the default font engine specified by the CApplication (which must be set before instantiating this object) |
Definition at line 31 of file wg_tooltip.cpp.
References wGui::CMessage::CTRL_TIMER, wGui::CApplication::GetDefaultFontEngine(), wGui::CRenderedString::HALIGN_LEFT, wGui::CMessageServer::Instance(), wGui::CApplication::Instance(), wGui::CWindow::m_BackgroundColor, m_BoundingRect, m_pFontEngine, m_pRenderedString, m_pTimer, wGui::CWindow::m_sWindowText, wGui::CMessage::MOUSE_MOVE, wGui::CMessageServer::RegisterMessageClient(), and wGui::CRenderedString::VALIGN_TOP.
void wGui::CToolTip::ShowTip | ( | const CPoint & | DrawPoint | ) |
Displays the tooltip
DrawPoint | Where to poisition the top left corner of the tooltip, in view coordinates |
Definition at line 67 of file wg_tooltip.cpp.
References Draw(), m_BoundingRect, wGui::CWindow::m_pParentWindow, wGui::CWindow::SetVisible(), wGui::CWindow::SetWindowRect(), and wGui::CWindow::ViewToClient().
Referenced by HandleMessage().
void wGui::CToolTip::MoveWindow | ( | const CPoint & | MoveDistance | ) | [virtual] |
Move the window and any child windows
MoveDistance | The relative distance to move the window |
Reimplemented from wGui::CWindow.
Definition at line 100 of file wg_tooltip.cpp.
References m_BoundingRect, and wGui::CWindow::MoveWindow().
void wGui::CToolTip::PaintToSurface | ( | SDL_Surface & | ScreenSurface, | |
SDL_Surface & | FloatingSurface, | |||
const CPoint & | Offset | |||
) | const [virtual] |
Blit the window to the given surface, using m_WindowRect as the offset into the surface
ScreenSurface | A reference to the surface that the window will be copied to | |
FloatingSurface | A reference to the floating surface which is overlayed at the very end (used for tooltips, menus and such) | |
Offset | This is the current offset into the Surface that should be used as reference |
Reimplemented from wGui::CWindow.
Definition at line 107 of file wg_tooltip.cpp.
References wGui::CWindow::m_bVisible, wGui::CWindow::m_ChildWindows, wGui::CWindow::m_ClientRect, wGui::CWindow::m_pSDLSurface, wGui::CWindow::m_WindowRect, wGui::CRect::SizeRect(), and wGui::CRect::TopLeft().
bool wGui::CToolTip::HandleMessage | ( | CMessage * | pMessage | ) | [virtual] |
CTooltips handle MOUSE_MOVE and CTRL_TIMER messages
pMessage | A pointer to the message |
Reimplemented from wGui::CWindow.
Definition at line 123 of file wg_tooltip.cpp.
References wGui::CMessage::CTRL_TIMER, wGui::CView::GetFloatingWindow(), wGui::CWindow::GetView(), wGui::CWindow::GetWindowRect(), wGui::CWindow::HandleMessage(), HideTip(), wGui::CRect::HitTest(), wGui::CWindow::HitTest(), wGui::CWindow::IsVisible(), m_LastMousePosition, wGui::CWindow::m_pParentWindow, m_pTimer, wGui::CMessage::MessageType(), wGui::CMessage::MOUSE_MOVE, wGui::CMouseMessage::Point, wGui::CRect::RELPOS_INSIDE, ShowTip(), wGui::CRect::SizeRect(), wGui::CTimer::StartTimer(), wGui::CTimer::StopTimer(), and wGui::CWindow::ViewToWindow().