X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flogic.h;h=1d25c6ea44227bdd9c093b299c547e80d4e3ebf2;hb=c8291177b545ec81930603a5915234a60296db51;hp=689b39b41ec0b6f8f9c6504e982230ba1c1cb042;hpb=c435423919a20a87d100e1ee4cd1fc6ce223040c;p=libs%2Fgltk.git diff --git a/source/logic.h b/source/logic.h index 689b39b..1d25c6e 100644 --- a/source/logic.h +++ b/source/logic.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgltk -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_GLTK_LOGIC_H_ #define MSP_GLTK_LOGIC_H_ @@ -12,8 +5,7 @@ Distributed under the LGPL #include #include #include -#include -#include +#include namespace Msp { namespace GLtk { @@ -21,25 +13,26 @@ namespace GLtk { class Widget; /** -Stores use interface logic. This is stored as actions associated to widgets. -Each action has type and data. See also class Connector. +Stores use interface logic. This is represented as widget bindings. Each +binding has type and data. + +See also class Connector. */ class Logic { public: - class Loader: public DataFile::Loader + class Loader: public DataFile::ObjectLoader { private: - Logic &logic; const std::map &widgets; public: Loader(Logic &, const std::map &); private: - void action(const std::string &, const std::string &); + void bind(const std::string &, const std::string &); }; - struct WidgetAction + struct WidgetBinding { Widget *wdg; std::string type; @@ -47,10 +40,10 @@ public: }; private: - std::list actions; + std::list bindings; public: - const std::list &get_actions() const { return actions; } + const std::list &get_bindings() const { return bindings; } }; } // namespace GLtk