aseprite/src/app/load_widget.h
David Capello 02e8c66da4 Remove signals and hooks in GUI code.
Several refactoring tasks where made:
- Removed the old Widget::id field (JID).
- Renamed Widget::get/setName to get/setId.
- Moved load_widget_from_xmlfile() to app::load_widget and WidgetLoader
  class.
- Removed jhook structure & jwidget_add_hook function. Hooks were replaced
  subclassing widgets.
- Added InitThemeEvent class and Widget::onInitTheme member function.
2012-06-15 23:37:59 -03:00

36 lines
1.1 KiB
C++

/* ASEPRITE
* Copyright (C) 2001-2012 David Capello
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef APP_GUI_LOAD_WIDGET_H_INCLUDED
#define APP_GUI_LOAD_WIDGET_H_INCLUDED
#include "app/widget_loader.h"
#include "base/unique_ptr.h"
namespace app {
template<class T>
inline T* load_widget(const char* fileName, const char* widgetId) {
WidgetLoader loader;
return loader.loadWidgetT<T>(fileName, widgetId);
}
} // namespace app
#endif