Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

mcMathMngHelpers Class Reference

#include <MathMng.h>

Inheritance diagram for mcMathMngHelpers:

Inheritance graph
[legend]
Collaboration diagram for mcMathMngHelpers:

Collaboration graph
[legend]
List of all members.

Detailed Description

Manages all the operations on the mathematical data.

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
mcPolynomialgui_GetFocusMem ()
const mcPolynomialgui_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 mcElementdata_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 mcPolynomialdata_GetLeftMem () const
const mcPolynomialdata_GetRightMem () const
mcPolynomialdata_GetLeftMem ()
mcPolynomialdata_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 mcElementgui_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 mcStyleArraysgui_pNormalStyles = NULL
 The default style.
static mcStyleArraysgui_pSmallStyles = NULL
 A smaller style.
static mcStyleArraysgui_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)


Constructor & Destructor Documentation

mcMathMngHelpers::mcMathMngHelpers  )  [inline]
 

Standard constructor.

Definition at line 115 of file MathMng.h.

References data_Init().

virtual mcMathMngHelpers::~mcMathMngHelpers  )  [inline, virtual]
 

Definition at line 116 of file MathMng.h.


Member Function Documentation

void mcMathMngHelpers::data_DeepCopy const mcElementHelpers mm  )  [virtual]
 

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().

int mcMathMngHelpers::data_GetChildrenCount  )  const [inline, virtual]
 

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().

const mcElement& mcMathMngHelpers::data_GetConstChild int  n  )  const [inline, virtual]
 

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));
     }

Parameters:
n The n-th child of this object.

Reimplemented from mcElementHelpers.

Definition at line 163 of file MathMng.h.

References data_GetLeftMem(), data_GetRightMem(), mcEmptyElement, and mcRETURN_ELEMENT_CHILD.

void mcMathMngHelpers::data_GetConstSourceDest const mcPolynomialHelpers **  s,
const mcPolynomialHelpers **  d,
bool  toleft
const [protected]
 

Definition at line 144 of file MathMng.cpp.

References mdata_eLMember, and mdata_eRMember.

Referenced by data_GetSourceDest().

mcPolynomial& mcMathMngHelpers::data_GetLeftMem  )  [inline]
 

Definition at line 189 of file MathMng.h.

References mdata_eLMember.

const mcPolynomial& mcMathMngHelpers::data_GetLeftMem  )  const [inline]
 

Definition at line 187 of file MathMng.h.

References mdata_eLMember.

Referenced by data_GetConstChild(), data_SetMember(), gui_DeleteSelection(), gui_DoRecalcSize(), gui_Draw(), gui_GetActiveElem(), gui_GetConstSelectionSourceDest(), gui_GetCursorPos(), gui_GetRectOfLeftMem(), gui_GetRelCursorPos(), gui_GetSelection(), gui_GetXOfRightMem(), gui_GetXOfSeparator(), gui_GetYAnchor(), gui_Input(), gui_Insert(), gui_MoveCursor(), gui_MoveCursorUsingPoint(), gui_MultiplyBySel(), gui_OnSelect(), gui_SetCursorPos(), gui_UpdateExpDepth(), io_GetInlinedExpr(), io_GetMathML(), io_ImportInlinedExpr(), io_ImportPresentationMathML(), math_Add(), math_Compare(), math_CompareThisOnly(), math_ContainsInvalidSymbols(), math_ContainsSymbol(), math_DivideBy(), math_Evaluate(), math_Expand(), math_FactoreOut(), math_FactoreOutAll(), math_FactoreOutFreeOf(), math_Find(), math_GetCountOf(), math_GetMathType(), math_GetMaxDegreeFor(), math_GetSymbolList(), math_GetTotalLenght(), math_isConstant(), math_isFactorized(), math_isMaxSimplified(), math_MultiplyBy(), math_RaiseTo(), math_Replace(), math_Simplify(), and math_Subtract().

mcPolynomial& mcMathMngHelpers::data_GetRightMem  )  [inline]
 

Definition at line 190 of file MathMng.h.

References mdata_eRMember.

const mcPolynomial& mcMathMngHelpers::data_GetRightMem  )  const [inline]
 

Definition at line 188 of file MathMng.h.

References mdata_eRMember.

