libyui
3.0.10
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Enumerations
Friends
YExternalWidgets.h
1
/*
2
Copyright (C) 2013 Angelo Naselli <anaselli at linux dot it>
3
4
This file is part of libyui project
5
6
This library is free software; you can redistribute it and/or modify
7
it under the terms of the GNU Lesser General Public License as
8
published by the Free Software Foundation; either version 2.1 of the
9
License, or (at your option) version 3.0 of the License. This library
10
is distributed in the hope that it will be useful, but WITHOUT ANY
11
WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13
License for more details. You should have received a copy of the GNU
14
Lesser General Public License along with this library; if not, write
15
to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
16
Floor, Boston, MA 02110-1301 USA
17
*/
18
19
#ifndef YExternalWidgets_h
20
#define YExternalWidgets_h
21
22
class
YExternalWidgetFactory
;
23
24
/**
25
* Abstract base class of a libYUI Widget Extension interface.
26
**/
27
class
YExternalWidgets
28
{
29
friend
class
YExternalWidgetsTerminator
;
30
31
protected
:
32
/**
33
* Constructor.
34
**/
35
YExternalWidgets
( );
36
37
public
:
38
39
/**
40
* Destructor.
41
**/
42
virtual
~YExternalWidgets
();
43
44
45
/**
46
* Access the global YUI external widgets.
47
*
48
* NOTE that only one external widget plugin can be loaded, further implementation
49
* may allow more.
50
**/
51
static
YExternalWidgets
*
externalWidgets
();
52
53
/**
54
* Return the external widget factory that provides all the createXY() methods for
55
* user defined widgets.
56
*
57
* This will create the factory upon the first call and return a pointer to
58
* the one and only (singleton) factory upon each subsequent call.
59
* This may throw exceptions if the factory cannot be created.
60
*
61
* It is up to user extend YExternalWidgetFactory to add createXY() methods in
62
* his/her implementation. So once YExternalWidgetFactory is extended with
63
* all the createXY() methods, three sub-plugins must be defined one for each
64
* supported graphical environment, e.g. Gtk, ncurses and QT, following the
65
* libyui implementation rules.
66
*
67
* For instance an external widgets plugin called yui-foo that needs Gtk, ncurses
68
* and QT specialization will require also yui-foo-gtk, yui-foo-ncurses and
69
* yui-foo-qt plugin implementation.
70
*
71
**/
72
static
YExternalWidgetFactory
*
externalWidgetFactory
();
73
74
protected
:
75
76
/**
77
* Create the external widgets factory that provides all the createXY() methods for
78
*
79
* Derived classes are required to implement this. Usually createXY() is virtual,
80
* real implementation is demanded to derived classes that implement Gtk, ncurses and QT
81
* specialization.
82
**/
83
virtual
YExternalWidgetFactory
*
createExternalWidgetFactory
() = 0;
84
85
private
:
86
87
static
YExternalWidgets
*_externalWidgets;
88
};
89
90
#endif // YExternalWidgets_h
YExternalWidgets::createExternalWidgetFactory
virtual YExternalWidgetFactory * createExternalWidgetFactory()=0
YExternalWidgetsTerminator
Definition:
YExternalWidgets.cc:74
YExternalWidgets::YExternalWidgets
YExternalWidgets()
Definition:
YExternalWidgets.cc:28
YExternalWidgets
Definition:
YExternalWidgets.h:27
YExternalWidgets::~YExternalWidgets
virtual ~YExternalWidgets()
Definition:
YExternalWidgets.cc:38
YExternalWidgets::externalWidgets
static YExternalWidgets * externalWidgets()
Definition:
YExternalWidgets.cc:43
YExternalWidgets::externalWidgetFactory
static YExternalWidgetFactory * externalWidgetFactory()
Definition:
YExternalWidgets.cc:50
YExternalWidgetFactory
Definition:
YExternalWidgetFactory.h:30
src
YExternalWidgets.h
Generated by
1.8.5