#include <MathMng.h>
Inheritance diagram for mcMathMngHelpers:
mcMathMng implements many mcElement functions even if it's not a mcElement derived class. You can use these functions as if you are working with a mcElement (infact, all the documentation of mcElement functions implemented here is copied by mcElement documentation).
Definition at line 51 of file MathMng.h.
mcMathMng specific GUI functions | |
Some additional GUI features for mcMathMng. | |
wxSize | gui_GetSeparatorSize () const |
Returns the size of the separator symbol for this datatype (for example, when m_nDataType == mcMMT_EQUATION, this function returns the size of the '=' character). | |
void | gui_RecalcSeparatorSize () |
Recalculates the size of the separator symbol (that is, the symbol drawn between the left & right member) and stores the result in the mgui_szSeparator variable. | |
int | gui_GetXOfSeparator (int centerLine=-1) const |
int | gui_GetYOfSeparator (int centerLine=-1) const |
int | gui_GetXOfLeftMem () const |
int | gui_GetYOfLeftMem () const |
int | gui_GetXOfRightMem () const |
int | gui_GetYOfRightMem () const |
void | gui_SelectSeparatorStyle (wxDC &) const |
int | gui_GetYAnchor () const |
Returns the y amount of this mcElement to subtract from the center line to draw this element. | |
wxRect | gui_GetRectOfLeftMem () const |
wxRect | gui_GetRectOfRightMem () const |
mcPolynomial & | gui_GetFocusMem () |
const mcPolynomial & | gui_GetFocusMem () const |
static void | gui_InitStyles () |
Initializes the default array of styles owned by this class. | |
static void | gui_DeleteStyles () |
Frees the memory of the styles owned by this class. | |
Public Member Functions | |
mcMathMngHelpers () | |
Standard constructor. | |
virtual | ~mcMathMngHelpers () |
int | data_GetChildrenCount () const |
Returns the number of children attached to this tree node. | |
const mcElement & | data_GetConstChild (int n) const |
Returns the n-th tree node attached to this element. | |
void | data_DeepCopy (const mcElementHelpers *mm) |
Deep copy this object: all the data of the new class is completely independent from the previous mcMathMng object. | |
virtual void | data_SetFilter (const mcFilter *p) |
Set/changes the filter used by this class. | |
virtual void | data_SetMember (bool left, const mcPolynomial &, mcMathMngType newtype=mcMMT_EQUATION) |
Copies the given pointer in one of the two members, eventually changing the type of the math data. | |
const mcPolynomial & | data_GetLeftMem () const |
const mcPolynomial & | data_GetRightMem () const |
mcPolynomial & | data_GetLeftMem () |
mcPolynomial & | data_GetRightMem () |
mcElement abstract GUI functions | |
Implementation of mcElement's abstract functions. | |
bool | gui_isBeginKey (const mcKey &key) const |
Returns a positive value if the given character marks the begin of this element; FALSE otherwise. | |
bool | gui_isEndKey (const mcKey &key) const |
Returns TRUE if the given character marks the end of this element; this function is always called before calling ::gui_Input function. | |
virtual int | gui_Draw (wxDC &h, int x, int y, long flags, const wxPoint &p) const |
Draws the mathematical data on the given DC at the given point. | |
virtual mcInputRes | gui_Input (const mcKey &key, mcElement *) |
Handles the given keypress event, calling the mcElement::gui_Input() function of the left or right polynomial of the expression/equation/inequality. | |
mcInsertRes | gui_Insert (const mcElement &, mcElement *) |
Inserts the given element at the right of the cursor position. | |
virtual mcMoveCursorRes | gui_MoveCursor (mcMoveCursorFlag flag, long modifiers) |
This function is called to move the cursor which is inside the element, one 'step' left, right, up or down (when flag=mcMCF_LEFT/mcMCF_RIGHT/mcMCF_UP/mcMCF_DOWN). | |
virtual int | gui_GetRelCursorPos (wxDC &dc, wxPoint *pt) const |
Returns the height of the cursor and the (x;y) position of the cursor (in the given pointer) relative to the top-left point of this element. | |
virtual void | gui_SetCursorPos (const mcCursorPos &code) |
Sets the cursor position inside the element using Cursor Position flags. | |
virtual void | gui_GetCursorPos (mcCursorPos &) const |
Returns the cursor position as Cursor Position flag. | |
virtual int | gui_MoveCursorUsingPoint (wxDC &, const wxPoint &) |
Moves the cursor inside this element in the closest available position to the given point. | |
virtual void | gui_OnSelect (wxDC &dc, wxRect &rc) |
This function is called when the bounding box of this element intersects with the selection rectangle created by the user with the mouse cursor. | |
virtual void | gui_DoRecalcSize () |
This function is called by mcElement and non-mcElement functions when the internal size variable must be updated due to a change in the structure of the element. | |
virtual mcElement & | gui_GetActiveElem (int x, int y, const wxPoint &pt) |
Returns the currently active element: that is, the element currently containing the given point. | |
virtual mcElement | gui_GetSelection () const |
Returns the selected portion of this math data. | |
virtual void | gui_DeleteSelection () |
Deletes the selected parts of this math data (if any). | |
virtual void | gui_UpdateExpDepth () |
Updates the exponent depth of the left & right members setting them to the same exponent depth of *this;. | |
GUI+MATH functions | |
Math functions working on GUI selection. | |
virtual void | gui_MultiplyBySel (bool bDivide=FALSE) |
virtual void | gui_MoveSel () |
virtual void | gui_AddSubSel () |
virtual void | gui_ExecCmdOnSel (mcMathMngCmdID) |
virtual void | gui_GetPossibleOperations (mcMathMngCmdID *) const |
virtual wxArrayString | gui_GetPossibleOpOnSel (mcMathMngCmd *) const |
MATH functions | |
These functions manage all the math operations. | |
mcBasicOpRes | math_Add (const mcElement &, mcElement *, bool add) |
Sums or subtracts this element with the given e element. | |
mcBasicOpRes | math_MultiplyBy (const mcElement &, mcElement *) |
Multiplies two mcElements of the same type and stores the result in this object. | |
mcBasicOpRes | math_DivideBy (const mcElement &e, mcElement *pp) |
Divides two mcElements of the same type and stores the result in this object. | |
mcBasicOpRes | math_Subtract (const mcElement &, mcElement *) |
math_s two mcElements of the same type and stores the result in this object. | |
bool | math_Compare (const mcElement &p, long flags) const |
Compares *this element with the given one and then compare the children of *this and the children of the given element, too. | |
void | math_MultiplyBy (const mcMonomial &) |
void | math_DivideBy (const mcMonomial &) |
void | math_MultiplyBy (int nID) |
void | math_MoveSymbols (const mcSymbolArray *arr, bool toLeft) |
Moves all the monomial containing one or more symbol belonging to the given mcSymbolArray to the left (if toLeft == TRUE) or to the right member. | |
void | math_MoveSymbol (const mcSymbolProperties *sym, bool toLeft) |
void | math_MoveFreeFrom (const mcSymbolProperties *sym, bool toLeft) |
void | math_MoveUnknowns (bool toLeft) |
void | math_MoveConstants (bool toLeft) |
void | math_MoveParameters (bool toLeft) |
void | math_MoveNonSymbol (bool toLeft) |
void | math_MoveAll (bool toleft) |
void | math_Move (int mathidx, bool toleft) |
mcBasicOpRes | math_RaiseTo (const mcPolynomial &p) |
Raises *this element to the given polynomial. | |
void | math_RaiseTo (const mcRealValue &) |
void | math_RaiseTo (int nID) |
void | math_RaiseToSel () |
mcExpSimRes | math_Simplify (long flags, mcElement *) |
Simplifies this element one "step"; that is, after one call to this function the element must be slightly changed. | |
mcExpSimRes | math_Expand (long flags, mcElement *) |
Expands this element one "step". | |
mcExpSimRes | math_Simplify (long lflags, long rflags) |
mcExpSimRes | math_Expand (long lflags, long rflags) |
bool | math_isMaxSimplified () const |
bool | math_isConstant () const |
Returns TRUE if this element contains mcSymbol registered as constants and/or mcNumbers only. | |
bool | math_isFactorized () const |
mcRealValue | math_Evaluate () const |
Evaluates the numeric value of this element and then returns it. | |
mcRealValue | math_GetLenght () const |
Returns the 'lenght' of this element without taking in count its children. | |
mcRealValue | math_GetTotalLenght () const |
Returns the lenght of this element, taking in count also the children. | |
mcIntegerValue | math_GetMaxDegreeFor (const mcSymbolProperties *sym) const |
int | math_Replace (const mcElement &tofind, int occ, long flags, const mcElement &replacement, bool addchildren) |
| |
int | math_GetCountOf (const mcElement &tocount, long flags) const |
Returns the number of elements with the same contents of the given one contained into this one. | |
bool | math_CompareThisOnly (const mcElement &, long flags) const |
Compares this element and the given one and then stops, unlike math_Compare() that compares children too. | |
mcElement | math_Find (int n, const mcElement &tofind, long flags, int *pos=NULL) const |
Deep searches the n-th occurrence of an element with the same contents (checked using mcElement::math_hasSameContentOf) of the given element. | |
bool | math_ContainsSymbol (const mcSymbolProperties *sym) const |
Non-const version of the main math_Find. | |
bool | math_ContainsNumber (const mcRealValue &sym) const |
bool | math_ContainsInvalidSymbols () const |
Returns TRUE if this element contains unregistered symbols. | |
int | math_GetSymbolList (mcSymbol **, int size, const mcSymbol &tofind, bool left=TRUE) const |
void | math_FactoreOutAll (bool bForceUseless) |
void | math_FactoreOut (const mcSymbolProperties *, const mcPolynomial &pol, bool bForceUseless) |
void | math_FactoreOutFreeOf (const mcSymbolProperties *, const mcPolynomial &pol, bool bForceUseless) |
mcMathMngType | math_GetMathMngType () const |
Returns the type of mathematical data which is currently contained in this class. | |
void | math_SetMathType (mcMathMngType newtype) |
Sets the type of math data stored in this object. | |
mcMathType | math_GetMathType () const |
Returns extended informations about the currently contained math data of this class. | |
int | math_GetOrderPos () const |
Returns the order position for this element. | |
bool | math_CanBeAddedWith (const mcElement &p) const |
Returns TRUE if this element can be added with the given element. | |
bool | math_CanBeMultWith (const mcElement &p) const |
Works like #math_CanBemath_AddeWith(), just for multiplication. | |
bool | math_CanBeDivBy (const mcElement &p) const |
Works like #math_CanBemath_AddeWith(), just for divisions. | |
mcMonomial | math_GetLCM (const mcElement &) const |
Returns the LCM between *this and the given element. | |
mcMonomial | math_GetGCD (const mcElement &) const |
IO functions | |
Functions which are used to import/export the math data. | |
virtual wxXml2Node | io_GetMathML (bool bGetPresentation) const |
| |
virtual wxString | io_GetInlinedExpr () const |
| |
virtual bool | io_ImportPresentationMathML (wxXml2Node tag, wxString &err) |
Imports some presentation MathML. | |
virtual bool | io_ImportInlinedExpr (const wxString &str, int *count, wxString &perr) |
Imports the given inlined expression. | |
wxString | io_GetSeparatorSymbol (bool bUseSpecialChars=TRUE) const |
Returns the string associated with the current datatype. | |
bool | io_isBeginTag (const wxXml2Node &tag) const |
Returns a positive value if the given MathML content tag marks the begin of this element; FALSE otherwise. | |
bool | io_isBeginChar (const wxString &str) const |
Returns a positive value if the given inlined expression marks the begin of this element; FALSE otherwise. | |
Static Public Attributes | |
static int | sgui_nSpaceAroundSeparator = 5 |
The number of pixels between the left member and the separator symbol and between the separator symbol and the right member. | |
static int | sgui_nSpaceLeftRight = 1 |
The space to leave at the left of the left member and at the right of the right member. | |
static mcMathMngCmd | sgui_cmd [mcMMC_LAST] |
Standard styles collection | |
A group of some pre-made styles which are used to avoid the long process of the creation of a completely new mcStyleArray; use the #InitStyles() function to prepare these pointers... | |
static mcStyleArray * | sgui_pNormalStyles = NULL |
The default style. | |
static mcStyleArray * | sgui_pSmallStyles = NULL |
A smaller style. | |
static mcStyleArray * | sgui_pBigStyles = NULL |
A bigger style. | |
Protected Member Functions | |
void | data_Init () |
Inits this class calling the gui_Init, math_Init and io_Init functions, if required. | |
void | gui_Init () |
Inits this section of the element. | |
void | data_GetConstSourceDest (const mcPolynomialHelpers **s, const mcPolynomialHelpers **d, bool toleft) const |
void | data_GetSourceDest (mcPolynomialHelpers **s, mcPolynomialHelpers **d, bool toleft) |
void | gui_GetConstSelectionSourceDest (const mcPolynomialHelpers **s, const mcPolynomialHelpers **d) const |
Sets the two given pointers to pointers to, respectively, the source and the destination polynomial of a math operation which is working on selection. | |
void | gui_GetSelectionSourceDest (mcPolynomialHelpers **s, mcPolynomialHelpers **d) |
Static Protected Member Functions | |
static bool | gui_isRelationalOp (const mcKey &key) |
Returns TRUE if the given keypress represent a valid relational operator; FALSE otherwise. | |
static mcMathMngRelationalOp | math_GetRelationalOpFor (mcMathMngType type) |
Returns the mcMathMngRelationalOp associated with the given mcMathMngType; mcMMRO_EQUAL if type is mcMMT_NOT_SET. | |
static mcMathMngType | math_GetMathTypeFor (mcMathMngRelationalOp type) |
Returns the mcMathMngType associated with the given relational operator or mcMMT_NOT_SET if the given type id invalid. | |
static mcMathMngType | math_GetMathTypeFrom (const mcKey &) |
Returns the mcMathMngType which is associated with the given keypress or mcMMT_NOT_SET if the given keypress is not a valid relational operator. | |
Protected Attributes | |
mcPolynomial | mdata_eLMember |
The first member: the element at the left of the '='. | |
mcPolynomial | mdata_eRMember |
The second member: the element at the right of the '='. | |
mcMathMngType | mdata_nDataType |
The type of data of the array: see the mcMATHMNG_* defines. | |
int | mgui_nCursorPos |
The position of the cursor; use a mcMATHMNG_LEFT to indicate that the cursor is placed on the left member (or it's inside the expression); use mcMATHMNG_RIGHT to indicate that the cursor is placed on the right member of the equation/inequality. | |
wxSize | mgui_szSeparator |
The size of the separator symbol. | |
Private Member Functions | |
mcDEFINE_REFERENCE_DATA (mcMathMng, mcET_MATHMNG) |
|
Standard constructor.
Definition at line 115 of file MathMng.h. References data_Init(). |
|
|
|
Deep copy this object: all the data of the new class is completely independent from the previous mcMathMng object.
Reimplemented from mcElementHelpers. Reimplemented in mcMathLineHelpers. Definition at line 111 of file MathMng.cpp. References mcElement::data_DeepCopy(), mcEmptyElement, mdata_eLMember, mdata_eRMember, mdata_nDataType, mgui_nCursorPos, and mcElementHelpers::mgui_pStyleArray. Referenced by mcMathLineHelpers::data_DeepCopy(). |
|
Returns the number of children attached to this tree node. This function can be used on *any* mcElement node because this is a virtual function which is overridden by container classes which thus return the correct number of children. This function is used by various mcElement functions like data_Check() const data_GetElemFromID(), ... which must call some standard mcElement functions on all nodes attached to this element. Reimplemented from mcElementHelpers. Definition at line 158 of file MathMng.h. References mcElementHelpers::data_GetChildrenCount(). |
|
Returns the n-th tree node attached to this element. You can use this function to traverse the entire tree:
mcElement rootnode = [...]; MyWalkerFnc(rootnode); void MyWalkerFnc(mcElement p) { // do what you want on the "p" node... for (int i=0; i < p.data_GetChildrenCount(); i++) MyWalkerFnc(p.data_GetChild(i)); }
Reimplemented from mcElementHelpers. Definition at line 163 of file MathMng.h. References data_GetLeftMem(), data_GetRightMem(), mcEmptyElement, and mcRETURN_ELEMENT_CHILD. |
|
Definition at line 144 of file MathMng.cpp. References mdata_eLMember, and mdata_eRMember. Referenced by data_GetSourceDest(). |
|
Definition at line 189 of file MathMng.h. References mdata_eLMember. |
|
|
Definition at line 190 of file MathMng.h. References mdata_eRMember. |
|
|
Definition at line 142 of file MathMng.h. References data_GetConstSourceDest(). Referenced by math_Move(), math_MoveAll(), math_MoveFreeFrom(), math_MoveNonSymbol(), math_MoveSymbol(), and math_MoveSymbols(). |
|
Inits this class calling the gui_Init, math_Init and io_Init functions, if required. This function should called by the last overload of the constructor of the mcElementHelpers-derived class, that is, when the build process is completed and the xxx_Init() functions called are the functions of the derived class. Reimplemented from mcElementHelpers. Definition at line 121 of file MathMng.h. References mcElementHelpers::data_Init(), mcMMT_EXPRESSION, and mdata_nDataType. Referenced by mcMathLineHelpers::mcMathLineHelpers(), and mcMathMngHelpers(). |
|
Set/changes the filter used by this class. Use NULL to remove any filter which is currently being used. Definition at line 130 of file MathMng.cpp. References mcElementArray::data_SetFilter(), mdata_eLMember, and mdata_eRMember. |
|
Copies the given pointer in one of the two members, eventually changing the type of the math data. The given pointer is copied, thus it still must be deleted by the caller... Definition at line 161 of file MathMng.cpp. References mcElement::data_DeepCopy(), data_GetLeftMem(), data_GetRightMem(), mcEmptyPolynomial, and mdata_nDataType. |
|
Definition at line 826 of file MathMng.cpp. References mcElementArrayHelpers::gui_GetSelection(), gui_GetSelectionSourceDest(), mcElement::gui_SelectAll(), mcPolynomialHelpers::math_GetSel(), mcPolynomialHelpers::math_GetSelCount(), mcElementArrayHelpers::math_SimpleAdd(), and mcElementHelpers::math_SimpleSubtract(). Referenced by gui_ExecCmdOnSel(). |
|
Deletes the selected parts of this math data (if any).
Reimplemented from mcElementHelpers. Definition at line 752 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcPolynomial::gui_AddNewEmptyMonomial(), mcElementArray::gui_DeleteSelection(), mcElementHelpers::gui_RecalcSize(), gui_SetCursorPos(), and mcCP_BEGIN. |
|
Frees the memory of the styles owned by this class.
Definition at line 262 of file MathMng.cpp. References mcSAFE_DELETE, sgui_pBigStyles, sgui_pNormalStyles, and sgui_pSmallStyles. Referenced by mcMathCore::CleanupGUI(), and gui_InitStyles(). |
|
This function is called by mcElement and non-mcElement functions when the internal size variable must be updated due to a change in the structure of the element. This function should be as fast and accurate as possible and it must store the new size in the mgui_sz variable.
Implements mcElementHelpers. Reimplemented in mcMathLineHelpers. Definition at line 275 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElementHelpers::gui_GetHeight(), mcElementHelpers::gui_GetWidth(), gui_GetXOfLeftMem(), gui_GetXOfRightMem(), gui_GetYOfLeftMem(), gui_GetYOfRightMem(), gui_RecalcSeparatorSize(), mcMAX, mcMMT_EXPRESSION, mdata_nDataType, and sgui_nSpaceLeftRight. Referenced by mcMathLineHelpers::gui_DoRecalcSize(). |
|
|
Definition at line 973 of file MathMng.cpp. References gui_AddSubSel(), gui_MoveSel(), gui_MultiplyBySel(), math_Expand(), math_Simplify(), mcEXPSIM_NOFLAGS, mcMMC_ADDSUB_SEL, mcMMC_DIV_SEL, mcMMC_EXPAND, mcMMC_MOVE_SEL, mcMMC_MULT_SEL, and mcMMC_SIMPLIFY. |
|
Returns the currently active element: that is, the element currently containing the given point.
Definition at line 409 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElementArray::gui_ExGetActiveElem(), gui_GetRectOfLeftMem(), gui_GetXOfRightMem(), gui_GetYAnchor(), and gui_GetYOfRightMem(). |
|
Sets the two given pointers to pointers to, respectively, the source and the destination polynomial of a math operation which is working on selection. That is, the polynomial which contains selected elements is set as source and the remaining one as destination. Definition at line 314 of file MathMng.cpp. References data_GetLeftMem(), mdata_eLMember, and mdata_eRMember. Referenced by gui_GetSelectionSourceDest(). |
|
Returns the cursor position as Cursor Position flag. It must return mcCP_BEGIN if cursor is at the leftmost point of the element, mcCP_END if the cursor is at the rightmost point of the element, mcCP_INSIDE otherwise. When this function is called the cursor is always inside the element. Implements mcElementHelpers. Definition at line 604 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::gui_GetCursorPos(), mcElementHelpers::gui_GetCursorPos(), mcCursorPos::gui_Push(), mcCP_BEGIN, mcCP_END, mcMATHMNG_LEFT, mcMATHMNG_RIGHT, and mgui_nCursorPos. |
|
Definition at line 267 of file MathMng.h. References mcMATHMNG_LEFT, mdata_eLMember, mdata_eRMember, and mgui_nCursorPos. |
|
Definition at line 264 of file MathMng.h. References mcMATHMNG_LEFT, mdata_eLMember, mdata_eRMember, and mgui_nCursorPos. |
|
Definition at line 888 of file MathMng.cpp. References mcASSERT, mcMMC_EXPAND, mcMMC_SIMPLIFY, mcMMT_EQUATION, mcMMT_EXPRESSION, mcMMT_INEQUALITY_G, mcMMT_INEQUALITY_GE, mcMMT_INEQUALITY_L, mcMMT_INEQUALITY_LE, mcMMT_INEQUALITY_NE, mcMMT_NOT_SET, and mdata_nDataType. |
|
Definition at line 913 of file MathMng.cpp. References mcASSERT. |
|
Definition at line 220 of file MathMng.cpp. References data_GetLeftMem(), mcElementHelpers::gui_GetHeight(), mcElementHelpers::gui_GetWidth(), gui_GetXOfLeftMem(), and gui_GetYOfLeftMem(). Referenced by gui_Draw(), gui_GetActiveElem(), gui_MoveCursorUsingPoint(), and gui_OnSelect(). |
|
Definition at line 226 of file MathMng.cpp. References data_GetRightMem(), mcElementHelpers::gui_GetHeight(), mcElementHelpers::gui_GetWidth(), gui_GetXOfRightMem(), and gui_GetYOfRightMem(). Referenced by gui_MoveCursorUsingPoint(), and gui_OnSelect(). |
|
Returns the height of the cursor and the (x;y) position of the cursor (in the given pointer) relative to the top-left point of this element. The function must fill the wxPoint pointer using coordinates relative to the top-left point of its bounding rectangle. When this function is called, the cursor is always inside the element.
Implements mcElementHelpers. Reimplemented in mcMathLineHelpers. Definition at line 517 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElementArray::gui_ExGetRelCursorPos(), gui_GetXOfLeftMem(), gui_GetXOfRightMem(), gui_GetYAnchor(), gui_GetYOfLeftMem(), gui_GetYOfRightMem(), mcMATHMNG_LEFT, mcMMT_EXPRESSION, mdata_nDataType, and mgui_nCursorPos. Referenced by mcMathLineHelpers::gui_GetRelCursorPos(). |
|
Returns the selected portion of this math data. The returned object maybe mcEmptyElement if nothing is selected in none of the two members. Reimplemented from mcElementHelpers. Reimplemented in mcMathLineHelpers. Definition at line 735 of file MathMng.cpp. References mcMathMng::data_GetLeftMem(), data_GetLeftMem(), data_GetRightMem(), mcMathMng::data_GetRightMem(), mcElement::gui_GetSelection(), and mcElementHelpers::gui_isSelected(). |
|
Definition at line 205 of file MathMng.h. References gui_GetConstSelectionSourceDest(). Referenced by gui_AddSubSel(), and gui_MoveSel(). |
|
Returns the size of the separator symbol for this datatype (for example, when m_nDataType == mcMMT_EQUATION, this function returns the size of the '=' character).
Definition at line 241 of file MathMng.h. References mgui_szSeparator. Referenced by gui_GetXOfRightMem(), gui_GetYOfSeparator(), and gui_MoveCursorUsingPoint(). |
|
Definition at line 184 of file MathMng.cpp. References sgui_nSpaceLeftRight. Referenced by gui_DoRecalcSize(), gui_Draw(), gui_GetRectOfLeftMem(), gui_GetRelCursorPos(), gui_GetXOfRightMem(), and gui_GetXOfSeparator(). |
|
Definition at line 196 of file MathMng.cpp. References data_GetLeftMem(), gui_GetSeparatorSize(), mcElement::gui_GetWidth(), gui_GetXOfLeftMem(), and sgui_nSpaceAroundSeparator. Referenced by gui_DoRecalcSize(), gui_Draw(), gui_GetActiveElem(), gui_GetRectOfRightMem(), and gui_GetRelCursorPos(). |
|
Definition at line 190 of file MathMng.cpp. References data_GetLeftMem(), mcElement::gui_GetWidth(), gui_GetXOfLeftMem(), mcUNUSED, and sgui_nSpaceAroundSeparator. Referenced by gui_Draw(), and gui_MoveCursorUsingPoint(). |
|
Returns the y amount of this mcElement to subtract from the center line to draw this element.
Reimplemented from mcElementHelpers. Definition at line 269 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcMAX. Referenced by gui_Draw(), gui_GetActiveElem(), gui_GetRelCursorPos(), and gui_GetYOfSeparator(). |
|
Definition at line 203 of file MathMng.cpp. Referenced by gui_DoRecalcSize(), gui_Draw(), gui_GetRectOfLeftMem(), and gui_GetRelCursorPos(). |
|
Definition at line 215 of file MathMng.cpp. Referenced by gui_DoRecalcSize(), gui_Draw(), gui_GetActiveElem(), gui_GetRectOfRightMem(), and gui_GetRelCursorPos(). |
|
Definition at line 209 of file MathMng.cpp. References gui_GetSeparatorSize(), and gui_GetYAnchor(). Referenced by gui_Draw(), and gui_MoveCursorUsingPoint(). |
|
Inits this section of the element. Acts like a constructor (it's called by mcElementHelpers). Reimplemented from mcElementHelpers. Reimplemented in mcMathLineHelpers. Definition at line 126 of file MathMng.h. References mcElementHelpers::gui_Init(), mcMATHMNG_LEFT, mgui_nCursorPos, and sgui_pNormalStyles. Referenced by mcMathLineHelpers::gui_Init(). |
|
Initializes the default array of styles owned by this class. If you call this function, which is required only if you want to be able to do something like: mymathmng.gui_SetStyleArray(mcMathMng::pSmallStyles); Definition at line 248 of file MathMng.cpp. References gui_DeleteStyles(), mcStyleArray::ScaleSize(), sgui_pBigStyles, sgui_pNormalStyles, and sgui_pSmallStyles. Referenced by mcMathCore::SetupGUI(). |
|
Handles the given keypress event, calling the mcElement::gui_Input() function of the left or right polynomial of the expression/equation/inequality.
Implements mcElementHelpers. Definition at line 625 of file MathMng.cpp. References mcElementArray::data_DeleteAll(), data_GetLeftMem(), data_GetRightMem(), mcMathCore::Get(), mcPolynomial::gui_AddNewEmptyMonomial(), mcElement::gui_Input(), gui_isRelationalOp(), mcElementHelpers::gui_RecalcSize(), gui_SetCursorPos(), mcElement::gui_SetCursorPos(), io_GetInlinedExpr(), math_GetMathTypeFrom(), mcASSERT, mcCP_BEGIN, mcCP_END, mcGUILOG, mcIR_DELETE_NEXT, mcIR_DELETE_PREVIOUS, mcIR_DELETE_THIS, mcIR_OKAY, mcMATHMNG_LEFT, mcMATHMNG_RIGHT, mcMMT_EXPRESSION, mcMMT_NOT_SET, mdata_nDataType, mgui_nCursorPos, and mcMathCore::SyntaxError(). |
|
Inserts the given element at the right of the cursor position.
Implements mcElementHelpers. Definition at line 720 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::gui_Insert(), mcINSR_OKAY, mcMATHMNG_LEFT, mcMATHMNG_RIGHT, and mgui_nCursorPos. |
|
Returns a positive value if the given character marks the begin of this element; FALSE otherwise. The begin character cannot be dependent from any variable; it must be always the same. The character is given both as ASCII code and as virtual key code.
Implements mcElementHelpers. |
|
Returns TRUE if the given character marks the end of this element; this function is always called before calling ::gui_Input function. isEndChar can return values dependent from the cursor position. The character is given both as ASCII code and as virtual key code
Implements mcElementHelpers. |
|
Returns TRUE if the given keypress represent a valid relational operator; FALSE otherwise. To represent valid relational operators, the given mcKey must be marked as "special" keypress (see mcKey::SetAsSpecialKey) Definition at line 766 of file MathMng.cpp. References mcMMRO_EQUAL, mcMMRO_GREATER, mcMMRO_GREATER_OR_EQUAL, mcMMRO_LESS, mcMMRO_LESS_OR_EQUAL, and mcMMRO_NOT_EQUAL. Referenced by gui_Input(). |
|
This function is called to move the cursor which is inside the element, one 'step' left, right, up or down (when flag=mcMCF_LEFT/mcMCF_RIGHT/mcMCF_UP/mcMCF_DOWN). Elements which cannot move the cursor in the given direction, should call mcMathCore::Get()->SyntaxError() function. If the cursor must 'exit' the element (because its at the end, for example) the function must return mcMCR_SETFOCUS_PREVIOUS or mcMCR_SETFOCUS_NEXT. This function must always return the code mcMCR_SETFOCUS_* or mcMCR_OKAY. When this function is called, cursor is always inside the element.
Implements mcElementHelpers. Definition at line 424 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::gui_MoveCursor(), mcElement::gui_SetCursorPos(), mcCP_BEGIN, mcCP_END, mcMATHMNG_LEFT, mcMATHMNG_RIGHT, mcMCR_OKAY, mcMCR_SETFOCUS_ABOVE, mcMCR_SETFOCUS_BELOW, mcMCR_SETFOCUS_NEXT, mcMCR_SETFOCUS_PREVIOUS, mcMMT_EXPRESSION, mdata_nDataType, and mgui_nCursorPos. |
|
Moves the cursor inside this element in the closest available position to the given point. The function must use the given point to set its internal cursor-position variables (when this function is called, the given point is always inside the bounding rectangle of the element, but maybe the cursor is not).
Implements mcElementHelpers. Reimplemented in mcMathLineHelpers. Definition at line 463 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), gui_GetRectOfLeftMem(), gui_GetRectOfRightMem(), gui_GetSeparatorSize(), gui_GetXOfSeparator(), gui_GetYOfSeparator(), mcElement::gui_MoveCursorUsingPoint(), mcElement::gui_SetCursorPos(), mcCP_BEGIN, mcCP_END, mcGUILOG, mcMATHMNG_LEFT, mcMATHMNG_RIGHT, mcMCR_CANNOT_SETFOCUS, mcMMT_EXPRESSION, mdata_nDataType, and mgui_nCursorPos. Referenced by mcMathLineHelpers::gui_MoveCursorUsingPoint(). |
|
|
Definition at line 849 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::gui_GetSelection(), mcElementArray::gui_GetSelElemCount(), mcElement::math_SimpleDivideBy(), mcElement::math_SimpleMultiplyBy(), mcASSERT, mcMMT_EXPRESSION, and mdata_nDataType. Referenced by gui_ExecCmdOnSel(). |
|
This function is called when the bounding box of this element intersects with the selection rectangle created by the user with the mouse cursor. The standard implementation just selects this element. If you are implementing a container element, you must override this function and check contained elements' bounding boxes and then call the gui_OnSelect() function of the contained elements whose bounding boxes intersect the given selection rectangle. Reimplemented from mcElementHelpers. Reimplemented in mcMathLineHelpers. Definition at line 543 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElementHelpers::gui_DeSelect(), mcElement::gui_DeSelect(), gui_GetRectOfLeftMem(), gui_GetRectOfRightMem(), mcElementHelpers::gui_isSelected(), mcElement::gui_OnSelect(), mcElementHelpers::gui_Select(), mcMMT_EXPRESSION, and mdata_nDataType. Referenced by mcMathLineHelpers::gui_OnSelect(). |
|
Recalculates the size of the separator symbol (that is, the symbol drawn between the left & right member) and stores the result in the mgui_szSeparator variable.
Definition at line 302 of file MathMng.cpp. References mcElementHelpers::gui_GetSizeOf(), gui_SelectSeparatorStyle(), io_GetSeparatorSymbol(), mcMMT_EXPRESSION, mdata_nDataType, and mgui_szSeparator. Referenced by gui_DoRecalcSize(). |
|
Definition at line 296 of file MathMng.cpp. References mcStyle::GetSpecialTextSettings(), mcElementHelpers::gui_GetStyle(), and mcTextSettings::gui_Select(). Referenced by gui_Draw(), and gui_RecalcSeparatorSize(). |
|
Sets the cursor position inside the element using Cursor Position flags. When it's called to set the cursor at the end of the base, code==mcCP_END and data_hasProperty(mcEP_HASEXPONENT) == FALSE, when it's called to set the cursor at the beginning of the base, code==mcCP_BEGIN. The function doesnt need to care for the third Cursor Position flag: mcCP_INSIDE, actually this function will never be called with this code. Implements mcElementHelpers. Definition at line 579 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::gui_SetCursorPos(), mcASSERT, mcCP_BEGIN, mcCP_END, mcMATHMNG_LEFT, mcMATHMNG_RIGHT, mcMMT_EXPRESSION, mdata_nDataType, and mgui_nCursorPos. Referenced by gui_DeleteSelection(), and gui_Input(). |
|
Updates the exponent depth of the left & right members setting them to the same exponent depth of *this;.
Reimplemented from mcElementHelpers. Definition at line 785 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::gui_SetAtSameLevelOf(), and mcElementHelpers::gui_UpdateExpDepth(). |
|
Implements mcElementHelpers. Definition at line 1107 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::io_GetInlinedExpr(), io_GetSeparatorSymbol(), mcMMT_EXPRESSION, and mdata_nDataType. Referenced by gui_Input(), and math_FactoreOut(). |
|
Implements mcElementHelpers. Definition at line 1022 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::io_GetMathML(), io_GetSeparatorSymbol(), mcMMT_EQUATION, mcMMT_EXPRESSION, mcMMT_INEQUALITY_G, mcMMT_INEQUALITY_GE, mcMMT_INEQUALITY_L, mcMMT_INEQUALITY_LE, mcMMT_INEQUALITY_NE, mcMMT_NOT_SET, and mdata_nDataType. |
|
Returns the string associated with the current datatype.
Definition at line 1078 of file MathMng.cpp. References math_GetRelationalOpFor(), mcMMT_EXPRESSION, mcMMT_INEQUALITY_GE, mcMMT_INEQUALITY_LE, mcMMT_INEQUALITY_NE, and mdata_nDataType. Referenced by gui_Draw(), gui_RecalcSeparatorSize(), io_GetInlinedExpr(), io_GetMathML(), and io_ImportInlinedExpr(). |
|
Imports the given inlined expression.
Implements mcElementHelpers. Definition at line 1142 of file MathMng.cpp. References mcElementArray::data_DeleteAll(), data_GetLeftMem(), data_GetRightMem(), io_GetSeparatorSymbol(), mcElement::io_ImportInlinedExpr(), mcElementArray::math_WrapNumber(), mcASSERT, mcMMT_EQUATION, mcMMT_EXPRESSION, mcMMT_INEQUALITY_G, mcMMT_INEQUALITY_GE, mcMMT_INEQUALITY_L, mcMMT_INEQUALITY_LE, mcMMT_INEQUALITY_NE, and mdata_nDataType. |
|
Imports some presentation MathML.
Implements mcElementHelpers. Definition at line 1118 of file MathMng.cpp. References data_GetLeftMem(), and mcElement::io_ImportPresentationMathML(). |
|
Returns a positive value if the given inlined expression marks the begin of this element; FALSE otherwise. The begin tag cannot be dependent from any variable; it must be always the same. Implements mcElementHelpers. |
|
Returns a positive value if the given MathML content tag marks the begin of this element; FALSE otherwise. The begin tag cannot be dependent from any variable; it must be always the same.
Implements mcElementHelpers. |
|
Sums or subtracts this element with the given A unique function for add/subtract operations is used because the algorithms used to handle this two operations are usually almost identic and thus this avoids a lot of repetitions. If the two elements cannot be summed, then an ASSERT should fail since before using this function, the caller should always use the math_CanBeAddedWith() function.
The function returns one of mcBasicOpRes values, eventually using the Implements mcElementHelpers. Definition at line 1567 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::math_Add(), mcElement::math_SimpleAdd(), mcMMT_EXPRESSION, and mdata_nDataType. |
|
Returns TRUE if this element can be added with the given element. If the function returns TRUE, then the math_Add() function should return one of mcBOR_REMOVE_OPERAND, mcBOR_REPLACE_BOTH or mcBOR_REPLACE_OPERAND. Implements mcElementHelpers. |
|
Works like #math_CanBemath_AddeWith(), just for divisions.
Implements mcElementHelpers. |
|
Works like #math_CanBemath_AddeWith(), just for multiplication.
Implements mcElementHelpers. |
|
Compares *this element with the given one and then compare the children of *this and the children of the given element, too. If they are the same, then the function returns TRUE; FALSE otherwise. This function is different from #math_hasSameContentOf() because it doesn't work on MaxSimply()ed copies. This function tipically uses the math_CompareThisOnly() function. Implements mcElementHelpers. Definition at line 1232 of file MathMng.cpp. References mcMathMng::data_GetLeftMem(), data_GetLeftMem(), mcMathMng::data_GetRightMem(), data_GetRightMem(), and math_CompareThisOnly(). |
|
Compares this element and the given one and then stops, unlike math_Compare() that compares children too.
Reimplemented from mcElementHelpers. Definition at line 1303 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcElement::math_Compare(). Referenced by math_Compare(). |
|
Returns TRUE if this element contains unregistered symbols.
Reimplemented from mcElementHelpers. Definition at line 1318 of file MathMng.cpp. References data_GetLeftMem(), and data_GetRightMem(). |
|
|
|
Non-const version of the main math_Find.
Definition at line 1718 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcElement::math_ContainsSymbol(). |
|
Definition at line 1602 of file MathMng.cpp. References math_DivideBy(), and WRAP_MONOMIAL. |
|
Divides two mcElements of the same type and stores the result in this object.
Implements mcElementHelpers. Definition at line 1554 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcElement::math_DivideBy(). Referenced by math_DivideBy(). |
|
Evaluates the numeric value of this element and then returns it. The evaluation can proceed *only* if this element does _not_ contain any parameter or unknown; in case it contains one of these, then the returned value is *mcRealValue::pNAN. Implements mcElementHelpers. Definition at line 1612 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::math_Evaluate(), mcMMT_EXPRESSION, and mdata_nDataType. |
|
Definition at line 1354 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElementArray::math_Expand(), mcMMT_EXPRESSION, and mdata_nDataType. |
|
Expands this element one "step". expanding means that the aim of this function is exactly the opposite of math_Simplify: instead making the function body shorter, it tries to make it as long as possible: (x - 2)^3 . first call to math_Expand x^3 - 6x^2 + 12x -8 Implements mcElementHelpers. Definition at line 407 of file MathMng.h. Referenced by gui_ExecCmdOnSel(). |
|
Definition at line 1739 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), io_GetInlinedExpr(), mcPolynomial::math_FactoreOut(), and mcMATHLOG. |
|
Definition at line 1756 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcPolynomial::math_FactoreOutAll(). |
|
Definition at line 1748 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcPolynomial::math_FactoreOutFreeOf(). |
|
Deep searches the n-th occurrence of an element with the same contents (checked using mcElement::math_hasSameContentOf) of the given element.
Definition at line 1646 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::math_Find(), and mcElement::math_GetCountOf(). |
|
Returns the number of elements with the same contents of the given one contained into this one.
Reimplemented from mcElementHelpers. Definition at line 1663 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcElement::math_GetCountOf(). |
|
Implements mcElementHelpers. Definition at line 478 of file MathMng.h. References mcEmptyMonomial. |
|
Returns the LCM between *this and the given element.
Implements mcElementHelpers. Definition at line 477 of file MathMng.h. References mcEmptyMonomial. |
|
Returns the 'lenght' of this element without taking in count its children. The wxT('lenght') of this element is the 'complexity' represented by the data placed in the mcElementData of this element. This is a key function for the simplify and expand routines of MathCore because through the use of this value, the system is able to decide if an operation determines a simplification or a complication. The simple example below shows how this can be done:
mcPolynomial mypol(NULL); mypol.Init("2^16"); mcRealValue n1 = mypol.math_GetTotalLenght(); */ (The math_GetTotalLenght() function works using this function !) The default implementation returns zero. This is a valid behaviour only for container elements, that is, for those elements where only the children carry information. For simple elements and for those containers which stand for an operation (like mcFraction which implies a division), the default implementation must be overridden. A lenght/complexity of 1 means that this element would require only a single byte of memory if stored in an ASCII string. An element long 2 units (like mcBracket) would require 2 bytes (one for the left parenthesis and one for the right one)... Implements mcElementHelpers. Definition at line 1625 of file MathMng.cpp. References mcMMT_EQUATION, mcMMT_EXPRESSION, and mdata_nDataType. Referenced by math_GetTotalLenght(). |
|
Returns the type of mathematical data which is currently contained in this class.
Definition at line 455 of file MathMng.h. References mdata_nDataType. |
|
Returns extended informations about the currently contained math data of this class.
Implements mcElementHelpers. Definition at line 1398 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcMathType::math_Add(), mcElement::math_GetMathType(), mcMMT_EQUATION, mcMMT_EXPRESSION, mcMMT_INEQUALITY_G, mcMMT_INEQUALITY_GE, mcMMT_INEQUALITY_L, mcMMT_INEQUALITY_LE, mcMMT_INEQUALITY_NE, mcMMT_NOT_SET, mcMTL1_NOT_RECOGNIZED, mcMTL2_NOT_RECOGNIZED, mcMTL3_NOT_RECOGNIZED, and mdata_nDataType. |
|
Returns the mcMathMngType associated with the given relational operator or mcMMT_NOT_SET if the given type id invalid.
Definition at line 1269 of file MathMng.cpp. References mcMMRO_EQUAL, mcMMRO_GREATER, mcMMRO_GREATER_OR_EQUAL, mcMMRO_LESS, mcMMRO_LESS_OR_EQUAL, mcMMRO_NOT_EQUAL, mcMMT_EQUATION, mcMMT_INEQUALITY_G, mcMMT_INEQUALITY_GE, mcMMT_INEQUALITY_L, mcMMT_INEQUALITY_LE, mcMMT_INEQUALITY_NE, and mcMMT_NOT_SET. Referenced by math_GetMathTypeFrom(). |
|
Returns the mcMathMngType which is associated with the given keypress or mcMMT_NOT_SET if the given keypress is not a valid relational operator. To represent valid relational operators, the given mcKey must be marked as "special" keypress (see mcKey::SetAsSpecialKey) Definition at line 1289 of file MathMng.cpp. References math_GetMathTypeFor(), and mcMMT_NOT_SET. Referenced by gui_Input(). |
|
Definition at line 1724 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcValue::isValid(), mcPolynomial::math_GetMaxDegreeFor(), and mcMAX. |
|
Returns the order position for this element.
Implements mcElementHelpers. |
|
Returns the mcMathMngRelationalOp associated with the given mcMathMngType; mcMMRO_EQUAL if type is mcMMT_NOT_SET.
Definition at line 1245 of file MathMng.cpp. References mcMMRO_EQUAL, mcMMRO_GREATER, mcMMRO_GREATER_OR_EQUAL, mcMMRO_LESS, mcMMRO_LESS_OR_EQUAL, mcMMRO_NOT_EQUAL, mcMMT_EQUATION, mcMMT_EXPRESSION, mcMMT_INEQUALITY_G, mcMMT_INEQUALITY_GE, mcMMT_INEQUALITY_L, mcMMT_INEQUALITY_LE, mcMMT_INEQUALITY_NE, and mcMMT_NOT_SET. Referenced by io_GetSeparatorSymbol(). |
|
Definition at line 1679 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcElement::math_GetSymbolList(). |
|
Returns the lenght of this element, taking in count also the children. Uses the math_GetLenght() function to do the job. Reimplemented from mcElementHelpers. Definition at line 1636 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), math_GetLenght(), mcElement::math_GetTotalLenght(), mcMMT_EXPRESSION, and mdata_nDataType. |
|
Returns TRUE if this element contains mcSymbol registered as constants and/or mcNumbers only.
Reimplemented from mcElementHelpers. Definition at line 1392 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcElement::math_isConstant(). |
|
Definition at line 1762 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcPolynomial::math_isFactorized(). |
|
Definition at line 1384 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::math_isMaxSimplified(), and mcEXPSIM_NOFLAGS. |
|
Definition at line 1425 of file MathMng.cpp. References data_GetSourceDest(), mcPolynomialHelpers::math_Get(), mcPolynomialHelpers::math_GetSign(), mcElementArray::math_isWrappingOnly(), mcElementArrayHelpers::math_Remove(), mcElementArrayHelpers::math_SimpleAdd(), and mcASSERT. Referenced by math_MoveAll(), math_MoveFreeFrom(), math_MoveNonSymbol(), math_MoveSymbol(), and math_MoveSymbols(). |
|
Definition at line 1527 of file MathMng.cpp. References data_GetSourceDest(), mcPolynomialHelpers::math_GetCount(), and math_Move(). |
|
Definition at line 1521 of file MathMng.cpp. References math_MoveSymbols(). |
|
Definition at line 1470 of file MathMng.cpp. References data_GetSourceDest(), mcElement::math_ContainsSymbol(), mcPolynomialHelpers::math_Get(), mcPolynomialHelpers::math_GetCount(), and math_Move(). |
|
Definition at line 1502 of file MathMng.cpp. References data_GetSourceDest(), mcElement::math_ContainsSymbols(), mcPolynomialHelpers::math_Get(), mcPolynomialHelpers::math_GetCount(), and math_Move(). |
|
Definition at line 1524 of file MathMng.cpp. References math_MoveSymbols(). |
|
Definition at line 1448 of file MathMng.cpp. References data_GetSourceDest(), mcElement::math_ContainsSymbol(), mcPolynomialHelpers::math_Get(), mcPolynomialHelpers::math_GetCount(), and math_Move(). |
|
Moves all the monomial containing one or more symbol belonging to the given mcSymbolArray to the left (if
Definition at line 1486 of file MathMng.cpp. References data_GetSourceDest(), mcElement::math_ContainsOneOf(), mcPolynomialHelpers::math_Get(), mcPolynomialHelpers::math_GetCount(), and math_Move(). Referenced by math_MoveConstants(), math_MoveParameters(), and math_MoveUnknowns(). |
|
Definition at line 1518 of file MathMng.cpp. References math_MoveSymbols(). |
|
|
|
Definition at line 1599 of file MathMng.cpp. References math_MultiplyBy(), and WRAP_MONOMIAL. |
|
Multiplies two mcElements of the same type and stores the result in this object.
Implements mcElementHelpers. Definition at line 1544 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::math_MultiplyBy(), mcElement::math_SimpleMultiplyBy(), mcMMT_EXPRESSION, and mdata_nDataType. Referenced by math_MultiplyBy(). |
|
|
|
|
|
Raises *this element to the given polynomial. Returns mcBOR_INVALID if the operation could not be performed (this is typically because the base is negative), or mcBOR_REMOVE_OPERAND if the operation was okay.
Implements mcElementHelpers. Definition at line 1687 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::math_SimpleRaiseTo(), and mcBOR_REMOVE_OPERAND. |
|
|
|
Reimplemented from mcElementHelpers. Definition at line 1669 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), and mcElement::math_Replace(). |
|
Sets the type of math data stored in this object. This function obviously changes the separator symbol for the left & right members (or disable it together with the right member if mcMMT_EXPRESSION is set). Definition at line 462 of file MathMng.h. References mdata_nDataType. |
|
Definition at line 1327 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElementArray::math_Simplify(), mcESR_DONE, mcESR_NOTFINISHED, mcLOG, mcMMT_EXPRESSION, mcTXT, mdata_eLMember, mdata_eRMember, and mdata_nDataType. |
|
Simplifies this element one "step"; that is, after one call to this function the element must be slightly changed. For example, this monomial requires three calls to math_Simplify to be completely reduced in a basic form: 12ax*3 + 4a/(x^-1) . first call to math_Simplify 36ax + 4a/(1/x) . second call 36ax + 4ax . third call 40ax
Implements mcElementHelpers. Definition at line 405 of file MathMng.h. Referenced by gui_ExecCmdOnSel(). |
|
math_s two mcElements of the same type and stores the result in this object.
Reimplemented from mcElementHelpers. Definition at line 1577 of file MathMng.cpp. References data_GetLeftMem(), data_GetRightMem(), mcElement::math_SimpleSubtract(), mcElement::math_Subtract(), mcMMT_EXPRESSION, and mdata_nDataType. |
|
|
|
The first member: the element at the left of the '='.
Definition at line 59 of file MathMng.h. Referenced by data_DeepCopy(), data_GetConstSourceDest(), data_GetLeftMem(), data_SetFilter(), gui_GetConstSelectionSourceDest(), gui_GetFocusMem(), and math_Simplify(). |
|
The second member: the element at the right of the '='.
Definition at line 62 of file MathMng.h. Referenced by data_DeepCopy(), data_GetConstSourceDest(), data_GetRightMem(), data_SetFilter(), gui_GetConstSelectionSourceDest(), gui_GetFocusMem(), and math_Simplify(). |
|
The type of data of the array: see the mcMATHMNG_* defines.
Definition at line 65 of file MathMng.h. Referenced by data_DeepCopy(), data_Init(), data_SetMember(), gui_DoRecalcSize(), gui_Draw(), gui_GetPossibleOperations(), gui_GetRelCursorPos(), gui_Input(), gui_MoveCursor(), gui_MoveCursorUsingPoint(), gui_MultiplyBySel(), gui_OnSelect(), gui_RecalcSeparatorSize(), gui_SetCursorPos(), io_GetInlinedExpr(), io_GetMathML(), io_GetSeparatorSymbol(), io_ImportInlinedExpr(), math_Add(), math_Evaluate(), math_Expand(), math_GetLenght(), math_GetMathMngType(), math_GetMathType(), math_GetTotalLenght(), math_MultiplyBy(), math_SetMathType(), math_Simplify(), and math_Subtract(). |
|
The position of the cursor; use a mcMATHMNG_LEFT to indicate that the cursor is placed on the left member (or it's inside the expression); use mcMATHMNG_RIGHT to indicate that the cursor is placed on the right member of the equation/inequality.
Definition at line 77 of file MathMng.h. Referenced by data_DeepCopy(), gui_GetCursorPos(), gui_GetFocusMem(), gui_GetRelCursorPos(), gui_Init(), gui_Input(), gui_Insert(), gui_MoveCursor(), gui_MoveCursorUsingPoint(), and gui_SetCursorPos(). |
|
The size of the separator symbol.
Definition at line 83 of file MathMng.h. Referenced by gui_GetSeparatorSize(), and gui_RecalcSeparatorSize(). |
|
Initial value: { mcMathMngCmd(mcMMC_MOVE_SEL, wxT("Move the selection")), mcMathMngCmd(mcMMC_MULT_SEL, wxT("Multiply everything by this")), mcMathMngCmd(mcMMC_DIV_SEL, wxT("Divide everything by this")), mcMathMngCmd(mcMMC_ADDSUB_SEL, wxT("Add this")), mcMathMngCmd(mcMMC_SIMPLIFY, wxT("Simplify selection")), mcMathMngCmd(mcMMC_EXPAND, wxT("Expand selection")) } Definition at line 61 of file MathMng.cpp. |
|
The number of pixels between the left member and the separator symbol and between the separator symbol and the right member.
Definition at line 56 of file MathMng.cpp. Referenced by gui_GetXOfRightMem(), and gui_GetXOfSeparator(). |
|
The space to leave at the left of the left member and at the right of the right member.
Definition at line 55 of file MathMng.cpp. Referenced by gui_DoRecalcSize(), and gui_GetXOfLeftMem(). |
|
A bigger style.
Definition at line 59 of file MathMng.cpp. Referenced by gui_DeleteStyles(), and gui_InitStyles(). |
|
The default style.
Definition at line 57 of file MathMng.cpp. Referenced by gui_DeleteStyles(), gui_Init(), and gui_InitStyles(). |
|
A smaller style.
Definition at line 58 of file MathMng.cpp. Referenced by gui_DeleteStyles(), and gui_InitStyles(). |
[ Top ] |