38 chosen_topic_(nullptr),
39 selected_item_(&toplevel,
"")
55 if (sec.
id !=
"toplevel" &&
expanded_.insert(&sec).second) {
73 section_list::const_iterator sec_it;
74 for (sec_it = sec.
sections.begin(); sec_it != sec.
sections.end(); ++sec_it) {
83 topic_list::const_iterator topic_it;
84 for (topic_it = sec.
topics.begin(); topic_it != sec.
topics.end(); ++topic_it) {
93 std::stringstream to_show;
94 for (
unsigned i = 1;
i <
level; ++
i) {
104 std::stringstream to_show;
107 return to_show.str();
112 std::stringstream to_show;
115 return to_show.str();
120 topic_list::const_iterator tit =
122 if (tit != sec.
topics.end()) {
125 if (t.
id.size()<2 || t.
id[0] !=
'.' || t.
id[1] !=
'.')
129 section_list::const_iterator sit;
147 for (std::vector<visible_item>::const_iterator it =
visible_items_.begin();
162 SDL_GetMouseState(&mousex,&mousey);
169 if (sec !=
nullptr) {
179 if (menu::double_clicked() || x < text_start) {
185 }
else if (x >= text_start){
206 std::vector<std::string> menu_items;
207 for(std::vector<visible_item>::const_iterator items_it =
visible_items_.begin(),
212 menu_items.push_back(to_show);
218 t(nullptr), sec(_sec), visible_string(vis_string) {}
221 t(_t), sec(nullptr), visible_string(vis_string) {}
225 return sec !=
nullptr && *sec == _sec;
230 return t !=
nullptr && *
t == _t;
235 return t == vis_item.
t && sec == vis_item.
sec;
char const IMG_TEXT_SEPARATOR
const std::string open_section_img
const std::string topic_img
const std::string closed_section_img
A section contains topics and sections along with title and ID.
const std::string menu_expand
std::vector< std::string > empty_string_vector
bool is_visible_id(const std::string &id)
const std::string menu_contract
GLint GLint GLint GLint GLint x
bool find(E event, F functor)
Tests whether an event handler is available.
const topic * find_topic(const section &sec, const std::string &id)
Search for the topic with the specified identifier in the section and its subsections.
void play_UI_sound(const std::string &files)
A topic contains a title, an id and some text.
GLsizei const GLcharARB ** string