24 #include "win_types.h"
31 hash_map<string, win_theme *> win_manager::theme;
33 hash_map<string, win_ttf *> win_manager::font;
35 string win_manager::font_file;
50 current = wnd_list.end ();
64 list<win_base *>::iterator i;
66 for (i = wnd_list.begin(); i != wnd_list.end(); i++)
68 (*i)->set_manager (NULL);
86 for (hash_map <string, win_theme *>::iterator it = theme.begin ();
87 it != theme.end (); it++)
92 for (hash_map <string, win_ttf *>::iterator ifo = font.begin ();
93 ifo != font.end (); ifo++)
103 wnd_list.push_back (tmp);
104 tmp->set_manager (
this);
138 wnd_list.remove (tmp);
139 tmp->set_manager (NULL);
142 if (!wnd_focus)
set_focus (wnd_list.back ());
149 if (prev != NULL) prev->
draw ();
152 for (current = wnd_list.begin (); current != wnd_list.end(); current++)
166 for (current = wnd_list.begin (); current != wnd_list.end ();)
168 if (!(*current)->update ())
183 if (!wnd_list.empty ())
186 if (wnd_focus) wnd_focus->
set_focus (
false);
197 theme[name] =
new win_theme ((
char *) name.c_str ());
203 hash_map <string, win_theme *>::iterator it = theme.find (name);
204 if (it == theme.end ())
return false;
214 hash_map <string, win_theme *>::iterator it = theme.find (name);
217 if (it == theme.end ())
222 else return it->second;
228 font[name] =
new win_ttf ((
char *) name.c_str (), font_file);
234 hash_map <string, win_ttf *>::iterator it = font.find (name);
235 if (it == font.end ())
return false;
245 hash_map <string, win_ttf *>::iterator it = font.find (name);
248 if (it == font.end ())
253 else return it->second;