1 // Aseprite 2 // Copyright (C) 2001-2015 David Capello 3 // 4 // This program is distributed under the terms of 5 // the End-User License Agreement for Aseprite. 6 7 #ifndef APP_LOAD_WIDGET_H_INCLUDED 8 #define APP_LOAD_WIDGET_H_INCLUDED 9 #pragma once 10 11 #include "app/widget_loader.h" 12 #include "base/unique_ptr.h" 13 14 namespace app { 15 16 template<class T> 17 inline T* load_widget(const char* fileName, const char* widgetId, T* widget = NULL) { 18 WidgetLoader loader; 19 return loader.loadWidgetT<T>(fileName, widgetId, widget); 20 } 21 22 } // namespace app 23 24 #endif 25