X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flogic.cpp;h=16444892a591b752aa7eff5e95b0f1bf67bfc07e;hb=c72566cd7f8252eb386c753ceeafa8a324d1120b;hp=40d06b218b1aa4b01f9de19ac6df9189bad0d1bb;hpb=c435423919a20a87d100e1ee4cd1fc6ce223040c;p=libs%2Fgltk.git diff --git a/source/logic.cpp b/source/logic.cpp index 40d06b2..1644489 100644 --- a/source/logic.cpp +++ b/source/logic.cpp @@ -16,22 +16,22 @@ Logic::Loader::Loader(Logic &l, const map &w): logic(l), widgets(w) { - add("action", &Loader::action); + add("bind", &Loader::bind); } -void Logic::Loader::action(const string &wdg, const string &data) +void Logic::Loader::bind(const string &wdg, const string &data) { map::const_iterator i=widgets.find(wdg); if(i==widgets.end()) throw KeyError("Unknown widget", wdg); - unsigned colon=data.find(':'); - WidgetAction act; + string::size_type colon=data.find(':'); + WidgetBinding act; act.wdg=i->second; act.type=data.substr(0, colon); if(colon!=string::npos) act.data=data.substr(colon+1); - logic.actions.push_back(act); + logic.bindings.push_back(act); } } // namespace GLtk