libyui-ncurses  2.44.1
 All Classes Functions Variables
NCPackageSelectorPluginStub.cc
1 /*
2  Copyright (C) 2000-2012 Novell, Inc
3  This library is free software; you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as
5  published by the Free Software Foundation; either version 2.1 of the
6  License, or (at your option) version 3.0 of the License. This library
7  is distributed in the hope that it will be useful, but WITHOUT ANY
8  WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10  License for more details. You should have received a copy of the GNU
11  Lesser General Public License along with this library; if not, write
12  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13  Floor, Boston, MA 02110-1301 USA
14 */
15 
16 
17 /*-/
18 
19  File: NCPackageSelectorPluginStub.cc
20 
21  Author: Hedgehog Painter <kmachalkova@suse.cz>
22 
23 
24 /-*/
25 
26 #include "NCPackageSelectorPluginStub.h"
27 
28 #define YUILogComponent "ncurses-ui"
29 #include <yui/YUILog.h>
30 #include "NCWidget.h"
31 #include "NCLabel.h"
32 #include "NCDialog.h"
33 #include "NCPackageSelectorPluginIf.h"
34 #include "YNCursesUI.h" // NCtoY2Event
35 
36 #define PLUGIN_BASE_NAME "ncurses-pkg"
37 
38 
40  : YPackageSelectorPlugin( PLUGIN_BASE_NAME )
41 {
42  if ( success() )
43  {
44  yuiMilestone() << "Loaded " << PLUGIN_BASE_NAME
45  << " plugin successfully from " << pluginLibFullPath()
46  << std::endl;
47  }
48 
49 
50  impl = ( NCPackageSelectorPluginIf* ) locateSymbol( "PSP" );
51 
52  if ( !impl )
53  YUI_THROW( YUIPluginException( PLUGIN_BASE_NAME ) );
54 
55 }
56 
57 
59 {
60  // NOP
61 }
62 
63 
64 YPackageSelector * NCPackageSelectorPluginStub::createPackageSelector( YWidget * parent,
65  long modeFlags )
66 {
67  return impl->createPackageSelector( parent, modeFlags );
68 }
69 
70 
71 YWidget * NCPackageSelectorPluginStub::createPkgSpecial( YWidget *parent, const std::string &subwidget )
72 {
73  return impl->createPkgSpecial( parent, subwidget );
74 }
75 
76 
78  YWidget * selector )
79 {
80  return impl->runPkgSelection( dialog, selector );
81 }
virtual YWidget * createPkgSpecial(YWidget *parent, const std::string &subwidget)
virtual YEvent * runPkgSelection(YDialog *currentDialog, YWidget *packageSelector)
virtual YPackageSelector * createPackageSelector(YWidget *parent, long modeFlags)