1 // vim: set expandtab tabstop=4 shiftwidth=4:
4 #include "../libbife/fallback.h"
5 #include "../libbife/widget.h"
6 #include "../libbife/hash.h"
10 using bife::Translate;
17 * Fallback constructor.
19 * @param classname Name of the class to construct.
20 * @param widgetname Name of the widget to construct.
21 * @param attrs Widget's attributes.
22 * @return A new Fallback widget.
25 Fallback* fallback_constructor(const string& classname, const string& widgetname, const Hash& attrs) {
26 string cn = classname;
27 std::transform(cn.begin(), cn.end(), cn.begin(), std::tolower);
28 if (cn == "translate") {
29 return new Translate(widgetname, attrs);
38 * @param w The widget to destroy.
41 void widget_destructor(Widget* w) {