Referenced by data_GetConstChild(), data_SetMember(), gui_DeleteSelection(), gui_DoRecalcSize(), gui_Draw(), gui_GetActiveElem(), gui_GetCursorPos(), gui_GetRectOfRightMem(), gui_GetRelCursorPos(), gui_GetSelection(), gui_GetYAnchor(), gui_Input(), gui_Insert(), gui_MoveCursor(), gui_MoveCursorUsingPoint(), gui_MultiplyBySel(), gui_OnSelect(), gui_SetCursorPos(), gui_UpdateExpDepth(), io_GetInlinedExpr(), io_GetMathML(), io_ImportInlinedExpr(), math_Add(), math_Compare(), math_CompareThisOnly(), math_ContainsInvalidSymbols(), math_ContainsSymbol(), math_DivideBy(), math_Evaluate(), math_Expand(), math_FactoreOut(), math_FactoreOutAll(), math_FactoreOutFreeOf(), math_Find(), math_GetCountOf(), math_GetMathType(), math_GetMaxDegreeFor(), math_GetSymbolList(), math_GetTotalLenght(), math_isConstant(), math_isFactorized(), math_isMaxSimplified(), math_MultiplyBy(), math_RaiseTo(), math_Replace(), math_Simplify(), and math_Subtract().

void mcMathMngHelpers::data_GetSourceDest mcPolynomialHelpers **  s,
mcPolynomialHelpers **  d,
bool  toleft
[inline, protected]
 

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().

void mcMathMngHelpers::data_Init  )  [inline, protected]
 

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().

void mcMathMngHelpers::data_SetFilter const mcFilter p  )  [virtual]
 

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.

void mcMathMngHelpers::data_SetMember bool  left,
const mcPolynomial ,
mcMathMngType  newtype = mcMMT_EQUATION
[virtual]
 

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.

void mcMathMngHelpers::gui_AddSubSel  )  [virtual]
 

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().

void mcMathMngHelpers::gui_DeleteSelection  )  [virtual]
 

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.

void mcMathMngHelpers::gui_DeleteStyles  )  [static]
 

Frees the memory of the styles owned by this class.

Note:
This function won't delete the pNormalStyles pointer because it's just a copy of the mcElementHelpers::sgui_pDefaultStyles pointer which is cleaned up by mcElementGUI...

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().

void mcMathMngHelpers::gui_DoRecalcSize  )  [virtual]
 

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.

Note:
It's very important, to maintain the size member updated, to call, in the other mcElement functions, gui_RecalcSize() every time size could have changed (for example, in gui_Input(), mcElementData setters...).

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().

int mcMathMngHelpers::gui_Draw wxDC &  h,
int  x,
int  y,
long  flags,
const wxPoint &  p
const [virtual]
 

Draws the mathematical data on the given DC at the given point.

If the data has been recognized as an equation or as a inequality, this function will also draw the wxT('='), wxT('<') or the '>' symbols. All the parameters it needs, are the same required by mcElement::gui_Draw function.

Implements mcElementHelpers.

Definition at line 332 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), mcElement::gui_Draw(), mcPolynomial::gui_ExDraw(), gui_GetRectOfLeftMem(), gui_GetXOfLeftMem(), gui_GetXOfRightMem(), gui_GetXOfSeparator(), gui_GetYAnchor(), gui_GetYOfLeftMem(), gui_GetYOfRightMem(), gui_GetYOfSeparator(), gui_SelectSeparatorStyle(), io_GetSeparatorSymbol(), mcASSERT, mcDRW_ALLOW_TOTAL_SELECTION, mcDRW_NONACTIVE, mcDRW_USEPOINT, mcGUILOG, mcMMT_EQUATION, mcMMT_EXPRESSION, mcMMT_INEQUALITY_G, mcMMT_INEQUALITY_GE, mcMMT_INEQUALITY_L, mcMMT_INEQUALITY_LE, mcMMT_INEQUALITY_NE, mcTXTTHIS, and mdata_nDataType.

Referenced by mcMathLineHelpers::gui_DrawBmp(), and mcMathLineHelpers::gui_UpdateBmp().

void mcMathMngHelpers::gui_ExecCmdOnSel mcMathMngCmdID   )  [virtual]
 

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.

