Warning, /office/calligra/plugins/formulashape/Mainpage.dox is written in an unsupported language. File is not indexed.
0001 /** 0002 * \mainpage KoFormulaShape 0003 * 0004 * KoFormulaShape is a flake shape ( derived from KoShape ) that implements the 0005 * functionality to edit and show a mathematical formula. Its structure is highly 0006 * related to the MathML markup language which is the ODF standard format for 0007 * formula markup. At the moment the KoFormulaShape implements only parts of the 0008 * MathML presentation markup, content markup is not supported. 0009 * 0010 * Every formula is stored as a tree of element objects that more or less are 0011 * equivalent to the XML structure of the MathML they were loaded from. 0012 * The element objects are classes that derive all from the BasicElement class. 0013 * They all implement a special interface which is used to alter and navigate 0014 * through them. 0015 * 0016 * The element tree's highest element is an object of the class FormulaElement. 0017 * This object is a private member of the FormulaShape class which implements the 0018 * public interface of a flake shape. 0019 * The according flake tool is implemented in FormulaTool and contains an instance 0020 * of FormulaEditor which is used for navigating and modifying the formula. 0021 * A FormulaEditor holds a FormulaCursor that represents a position or selection in 0022 * the formula, it consists of a start position, simply called position and (if selecting) 0023 * an end position of the selection, called mark. It can be modified in various ways. 0024 * The FormulaEditor provides methods for modifying the formula according to current 0025 * cursor. These methods return a QUndoCommand, that is wrapped in a FormulaUpdateCommand 0026 * (this has to be done to allow the notification of the shape/tool of data changes while 0027 * keeping a sepearation between the kformulalib part and the flake part) and than pushed 0028 * on the documents undo stack. 0029 * 0030 * The complex system of attributes which can be hold by the single elements is 0031 * completely implemented in the AttributeManager class. The attributes are 0032 * generically loaded and stored inside the elements and obtain and parse their 0033 * values the elements use AttributeManager which also deals with heritage and 0034 * default values. 0035 * 0036 * MathML specifies a scaling mechanism that uses the scriptlevel attribute. This 0037 * mechanism is implemented in BasicElement using the m_scalingFactor. This is the 0038 * factor the element is scaled in relation to its parent element. The value is 0039 * determined in during layouting in FormulaRenderer class. 0040 * 0041 * There are a number of elements that do not inherit BasicElement directly but 0042 * instead through RowElement. These classes are referred to as the inferred 0043 * row elements - see MathML spec 3.1.3.1. 0044 * 0045 * Most other elements, especially those with a fixed number of childs, but also 0046 * multiscript elements, inherit from FixedElement, which provides some convinience 0047 * methods and default implementations to them. 0048 * 0049 * The MathML specification lists default values for operator's layouting. These 0050 * values are different for every element class so each of them implements a 0051 * defaultAttributeValue() method that returns the hardcoded default value of the 0052 * passed attribute. 0053 * 0054 * The FormulaCursor class contains a current element, where the cursor is in. 0055 * Each element provides a certain number of cursor positions, for example 0056 * a token element has a cursor position before each letter and one at the end. 0057 * The position and mark (as mentioned above) are in respect to the cursor positions 0058 * of the current element. Each element implements a moveCursor method that is called 0059 * with the cursor position before the move (oldCursor) and the (maybe already modified) 0060 * new cursor position that the element changes according to it's direction. Additionally 0061 * each element implements a acceptCursor method, where it can specify if it accepts 0062 * this cursor (also according to it's position and selection state) or if the cursor 0063 * should be moved further. 0064 * 0065 */ 0066 // DOXYGEN_SET_IGNORE_PREFIX = Ko K