X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fuserinterface.h;h=9ce08c38e08f6e64dd568b282b38c40b81837dc3;hb=033732b500a35f3737bad515349d884cb3f123f0;hp=c821320b672e3a5445e935522eec1453faa460f1;hpb=86d9edd57268b4ebdc92844d65db4469d516b1d1;p=libs%2Fgltk.git diff --git a/source/userinterface.h b/source/userinterface.h index c821320..9ce08c3 100644 --- a/source/userinterface.h +++ b/source/userinterface.h @@ -33,8 +33,10 @@ public: void root(); }; + typedef std::map WidgetMap; + private: - std::map widgets; + WidgetMap widgets; Root root; Logic logic; @@ -46,11 +48,11 @@ public: template W &get_widget(const std::string &n) const { - std::map::const_iterator i=widgets.find(n); + WidgetMap::const_iterator i = widgets.find(n); if(i==widgets.end()) throw KeyError("Unknown widget", n); - W *w=dynamic_cast(i->second); + W *w = dynamic_cast(i->second); if(!w) throw Exception("Widget type mismatch"); @@ -60,7 +62,7 @@ public: template void get_widget(const std::string &n, W *&w) const { - w=&get_widget(n); + w = &get_widget(n); } };