本文整理汇总了C++中MathCell::AppendCell方法的典型用法代码示例。如果您正苦于以下问题:C++ MathCell::AppendCell方法的具体用法?C++ MathCell::AppendCell怎么用?C++ MathCell::AppendCell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MathCell
的用法示例。
在下文中一共展示了MathCell::AppendCell方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AppendOutput
void GroupCell::AppendOutput(MathCell *cell)
{
if (m_output == NULL) {
m_output = cell;
if (m_groupType == GC_TYPE_CODE && m_input->m_next != NULL)
((EditorCell *)(m_input->m_next))->ContainsChanges(false);
m_lastInOutput = m_output;
while (m_lastInOutput->m_next != NULL)
m_lastInOutput = m_lastInOutput->m_next;
}
else {
MathCell *tmp = m_lastInOutput;
if (tmp == NULL)
tmp = m_output;
while (tmp->m_next != NULL)
tmp = tmp->m_next;
tmp->AppendCell(cell);
while (m_lastInOutput->m_next != NULL)
m_lastInOutput = m_lastInOutput->m_next;
}
if (m_appendedCells == NULL)
m_appendedCells = cell;
}
示例2: Copy
MathCell *MathCell::CopyList()
{
MathCell *dest = Copy();
MathCell *src = this->m_next;
MathCell *ret = dest;
while(src != NULL)
{
dest->AppendCell(src->Copy());
src = src->m_next;
dest = dest->m_next;
}
return ret;
}
示例3: ParseTag
MathCell* MathParser::ParseTag(wxXmlNode* node, bool all)
{
// wxYield();
MathCell* tmp = NULL;
MathCell* cell = NULL;
bool warning = all;
wxString altCopy;
while (node)
{
// Parse tags
if (node->GetType() == wxXML_ELEMENT_NODE)
{
wxString tagName(node->GetName());
if (tagName == wxT("v"))
{ // Variables (atoms)
if (cell == NULL)
cell = ParseText(node->GetChildren(), TS_VARIABLE);
else
cell->AppendCell(ParseText(node->GetChildren(), TS_VARIABLE));
}
else if (tagName == wxT("t"))
{ // Other text
if (cell == NULL)
cell = ParseText(node->GetChildren(), TS_DEFAULT);
else
cell->AppendCell(ParseText(node->GetChildren(), TS_DEFAULT));
}
else if (tagName == wxT("n"))
{ // Numbers
if (cell == NULL)
cell = ParseText(node->GetChildren(), TS_NUMBER);
else
cell->AppendCell(ParseText(node->GetChildren(), TS_NUMBER));
}
else if (tagName == wxT("h"))
{ // Hidden cells (*)
MathCell* tmp = ParseText(node->GetChildren());
tmp->m_isHidden = true;
if (cell == NULL)
cell = tmp;
else
cell->AppendCell(tmp);
}
else if (tagName == wxT("p"))
{ // Parenthesis
if (cell == NULL)
cell = ParseParenTag(node);
else
cell->AppendCell(ParseParenTag(node));
}
else if (tagName == wxT("f"))
{ // Fractions
if (cell == NULL)
cell = ParseFracTag(node);
else
cell->AppendCell(ParseFracTag(node));
}
else if (tagName == wxT("e"))
{ // Exponentials
if (cell == NULL)
cell = ParseSupTag(node);
else
cell->AppendCell(ParseSupTag(node));
}
else if (tagName == wxT("i"))
{ // Subscripts
if (cell == NULL)
cell = ParseSubTag(node);
else
cell->AppendCell(ParseSubTag(node));
}
else if (tagName == wxT("fn"))
{ // Functions
if (cell == NULL)
cell = ParseFunTag(node);
else
cell->AppendCell(ParseFunTag(node));
}
else if (tagName == wxT("g"))
{ // Greek constants
MathCell* tmp = ParseText(node->GetChildren(), TS_GREEK_CONSTANT);
if (cell == NULL)
cell = tmp;
else
cell->AppendCell(tmp);
}
else if (tagName == wxT("s"))
{ // Special constants %e,...
MathCell* tmp = ParseText(node->GetChildren(), TS_SPECIAL_CONSTANT);
if (cell == NULL)
cell = tmp;
else
cell->AppendCell(tmp);
}
else if (tagName == wxT("fnm"))
{ // Function names
MathCell* tmp = ParseText(node->GetChildren(), TS_FUNCTION);
if (cell == NULL)
//.........这里部分代码省略.........