oasiscreationstrategy.h
1/* This file is part of the KDE project
2 Copyright (C) 2006 Alfredo Beaumont Sainz <alfredo.beaumont@gmail.com>
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
21#ifndef OASISCREATIONSTRATEGY_H
22#define OASISCREATIONSTRATEGY_H
23
24
25#include <tqstring.h>
26
27#include "kformuladefs.h"
28#include "creationstrategy.h"
29
30KFORMULA_NAMESPACE_BEGIN
31
32class BasicElement;
33class BracketElement;
34class EmptyElement;
35class FractionElement;
36class IndexElement;
37class MatrixElement;
39class NameSequence;
40class OverlineElement;
41class RootElement;
42class SpaceElement;
43class SymbolElement;
44class TextElement;
46
51public:
52 virtual BasicElement* createElement( TQString type, const TQDomElement& element );
53
54 virtual TextElement* createTextElement( const TQChar& ch, bool symbol=false );
55 virtual EmptyElement* createEmptyElement();
56 virtual NameSequence* createNameSequence();
57 virtual BracketElement* createBracketElement( SymbolType lhs, SymbolType rhs );
58 virtual OverlineElement* createOverlineElement();
59 virtual UnderlineElement* createUnderlineElement();
60 virtual MultilineElement* createMultilineElement();
61 virtual SpaceElement* createSpaceElement( SpaceWidth width );
62 virtual FractionElement* createFractionElement();
63 virtual RootElement* createRootElement();
64 virtual SymbolElement* createSymbolElement( SymbolType type );
65 virtual MatrixElement* createMatrixElement( uint rows, uint columns );
66 virtual IndexElement* createIndexElement();
67 virtual IdentifierElement* createIdentifierElement();
68 virtual OperatorElement* createOperatorElement();
69 virtual NumberElement* createNumberElement();
70 virtual TQString type() const { return "Oasis"; }
71
72 BasicElement* createOperatorElement( const TQDomElement& element );
73};
74
75KFORMULA_NAMESPACE_END
76
77#endif // OASISCREATIONSTRATEGY_H
Basis of every formula element.
A left and/or right bracket around one child.
An object of this type needs to be known by the SequenceElement.
An element that represents an empty box.
The element with up to four indexes in the four corners.
Any number of lines.
The sequence thats a name.
The strategy to be used for OASIS OpenDocument / MathML.
virtual TextElement * createTextElement(const TQChar &ch, bool symbol=false)
there must always be a TextElement, so this can never return 0
virtual MatrixElement * createMatrixElement(uint rows, uint columns)
when this gets called the user has seen the matrix dialog and expects a matrix!
A line above the content.
A nice graphical root.
Definition rootelement.h:35
A element that represents a space.
A symbol is simply a piece of art.
An element that represents one char.
Definition textelement.h:37
A line below the content.