1 #ifndef MSP_GLTK_USERINTERFACE_H_
2 #define MSP_GLTK_USERINTERFACE_H_
4 #include <msp/core/maputils.h>
12 Encapsulates a Root widget and Logic associated with it. Allows looking up
18 class Loader: public DataFile::Loader
24 Loader(UserInterface &);
30 typedef std::map<std::string, Widget *> WidgetMap;
38 UserInterface(Resources &, Graphics::Window &);
39 Root &get_root() { return root; }
40 const Logic &get_logic() const { return logic; }
43 W &get_widget(const std::string &n) const
45 return dynamic_cast<W &>(*get_item(widgets, n));
49 void get_widget(const std::string &n, W *&w) const
51 w = &get_widget<W>(n);