libyui
 
Loading...
Searching...
No Matches
YExternalWidgets Class Referenceabstract

#include <YExternalWidgets.h>

Public Member Functions

virtual ~YExternalWidgets ()
 
YExternalWidgetFactoryexternalWidgetFactory ()
 

Static Public Member Functions

static YExternalWidgetsexternalWidgets (const std::string &name)
 
static YExternalWidgetFactoryexternalWidgetFactory (const std::string &name)
 

Protected Member Functions

 YExternalWidgets (const std::string &name)
 
virtual YExternalWidgetFactorycreateExternalWidgetFactory ()=0
 

Friends

class YExternalWidgetsTerminator
 

Detailed Description

Abstract base class of a libYUI Widget Extension interface.

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

◆ ~YExternalWidgets()

YExternalWidgets::~YExternalWidgets ( )
virtual

Destructor.

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.

◆ 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)


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