28 #include "win_types.h"
35 hash_map<string, win_theme *> win_manager::theme;
37 hash_map<string, win_ttf *> win_manager::font;
39 string win_manager::font_file;
54 current = wnd_list.end ();
68 list<win_base *>::iterator i;
70 for (i = wnd_list.begin(); i != wnd_list.end(); i++)
72 (*i)->set_manager (NULL);
76 if (input::is_text_input())
78 input::stop_text_input();
95 for (hash_map <string, win_theme *>::iterator it = theme.begin ();
96 it != theme.end (); it++)
101 for (hash_map <string, win_ttf *>::iterator ifo = font.begin ();
102 ifo != font.end (); ifo++)
112 wnd_list.push_back (tmp);
113 tmp->set_manager (
this);
147 wnd_list.remove (tmp);
148 tmp->set_manager (NULL);
151 if (!wnd_focus)
set_focus (wnd_list.back ());
158 if (prev != NULL) prev->
draw ();
161 for (current = wnd_list.begin (); current != wnd_list.end(); current++)
175 for (current = wnd_list.begin (); current != wnd_list.end ();)
177 if (!(*current)->update ())
192 if (!wnd_list.empty ())
195 if (wnd_focus) wnd_focus->
set_focus (
false);
206 theme[name] =
new win_theme ((
char *) name.c_str ());
212 hash_map <string, win_theme *>::iterator it = theme.find (name);
213 if (it == theme.end ())
return false;
223 hash_map <string, win_theme *>::iterator it = theme.find (name);
226 if (it == theme.end ())
231 else return it->second;
237 font[name] =
new win_ttf ((
char *) name.c_str (), font_file);
243 hash_map <string, win_ttf *>::iterator it = font.find (name);
244 if (it == font.end ())
return false;
254 hash_map <string, win_ttf *>::iterator it = font.find (name);
257 if (it == font.end ())
262 else return it->second;