00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
#ifndef __ktexteditor_plugin_h__
00020
#define __ktexteditor_plugin_h__
00021
00022
#include <qobject.h>
00023
00024
#include <kdelibs_export.h>
00025
00026
namespace KTextEditor
00027 {
00028
00029
class Document;
00030
class View;
00031
00036 class KTEXTEDITOR_EXPORT Plugin :
public QObject
00037 {
00038
friend class PrivatePlugin;
00039
00040 Q_OBJECT
00041
00042
public:
00043 Plugin (
Document *document = 0,
const char *name = 0 );
00044
virtual ~Plugin ();
00045
00046
unsigned int pluginNumber ()
const;
00047
00048
Document *document ()
const;
00049
00050
private:
00051
class PrivatePlugin *d;
00052
static unsigned int globalPluginNumber;
00053
unsigned int myPluginNumber;
00054 };
00055
00056 KTEXTEDITOR_EXPORT Plugin *createPlugin (
const char* libname,
Document *document = 0,
const char *name = 0 );
00057
00062 class KTEXTEDITOR_EXPORT PluginViewInterface
00063 {
00064
friend class PrivatePluginViewInterface;
00065
00066
public:
00067 PluginViewInterface ();
00068
virtual ~PluginViewInterface ();
00069
00070
unsigned int pluginViewInterfaceNumber ()
const;
00071
00072
00073
00074
00075
virtual void addView (
View *) = 0;
00076
virtual void removeView (
View *) = 0;
00077
00078
private:
00079
class PrivatePluginViewInterface *d;
00080
static unsigned int globalPluginViewInterfaceNumber;
00081
unsigned int myPluginViewInterfaceNumber;
00082 };
00083
00084 KTEXTEDITOR_EXPORT PluginViewInterface *pluginViewInterface (Plugin *plugin);
00085
00086 }
00087
00088
#endif