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

mcTextHelpers Class Reference

#include <Text.h>

Inheritance diagram for mcTextHelpers:

Inheritance graph
[legend]
Collaboration diagram for mcTextHelpers:

Collaboration graph
[legend]
List of all members.

Detailed Description

A little class containing the DATA, MATH, GUI and IO sections of this element (as instances and not pointers).

This is entirely defined & implemented through macros.

Definition at line 56 of file Text.h.

Public Member Functions

 mcTextHelpers ()
virtual ~mcTextHelpers ()
void data_DeepCopy (const mcElementHelpers *p)
 Deep copies all the info contained in this class.
int data_GetChildrenCount () const
 Returns the number of children attached to this tree node.
const mcElementdata_GetConstChild (int n) const
 mcDecorationHelpers have no children (by default).
void data_SetChild (int n, const mcElement &newchild)
 math_Replaces the idx-th child of this element with a copy of the given one.
bool data_isArrayEmpty () const
 Returns TRUE if the array of this element is empty.
bool data_isToReject (wxChar c) const
 Returns TRUE if the given char must be rejected by the current filter.
bool math_CompareThisOnly (const mcElement &p, long flags) const
 This is one of the few math functions which applies on a mcText object...
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.
wxXml2Node io_GetMathML (bool bGetPresentation) const
 Returns the MathML code for this element as presentation markup (http://www.w3.org/TR/MathML2/chapter3.html) or as content markup (http://www.w3.org/TR/MathML2/chapter4.html).
wxString io_GetInlinedExpr () const
 Returns the inlined expression for this element as a wxString.
bool io_ImportPresentationMathML (wxXml2Node tag, wxString &pErr)
 Imports presentation MathML reading the contents of the given XML node (without modifying it).
bool io_ImportInlinedExpr (const wxString &, int *count, wxString &pErr)
 Imports an inlined expression.
SET functions.
SET functions not overloaded from base class.

void data_SetText (const wxString &str)
 Sets the text associated with this class.
void data_SetAsMultiline ()
 Enables the multiline mode.
void data_SetAsSingleline ()
 Disables the multiline mode.
void data_SetFilter (const wxString &str)
 Sets the given string as the current filter; use an empty string to diable input filtering.
GET functions.
GET functions not overloaded from base class.

wxString data_GetText () const
 Returns the text stored in this class.
wxString data_GetLongestStr () const
 Returns the longest string stored in this object.
wxString data_GetFilter () const
 Returns the filter in use.
int data_GetRowCount () const
 Returns the number of rows stored in this object; if this class is working in single-line mode, the result is one.
mcText specific functions
Implementation of mcElement abstract functions.

int gui_GetRowHeight (wxDC *dc, int i) const
 Returns the height of the i-th row stored in this object.
int gui_GetRowWidth (wxDC *dc, int i) const
mcElement overloaded functions
Implementation of mcElement abstract functions.

bool gui_isBeginKey (const mcKey &ev) const
 Always returns FALSE: decorations generally are created by the program itself...
bool gui_isEndKey (const mcKey &ev) const
 Always returns FALSE: mcEmptyBox::gui_Input function handles all the keypresses returning mcIR_DELETE_this-> Empty boxes infact, should always be replaced by a new class.
void gui_GetCursorPos (mcCursorPos &) const
 Returns the cursor position as Cursor Position flag.
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.
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.
void gui_SetCursorPos (const mcCursorPos &code)
 Sets the cursor position inside the element using Cursor Position flags.
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.
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).
int gui_MoveCursorUsingPoint (wxDC &dc, const wxPoint &p)
 Moves the cursor inside this element in the closest available position to the given point.
mcInputRes gui_Input (const mcKey &ev, mcElement *newelem)
 This function is called when the cursor is inside the element and the user presses a key (which is not the element's end tag).
int gui_Draw (wxDC &dc, int x, int y, long flags, int w, wxColour *color) const
int gui_Draw (wxDC &dc, int x, int y, long flags, const wxPoint &pt) const
 element must be drawn with mcElementHelpers::sgui_m_pActivationBrush background brush; if this pointer is equal to mcDRW_NONACTIVE, the function must simply draw everything with default transparent mode; if the pointer is not one of the previous values, the function must use the pointer to find the subelement where it lies.
void gui_UpdateExpDepth ()
 Called by mcElement's standard functions to update the exponent depth of member classes.

Public Attributes

bool mgui_bDrawEmptyBoxIfEmpty
 If TRUE, an empty box is drawn when the class is empty.
mcEmptyBoxmgui_pEmptyBox
 The empty box which is used to draw this element when it's empty and m_bgui_DrawEmptyBoxIfEmpty == TRUE.

Static Public Attributes

static mcTextsmath_pEmpty = NULL

Protected Member Functions

void gui_Init ()
 Inits this section of the element.

Protected Attributes

wxArrayString mdata_arrStr
 The text contained by the class.
wxString mdata_strFilter
 The string used to filter the input; if the string is an empty string, no filter is used.
bool mdata_bMultiline
 TRUE if this is a multiline control.
int mgui_nCursorPos
 The cursor position: zero when cursor is on the left of the first character of the string.
int mgui_nRowPos
 If multiline is TRUE, this variable contains the zero-based row index where the cursor is set, and mgui_nCursorPos is the zero-based column index.

Private Member Functions

 mcDEFINE_REFERENCE_DATA (mcText, mcET_TEXT)


Constructor & Destructor Documentation

mcTextHelpers::mcTextHelpers  )  [inline]
 

Definition at line 114 of file Text.h.

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

Definition at line 120 of file Text.h.

References mcSAFE_DELETE.


Member Function Documentation

void mcTextHelpers::data_DeepCopy const mcElementHelpers p  )  [virtual]
 

Deep copies all the info contained in this class.

The mcElement implementation should be enough because all the element's data should be contained inside the associated mcElementData derived class. In fact, mcElementData does not provide a standard implementation of the DeepCopy() function. mcElement-derived classes, instead, should not contain any other variable, so this function should be enough....

Reimplemented from mcDecorationHelpers.

Definition at line 67 of file Text.cpp.

References mcSAFE_DELETE, mdata_arrStr, mdata_bMultiline, mdata_strFilter, mgui_bDrawEmptyBoxIfEmpty, mgui_nCursorPos, mgui_nRowPos, and mgui_pEmptyBox.

int mcTextHelpers::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 141 of file Text.h.

References mcElementHelpers::data_GetChildrenCount().

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

mcDecorationHelpers have no children (by default).

Reimplemented from mcDecorationHelpers.

Definition at line 148 of file Text.h.

References mcEmptyElement, and mcRETURN_ELEMENT_CHILD.

wxString mcTextHelpers::data_GetFilter  )  const [inline]
 

Returns the filter in use.

Definition at line 233 of file Text.h.

wxString mcTextHelpers::data_GetLongestStr  )  const [inline]
 

Returns the longest string stored in this object.

Definition at line 224 of file Text.h.

Referenced by gui_DoRecalcSize().

int mcTextHelpers::data_GetRowCount  )  const [inline]
 

Returns the number of rows stored in this object; if this class is working in single-line mode, the result is one.

Definition at line 239 of file Text.h.

Referenced by gui_DoRecalcSize(), gui_Draw(), gui_GetCursorPos(), gui_Input(), gui_MoveCursor(), and gui_MoveCursorUsingPoint().

wxString mcTextHelpers::data_GetText  )  const [inline]
 

Returns the text stored in this class.

Definition at line 216 of file Text.h.

Referenced by math_CompareThisOnly().

bool mcTextHelpers::data_isArrayEmpty  )  const [inline]
 

Returns TRUE if the array of this element is empty.

Definition at line 165 of file Text.h.

Referenced by gui_DoRecalcSize(), gui_Draw(), gui_GetRelCursorPos(), gui_Input(), gui_MoveCursor(), gui_MoveCursorUsingPoint(), and gui_SetCursorPos().

bool mcTextHelpers::data_isToReject wxChar  c  )  const [inline]
 

Returns TRUE if the given char must be rejected by the current filter.

Definition at line 171 of file Text.h.

Referenced by gui_Input().

void mcTextHelpers::data_SetAsMultiline  )  [inline]
 

Enables the multiline mode.

Definition at line 189 of file Text.h.

void mcTextHelpers::data_SetAsSingleline  )  [inline]
 

Disables the multiline mode.

The lines present after the fist, if present, are deleted.

Definition at line 195 of file Text.h.

void mcTextHelpers::data_SetChild int  n,
const mcElement newchild
[inline, virtual]
 

math_Replaces the idx-th child of this element with a copy of the given one.

Reimplemented from mcElementHelpers.

Definition at line 155 of file Text.h.

References mcASSERT, mcET_EMPTYBOX, mcSAFE_DELETE, and mcSET_ELEMENT_CHILD.

void mcTextHelpers::data_SetFilter const wxString &  str  )  [inline]
 

Sets the given string as the current filter; use an empty string to diable input filtering.

Definition at line 203 of file Text.h.

void mcTextHelpers::data_SetText const wxString &  str  ) 
 

Sets the text associated with this class.

Definition at line 87 of file Text.cpp.

References gui_SetCursorPos(), mcASSERT, mcCP_END, mdata_arrStr, and mdata_bMultiline.

Referenced by io_ImportInlinedExpr().

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

Definition at line 371 of file Text.cpp.

References data_GetLongestStr(), data_GetRowCount(), data_isArrayEmpty(), gui_GetRowHeight(), mcElement::gui_GetSize(), mcElementHelpers::gui_GetWidthOf(), mcElement::gui_RecalcSize(), mcElementHelpers::gui_SelectStyle(), mgui_bDrawEmptyBoxIfEmpty, and mgui_pEmptyBox.

int mcTextHelpers::gui_Draw wxDC &  dc,
int  x,
int  y,
long  flags,
const wxPoint &  pt
const [inline, virtual]
 

element must be drawn with mcElementHelpers::sgui_m_pActivationBrush background brush; if this pointer is equal to mcDRW_NONACTIVE, the function must simply draw everything with default transparent mode; if the pointer is not one of the previous values, the function must use the pointer to find the subelement where it lies.

Then, only the subelement's gui_Draw() function must be called with the initial pointer. The subelements must be called with mcDRW_ALLACTIVE flag only for special reasons.

Returns:
The ID of the element marked as active (the element which is drawn with mcElementHelpers::sgui_m_pActivationBrush as background), or mcDRW_NOACTIVEELEM flag if this element does not contain the mouse cursor.

Implements mcElementHelpers.

Definition at line 299 of file Text.h.

int mcTextHelpers::gui_Draw wxDC &  dc,
int  x,
int  y,
long  flags,
int  w,
wxColour *  color
const
 

Definition at line 324 of file Text.cpp.

References mcElementHelpers::data_GetID(), data_GetRowCount(), data_isArrayEmpty(), mcElement::gui_Draw(), gui_GetRowHeight(), mcElementHelpers::gui_SelectStyle(), mcDRW_NONACTIVE, mdata_arrStr, mgui_bDrawEmptyBoxIfEmpty, and mgui_pEmptyBox.

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

Reimplemented from mcDecorationHelpers.

Definition at line 413 of file Text.cpp.

References data_GetRowCount(), mcCursorPos::gui_Push(), mcCP_BEGIN, mcCP_END, mdata_arrStr, mgui_nCursorPos, and mgui_nRowPos.

int mcTextHelpers::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.

Reimplemented from mcDecorationHelpers.

Definition at line 344 of file Text.cpp.

References data_isArrayEmpty(), mcElement::gui_GetRelCursorPos(), gui_GetRowHeight(), mcElementHelpers::gui_GetWidthOf(), mcElementHelpers::gui_SelectStyle(), mdata_arrStr, mgui_bDrawEmptyBoxIfEmpty, mgui_nCursorPos, mgui_nRowPos, and mgui_pEmptyBox.

int mcTextHelpers::gui_GetRowHeight wxDC *  dc,
int  i
const [inline]
 

Returns the height of the i-th row stored in this object.

Definition at line 257 of file Text.h.

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

int mcTextHelpers::gui_GetRowWidth wxDC *  dc,
int  i
const [inline]
 

Definition at line 263 of file Text.h.

Referenced by gui_MoveCursorUsingPoint().

void mcTextHelpers::gui_Init  )  [protected, virtual]
 

Inits this section of the element.

Acts like a constructor (it's called by mcElementHelpers).

Reimplemented from mcDecorationHelpers.

Definition at line 122 of file Text.cpp.

References mcDecorationHelpers::gui_Init(), mgui_bDrawEmptyBoxIfEmpty, mgui_nCursorPos, mgui_nRowPos, and mgui_pEmptyBox.

mcInputRes mcTextHelpers::gui_Input const mcKey ev,
mcElement newelem
[virtual]
 

This function is called when the cursor is inside the element and the user presses a key (which is not the element's end tag).

The way the element should process the given character is dependent to the element type: a mcNumber will insert vk next to the cursor position if vk is a digit. If vk is not acceptable, the function should call the MathCore error-handler function, mcMathCore::Get()->SyntaxError. This function should return one of the values defined for mcInputRes: mcIR_OKAY, mcIR_DELETE_THIS, mcIR_DIRECT_DELETE, mcIR_DELETE_NEXT.

Parameters:
ev The wxWidgets key event for the keypress. It contains the untraslated code for the input key; see wxWidgets KeyCodes for more info.
newelem If the function returns mcIR_REPLACE_THIS, the caller will use this pointer as a substitute for this element (which will be deleted).

Reimplemented from mcDecorationHelpers.

Definition at line 132 of file Text.cpp.

References data_GetRowCount(), data_isArrayEmpty(), data_isToReject(), mcMathCore::Get(), gui_SetCursorPos(), mcASSERT, mcCP_END, mcIR_DELETE_NEXT, mcIR_DELETE_THIS, mcIR_OKAY, mdata_arrStr, mdata_bMultiline, mgui_nCursorPos, mgui_nRowPos, and mcMathCore::SyntaxError().

bool mcTextHelpers::gui_isBeginKey const mcKey ev  )  const [inline, virtual]
 

Always returns FALSE: decorations generally are created by the program itself...

Reimplemented from mcDecorationHelpers.

Definition at line 277 of file Text.h.

bool mcTextHelpers::gui_isEndKey const mcKey ev  )  const [inline, virtual]
 

Always returns FALSE: mcEmptyBox::gui_Input function handles all the keypresses returning mcIR_DELETE_this-> Empty boxes infact, should always be replaced by a new class.

Reimplemented from mcDecorationHelpers.

Definition at line 283 of file Text.h.

mcMoveCursorRes mcTextHelpers::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)

Reimplemented from mcDecorationHelpers.

Definition at line 245 of file Text.cpp.

References data_GetRowCount(), data_isArrayEmpty(), mcElement::gui_MoveCursor(), mcMCF_DOWN, mcMCF_LEFT, mcMCF_RIGHT, mcMCF_UP, mcMCR_OKAY, mcMCR_SETFOCUS_ABOVE, mcMCR_SETFOCUS_BELOW, mcMCR_SETFOCUS_NEXT, mcMCR_SETFOCUS_PREVIOUS, mdata_arrStr, mgui_bDrawEmptyBoxIfEmpty, mgui_nCursorPos, mgui_nRowPos, and mgui_pEmptyBox.

int mcTextHelpers::gui_MoveCursorUsingPoint wxDC &  dc,
const wxPoint &  p
[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

Reimplemented from mcDecorationHelpers.

Definition at line 291 of file Text.cpp.

References data_GetRowCount(), data_isArrayEmpty(), gui_GetRowHeight(), gui_GetRowWidth(), mcElementHelpers::gui_SelectStyle(), mcMCR_CANNOT_SETFOCUS, mcMCR_OKAY, mdata_arrStr, mgui_bDrawEmptyBoxIfEmpty, mgui_nCursorPos, and mgui_nRowPos.

void mcTextHelpers::gui_OnSelect wxDC &  dc,
wxRect &  rc
[inline, 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.

Definition at line 290 of file Text.h.

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

Reimplemented from mcDecorationHelpers.

Definition at line 392 of file Text.cpp.

References data_isArrayEmpty(), mcASSERT, mdata_arrStr, mgui_nCursorPos, and mgui_nRowPos.

Referenced by data_SetText(), and gui_Input().

void mcTextHelpers::gui_UpdateExpDepth  )  [virtual]
 

Called by mcElement's standard functions to update the exponent depth of member classes.

Override this function if you need to update member variables when the exponent level of this element changes (this happens each time gui_SetExpDepth() function is called; thus this happens each time gui_SetAsExpOf or gui_SetAtSameLevelOf functions are called).

Note:
This function DOES NOT call the gui_RecalcSize() function, even if probably it is required after such function.

Reimplemented from mcElementHelpers.

Definition at line 424 of file Text.cpp.

References mcElement::gui_SetAtSameLevelOf(), mcElementHelpers::gui_UpdateExpDepth(), and mgui_pEmptyBox.

wxString mcTextHelpers::io_GetInlinedExpr  )  const [virtual]
 

Returns the inlined expression for this element as a wxString.

"Inlined expression" means a math representation of the data in a single line: to allow such a restriction (everything must be on one text line), some standard conventions (and many brackets !!!) are used:

  • "^" introduces an exponent
  • "_" introduces a subscript Some examples of inlined expressions are: "4x^2+5a*sin(x/4)", "cos^2(PI/2)+ (123ax+b)/c >= 0", ....

Reimplemented from mcDecorationHelpers.

Definition at line 452 of file Text.cpp.

References mdata_arrStr.

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

Returns the MathML code for this element as presentation markup (http://www.w3.org/TR/MathML2/chapter3.html) or as content markup (http://www.w3.org/TR/MathML2/chapter4.html).

Parameters:
bGetPresentation TRUE if you want to get the presentation markup, FALSE if you want the content MathML.
Returns:
The XML tree containing the MathML code for this element.

Reimplemented from mcDecorationHelpers.

Definition at line 443 of file Text.cpp.

References mcASSERT, mdata_arrStr, and mdata_bMultiline.

bool mcTextHelpers::io_ImportInlinedExpr const wxString &  ,
int *  count,
wxString &  pErr
[virtual]
 

Imports an inlined expression.

"Inlined expression" means a string containing an encoded representation of math data: 234^2*ax+6y/2=0 is an inlined expression. This is the form which is used to input and output math data by a lot of math programs. Compability with these programs is crucial. However, because of the nature of this representation, the algorithm which recognizes (through io_isBeginChar functions) the elements to create, needs to know the lenght of the token which encodes this element; this is accomplished with the count parameter which must *absolutely* be set by this function.

Parameters:
str The string containing the inlined expression to import.
count A pointer where is stored the number of characters of str imported by this function.
pErr The string where the error description is placed, if the function returns FALSE.
Returns:
TRUE on success: the first (and eventually the following) characters of the given string represent an encoded inline expression of this element and they were successfully recognized and imported.

Reimplemented from mcDecorationHelpers.

Definition at line 465 of file Text.cpp.

References data_SetText().

bool mcTextHelpers::io_ImportPresentationMathML wxXml2Node  tag,
wxString &  pErr
[virtual]
 

Imports presentation MathML reading the contents of the given XML node (without modifying it).

This function is called only if io_isBeginTag function returns a positive value for the name of parent tag of pTag.

Parameters:
pTag The wxXML_***_NODE class to parse.
pErr The string where the error description is placed, if the function returns FALSE.
Returns:
TRUE on success (no mismatched or invalid tags).

Reimplemented from mcDecorationHelpers.

Definition at line 460 of file Text.cpp.

bool mcTextHelpers::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.

Reimplemented from mcDecorationHelpers.

Definition at line 326 of file Text.h.

bool mcTextHelpers::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

Reimplemented from mcDecorationHelpers.

Definition at line 325 of file Text.h.

bool mcTextHelpers::math_CompareThisOnly const mcElement p,
long  flags
const [virtual]
 

This is one of the few math functions which applies on a mcText object...

Reimplemented from mcElementHelpers.

Definition at line 480 of file Text.cpp.

References data_GetText().

mcTextHelpers::mcDEFINE_REFERENCE_DATA mcText  ,
mcET_TEXT 
[private]
 


Member Data Documentation

wxArrayString mcTextHelpers::mdata_arrStr [protected]
 

The text contained by the class.

Definition at line 64 of file Text.h.

Referenced by data_DeepCopy(), data_SetText(), gui_Draw(), gui_GetCursorPos(), gui_GetRelCursorPos(), gui_Input(), gui_MoveCursor(), gui_MoveCursorUsingPoint(), gui_SetCursorPos(), io_GetInlinedExpr(), and io_GetMathML().

bool mcTextHelpers::mdata_bMultiline [protected]
 

TRUE if this is a multiline control.

Definition at line 71 of file Text.h.

Referenced by data_DeepCopy(), data_SetText(), gui_Input(), and io_GetMathML().

wxString mcTextHelpers::mdata_strFilter [protected]
 

The string used to filter the input; if the string is an empty string, no filter is used.

Definition at line 68 of file Text.h.

Referenced by data_DeepCopy().

bool mcTextHelpers::mgui_bDrawEmptyBoxIfEmpty
 

If TRUE, an empty box is drawn when the class is empty.

Definition at line 102 of file Text.h.

Referenced by data_DeepCopy(), gui_DoRecalcSize(), gui_Draw(), gui_GetRelCursorPos(), gui_Init(), gui_MoveCursor(), and gui_MoveCursorUsingPoint().

int mcTextHelpers::mgui_nCursorPos [protected]
 

The cursor position: zero when cursor is on the left of the first character of the string.

Reimplemented from mcDecorationHelpers.

Definition at line 88 of file Text.h.

Referenced by data_DeepCopy(), gui_GetCursorPos(), gui_GetRelCursorPos(), gui_Init(), gui_Input(), gui_MoveCursor(), gui_MoveCursorUsingPoint(), and gui_SetCursorPos().

int mcTextHelpers::mgui_nRowPos [protected]
 

If multiline is TRUE, this variable contains the zero-based row index where the cursor is set, and mgui_nCursorPos is the zero-based column index.

Definition at line 93 of file Text.h.

Referenced by data_DeepCopy(), gui_GetCursorPos(), gui_GetRelCursorPos(), gui_Init(), gui_Input(), gui_MoveCursor(), gui_MoveCursorUsingPoint(), and gui_SetCursorPos().

mcEmptyBox* mcTextHelpers::mgui_pEmptyBox
 

The empty box which is used to draw this element when it's empty and m_bgui_DrawEmptyBoxIfEmpty == TRUE.

Definition at line 106 of file Text.h.

Referenced by data_DeepCopy(), gui_DoRecalcSize(), gui_Draw(), gui_GetRelCursorPos(), gui_Init(), gui_MoveCursor(), and gui_UpdateExpDepth().

mcText * mcTextHelpers::smath_pEmpty = NULL [static]
 

Definition at line 57 of file Text.cpp.


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

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

[ Top ]