gui/widgets/vertical_scrollbar.hpp

Go to the documentation of this file.
00001 /* $Id: vertical_scrollbar.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2008 - 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_VERTICAL_SCROLLBAR_HPP_INCLUDED
00017 #define GUI_WIDGETS_VERTICAL_SCROLLBAR_HPP_INCLUDED
00018 
00019 #include "gui/widgets/scrollbar.hpp"
00020 
00021 namespace gui2 {
00022 
00023 /** A vertical scrollbar. */
00024 class tvertical_scrollbar : public tscrollbar_
00025 {
00026 public:
00027 
00028     tvertical_scrollbar() :
00029         tscrollbar_()
00030     {
00031     }
00032 
00033 private:
00034 
00035     /** Inherited from tscrollbar. */
00036     unsigned get_length() const { return get_height(); }
00037 
00038     /** Inherited from tscrollbar. */
00039     unsigned minimum_positioner_length() const;
00040 
00041     /** Inherited from tscrollbar. */
00042     unsigned maximum_positioner_length() const;
00043 
00044     /** Inherited from tscrollbar. */
00045     unsigned offset_before() const;
00046 
00047     /** Inherited from tscrollbar. */
00048     unsigned offset_after() const;
00049 
00050     /** Inherited from tscrollbar. */
00051     bool on_positioner(const tpoint& coordinate) const;
00052 
00053     /** Inherited from tscrollbar. */
00054     int on_bar(const tpoint& coordinate) const;
00055 
00056     /** Inherited from tscrollbar. */
00057     int get_length_difference(const tpoint& original, const tpoint& current) const
00058         { return current.y - original.y; }
00059 
00060     /** Inherited from tcontrol. */
00061     const std::string& get_control_type() const;
00062 };
00063 
00064 } // namespace gui2
00065 
00066 #endif
00067 
 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