#include <MathAndSystem.h>
Inheritance diagram for mcMathAndSystemHelpers:
Definition at line 70 of file MathAndSystem.h.
Public Member Functions | |
mcMathAndSystemHelpers () | |
virtual | ~mcMathAndSystemHelpers () |
void | data_SetFilter (const mcFilter *p, int n=-1) |
Sets the filter associated with all the elements of the array. | |
mcMathLine & | gui_GetFocusLine () |
const mcMathLine & | gui_GetFocusLine () const |
void | gui_DrawSystemSymbols (wxDC &dc, int x, int y, long flags) const |
Draws the connector symbols of this system *without* drawing the elements contained. | |
void | gui_RecalcSymbolSize () |
Recalculates the size of one of the connectors (they must have all the same size for mcMathSystem algorithms) and puts the result into the mgui_szSymbol variable. | |
mcElement | gui_GetSelection () const |
Returns a pointer to the portion of mathsystem currently selected; NULL if there are no parts selected. | |
bool | gui_isIDChanged () const |
Returns TRUE if the last call to #data_UpdateBmp() set as active element (the element under mouse cursor) an element which is different from the element which was active before that call. | |
virtual int | gui_GetActiveElemID () const |
Returns the ID of the element which was marked as active in the last bitmap update. | |
void | math_Merge (const mcMathAndSystem &arr1, const mcMathAndSystem &arr2) |
mcMathSystemType | math_GetMathSystemType () const |
Returns the type of this math system as a mcMathOrSystemType enumeration value. | |
wxString | io_GetInlinedExprOfLogicalOperator () const |
Returns as inlined expression all the current system. | |
bool | io_ImportToken (const wxString &str, wxString *perr) |
DATA functions | |
Functions that work on the content but which do not belong to the general GUI, MATH and IO sections. | |
void | data_AddLine (mcMathLine *ptoadd) |
Adds the given line to the array taking ownership of it. | |
void | data_AddEmptyLine () |
Adds an empty line to the array. | |
mcMathLine & | data_GetLine (int n) |
const mcMathLine & | data_GetLine (int n) const |
mcMathLine & | data_GetLastLine () |
const mcMathLine & | data_GetLastLine () const |
Static Public Attributes | |
static int | sgui_nSpaceLeftRight = 4 |
The space left on the left and the right of the math lines. | |
static int | sgui_nSpaceAboveBelow = 4 |
The space left above and below the math lines. | |
static int | sgui_nSpaceBetween = 10 |
The space between two math lines when sgui_bUseCurlyBracket is TRUE and thus lines are drawn one above the other. | |
static bool | sgui_bHorizOrientation = FALSE |
If TRUE, then the lines of this system will be drawn horizontally, if FALSE, then they will be drawn vertically. | |
static mcMathAndSystemRenderMode | sgui_nRenderMode = mcMASRM_DRAW_AND_SYMBOLS |
If TRUE, then sgui_bHorizOrientation will be ignored (the lines will always ve drawn in vertical order) and a curly bracket on the left side of the system. | |
Protected Member Functions | |
int | gui_UpdateActiveLine (int n, wxMemoryDC &hDC, int x, int y, long flags, const wxPoint &p) |
Sets the n-th line as the line where the cursor is currently over. | |
int | gui_GetLineContainingPt (int x, int y, const wxPoint &pt) |
Returns the index of the math-line which contains the given point. | |
void | gui_UpdateSystemSym () |
Updates the font which is used to draw the main system symbol. | |
void | data_Delete (int n) |
Removes the n-th line of the array. | |
mcAbstractItem * | data_GetCopyOf (int n) const |
Returns a copy of the n-th line of the array. | |
virtual bool | gui_DrawHorizontally () const |
Returns TRUE if the elements of the array should be oriented horizontally. | |
virtual bool | gui_DrawVertically () const |
virtual int | gui_GetSpaceAboveBelow () const |
virtual int | gui_GetSpaceLeftRight () const |
virtual int | gui_GetSpaceBetween () const |
Private Member Functions | |
mcDEFINE_REFERENCE_DATA (mcMathAndSystem, mcET_MATHANDSYSTEM) |
|
Definition at line 109 of file MathAndSystem.h. References mcElementHelpers::data_Init(). |
|
Definition at line 110 of file MathAndSystem.h. References mcAbstractArray::data_Clear(). |
|
Adds an empty line to the array.
Definition at line 133 of file MathAndSystem.h. Referenced by io_ImportToken(). |
|
Adds the given line to the array taking ownership of it.
Definition at line 129 of file MathAndSystem.h. References mcAbstractArray::data_Add(). |
|
Removes the n-th line of the array.
Implements mcAbstractArray. Definition at line 99 of file MathAndSystem.h. References mcAbstractArray::data_GetItem(). |
|
Returns a copy of the n-th line of the array.
Reimplemented from mcAbstractArray. Definition at line 103 of file MathAndSystem.h. References mcAbstractItem. |
|
Definition at line 142 of file MathAndSystem.h. References mcMathSystemHelpers::data_GetLast(). |
|
Definition at line 140 of file MathAndSystem.h. References mcMathSystemHelpers::data_GetLast(). Referenced by io_ImportToken(). |
|
Definition at line 138 of file MathAndSystem.h. References mcMathSystemHelpers::data_GetConstChild(). |
|
Definition at line 136 of file MathAndSystem.h. References mcElementHelpers::data_GetChild(). Referenced by data_SetFilter(), gui_GetActiveElemID(), gui_isIDChanged(), and math_GetMathSystemType(). |
|
Sets the filter associated with all the elements of the array. See mcFilter and mcPolynomial for more info.
Definition at line 90 of file MathAndSystem.cpp. References mcMathSystemHelpers::data_GetCount(), data_GetLine(), and mcMathMng::data_SetFilter(). |
|
Returns TRUE if the elements of the array should be oriented horizontally.
Implements mcMathSystemHelpers. Definition at line 183 of file MathAndSystem.h. |
|
Draws the connector symbols of this system *without* drawing the elements contained.
Implements mcMathSystemHelpers. Definition at line 130 of file MathAndSystem.cpp. References mcMathSystemHelpers::data_GetCount(), mcMathSystemHelpers::gui_GetXOfSymbol(), mcMathSystemHelpers::gui_GetYOfSymbol(), mcElementHelpers::gui_SelectStyle(), mcMASRM_DRAW_AND_SYMBOLS, mcMASRM_DRAW_AND_TEXT, mcMASRM_DRAW_CURLY_BRACKET, and sgui_nRenderMode. |
|
Implements mcMathSystemHelpers. Definition at line 184 of file MathAndSystem.h. |
|
Returns the ID of the element which was marked as active in the last bitmap update.
Definition at line 175 of file MathAndSystem.cpp. References data_GetLine(), mcMathLine::gui_GetActiveElemID(), and mcDRW_NOACTIVEELEM. |
|
Definition at line 194 of file MathAndSystem.h. References mcMathSystemHelpers::gui_GetFocus(). |
|
Definition at line 192 of file MathAndSystem.h. References mcMathSystemHelpers::gui_GetFocus(). |
|
Returns the index of the math-line which contains the given point.
|
|
Returns a pointer to the portion of mathsystem currently selected; NULL if there are no parts selected.
Reimplemented from mcElementHelpers. Definition at line 183 of file MathAndSystem.cpp. References mcMathSystemHelpers::data_Get(), mcMathSystemHelpers::data_GetCount(), mcElementHelpers::gui_isSelected(), and mcEmptySystem. |
|
Implements mcMathSystemHelpers. Definition at line 186 of file MathAndSystem.h. |
|
Implements mcMathSystemHelpers. Definition at line 188 of file MathAndSystem.h. |
|
Implements mcMathSystemHelpers. Definition at line 187 of file MathAndSystem.h. |
|
Returns TRUE if the last call to #data_UpdateBmp() set as active element (the element under mouse cursor) an element which is different from the element which was active before that call.
Definition at line 161 of file MathAndSystem.cpp. References data_GetLine(), and mcMathLine::gui_isIDChanged(). |
|
Recalculates the size of one of the connectors (they must have all the same size for mcMathSystem algorithms) and puts the result into the mgui_szSymbol variable.
Implements mcMathSystemHelpers. Definition at line 111 of file MathAndSystem.cpp. References mcElementHelpers::gui_GetSizeOf(), mcElementHelpers::gui_SelectStyle(), mcMASRM_DRAW_AND_SYMBOLS, mcMASRM_DRAW_AND_TEXT, mcMASRM_DRAW_CURLY_BRACKET, and sgui_nRenderMode. |
|
Sets the n-th line as the line where the cursor is currently over. This requires some manipulation of mgui_nLastActiveLine and mgui_nCurrentActiveLine to optimize redrawing with the #isIDChanged() function. This function is protected because its use should be allowed only to mcMathOrSystem functions. The users of this class should call the #data_UpdateSystemBmp() function (which calls this function with the right parameters). |
|
Updates the font which is used to draw the main system symbol.
|
|
Returns as inlined expression all the current system.
Implements mcMathSystemHelpers. Definition at line 241 of file MathAndSystem.h. |
|
Implements mcMathSystemHelpers. Definition at line 205 of file MathAndSystem.cpp. References data_AddEmptyLine(), data_GetLastLine(), and mcMathSystemHelpers::io_ImportInlinedExpr(). |
|
Returns the type of this math system as a mcMathOrSystemType enumeration value.
Implements mcMathSystemHelpers. Definition at line 222 of file MathAndSystem.cpp. References mcMathSystemHelpers::data_GetCount(), data_GetLine(), mcMathMng::math_GetMathMngType(), mcMMT_EQUATION, mcMMT_EXPRESSION, mcMSTL1_EQUATIONS, mcMSTL1_EXPRESSION, mcMSTL1_INEQUALITIES, and mcMSTL1_MIXED. |
|
Definition at line 246 of file MathAndSystem.cpp. References mcAbstractArray::data_Add(), mcAbstractArray::data_Clear(), mcMathSystemHelpers::data_DeepCopy(), mcMATHLOG, mcTXT, and mcTXTTHIS. |
|
|
|
If TRUE, then the lines of this system will be drawn horizontally, if FALSE, then they will be drawn vertically.
Definition at line 58 of file MathAndSystem.cpp. |
|
If TRUE, then sgui_bHorizOrientation will be ignored (the lines will always ve drawn in vertical order) and a curly bracket on the left side of the system.
Definition at line 59 of file MathAndSystem.cpp. Referenced by gui_DrawSystemSymbols(), and gui_RecalcSymbolSize(). |
|
The space left above and below the math lines.
Definition at line 55 of file MathAndSystem.cpp. |
|
The space between two math lines when sgui_bUseCurlyBracket is TRUE and thus lines are drawn one above the other.
Definition at line 57 of file MathAndSystem.cpp. |
|
The space left on the left and the right of the math lines.
Definition at line 56 of file MathAndSystem.cpp. |
[ Top ] |