mcElement & mcMathMngHelpers::gui_GetActiveElem int  x,
int  y,
const wxPoint &  pt
[virtual]
 

Returns the currently active element: that is, the element currently containing the given point.

Parameters:
x The leftmost position of the math data.
y The topmost position of the math data.
pt The point which must be used to find the element (obviously the origin of the x;y coordinates must match the origin of this 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().

void mcMathMngHelpers::gui_GetConstSelectionSourceDest const mcPolynomialHelpers **  s,
const mcPolynomialHelpers **  d
const [protected]
 

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().

void mcMathMngHelpers::gui_GetCursorPos mcCursorPos  )  const [virtual]
 

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.

const mcPolynomial& mcMathMngHelpers::gui_GetFocusMem  )  const [inline]
 

Definition at line 267 of file MathMng.h.

References mcMATHMNG_LEFT, mdata_eLMember, mdata_eRMember, and mgui_nCursorPos.

mcPolynomial& mcMathMngHelpers::gui_GetFocusMem  )  [inline]
 

Definition at line 264 of file MathMng.h.

References mcMATHMNG_LEFT, mdata_eLMember, mdata_eRMember, and mgui_nCursorPos.

void mcMathMngHelpers::gui_GetPossibleOperations mcMathMngCmdID  )  const [virtual]
 

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.

wxArrayString mcMathMngHelpers::gui_GetPossibleOpOnSel mcMathMngCmd  )  const [virtual]
 

Definition at line 913 of file MathMng.cpp.

References mcASSERT.

wxRect mcMathMngHelpers::gui_GetRectOfLeftMem  )  const
 

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().

wxRect mcMathMngHelpers::gui_GetRectOfRightMem  )  const
 

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().

int mcMathMngHelpers::gui_GetRelCursorPos wxDC &  dc,
wxPoint *  pt
const [virtual]
 

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.

Parameters:
dc The device context where the element was drawn last time.
pt The coordinates, relative to the element (assume the element placed at 0;0), indicating the top-left point of the cursor.

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().

mcElement mcMathMngHelpers::gui_GetSelection  )  const [virtual]
 

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().

void mcMathMngHelpers::gui_GetSelectionSourceDest mcPolynomialHelpers **  s,
mcPolynomialHelpers **  d
[inline, protected]
 

Definition at line 205 of file MathMng.h.

References gui_GetConstSelectionSourceDest().

Referenced by gui_AddSubSel(), and gui_MoveSel().

wxSize mcMathMngHelpers::gui_GetSeparatorSize  )  const [inline]
 

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().

int mcMathMngHelpers::gui_GetXOfLeftMem  )  const
 

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().

int mcMathMngHelpers::gui_GetXOfRightMem  )  const
 

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().

int mcMathMngHelpers::gui_GetXOfSeparator int  centerLine = -1  )  const
 

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().

int mcMathMngHelpers::gui_GetYAnchor  )  const [virtual]
 

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().

int mcMathMngHelpers::gui_GetYOfLeftMem  )  const
 

Definition at line 203 of file MathMng.cpp.

Referenced by gui_DoRecalcSize(), gui_Draw(), gui_GetRectOfLeftMem(), and gui_GetRelCursorPos().

int mcMathMngHelpers::gui_GetYOfRightMem  )  const
 

Definition at line 215 of file MathMng.cpp.

Referenced by gui_DoRecalcSize(), gui_Draw(), gui_GetActiveElem(), gui_GetRectOfRightMem(), and gui_GetRelCursorPos().

int mcMathMngHelpers::gui_GetYOfSeparator int  centerLine = -1  )  const
 

Definition at line 209 of file MathMng.cpp.

References gui_GetSeparatorSize(), and gui_GetYAnchor().

Referenced by gui_Draw(), and gui_MoveCursorUsingPoint().

void mcMathMngHelpers::gui_Init  )  [inline, protected, virtual]
 

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().

void mcMathMngHelpers::gui_InitStyles  )  [static]
 

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);
then you must call the #DeleteStyles() function, too, when the styles are not required any more.

Definition at line 248 of file MathMng.cpp.

References gui_DeleteStyles(), mcStyleArray::ScaleSize(), sgui_pBigStyles, sgui_pNormalStyles, and sgui_pSmallStyles.

Referenced by mcMathCore::SetupGUI().

mcInputRes mcMathMngHelpers::gui_Input const mcKey key,
mcElement
[virtual]
 

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().

mcInsertRes mcMathMngHelpers::gui_Insert const mcElement ,
mcElement
[virtual]
 

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.

bool mcMathMngHelpers::gui_isBeginKey const mcKey key  )  const [inline, virtual]
 

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.

Parameters:
ev The wxWidgets key event for the keypress. It contains the untraslated code for the input key; see wxWidgets KeyCodes for more info.
Returns:
A value identifying the subclass of this element that matched the given character; if the element has no subclasses it should return a null value when the given character is the begin character of the element. See MathCore::NewElem for more info.

Implements mcElementHelpers.

Definition at line 280 of file MathMng.h.

bool mcMathMngHelpers::gui_isEndKey const mcKey key  )  const [inline, virtual]
 

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

Parameters:
ev The wxWidgets key event for the keypress. It contains the untraslated code for the input key; see wxWidgets KeyCodes for more info.

Implements mcElementHelpers.

Definition at line 282 of file MathMng.h.

bool mcMathMngHelpers::gui_isRelationalOp const mcKey key  )  [static, protected]
 

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().

mcMoveCursorRes mcMathMngHelpers::gui_MoveCursor mcMoveCursorFlag  flag,
long  modifiers
[virtual]
 

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.

Parameters:
flag One of the Move Cursor flags (see MathTypes.h)

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.

int mcMathMngHelpers::gui_MoveCursorUsingPoint wxDC &  ,
const wxPoint & 
[virtual]
 

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).

Parameters:
dc The device context where the element was drawn last time
p a valid pointer to a wxPoint (containing coord. relative to the top-left point of the element) which must be used to find the selected subelement; otherwise this is a NULL value

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().

void mcMathMngHelpers::gui_MoveSel  )  [virtual]
 

Definition at line 801 of file MathMng.cpp.

References mcElementArrayHelpers::gui_DeleteSelection(), mcElementArrayHelpers::gui_GetSelection(), gui_GetSelectionSourceDest(), mcElement::gui_SelectAll(), mcPolynomialHelpers::math_Add(), mcPolynomialHelpers::math_ChangeAllSigns(), mcPolynomialHelpers::math_GetSel(), and mcPolynomialHelpers::math_GetSelCount().

Referenced by gui_ExecCmdOnSel().

void mcMathMngHelpers::gui_MultiplyBySel bool  bDivide = FALSE  )  [virtual]
 

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().

void mcMathMngHelpers::gui_OnSelect wxDC &  hDC,
wxRect &  rc
[virtual]
 

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().

void mcMathMngHelpers::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.

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().

void mcMathMngHelpers::gui_SelectSeparatorStyle wxDC &   )  const
 

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().

void mcMathMngHelpers::gui_SetCursorPos const mcCursorPos code  )  [virtual]
 

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().

void mcMathMngHelpers::gui_UpdateExpDepth  )  [virtual]
 

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().

wxString mcMathMngHelpers::io_GetInlinedExpr  )  const [virtual]
 

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().

wxXml2Node mcMathMngHelpers::io_GetMathML bool  bGetPresentation  )  const [virtual]
 

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.

wxString mcMathMngHelpers::io_GetSeparatorSymbol bool  bUseSpecialChars = TRUE  )  const
 

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().

bool mcMathMngHelpers::io_ImportInlinedExpr const wxString &  str,
int *  count,
wxString &  perr
[virtual]
 

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.

bool mcMathMngHelpers::io_ImportPresentationMathML wxXml2Node  tag,
wxString &  err
[virtual]
 

Imports some presentation MathML.

Implements mcElementHelpers.

Definition at line 1118 of file MathMng.cpp.

References data_GetLeftMem(), and mcElement::io_ImportPresentationMathML().

bool mcMathMngHelpers::io_isBeginChar const wxString &  str  )  const [inline, virtual]
 

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.

Definition at line 511 of file MathMng.h.

bool mcMathMngHelpers::io_isBeginTag const wxXml2Node &  tag  )  const [inline, virtual]
 

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.

