vertical_scrollbar.hpp

Go to the documentation of this file.
00001 /* $Id: vertical_scrollbar.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_VERTICAL_SCROLLBAR_HPP_INCLUDED__
00016 #define __GUI_WIDGETS_VERTICAL_SCROLLBAR_HPP_INCLUDED__
00017 
00018 #include "gui/widgets/scrollbar.hpp"
00019 
00020 namespace gui2 {
00021 
00022 //! A vertical scrollbar.
00023 class tvertical_scrollbar : public tscrollbar_
00024 {
00025 public:
00026     
00027     tvertical_scrollbar() :
00028         tscrollbar_() 
00029     {
00030     }
00031 
00032 private:
00033 
00034     //! Inherited from tscrollbar.
00035     unsigned get_length() const { return get_height(); }
00036 
00037     //! Inherited from tscrollbar.
00038     unsigned minimum_positioner_length() const;
00039 
00040     //! Inherited from tscrollbar.
00041     unsigned offset_before() const;
00042 
00043     //! Inherited from tscrollbar.
00044     unsigned offset_after() const;
00045 
00046     //! Inherited from tscrollbar.
00047     bool on_positioner(const tpoint& coordinate) const;
00048 
00049     //! Inherited from tscrollbar.
00050     int get_length_difference(const tpoint& original, const tpoint& current) const
00051         { return current.y - original.y; }
00052 
00053     //! Inherited from tcontrol.
00054     const std::string& get_control_type() const 
00055         { static const std::string type = "vertical_scrollbar"; return type; }
00056 };
00057 
00058 } // namespace gui2
00059 
00060 #endif
00061 
00062 

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