tooltip.hpp

Go to the documentation of this file.
00001 /* $Id: tooltip.hpp 26662 2008-05-17 07:18:31Z mordante $ */
00002 /*
00003    copyright (C) 2008 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 version 2
00008    or at your option any later version.
00009    this program is distributed in the hope that it will be useful,
00010    but without any warranty.
00011 
00012    see the copying file for more details.
00013 */
00014 
00015 #ifndef __GUI_WIDGETS_TOOLTIP_HPP_INCLUDED__
00016 #define __GUI_WIDGETS_TOOLTIP_HPP_INCLUDED__
00017 
00018 #include "gui/widgets/control.hpp"
00019 
00020 namespace gui2 {
00021 
00022 class ttooltip : public tcontrol
00023 {
00024 public:
00025 
00026     ttooltip() :
00027         tcontrol(1)
00028     {
00029         set_multiline_label();
00030     }
00031 
00032     //! Inherited from tcontrol.
00033     // We are always active, might not be visible but always active.
00034     void set_active(const bool) {}
00035     bool get_active() const { return true; }
00036     unsigned get_state() const { return 0; }
00037 
00038 private:    
00039     //! Inherited from tcontrol.
00040     const std::string& get_control_type() const 
00041         { static const std::string type = "tooltip"; return type; }
00042 };
00043 
00044 } // namespace gui2
00045 
00046 #endif

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs