operatorelement.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#ifndef OPERATORELEMENT_H
21#define OPERATORELEMENT_H
22
23#include "tokenelement.h"
24
25KFORMULA_NAMESPACE_BEGIN
26
27class OperatorElement : public TokenElement {
28 typedef TokenElement inherited;
29public:
30 OperatorElement( BasicElement* parent = 0 );
31 void setForm( FormType type );
32
41 virtual KCommand* buildCommand( Container*, Request* );
42
43 virtual TQString getElementName() const { return "mo"; }
44private:
45 virtual bool readAttributesFromMathMLDom( const TQDomElement &element );
46 void writeMathMLAttributes( TQDomElement& element ) const ;
47 void writeSizeAttribute( TQDomElement& element, const TQString &attr, SizeType type, double length ) const ;
48
49 FormType m_form;
50 SizeType m_lspaceType;
51 double m_lspace;
52 SizeType m_rspaceType;
53 double m_rspace;
54 SizeType m_maxSizeType;
55 double m_maxSize;
56 SizeType m_minSizeType;
57 double m_minSize;
58 bool m_fence;
59 bool m_separator;
60 bool m_stretchy;
61 bool m_symmetric;
62 bool m_largeOp;
63 bool m_movableLimits;
64 bool m_accent;
65
66 bool m_customForm;
67 bool m_customFence;
68 bool m_customSeparator;
69 bool m_customLSpace;
70 bool m_customRSpace;
71 bool m_customStretchy;
72 bool m_customSymmetric;
73 bool m_customMaxSize;
74 bool m_customMinSize;
75 bool m_customLargeOp;
76 bool m_customMovableLimits;
77 bool m_customAccent;
78
79};
80
81KFORMULA_NAMESPACE_END
82
83#endif // OPERATORELEMENT_H
Basis of every formula element.
The document.