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


C++ MarkChanged函数代码示例

本文整理汇总了C++中MarkChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ MarkChanged函数的具体用法?C++ MarkChanged怎么用?C++ MarkChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: DragTo

void DragTo(HTREEITEM dstItem, HTREEITEM srcItem)
{
    PROJECTITEM *srcData = GetItemInfo(srcItem);
    PROJECTITEM *dstData = GetItemInfo(dstItem);
    if (srcData && dstData && srcData->parent != dstData)
    {
        PROJECTITEM *p = dstData->parent;
        while(p)
            if (p == srcData)
                return;
            else
                p = p->parent;
        if (srcData->type == PJ_FOLDER || srcData->type == PJ_FILE)
        {
            if (dstData->type == PJ_FOLDER || dstData->type == PJ_PROJ)
            {
                PROJECTITEM **rmv = &srcData->parent->children;
                MarkChanged(srcData,FALSE);
                while (*rmv && *rmv != srcData)
                    rmv = &(*rmv)->next;
                if (*rmv)
                {
                    PROJECTITEM **ins = &dstData->children;
                    HTREEITEM pos = TVI_FIRST;
                    (*rmv) = (*rmv)->next;

                    TreeView_DeleteItem(prjTreeWindow, srcData->hTreeItem);
                    ResDeleteItem(srcData);
                    if (srcData->type == PJ_FILE)
                    {
                        while (*ins && (*ins)->type == PJ_FOLDER)
                        {
                            pos = (*ins)->hTreeItem;
                            ins = &(*ins)->next;
                        }
                    }
                    while (*ins && (*ins)->type == srcData->type && stricmp((*ins)->displayName, srcData->displayName) < 0)
                    {
                        pos = (*ins)->hTreeItem;
                        ins = &(*ins)->next;
                    }
                    srcData->parent = dstData;
                    srcData->next = NULL;
                    RecursiveCreateTree(dstData->hTreeItem, pos, srcData);
                    srcData->next = *ins;
                    *ins = srcData;
                    MarkChanged(srcData,FALSE);
                }
            }
        }
    }
}
开发者ID:bencz,项目名称:OrangeC,代码行数:52,代码来源:prjwnd.c

示例2: MarkChanged

void
DrawTargetSkia::MaskSurface(const Pattern &aSource,
                            SourceSurface *aMask,
                            Point aOffset,
                            const DrawOptions &aOptions)
{
  MarkChanged();
  AutoPaintSetup paint(mCanvas.get(), aOptions, aSource);

  SkPaint maskPaint;
  TempBitmap tmpBitmap;
  SetPaintPattern(maskPaint, SurfacePattern(aMask, ExtendMode::CLAMP), tmpBitmap);

  SkMatrix transform = maskPaint.getShader()->getLocalMatrix();
  transform.postTranslate(SkFloatToScalar(aOffset.x), SkFloatToScalar(aOffset.y));
  maskPaint.getShader()->setLocalMatrix(transform);

  SkLayerRasterizer *raster = new SkLayerRasterizer();
  raster->addLayer(maskPaint);
  SkSafeUnref(paint.mPaint.setRasterizer(raster));

  IntSize size = aMask->GetSize();
  Rect rect = Rect(aOffset.x, aOffset.y, size.width, size.height);
  mCanvas->drawRect(RectToSkRect(rect), paint.mPaint);
}
开发者ID:cbrem,项目名称:gecko-dev,代码行数:25,代码来源:DrawTargetSkia.cpp

示例3: ProcessSingles

