当前位置: 首页>>代码示例>>C++>>正文


C++ Iter::ReconstructIMarkFontStyle方法代码示例

本文整理汇总了C++中Iter::ReconstructIMarkFontStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ Iter::ReconstructIMarkFontStyle方法的具体用法?C++ Iter::ReconstructIMarkFontStyle怎么用?C++ Iter::ReconstructIMarkFontStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Iter的用法示例。


在下文中一共展示了Iter::ReconstructIMarkFontStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Execute

//---------------------------------------------------------------------------
bool __fastcall Parser::Execute(bool paint)
{
  //parse lists
  tasklist.sort();
  tasklistprior.sort();
  upperbound = parent->GetActLine() + PARSEINADVANCE;

  bool painted = false;

  int parsed = 0;
  bool endValid = false;
  while(tasklistprior.size() > 0 || (tasklist.size() > 0 && (tasklist.front().linenum < upperbound || tasklist.front().line->parserState.parseid != currentparseid)) )
  {
    ParseTask pt;
    if(tasklistprior.size() > 0)
    {
      pt = tasklistprior.front();
    }
    else
    {
      pt = tasklist.front();
    }
    linenum = parent->GetLineNum(pt.line);
    bool first = true;
    painted = linenum >= 0 | painted;
    Iter * itr = new Iter(pt.line, linenum >= 0 ? parent->itrLine.linenum+linenum : pt.linenum, 0, parent->buffer);
    state = itr->line->parserState;

    if(itr->linenum == 1)
      state.parseid = currentparseid;
    else if(itr->line != NULL && itr->line->prevline != NULL)
      state.parseid = itr->line->prevline->parserState.parseid;

    if(linenum >= 0)
    {
      ReconstructMarkup();
      actIMarkup = itr->ReconstructIMarkFontStyle();
      actMarkupCombined = actMarkup;
      actMarkupCombined += actIMarkup;
      itr->UpdateNextImark();
    }

    if(state.searchStateStack.top == NULL)
      state.searchStateStack.Push(langdef->GetDefSC(0));
    //LanguageDefinition::SearchIter * searchiter = &state.searchStateStack.top->data;  //now passed directly - no need to keep it
    actFormat = *state.searchStateStack.top->data.base->format;

    tasklistprior.remove(pt);
    tasklist.remove(pt);



    while(itr->word->next && (first || itr->line->parserState != this->state || tasklistprior.front().line == itr->line))
    {
      //take care of record from list
      newline = true;
      first = false;
      //take care of line
      if(itr->line->prevline != NULL) //otherwise sets a format to the first line -> changing langdef will never iterate change in buffer
        itr->line->parserState = this->state;

      tasklistprior.remove(pt);
      tasklist.remove(pt);

      // parent->Log(String("parsing line ")+String(itr->linenum));
      ParseLine(itr, &state.searchStateStack.top->data, linenum >= 0);

      endValid = itr->GoChar();
      if(linenum >= 0)
      {
        //FlushAll();
        painted = true;
        linenum = parent->GetLineNum(itr->line);
      }
      else if(parent->IsLineFirstVisible(itr->line))
      {
        itr->linenum = parent->GetActLine();
        ReconstructMarkup();
        actIMarkup = itr->ReconstructIMarkFontStyle();
        actMarkupCombined = actMarkup;
        actMarkupCombined += actIMarkup;
        itr->UpdateNextImark();

        linenum = 0;
      }
      pt.linenum++;
      pt.line = itr->line;
      parsed++;

      //if(!(linenum >= 0 && linenum <= parent->GetVisLineCount() && itr->line->parserState != this->state) && tasklistprior.size() > 0 )
      if(linenum < 0 && (tasklistprior.size() > 0 || itr->linenum > upperbound || parsed > PARSEINONEGO))
      {
        if(itr->word->next != NULL && itr->line->parserState != this->state)
        {
          this->tasklist.push_front(ParseTask(itr->line, itr->linenum));
        }
        itr->line->parserState = this->state;
        break;
      }
//.........这里部分代码省略.........
开发者ID:kareltucek,项目名称:shedit,代码行数:101,代码来源:uParser.cpp


注:本文中的Iter::ReconstructIMarkFontStyle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。