mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-06 23:09:58 +00:00
02e8c66da4
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.
36 lines
1.1 KiB
C++
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
|