libyui  3.4.2
YExternalWidgets Class Referenceabstract

Abstract base class of a libYUI Widget Extension interface. More...

#include <YExternalWidgets.h>

Public Member Functions

virtual ~YExternalWidgets ()
 Destructor.
 
YExternalWidgetFactoryexternalWidgetFactory ()
 Return the external widget factory that provides all the createXY() methods for user defined widgets. More...
 

Static Public Member Functions

static YExternalWidgetsexternalWidgets (const std::string &name)
 Access the global YUI external widgets. More...
 
static YExternalWidgetFactoryexternalWidgetFactory (const std::string &name)
 

Protected Member Functions

 YExternalWidgets (const std::string &name)
 Constructor. More...
 
virtual YExternalWidgetFactorycreateExternalWidgetFactory ()=0
 Create the external widgets factory that provides all the createXY() methods for. More...
 

Friends

class YExternalWidgetsTerminator
 

Detailed Description

Abstract base class of a libYUI Widget Extension interface.

Definition at line 29 of file YExternalWidgets.h.

Constructor & Destructor Documentation

◆ YExternalWidgets()

YExternalWidgets::YExternalWidgets ( const std::string &  name)
protected

Constructor.

'name' is the plugin name

throws a YUIException if the plugin 'name' has been alread created

Definition at line 32 of file YExternalWidgets.cc.

Member Function Documentation

◆ createExternalWidgetFactory()

virtual YExternalWidgetFactory* YExternalWidgets::createExternalWidgetFactory ( )
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.

◆ externalWidgetFactory()

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.

Definition at line 76 of file YExternalWidgets.cc.

◆ externalWidgets()

YExternalWidgets * YExternalWidgets::externalWidgets ( const std::string &  name)
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)

Definition at line 55 of file YExternalWidgets.cc.


The documentation for this class was generated from the following files: