1 /* This file is part of the KDE project
2  * Copyright (C) 2006-2007 Thomas Zander <zander@kde.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB.  If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef KOTEXTEDITINGREGISTRY_H
21 #define KOTEXTEDITINGREGISTRY_H
22 
23 #include <KoGenericRegistry.h>
24 #include <KoTextEditingFactory.h>
25 
26 /**
27  * This singleton class keeps a register of all available text editing plugins.
28  * The text editing plugins are all about handling user input while (s)he
29  * is editing the text. A plugin can do near everything with the typed text,
30  * including altering it and adding markup. The plugin gives events when a
31  * word and when a paragraph has been finished. Which is ideal for autocorrection
32  * and autoreplacement of text.
33  * @see KoTextEditingFactory
34  * @see KoTextEditingPlugin
35  */
36 class KRITATEXT_EXPORT KoTextEditingRegistry : public KoGenericRegistry<KoTextEditingFactory*>
37 {
38 public:
39     /**
40      * Return an instance of the KoTextEditingRegistry
41      * Creates an instance if that has never happened before and returns the singleton instance.
42      */
KoTextEditingRegistry()43     KoTextEditingRegistry() {}
44     ~KoTextEditingRegistry() override;
45     static KoTextEditingRegistry *instance();
46 
47 private:
48 
49     void init();
50 };
51 
52 #endif
53