/********************\ 
**  ProcessSingles  *********************************************\ 
**                                                              ** 
**    ProcessSingles takes a naked single and marks each cell   ** 
**    in the 3 associated groups as not allowing that number.   ** 
**    It also marks the groups as changed so we know to check   ** 
**    for hidden singles in that group.                         ** 
**                                                              ** 
**    This routines marks cells changed as each single is       ** 
**    processed.                                                ** 
**                                                              ** 
\****************************************************************/ 
static void ProcessSingles (void) 
{ int i, t, g, t2; 
register  unsigned int b; 

  for (i = 0; i < SingleCnt; i++) 
  { t = SinglePos[i];                     // Get local copy of position 
    b = SingleVal[i];                     // Get local copy of the value 

    if (Gp->Grid[t] == 0) continue;   // Check if we already processed this position 
    if (!(Gp->Grid[t] & b))           // Check for error conditions 
    { No_Sol = 1; SingleCnt = Changed = 0; return; } 
    SolGrid[t] = b; // Store the single in the solution grid 
    Gp->CellsLeft--;                  // mark one less empty space 
    Gp->Grid[t] = 0;                  // mark this position processed 

    for (g = 0; g < 3; g++)               // loop through all 3 groups 
      Gp->Grp[C2Grp[t][g]] |= b;      // mark the value as found in the group 
    for (g = 0; g < 20; g++)              // loop through each cell in the groups 
    { t2 = (int)In_Groups[t][g];          // get temp copy of position 
      if (Gp->Grid[t2] & b)           // check if removing a possibility 
      { Gp->Grid[t2] = Gp->Grid[t2] ^ b;    // remove possibility 
        if (Gp->Grid[t2] == 0)                  // check for error (no possibility) 
           { No_Sol = 1; SingleCnt = 0; Changed = 0; return; } 
        if (B2V[Gp->Grid[t2]])                  // Check if a naked single is found 
          PushSingle(t2, Gp->Grid[t2]); 
        MarkChanged(t2);                            // Mark groups as changed 
      } 
    } 
  } 
  SingleCnt = 0;                          // Clear the single count 
} 
开发者ID:Aykut-,项目名称:plb,代码行数:43,代码来源:bb_sudoku.c

示例4: MarkChanged

void
DrawTargetSkia::FillGlyphs(ScaledFont *aFont,
                           const GlyphBuffer &aBuffer,
                           const Pattern &aPattern,
                           const DrawOptions &aOptions,
                           const GlyphRenderingOptions*)
{
    if (aFont->GetType() != FONT_MAC &&
            aFont->GetType() != FONT_SKIA &&
            aFont->GetType() != FONT_GDI) {
        return;
    }

    MarkChanged();

    ScaledFontBase* skiaFont = static_cast<ScaledFontBase*>(aFont);

    AutoPaintSetup paint(mCanvas.get(), aOptions, aPattern);
    paint.mPaint.setTypeface(skiaFont->GetSkTypeface());
    paint.mPaint.setTextSize(SkFloatToScalar(skiaFont->mSize));
    paint.mPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);

    std::vector<uint16_t> indices;
    std::vector<SkPoint> offsets;
    indices.resize(aBuffer.mNumGlyphs);
    offsets.resize(aBuffer.mNumGlyphs);

    for (unsigned int i = 0; i < aBuffer.mNumGlyphs; i++) {
        indices[i] = aBuffer.mGlyphs[i].mIndex;
        offsets[i].fX = SkFloatToScalar(aBuffer.mGlyphs[i].mPosition.x);
        offsets[i].fY = SkFloatToScalar(aBuffer.mGlyphs[i].mPosition.y);
    }

    mCanvas->drawPosText(&indices.front(), aBuffer.mNumGlyphs*2, &offsets.front(), paint.mPaint);
}
开发者ID:sergecodd,项目名称:FireFox-OS,代码行数:35,代码来源:DrawTargetSkia.cpp

示例5: TimeToSamplesClip

bool WaveTrack::Copy(double t0, double t1, Track **dest)
{
   if (t1 < t0)
      return false;

   sampleCount s0, s1;

   TimeToSamplesClip(t0, &s0);
   TimeToSamplesClip(t1, &s1);

   WaveTrack *newTrack = new WaveTrack(mDirManager);
   newTrack->Init(*this);

   delete newTrack->mSequence;
   newTrack->mSequence = NULL;
   
   if (!mSequence->Copy(s0, s1, &newTrack->mSequence)) {
      // Error
      *dest = NULL;
      delete newTrack;
      return false;
   }

   newTrack->GetEnvelope()->CopyFrom(GetEnvelope(), t0, t1);

   *dest = newTrack;
   MarkChanged();
   return true;
}
开发者ID:Kirushanr,项目名称:audacity,代码行数:29,代码来源:WaveTrack.cpp

示例6: MarkChanged

void
DrawTargetSkia::DrawSurface(SourceSurface *aSurface,
                            const Rect &aDest,
                            const Rect &aSource,
                            const DrawSurfaceOptions &aSurfOptions,
                            const DrawOptions &aOptions)
{
  if (!(aSurface->GetType() == SurfaceType::SKIA || aSurface->GetType() == SurfaceType::DATA)) {
    return;
  }

  if (aSource.IsEmpty()) {
    return;
  }

  MarkChanged();

  SkRect destRect = RectToSkRect(aDest);
  SkRect sourceRect = RectToSkRect(aSource);

  TempBitmap bitmap = GetBitmapForSurface(aSurface);
 
  AutoPaintSetup paint(mCanvas.get(), aOptions);
  if (aSurfOptions.mFilter == Filter::POINT) {
    paint.mPaint.setFilterBitmap(false);
  }

  mCanvas->drawBitmapRectToRect(bitmap.mBitmap, &sourceRect, destRect, &paint.mPaint);
}
开发者ID:MYSHLIFE,项目名称:gecko-dev,代码行数:29,代码来源:DrawTargetSkia.cpp

