From e9ae80694875f869892f13f4fcaf1170a00dea41 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/parts/kafka/nodeenhancer.h | 76 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 quanta/parts/kafka/nodeenhancer.h (limited to 'quanta/parts/kafka/nodeenhancer.h') diff --git a/quanta/parts/kafka/nodeenhancer.h b/quanta/parts/kafka/nodeenhancer.h new file mode 100644 index 00000000..376379f1 --- /dev/null +++ b/quanta/parts/kafka/nodeenhancer.h @@ -0,0 +1,76 @@ +/*************************************************************************** + nodeenhancer.h + ------------------- + + copyright : (C) 2003, 2004 - Nicolas Deschildre + email : ndeschildre@kdewebdev.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef NODEENHANCER_H +#define NODEENHANCER_H + +class KConfig; +class Node; +namespace DOM +{ + class Node; +} + +/** + * Base class which define an interface to enhance DOM::Nodes + * i.e. to modify the corresponding DOM::Node of a Node. + * The aim is to modify the kafka view to provide visual aids + * like a error system which highlight syntax error, and so on... + * Defining this in XML files could be a nice idea once kafka + * support all the DTDs. + */ + +class NodeEnhancer +{ +public: + NodeEnhancer(){} + virtual ~NodeEnhancer(){} + + /** + * This function modify the DOM::Node of the node. + * The DOM::Node must be built before calling this + * function. + * @param node The Node we want to enhance. + * @param parentDNode the parent DOM::Node of the root DOM::Node of node. + * @param nextDNode the DOM::Node next to the root DOM::Node of node. + */ + virtual bool enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node nextDNode) = 0; + + /** + * This function apply some modifications once the whole DOM::Node tree is built. + * @param domNode The domNode we want to add some modifications. + */ + virtual void postEnhanceNode(DOM::Node domNode) = 0; + + /** + * This function un-apply the modifications made by postEnhanceNode() + * @param domNode The DOM::Node we want to un-enhance! + */ + virtual void postUnenhanceNode(DOM::Node domNode) = 0; + + /** + * Read the config. + * @m_config The config to read. + */ + virtual void readConfig(KConfig *m_config) = 0; + + /** + * This need to be strongly extended. + */ +}; + +#endif -- cgit v1.2.1