#include <YExternalWidgets.h>
Public Member Functions | |
virtual | ~YExternalWidgets () |
YExternalWidgetFactory * | externalWidgetFactory () |
Static Public Member Functions | |
static YExternalWidgets * | externalWidgets (const std::string &name) |
static YExternalWidgetFactory * | externalWidgetFactory (const std::string &name) |
Protected Member Functions | |
YExternalWidgets (const std::string &name) | |
virtual YExternalWidgetFactory * | createExternalWidgetFactory ()=0 |
Friends | |
class | YExternalWidgetsTerminator |
Abstract base class of a libYUI Widget Extension interface.
|
protected |
Constructor. 'name' is the plugin name
throws a YUIException if the plugin 'name' has been alread created
|
virtual |
Destructor.
|
protectedpure virtual |
Create the external widgets factory that provides all the createXY() methods for
Derived classes are required to implement this. Usually createXY() is virtual, real implementation is demanded to derived classes that implement Gtk, ncurses and QT specialization.
YExternalWidgetFactory * YExternalWidgets::externalWidgetFactory | ( | ) |
Return the external widget factory that provides all the createXY() methods for user defined widgets.
This will create the factory upon the first call and return a pointer to the one and only (singleton) factory upon each subsequent call. This may throw exceptions if the factory cannot be created.
It is up to user extend YExternalWidgetFactory to add createXY() methods in his/her implementation. So once YExternalWidgetFactory is extended with all the createXY() methods, three sub-plugins must be defined one for each supported graphical environment, e.g. Gtk, ncurses and QT, following the libyui implementation rules.
For instance an external widgets plugin called yui-foo that needs Gtk, ncurses and QT specialization will require also yui-foo-gtk, yui-foo-ncurses and yui-foo-qt plugin implementation.
|
static |
Access the global YUI external widgets. 'name' is the plugin name
if plugin 'name' has not been explicitally loaded by YUILoader::loadExternalWidgets externalWidgets try loading it (exactly as YUI::ui does) with default function symbol to be executed (see YUILoader::loadExternalWidgets for explanation)