libyui-ncurses
2.44.1
|
00001 /* 00002 Copyright (C) 2000-2012 Novell, Inc 00003 This library is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU Lesser General Public License as 00005 published by the Free Software Foundation; either version 2.1 of the 00006 License, or (at your option) version 3.0 of the License. This library 00007 is distributed in the hope that it will be useful, but WITHOUT ANY 00008 WARRANTY; without even the implied warranty of MERCHANTABILITY or 00009 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00010 License for more details. You should have received a copy of the GNU 00011 Lesser General Public License along with this library; if not, write 00012 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth 00013 Floor, Boston, MA 02110-1301 USA 00014 */ 00015 00016 00017 /*-/ 00018 00019 File: NCPackageSelectorPluginStub.cc 00020 00021 Author: Hedgehog Painter <kmachalkova@suse.cz> 00022 00023 00024 /-*/ 00025 00026 #include "NCPackageSelectorPluginStub.h" 00027 00028 #define YUILogComponent "ncurses-ui" 00029 #include <yui/YUILog.h> 00030 #include "NCWidget.h" 00031 #include "NCLabel.h" 00032 #include "NCDialog.h" 00033 #include "NCPackageSelectorPluginIf.h" 00034 #include "YNCursesUI.h" // NCtoY2Event 00035 00036 #define PLUGIN_BASE_NAME "ncurses-pkg" 00037 00038 00039 NCPackageSelectorPluginStub::NCPackageSelectorPluginStub() 00040 : YPackageSelectorPlugin( PLUGIN_BASE_NAME ) 00041 { 00042 if ( success() ) 00043 { 00044 yuiMilestone() << "Loaded " << PLUGIN_BASE_NAME 00045 << " plugin successfully from " << pluginLibFullPath() 00046 << std::endl; 00047 } 00048 00049 00050 impl = ( NCPackageSelectorPluginIf* ) locateSymbol( "PSP" ); 00051 00052 if ( !impl ) 00053 YUI_THROW( YUIPluginException( PLUGIN_BASE_NAME ) ); 00054 00055 } 00056 00057 00058 NCPackageSelectorPluginStub::~NCPackageSelectorPluginStub() 00059 { 00060 // NOP 00061 } 00062 00063 00064 YPackageSelector * NCPackageSelectorPluginStub::createPackageSelector( YWidget * parent, 00065 long modeFlags ) 00066 { 00067 return impl->createPackageSelector( parent, modeFlags ); 00068 } 00069 00070 00071 YWidget * NCPackageSelectorPluginStub::createPkgSpecial( YWidget *parent, const std::string &subwidget ) 00072 { 00073 return impl->createPkgSpecial( parent, subwidget ); 00074 } 00075 00076 00077 YEvent * NCPackageSelectorPluginStub::runPkgSelection( YDialog * dialog, 00078 YWidget * selector ) 00079 { 00080 return impl->runPkgSelection( dialog, selector ); 00081 }