Parameters:
tag The string containing the TAG to test.
Returns:
A value identifying the subclass of this element that matched the given character; if the element has no subclasses it should return a null value when the given character is the begin character of the element. See MathCore::NewElem for more info

Implements mcElementHelpers.

Definition at line 510 of file MathMng.h.

mcBasicOpRes mcMathMngHelpers::math_Add const mcElement ,
mcElement ,
bool  add
[virtual]
 

Sums or subtracts this element with the given e element.

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 pp pointer to store the replacement element which will be used by the caller in case this function returns mcBOR_REPLACE_OPERAND or mcBOR_REPLACE_BOTH.

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.

bool mcMathMngHelpers::math_CanBeAddedWith const mcElement p  )  const [inline, virtual]
 

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.

Definition at line 473 of file MathMng.h.

bool mcMathMngHelpers::math_CanBeDivBy const mcElement p  )  const [inline, virtual]
 

Works like #math_CanBemath_AddeWith(), just for divisions.

Implements mcElementHelpers.

Definition at line 475 of file MathMng.h.

bool mcMathMngHelpers::math_CanBeMultWith const mcElement p  )  const [inline, virtual]
 

Works like #math_CanBemath_AddeWith(), just for multiplication.

Implements mcElementHelpers.

Definition at line 474 of file MathMng.h.

bool mcMathMngHelpers::math_Compare const mcElement p,
long  flags
const [virtual]
 

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().

bool mcMathMngHelpers::math_CompareThisOnly const mcElement ,
long  flags
const [virtual]
 

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().

bool mcMathMngHelpers::math_ContainsInvalidSymbols  )  const [virtual]
 

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().

bool mcMathMngHelpers::math_ContainsNumber const mcRealValue sym  )  const
 

bool mcMathMngHelpers::math_ContainsSymbol const mcSymbolProperties sym  )  const
 

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().

void mcMathMngHelpers::math_DivideBy const mcMonomial  ) 
 

Definition at line 1602 of file MathMng.cpp.

References math_DivideBy(), and WRAP_MONOMIAL.

mcBasicOpRes mcMathMngHelpers::math_DivideBy const mcElement e,
mcElement pp
[virtual]
 

Divides two mcElements of the same type and stores the result in this object.

Parameters:
p A pointer to a mcElement of the same type of this mcElement, which will be used to divide this mcElement.

Implements mcElementHelpers.

Definition at line 1554 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), and mcElement::math_DivideBy().

Referenced by math_DivideBy().

mcRealValue mcMathMngHelpers::math_Evaluate  )  const [virtual]
 

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.

mcExpSimRes mcMathMngHelpers::math_Expand long  lflags,
long  rflags
 

Definition at line 1354 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), mcElementArray::math_Expand(), mcMMT_EXPRESSION, and mdata_nDataType.

mcExpSimRes mcMathMngHelpers::math_Expand long  flags,
mcElement
[inline, virtual]
 

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().

void mcMathMngHelpers::math_FactoreOut const mcSymbolProperties ,
const mcPolynomial pol,
bool  bForceUseless
 

Definition at line 1739 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), io_GetInlinedExpr(), mcPolynomial::math_FactoreOut(), and mcMATHLOG.

void mcMathMngHelpers::math_FactoreOutAll bool  bForceUseless  ) 
 

Definition at line 1756 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), and mcPolynomial::math_FactoreOutAll().

void mcMathMngHelpers::math_FactoreOutFreeOf const mcSymbolProperties ,
const mcPolynomial pol,
bool  bForceUseless
 

Definition at line 1748 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), and mcPolynomial::math_FactoreOutFreeOf().

mcElement mcMathMngHelpers::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.

Definition at line 1646 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), mcElement::math_Find(), and mcElement::math_GetCountOf().

int mcMathMngHelpers::math_GetCountOf const mcElement tocount,
long  flags
const [virtual]
 

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().

mcMonomial mcMathMngHelpers::math_GetGCD const mcElement  )  const [inline, virtual]
 

Implements mcElementHelpers.

Definition at line 478 of file MathMng.h.

References mcEmptyMonomial.

mcMonomial mcMathMngHelpers::math_GetLCM const mcElement  )  const [inline, virtual]
 

Returns the LCM between *this and the given element.

