gui/widgets/stacked_widget.hpp

Go to the documentation of this file.
00001 /* $Id: stacked_widget.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2009 - 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_WIDGETS_STACKED_WIDGET_HPP_INCLUDED
00017 #define GUI_WIDGETS_STACKED_WIDGET_HPP_INCLUDED
00018 
00019 #include "gui/widgets/container.hpp"
00020 
00021 namespace gui2 {
00022 
00023 namespace implementation {
00024     struct tbuilder_stacked_widget;
00025 }
00026 
00027 class tgenerator_;
00028 
00029 class tstacked_widget
00030         : public tcontainer_
00031 {
00032     friend struct implementation::tbuilder_stacked_widget;
00033     friend class tdebug_layout_graph;
00034 
00035 public:
00036 
00037     tstacked_widget();
00038 
00039     /***** ***** ***** inherited ***** ****** *****/
00040 
00041     /** Inherited from tcontrol. */
00042     bool get_active() const { return true; }
00043 
00044     /** Inherited from tcontrol. */
00045     unsigned get_state() const { return 0; }
00046 
00047     /** Inherited from tscrollbar_container. */
00048     void layout_children();
00049 
00050 private:
00051 
00052     /**
00053      * Finishes the building initialization of the widget.
00054      *
00055      * @param widget_builder      The builder to build the contents of the
00056      *                            widget.
00057      */
00058     void finalize(std::vector<tbuilder_grid_const_ptr> widget_builder);
00059 
00060     /**
00061      * Contains a pointer to the generator.
00062      *
00063      * The pointer is not owned by this class, it's stored in the content_grid_
00064      * of the tscrollbar_container super class and freed when it's grid is
00065      * freed.
00066      */
00067     tgenerator_* generator_;
00068 
00069     /** Inherited from tcontrol. */
00070     const std::string& get_control_type() const;
00071 
00072     /** Inherited from tcontainer_. */
00073     void set_self_active(const bool /*active*/) {}
00074 };
00075 
00076 } // namespace gui2
00077 
00078 #endif
00079 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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