gui/auxiliary/window_builder/helper.hpp

Go to the documentation of this file.
00001 /* $Id: helper.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_AUXILIARY_WINDOW_BUILDER_HELPER_HPP_INCLUDED
00017 #define GUI_AUXILIARY_WINDOW_BUILDER_HELPER_HPP_INCLUDED
00018 
00019 #include "gui/widgets/scrollbar_container.hpp"
00020 
00021 #include <string>
00022 #include <vector>
00023 
00024 class config;
00025 
00026 namespace gui2 {
00027 
00028 namespace implementation {
00029 
00030 /**
00031  * Returns the vertical alignment.
00032  *
00033  * @param v_align                 The string representing the alignment.
00034  *
00035  * @returns                       The alignment.
00036  */
00037 unsigned get_v_align(const std::string& v_align);
00038 
00039 /**
00040  * Returns the horizontal alignment.
00041  *
00042  * @param h_align                 The string representing the alignment.
00043  *
00044  * @returns                       The alignment.
00045  */
00046 unsigned get_h_align(const std::string& h_align);
00047 
00048 /**
00049  * Returns the border flags.
00050  *
00051  * @param border                  The string representing the border flags.
00052  *
00053  * @returns                       The border flags.
00054  */
00055 unsigned get_border(const std::vector<std::string>& border);
00056 
00057 /**
00058  * Returns the placement/resize flags.
00059  *
00060  * @param cfg                     The config to look for flags for.
00061  *
00062  * @returns                       The placement/resize flags.
00063  */
00064 unsigned read_flags(const config& cfg);
00065 
00066 /**
00067  * Returns the scrollbar mode flags.
00068  *
00069  * @param scrollbar_mode          The string representing the scrollbar_mode.
00070  *
00071  * @returns                       The scrollbar mode flags.
00072  */
00073 tscrollbar_container::tscrollbar_mode
00074         get_scrollbar_mode(const std::string& scrollbar_mode);
00075 
00076 /**
00077  * Returns the return value for a widget.
00078  *
00079  * If there's a valid retval_id that will be returned.
00080  * Else if there's a retval that's returned.
00081  * Else it falls back to the id.
00082  */
00083 int get_retval(const std::string& retval_id
00084         , const int retval
00085         , const std::string& id);
00086 
00087 } // namespace implementation
00088 
00089 } // namespace gui2
00090 
00091 #endif
00092 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Wed May 23 2012 01:02:43 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs