diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | e9ae80694875f869892f13f4fcaf1170a00dea41 (patch) | |
tree | aa2f8d8a217e2d376224c8d46b7397b68d35de2d /quanta/parts/kafka/nodeenhancer.h | |
download | tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip |
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
Diffstat (limited to 'quanta/parts/kafka/nodeenhancer.h')
-rw-r--r-- | quanta/parts/kafka/nodeenhancer.h | 76 |
1 files changed, 76 insertions, 0 deletions
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 |