Implements mcElementHelpers.

Definition at line 477 of file MathMng.h.

References mcEmptyMonomial.

mcRealValue mcMathMngHelpers::math_GetLenght  )  const [virtual]
 

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().

mcMathMngType mcMathMngHelpers::math_GetMathMngType  )  const [inline]
 

Returns the type of mathematical data which is currently contained in this class.

Definition at line 455 of file MathMng.h.

References mdata_nDataType.

mcMathType mcMathMngHelpers::math_GetMathType  )  const [virtual]
 

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.

mcMathMngType mcMathMngHelpers::math_GetMathTypeFor mcMathMngRelationalOp  type  )  [static, protected]
 

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().

mcMathMngType mcMathMngHelpers::math_GetMathTypeFrom const mcKey  )  [static, protected]
 

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().

mcIntegerValue mcMathMngHelpers::math_GetMaxDegreeFor const mcSymbolProperties sym  )  const
 

Definition at line 1724 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), mcValue::isValid(), mcPolynomial::math_GetMaxDegreeFor(), and mcMAX.

int mcMathMngHelpers::math_GetOrderPos  )  const [inline, virtual]
 

Returns the order position for this element.

Implements mcElementHelpers.

Definition at line 471 of file MathMng.h.

mcMathMngRelationalOp mcMathMngHelpers::math_GetRelationalOpFor mcMathMngType  type  )  [static, protected]
 

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().

int mcMathMngHelpers::math_GetSymbolList mcSymbol **  ,
int  size,
const mcSymbol tofind,
bool  left = TRUE
const
 

Definition at line 1679 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), and mcElement::math_GetSymbolList().

mcRealValue mcMathMngHelpers::math_GetTotalLenght  )  const [virtual]
 

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.

bool mcMathMngHelpers::math_isConstant  )  const [virtual]
 

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().

bool mcMathMngHelpers::math_isFactorized  )  const
 

Definition at line 1762 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), and mcPolynomial::math_isFactorized().

bool mcMathMngHelpers::math_isMaxSimplified  )  const
 

Definition at line 1384 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), mcElement::math_isMaxSimplified(), and mcEXPSIM_NOFLAGS.

void mcMathMngHelpers::math_Move int  mathidx,
bool  toleft
 

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().

void mcMathMngHelpers::math_MoveAll bool  toleft  ) 
 

Definition at line 1527 of file MathMng.cpp.

References data_GetSourceDest(), mcPolynomialHelpers::math_GetCount(), and math_Move().

void mcMathMngHelpers::math_MoveConstants bool  toLeft  ) 
 

Definition at line 1521 of file MathMng.cpp.

References math_MoveSymbols().

void mcMathMngHelpers::math_MoveFreeFrom const mcSymbolProperties sym,
bool  toLeft
 

Definition at line 1470 of file MathMng.cpp.

References data_GetSourceDest(), mcElement::math_ContainsSymbol(), mcPolynomialHelpers::math_Get(), mcPolynomialHelpers::math_GetCount(), and math_Move().

void mcMathMngHelpers::math_MoveNonSymbol bool  toLeft  ) 
 

Definition at line 1502 of file MathMng.cpp.

References data_GetSourceDest(), mcElement::math_ContainsSymbols(), mcPolynomialHelpers::math_Get(), mcPolynomialHelpers::math_GetCount(), and math_Move().

void mcMathMngHelpers::math_MoveParameters bool  toLeft  ) 
 

Definition at line 1524 of file MathMng.cpp.

References math_MoveSymbols().

void mcMathMngHelpers::math_MoveSymbol const mcSymbolProperties sym,
bool  toLeft
 

Definition at line 1448 of file MathMng.cpp.

References data_GetSourceDest(), mcElement::math_ContainsSymbol(), mcPolynomialHelpers::math_Get(), mcPolynomialHelpers::math_GetCount(), and math_Move().

void mcMathMngHelpers::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.

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().

void mcMathMngHelpers::math_MoveUnknowns bool  toLeft  ) 
 

Definition at line 1518 of file MathMng.cpp.

References math_MoveSymbols().

void mcMathMngHelpers::math_MultiplyBy int  nID  ) 
 