示例7: MarkChanged

bool WaveClip::SetSamples(samplePtr buffer, sampleFormat format,
                   sampleCount start, sampleCount len)
{
   bool bResult = mSequence->Set(buffer, format, start, len);
   MarkChanged();
   return bResult;
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:7,代码来源:WaveClip.cpp

示例8: MarkChanged

void
DrawTargetSkia::MaskSurface(const Pattern &aSource,
                            SourceSurface *aMask,
                            Point aOffset,
                            const DrawOptions &aOptions)
{
  MarkChanged();
  AutoPaintSetup paint(mCanvas.get(), aOptions, aSource);

  TempBitmap bitmap = GetBitmapForSurface(aMask);
  if (bitmap.mBitmap.colorType() == kAlpha_8_SkColorType) {
    mCanvas->drawBitmap(bitmap.mBitmap, aOffset.x, aOffset.y, &paint.mPaint);
  } else {
    SkPaint maskPaint;
    TempBitmap tmpBitmap;
    SetPaintPattern(maskPaint, SurfacePattern(aMask, ExtendMode::CLAMP), tmpBitmap);

    SkMatrix transform = maskPaint.getShader()->getLocalMatrix();
    transform.postTranslate(SkFloatToScalar(aOffset.x), SkFloatToScalar(aOffset.y));
    maskPaint.getShader()->setLocalMatrix(transform);

    SkLayerRasterizer::Builder builder;
    builder.addLayer(maskPaint);
    SkAutoTUnref<SkRasterizer> raster(builder.detachRasterizer());
    paint.mPaint.setRasterizer(raster.get());

    IntSize size = aMask->GetSize();
    Rect rect = Rect(aOffset.x, aOffset.y, size.width, size.height);
    mCanvas->drawRect(RectToSkRect(rect), paint.mPaint);
  }
}
开发者ID:CodeSpeaker,项目名称:gecko-dev,代码行数:31,代码来源:DrawTargetSkia.cpp

示例9: SoftwareDirectories_OnDelete

static BOOL SoftwareDirectories_OnDelete(HWND hDlg)
{
    int     nCount;
    int     nSelect;
    int     nItem;
    HWND    hList = GetDlgItem(hDlg, IDC_DIR_LIST);
	BOOL res;

	g_bModifiedSoftwarePaths = TRUE;

    nItem = ListView_GetNextItem(hList, -1, LVNI_SELECTED | LVNI_ALL);

    if (nItem == -1)
        return FALSE;

    /* Don't delete "Append" placeholder. */
    if (nItem == ListView_GetItemCount(hList) - 1)
        return FALSE;

	res = ListView_DeleteItem(hList, nItem);

    nCount = ListView_GetItemCount(hList);
    if (nCount <= 1)
        return FALSE;

    /* If the last item was removed, select the item above. */
    if (nItem == nCount - 1)
        nSelect = nCount - 2;
    else
        nSelect = nItem;

    ListView_SetItemState(hList, nSelect, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED);
	MarkChanged(hDlg);
	return TRUE;
}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:35,代码来源:propertiesms.c

示例10: AKJ_ASSERT

	void cTexturedQuadFactory::AddReference(cQuadInfo& info)
	{
		AKJ_ASSERT(info.mReferences >= 0);
		if(++info.mReferences == 1)
		{
			MarkChanged(info);
		}
	}
开发者ID:ProframFiles,项目名称:FancyDraw,代码行数:8,代码来源:akjTexturedQuadFactory.cpp

示例11: TimeToSamplesClip

bool WaveClip::Clear(double t0, double t1)
{
   sampleCount s0, s1;

   TimeToSamplesClip(t0, &s0);
   TimeToSamplesClip(t1, &s1);

   if (GetSequence()->Delete(s0, s1-s0))
   {
      // msmeyer
      //
      // Delete all cutlines that are within the given area, if any.
      //
      // Note that when cutlines are active, two functions are used:
      // Clear() and ClearAndAddCutLine(). ClearAndAddCutLine() is called
      // whenever the user directly calls a command that removes some audio, e.g.
      // "Cut" or "Clear" from the menu. This command takes care about recursive
      // preserving of cutlines within clips. Clear() is called when internal
      // operations want to remove audio. In the latter case, it is the right
      // thing to just remove all cutlines within the area.
      //
      double clip_t0 = t0;
      double clip_t1 = t1;
      if (clip_t0 < GetStartTime())
         clip_t0 = GetStartTime();
      if (clip_t1 > GetEndTime())
         clip_t1 = GetEndTime();

      WaveClipList::compatibility_iterator nextIt;

      for (WaveClipList::compatibility_iterator it = mCutLines.GetFirst(); it; it=nextIt)
      {
         nextIt = it->GetNext();
         WaveClip* clip = it->GetData();
         double cutlinePosition = mOffset + clip->GetOffset();
         if (cutlinePosition >= t0 && cutlinePosition <= t1)
         {
            // This cutline is within the area, delete it
            delete clip;
            mCutLines.DeleteNode(it);
         } else
         if (cutlinePosition >= t1)
         {
            clip->Offset(clip_t0-clip_t1);
         }
      }

      // Collapse envelope
      GetEnvelope()->CollapseRegion(t0, t1);
      if (t0 < GetStartTime())
         Offset(-(GetStartTime() - t0));

      MarkChanged();
      return true;
   }

   return false;
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:58,代码来源:WaveClip.cpp

示例12: MarkChanged

void
DrawTargetD2D1::ClearRect(const Rect &aRect)
{
  MarkChanged();

  mDC->PushAxisAlignedClip(D2DRect(aRect), D2D1_ANTIALIAS_MODE_PER_PRIMITIVE);
  mDC->Clear();
  mDC->PopAxisAlignedClip();
}
开发者ID:Wrichik1999,项目名称:gecko-dev,代码行数:9,代码来源:DrawTargetD2D1.cpp

示例13: WaveClip

bool WaveClip::Paste(double t0, WaveClip* other)
{
   WaveClip* pastedClip;

   bool clipNeedsResampling = other->mRate != mRate;

   if (clipNeedsResampling)
   {
      // The other clip's rate is different to our's, so resample
      pastedClip = new WaveClip(*other, mSequence->GetDirManager());
      if (!pastedClip->Resample(mRate))
      {
         delete pastedClip;
         return false;
      }
   } else
   {
      // No resampling needed, just use original clip without making a copy
      pastedClip = other;
   }

   sampleCount s0;
   TimeToSamplesClip(t0, &s0);

   // Force sample formats to match.
   if (pastedClip->mSequence->GetSampleFormat() != mSequence->GetSampleFormat())
      pastedClip->ConvertToSampleFormat(mSequence->GetSampleFormat());

   bool result = false;
   if (mSequence->Paste(s0, pastedClip->mSequence))
   {
      MarkChanged();
      mEnvelope->Paste((double)s0/mRate + mOffset, pastedClip->mEnvelope);
      mEnvelope->RemoveUnneededPoints();
      OffsetCutLines(t0, pastedClip->GetEndTime() - pastedClip->GetStartTime());
      
      // Paste cut lines contained in pasted clip
      for (WaveClipList::compatibility_iterator it = pastedClip->mCutLines.GetFirst(); it; it=it->GetNext())
      {
         WaveClip* cutline = it->GetData();
         WaveClip* newCutLine = new WaveClip(*cutline,
                                             mSequence->GetDirManager());
         newCutLine->Offset(t0 - mOffset);
         mCutLines.Append(newCutLine);
      }
      
      result = true;
   }
   
   if (clipNeedsResampling)
   {
      // Clip was constructed as a copy, so delete it
      delete pastedClip;
   }

   return result;
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:57,代码来源:WaveClip.cpp

示例14: MarkChanged

bool WaveTrack::AppendAlias(wxString fName, sampleCount start,
                            sampleCount len, int channel)
{
   MarkChanged();
   bool ret=mSequence->AppendAlias(fName, start, len, channel);
   if(ret==true)
      mEnvelope->SetTrackLen(mSequence->GetNumSamples() / mRate);

   return ret;
}
开发者ID:Kirushanr,项目名称:audacity,代码行数:10,代码来源:WaveTrack.cpp

示例15: UpdateEnvelopeTrackLen

bool WaveClip::AppendCoded(wxString fName, sampleCount start,
                            sampleCount len, int channel, int decodeType)
{
   bool result = mSequence->AppendCoded(fName, start, len, channel, decodeType);
   if (result)
   {
      UpdateEnvelopeTrackLen();
      MarkChanged();
   }
   return result;
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:11,代码来源:WaveClip.cpp


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