gui/widgets/scrollbar_panel.hpp

Go to the documentation of this file.
00001 /* $Id: scrollbar_panel.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_SCROLLBAR_PANEL_HPP_INCLUDED
00017 #define GUI_WIDGETS_SCROLLBAR_PANEL_HPP_INCLUDED
00018 
00019 #include "gui/widgets/scrollbar_container.hpp"
00020 
00021 namespace gui2 {
00022 
00023 namespace implementation {
00024     struct tbuilder_scrollbar_panel;
00025 }
00026 
00027 /**
00028  * Visible container to hold multiple widgets.
00029  *
00030  * This widget can draw items beyond the widgets it holds and in front of
00031  * them. A panel is always active so these functions return dummy values.
00032  */
00033 class tscrollbar_panel
00034     : public tscrollbar_container
00035 {
00036     friend struct implementation::tbuilder_scrollbar_panel;
00037 public:
00038 
00039     /**
00040      * Constructor.
00041      *
00042      * @param canvas_count        The canvas count for tcontrol.
00043      */
00044     explicit tscrollbar_panel(const unsigned canvas_count = 2) :
00045         tscrollbar_container(canvas_count)
00046     {
00047     }
00048 
00049     /** Inherited from tcontrol. */
00050     bool get_active() const { return true; }
00051 
00052     /** Inherited from tcontrol. */
00053     unsigned get_state() const { return 0; }
00054 
00055 private:
00056 
00057     /** Inherited from tcontrol. */
00058     const std::string& get_control_type() const;
00059 
00060     /** Inherited from tcontainer_. */
00061     void set_self_active(const bool /*active*/) {}
00062 
00063 };
00064 
00065 } // namespace gui2
00066 
00067 #endif
00068 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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