void mcMathMngHelpers::math_MultiplyBy const mcMonomial  ) 
 

Definition at line 1599 of file MathMng.cpp.

References math_MultiplyBy(), and WRAP_MONOMIAL.

mcBasicOpRes mcMathMngHelpers::math_MultiplyBy const mcElement ,
mcElement
[virtual]
 

Multiplies two mcElements of the same type and stores the result in this object.

Parameters:
p A pointer to a mcElement of the same type of this mcElement, which will be multiplied with this mcElement.

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().

void mcMathMngHelpers::math_RaiseTo int  nID  ) 
 

void mcMathMngHelpers::math_RaiseTo const mcRealValue  ) 
 

mcBasicOpRes mcMathMngHelpers::math_RaiseTo const mcPolynomial p  )  [virtual]
 

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.

Note:
All MathCore elements must implement this function, not only mcExpElement-derived classes because this operation *must* be feasible on every element: those elements which do not hold an exponent, must raise their children directly. mcFraction, for example, must implement this operation directly raising the numerator & denominator.

Implements mcElementHelpers.

Definition at line 1687 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), mcElement::math_SimpleRaiseTo(), and mcBOR_REMOVE_OPERAND.

void mcMathMngHelpers::math_RaiseToSel  ) 
 

int mcMathMngHelpers::math_Replace const mcElement tofind,
int  occ,
long  flags,
const mcElement replacement,
bool  addchildren
[virtual]
 

Reimplemented from mcElementHelpers.

Definition at line 1669 of file MathMng.cpp.

References data_GetLeftMem(), data_GetRightMem(), and mcElement::math_Replace().

void mcMathMngHelpers::math_SetMathType mcMathMngType  newtype  )  [inline]
 

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.

mcExpSimRes mcMathMngHelpers::math_Simplify long  lflags,
long  rflags
 

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.

mcExpSimRes mcMathMngHelpers::math_Simplify long  flags,
mcElement
[inline, virtual]
 

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

Returns:
Returns TRUE if the element is completely simplied and thus, the following calls to math_Simplify won't have effect.

Implements mcElementHelpers.

Definition at line 405 of file MathMng.h.

Referenced by gui_ExecCmdOnSel().

mcBasicOpRes mcMathMngHelpers::math_Subtract const mcElement p,
mcElement pp
 

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.

mcMathMngHelpers::mcDEFINE_REFERENCE_DATA mcMathMng  ,
mcET_MATHMNG 
[private]
 


Member Data Documentation

mcPolynomial mcMathMngHelpers::mdata_eLMember [protected]
 

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().

mcPolynomial mcMathMngHelpers::mdata_eRMember [protected]
 

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().

mcMathMngType mcMathMngHelpers::mdata_nDataType [protected]
 

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().

int mcMathMngHelpers::mgui_nCursorPos [protected]
 

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().

wxSize mcMathMngHelpers::mgui_szSeparator [protected]
 

The size of the separator symbol.

Definition at line 83 of file MathMng.h.

Referenced by gui_GetSeparatorSize(), and gui_RecalcSeparatorSize().

mcMathMngCmd mcMathMngHelpers::sgui_cmd [static]
 

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.

int mcMathMngHelpers::sgui_nSpaceAroundSeparator = 5 [static]
 

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().

int mcMathMngHelpers::sgui_nSpaceLeftRight = 1 [static]
 

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().

mcStyleArray * mcMathMngHelpers::sgui_pBigStyles = NULL [static]
 

A bigger style.

Definition at line 59 of file MathMng.cpp.

Referenced by gui_DeleteStyles(), and gui_InitStyles().

mcStyleArray * mcMathMngHelpers::sgui_pNormalStyles = NULL [static]
 

The default style.

Definition at line 57 of file MathMng.cpp.

Referenced by gui_DeleteStyles(), gui_Init(), and gui_InitStyles().

mcStyleArray * mcMathMngHelpers::sgui_pSmallStyles = NULL [static]
 

A smaller style.

Definition at line 58 of file MathMng.cpp.

Referenced by gui_DeleteStyles(), and gui_InitStyles().


The documentation for this class was generated from the following files:

Documentation generated with Doxygen on Sun Feb 6 17:12:49 2005
Visit MathStudio home page for more info

[ Top ]