gui/dialogs/tip.hpp

Go to the documentation of this file.
00001 /* $Id: tip.hpp 53835 2012-04-07 15:58:17Z loonycyborg $ */
00002 /*
00003    Copyright (C) 2011 - 2012 by Mark de Wever <koraq@xs4all.nl>
00004    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY.
00012 
00013    See the COPYING file for more details.
00014 */
00015 
00016 #ifndef GUI_DIALOGS_TIP_HPP_INCLUDED
00017 #define GUI_DIALOGS_TIP_HPP_INCLUDED
00018 
00019 #include <string>
00020 
00021 class CVideo;
00022 class t_string;
00023 
00024 namespace gui2 {
00025 
00026 struct tpoint;
00027 
00028 namespace tip {
00029 
00030     /**
00031      * Shows a tip.
00032      *
00033      * The tip is a tooltip or a helptip. One type of tip is shown at the same
00034      * time, opening a second tip closes the first.
00035      *
00036      * @param video               The video which contains the surface to draw
00037      *                            upon.
00038      * @param window_id           The id of the window used to show the tip.
00039      * @param message             The message to show in the tip.
00040      * @param mouse               The position of the mouse.
00041      */
00042     void show(CVideo& video
00043             , const std::string& window_id
00044             , const t_string& message
00045             , const tpoint& mouse);
00046 
00047     /**
00048      * Removes a tip.
00049      *
00050      * It is safe to call this function when no tip is shown.
00051      * */
00052     void remove();
00053 
00054 } // namespace tip
00055 
00056 } // namespace gui2
00057 
00058 #endif
00059 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:02:58 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs