Ejemplo n.º 1
0
MathCell* MathParser::ParseFracTag(wxXmlNode* node)
{
  FracCell *frac = new FracCell;
  frac->SetFracStyle(m_FracStyle);
  frac->SetHighlight(m_highlight);
  wxXmlNode* child = node->GetChildren();
  if (child)
  {
    frac->SetNum(ParseTag(child, false));
    child = child->GetNext();
    if (child)
    {
      frac->SetDenom(ParseTag(child, false));
#if wxCHECK_VERSION(2,9,0)
      if (node->GetAttributes() != NULL)
#else
      if (node->GetProperties() != NULL)
#endif
      {
        frac->SetFracStyle(FC_CHOOSE);
      }
      frac->SetType(m_ParserStyle);
      frac->SetStyle(TS_VARIABLE);
      frac->SetupBreakUps();
      return frac;
    }
  }
  delete frac;
  return NULL;
}
Ejemplo n.º 2
0
MathCell* FracCell::Copy(bool all)
{
  FracCell* tmp = new FracCell;
  CopyData(this, tmp);
  tmp->SetNum(m_num->Copy(true));
  tmp->SetDenom(m_denom->Copy(true));
  tmp->m_fracStyle = m_fracStyle;
  tmp->m_exponent = m_exponent;
  tmp->SetupBreakUps();
  if (all && m_next != NULL)
    tmp->AppendCell(m_next->Copy(all));
  return tmp;
}
Ejemplo n.º 3
0
MathCell* FracCell::Copy()
{
  FracCell* tmp = new FracCell;
  CopyData(this, tmp);
  tmp->SetNum(m_num->CopyList());
  tmp->SetDenom(m_denom->CopyList());
  tmp->m_fracStyle = m_fracStyle;
  tmp->m_exponent = m_exponent;
  tmp->SetupBreakUps();
  tmp->m_isBroken = m_isBroken;

  return tmp;
}
Ejemplo n.º 4
0
Cell *FracCell::Copy()
{
  FracCell *tmp = new FracCell(m_group, m_configuration, m_cellPointers);
  CopyData(this, tmp);
  tmp->SetNum(m_num->CopyList());
  tmp->SetDenom(m_denom->CopyList());
  tmp->m_fracStyle = m_fracStyle;
  tmp->m_exponent = m_exponent;
  tmp->SetupBreakUps();
  tmp->m_isBrokenIntoLines = m_isBrokenIntoLines;

  return tmp;
}