The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
tip.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2016 by Mark de Wever <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef GUI_DIALOGS_TIP_HPP_INCLUDED
16 #define GUI_DIALOGS_TIP_HPP_INCLUDED
17 
18 #include <string>
19 
20 class CVideo;
21 class t_string;
22 
23 namespace gui2
24 {
25 
26 struct tpoint;
27 
28 namespace tip
29 {
30 
31 /**
32  * Shows a tip.
33  *
34  * The tip is a tooltip or a helptip. One type of tip is shown at the same
35  * time, opening a second tip closes the first.
36  *
37  * @param video The video which contains the surface to draw
38  * upon.
39  * @param window_id The id of the window used to show the tip.
40  * @param message The message to show in the tip.
41  * @param mouse The position of the mouse.
42  */
43 void show(CVideo& video,
44  const std::string& window_id,
45  const t_string& message,
46  const tpoint& mouse);
47 
48 /**
49  * Removes a tip.
50  *
51  * It is safe to call this function when no tip is shown.
52  * */
53 void remove();
54 
55 } // namespace tip
56 
57 } // namespace gui2
58 
59 #endif
Definition: video.hpp:58
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
void show(CVideo &video, const std::string &window_id, const t_string &message, const tpoint &mouse)
Shows a tip.
Definition: tip.cpp:133
static ttip & tip()
Definition: tip.cpp:123
GLsizei GLenum GLuint GLuint GLsizei char * message
Definition: glew.h:2499
GLsizei const GLcharARB ** string
Definition: glew.h:4503