00001 /* $Id: tree_view.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2010 - 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_TREE_VIEW_HPP_INCLUDED 00017 #define GUI_AUXILIARY_WINDOW_BUILDER_TREE_VIEW_HPP_INCLUDED 00018 00019 #include "gui/auxiliary/window_builder/control.hpp" 00020 00021 #include "gui/widgets/scrollbar_container.hpp" 00022 00023 namespace gui2 { 00024 00025 namespace implementation { 00026 00027 struct tbuilder_tree_view 00028 : public tbuilder_control 00029 { 00030 explicit tbuilder_tree_view(const config& cfg); 00031 00032 twidget* build () const; 00033 00034 tscrollbar_container::tscrollbar_mode vertical_scrollbar_mode; 00035 tscrollbar_container::tscrollbar_mode horizontal_scrollbar_mode; 00036 00037 unsigned indention_step_size; 00038 00039 struct tnode 00040 { 00041 explicit tnode(const config& cfg); 00042 00043 std::string id; 00044 tbuilder_grid_ptr builder; 00045 }; 00046 00047 /** 00048 * The types of nodes in the tree view. 00049 * 00050 * Since we expect the amount of nodes to remain low it's stored in a 00051 * vector and not in a map. 00052 */ 00053 std::vector<tnode> nodes; 00054 00055 /* 00056 * NOTE this class doesn't have a data section, so it can only be filled 00057 * with data by the engine. I think this poses no limit on the usage since 00058 * I don't foresee that somebody wants to pre-fill a tree view. If the need 00059 * arises the data part can be added. 00060 */ 00061 }; 00062 00063 } // namespace implementation 00064 00065 } // namespace gui2 00066 00067 #endif 00068
| Generated by doxygen 1.7.1 on Wed May 23 2012 01:02:42 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |