• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ EndUpdate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetPort

void GBWindow::Update(bool running) {
#if MAC
	GrafPtr savePort;
	GetPort(&savePort);
	SetPort(GetWindowPort(window));
	if ( view->NeedsResize() )
		ResizeSelf();
	if ( view->NeedsRedraw(running) ) {
		BeginUpdate(window);
		EndUpdate(window);
		if ( showGrowBox ) DrawGrowIcon(window);
		view->DoDraw();
	} else {
		BeginUpdate(window);
		if ( showGrowBox ) DrawGrowIcon(window);
		view->DoDraw();
		EndUpdate(window);
	}
	SetPort(savePort);
#elif WINDOWS
	PAINTSTRUCT paint;
	HDC dc = BeginPaint(win, &paint);
	GBGraphics graphics(dc);
	view->SetGraphics(&graphics);
	view->DoDraw();
	EndPaint(win, &paint);
#endif
}
开发者ID:AgentE382,项目名称:grobots,代码行数:28,代码来源:GBWindow.cpp


示例2: EndUpdate

void CTexture::ClampImageToSurfaceS()
{
   if( !m_bClampedS && m_dwWidth < m_dwCreatedTextureWidth )
   {       
      DrawInfo di;
      if( StartUpdate(&di) )
      {
         if(  m_dwTextureFmt == TEXTURE_FMT_A8R8G8B8 )
         {
            for( uint32_t y = 0; y<m_dwHeight; y++ )
            {
               uint32_t* line = (uint32_t*)((uint8_t*)di.lpSurface+di.lPitch*y);
               uint32_t val = line[m_dwWidth-1];
               for( uint32_t x=m_dwWidth; x<m_dwCreatedTextureWidth; x++ )
                  line[x] = val;
            }
         }
         else
         {
            for( uint32_t y = 0; y<m_dwHeight; y++ )
            {
               uint16_t* line = (uint16_t*)((uint8_t*)di.lpSurface+di.lPitch*y);
               uint16_t val = line[m_dwWidth-1];
               for( uint32_t x=m_dwWidth; x<m_dwCreatedTextureWidth; x++ )
                  line[x] = val;
            }
         }
         EndUpdate(&di);
      }
   }
   m_bClampedS = true;
}
开发者ID:Boniato82,项目名称:mupen64plus-libretro,代码行数:32,代码来源:Texture.cpp


示例3: QTApp_Draw

void QTApp_Draw (WindowReference theWindow)
{
	GrafPtr 					mySavedPort = NULL;
	GrafPtr 					myWindowPort = NULL;
	WindowPtr					myWindow = NULL;
	Rect						myRect;
	
	GetPort(&mySavedPort);
	
	myWindowPort = QTFrame_GetPortFromWindowReference(theWindow);
	myWindow = QTFrame_GetWindowFromWindowReference(theWindow);
	
	if (myWindowPort == NULL)
		return;
		
	MacSetPort(myWindowPort);
	
#if TARGET_API_MAC_CARBON
	GetPortBounds(myWindowPort, &myRect);
#else
	myRect = myWindowPort->portRect;
#endif

	BeginUpdate(myWindow);

	// erase any part of a movie window that hasn't already been updated
	// by the movie controller
	if (QTFrame_IsMovieWindow(theWindow))
		EraseRect(&myRect);

	// ***insert application-specific drawing here***
	
	EndUpdate(myWindow);
	MacSetPort(mySavedPort);
}
开发者ID:fruitsamples,项目名称:qtgraphics.win,代码行数:35,代码来源:ComApplication.c


示例4: BeginUpdate

void Objects::Delete(Object* thisobject) {
	if(thisobject) {
		BeginUpdate();
		objects.erase(thisobject->bufferlocation);
		EndUpdate();
	}
}
开发者ID:JohanMes,项目名称:JohanEngine,代码行数:7,代码来源:Objects.cpp


示例5: mac_updatelicence

static void mac_updatelicence(WindowPtr window)
{
    Handle h;
    int len;
    long fondsize;
    Rect textrect;

    SetPort((GrafPtr)GetWindowPort(window));
    BeginUpdate(window);
    fondsize = GetScriptVariable(smRoman, smScriptSmallFondSize);
    TextFont(HiWord(fondsize));
    TextSize(LoWord(fondsize));
    h = Get1Resource('TEXT', wLicence);
    len = GetResourceSizeOnDisk(h);
#if TARGET_API_MAC_CARBON
    GetPortBounds(GetWindowPort(window), &textrect);
#else
    textrect = window->portRect;
#endif
    if (h != NULL) {
	HLock(h);
	TETextBox(*h, len, &textrect, teFlushDefault);
	HUnlock(h);
    }
    EndUpdate(window);
}
开发者ID:svn2github,项目名称:kitty,代码行数:26,代码来源:macabout.c


示例6: DoWindowUpdate

void DoWindowUpdate(WindowPtr whichWindow)
{
	BeginUpdate(whichWindow);

	if(whichWindow == nesWind) {
		NES_ScrnUpdate(false);
	}
	if(whichWindow == wpWind) {
		WP_Update();
	}
	if(whichWindow == srchWind) {
		Srch_Update();
	}

#ifdef GB_DEBUG
	if(whichWindow == statWind) {
		Stat_Update();
	}
	if(whichWindow == patWind) {
		NES_PatUpdate();
	}
	if(whichWindow == namWind) {
		NES_NamUpdate();
	}
	if(whichWindow == palWind) {
		NES_PalUpdate();
	}
#endif

	EndUpdate(whichWindow);
}
开发者ID:zenmumbler,项目名称:GrayBox,代码行数:31,代码来源:GB_Interface.c


示例7: EndUpdate

void CTexture::RestoreAlphaChannel(void)
{
    DrawInfo di;

    if ( StartUpdate(&di) )
    {
        uint32 *pSrc = (uint32 *)di.lpSurface;
        int lPitch = di.lPitch;

        for (uint32 y = 0; y < m_dwHeight; y++)
        {
            uint32 * dwSrc = (uint32 *)((uint8 *)pSrc + y*lPitch);
            for (uint32 x = 0; x < m_dwWidth; x++)
            {
                uint32 dw = dwSrc[x];
                uint32 dwRed   = (uint8)((dw & 0x00FF0000)>>16);
                uint32 dwGreen = (uint8)((dw & 0x0000FF00)>>8 );
                uint32 dwBlue  = (uint8)((dw & 0x000000FF)    );
                uint32 dwAlpha = (dwRed+dwGreen+dwBlue)/3;
                dw &= 0x00FFFFFF;
                dw |= (dwAlpha<<24);

                /*
                uint32 dw = dwSrc[x];
                if( (dw&0x00FFFFFF) > 0 )
                    dw |= 0xFF000000;
                else
                    dw &= 0x00FFFFFF;
                    */
            }
        }
        EndUpdate(&di);
    }
开发者ID:Gillou68310,项目名称:mupen64plus-video-rice,代码行数:33,代码来源:Texture.cpp


示例8: BeginUpdate

void TStrings::SetTextStr(const UnicodeString & Text)
{
  BeginUpdate();
  SCOPE_EXIT
  {
    EndUpdate();
  };
  {
    Clear();
    const wchar_t * P = Text.c_str();
    if (P != nullptr)
    {
      while (*P != 0x00)
      {
        const wchar_t * Start = P;
        while (!((*P == 0x00) || (*P == 0x0A) || (*P == 0x0D)))
        {
          P++;
        }
        UnicodeString S;
        S.SetLength(P - Start);
        memmove(const_cast<wchar_t *>(S.c_str()), Start, (P - Start) * sizeof(wchar_t));
        Add(S);
        if (*P == 0x0D) { P++; }
        if (*P == 0x0A) { P++; }
      }
    }
  }
}
开发者ID:opengl-ms,项目名称:Far-NetBox,代码行数:29,代码来源:Classes.cpp


示例9: MacIdle

void MacIdle(void)
{
  extern logical anywarns;
  static long time = 0;

  EventRecord myEvent;
  WindowPtr whichWindow;
#if TARGET_API_MAC_CARBON
  Rect tempRect;
#endif
  char theChar;

  if (TickCount()<time) return;
  if (mac_quit_now) {
    anywarns = FALSE;  /* kludge so that window doesn't sit around */
    my_exit(1);
  }
#if !TARGET_API_MAC_CARBON
  SystemTask();
#endif
  if (WaitNextEvent(everyEvent, &myEvent, 1, nil)) {

    if (!SIOUXHandleOneEvent(&myEvent)) switch (myEvent.what) {

    case mouseDown:
      switch (FindWindow(myEvent.where,&whichWindow)) {

      case inMenuBar:
	MenuSelect(myEvent.where);
	break;
#if !TARGET_API_MAC_CARBON
      case inSysWindow:
	SystemClick(&myEvent,whichWindow);
	break;
#endif
      case inContent:
	SelectWindow(whichWindow);
	break;
      case inDrag:
#if TARGET_API_MAC_CARBON
	GetRegionBounds(GetGrayRgn(),&tempRect);
	DragWindow(whichWindow,myEvent.where,&tempRect);
#else
	DragWindow(whichWindow,myEvent.where,&qd.screenBits.bounds);
#endif
	break;
      }
      break;
    case keyDown:
      theChar = myEvent.message & charCodeMask;
      break;
    case updateEvt:
      BeginUpdate((WindowPtr) myEvent.message);
      EndUpdate((WindowPtr) myEvent.message);
      break;
    }
  }
  time=TickCount()+20;
}
开发者ID:AMDmi3,项目名称:analog,代码行数:59,代码来源:macstuff.c


示例10: doEventLoop

void doEventLoop()
{
	EventRecord event;
	WindowPtr   window;
	short       clickArea;
	Rect        screenRect;
	RgnHandle	rgnHandle = NewRgn();

	for (;;)
	{
		if (WaitNextEvent( everyEvent, &event, 0, nil ))
		{
			if (event.what == mouseDown)
			{
				clickArea = FindWindow( event.where, &window );
				
				if (clickArea == inDrag)
				{
					//screenRect = (**GetGrayRgn ()).rgnBBox;
					GetRegionBounds(GetGrayRgn(), &screenRect);
					DragWindow( window, event.where, &screenRect );
				}
				else if (clickArea == inContent)
				{
					if (window != FrontWindow())
						SelectWindow( window );
				}
				else if (clickArea == inGoAway)
					if (TrackGoAway( window, event.where ))
						return;
			}
			else if (event.what == updateEvt)
			{
				window = (WindowPtr)event.message;	
				//SetPort( window );
				SetPortWindowPort( window );
				
				BeginUpdate( window );
				drawPixelImageData();
				EndUpdate( window );
				QDFlushPortBuffer(GetWindowPort(window), GetPortVisibleRegion(GetWindowPort(window), rgnHandle));
			}
			else if (event.what == activateEvt) 
			{
				/*if (event.modifiers & activeFlag) {
					window = (WindowPtr)event.message;
					SetPortWindowPort(window);
					drawPixelImageData();
					QDFlushPortBuffer(GetWindowPort(window), GetPortVisibleRegion(GetWindowPort(window), rgnHandle));
				}*/
				/*if (event.modifiers & activeFlag)
					PostEvent(updateEvt, (unsigned long)gWindow);*/
			}
		}
	}
	
	DisposeRgn(rgnHandle);
}
开发者ID:fruitsamples,项目名称:Direct_Pixel_Access,代码行数:58,代码来源:Direct+Pixel+Access.c


示例11: update_window

static void update_window(
	WindowPtr wp)
{
	BeginUpdate(wp);
	draw_window_contents(wp);
	EndUpdate(wp);
	
	return;
}
开发者ID:MaddTheSane,项目名称:tntbasic,代码行数:9,代码来源:shell.c


示例12: doEventLoop

void doEventLoop()
{
	EventRecord anEvent;
	WindowPtr   evtWind;
	short       clickArea;
	Rect        screenRect;
	Point		thePoint;
	Rect		zoomFrom, zoomTo;
	
	zoomFrom.top = zoomTo.top = -1;

	while (!gDone)
	{
		if (WaitNextEvent( everyEvent, &anEvent, 0, nil ))
		{
			if (anEvent.what == mouseDown)
			{
				clickArea = FindWindow( anEvent.where, &evtWind );
				
				if (clickArea == inDrag)
				{
					GetRegionBounds( GetGrayRgn(), &screenRect );
					DragWindow( evtWind, anEvent.where, &screenRect );
				}
				else if (clickArea == inContent)
				{
					if (evtWind != FrontWindow())
						SelectWindow( evtWind );
					else
					{
						thePoint = anEvent.where;
						GlobalToLocal( &thePoint );
						//Handle click in window content here
						GetRect(&zoomFrom, &zoomTo);
					}
				}
				else if (clickArea == inGoAway)
					if (TrackGoAway( evtWind, anEvent.where ))
						gDone = true;
			}
			else if (anEvent.what == updateEvt)
			{
				evtWind = (WindowPtr)anEvent.message;	
				SetPortWindowPort( evtWind );
				
				BeginUpdate( evtWind );
				//Call Draw Function here....
				if (zoomFrom.top != -1)
					FrameRect(&zoomFrom);
				if (zoomTo.top != -1)
					FrameRect(&zoomTo);
				EndUpdate (evtWind);
			}
		}
	}
}
开发者ID:fruitsamples,项目名称:ZoomRecter,代码行数:56,代码来源:ZoomRecter.c


示例13: SeqGrabberModalFilterUPP

//----------------------------------------
// osx needs this for modal dialogs.
Boolean SeqGrabberModalFilterUPP (DialogPtr theDialog, const EventRecord *theEvent, short *itemHit, long refCon){
	#pragma unused(theDialog, itemHit)
  	Boolean  handled = false;
  	if ((theEvent->what == updateEvt) &&
    ((WindowPtr) theEvent->message == (WindowPtr) refCon))
  	{
    	BeginUpdate ((WindowPtr) refCon);
    	EndUpdate ((WindowPtr) refCon);
    	handled = true;
  	}
  	return (handled);
}
开发者ID:burningneutron,项目名称:openFrameworks,代码行数:14,代码来源:ofxQtUtils_alpha.cpp


示例14: DrawWindow

void DrawWindow(WindowRef window)
{
    GrafPtr		curPort;
	
    GetPort(&curPort);
    SetPort(GetWindowPort(window));
    BeginUpdate(window);

    DrawControls(window);
    DrawGrowIcon(window);
    EndUpdate(window);
    SetPort(curPort);
}
开发者ID:fruitsamples,项目名称:CTMDemo,代码行数:13,代码来源:main.c


示例15: DoDialogUpdate

static void DoDialogUpdate(DialogPtr dlog)
	{
		GrafPtr oldPort;

		GetPort(&oldPort); SetPort(dlog);
		BeginUpdate(dlog);

		UpdateDialog(dlog,dlog->visRgn);
		FrameDefault(dlog,BUT1_OK,TRUE);

		EndUpdate(dlog);
		SetPort(oldPort);
	}
开发者ID:jleclanche,项目名称:darkdust-ctp2,代码行数:13,代码来源:EnterNewAddress.c


示例16: handleupdate

static void handleupdate (EventRecord *ev) {
	
	WindowPtr w;
	
	w = (WindowPtr) (*ev).message;
	
	BeginUpdate (w);
	
	SetPort (w);
	
	updatemainwindow ();
	
	EndUpdate (w);
	} /*handleupdate*/
开发者ID:dvincent,项目名称:frontier,代码行数:14,代码来源:main.c


示例17: BeginUpdate

nsresult
nsStyleSet::SetAuthorStyleDisabled(PRBool aStyleDisabled)
{
  if (aStyleDisabled == !mAuthorStyleDisabled) {
    mAuthorStyleDisabled = aStyleDisabled;
    BeginUpdate();
    mDirty |= 1 << eDocSheet |
              1 << ePresHintSheet |
              1 << eHTMLPresHintSheet |
              1 << eStyleAttrSheet;
    return EndUpdate();
  }
  return NS_OK;
}
开发者ID:ahadzi,项目名称:celtx,代码行数:14,代码来源:nsStyleSet.cpp


示例18: DrawWindow

void DrawWindow(WindowRef window)
{
    Rect		tempRect;
    GrafPtr		curPort;
	
    GetPort(&curPort);
    SetPort(GetWindowPort(window));
    BeginUpdate(window);
    EraseRect(GetWindowPortBounds(window, &tempRect));
    DrawControls(window);
    DrawGrowIcon(window);
    EndUpdate(window);
    SetPort(curPort);
}
开发者ID:fruitsamples,项目名称:CGGamma,代码行数:14,代码来源:main.c


示例19: BeginUpdate

void TStrings::AddStrings(const TStrings * Strings)
{
  BeginUpdate();
  auto cleanup = finally([&]()
  {
    EndUpdate();
  });
  {
    for (intptr_t I = 0; I < Strings->GetCount(); I++)
    {
      AddObject(Strings->GetString(I), Strings->GetObject(I));
    }
  }
}
开发者ID:nineclock,项目名称:Far-NetBox,代码行数:14,代码来源:Classes.cpp


示例20: DoUpdate

static void DoUpdate(WindowPtr	myWindow)
{ 
	GrafPtr		origPort;
	
	GetPort(&origPort);
	SetPort(myWindow);
		
	BeginUpdate(myWindow);	
	EndUpdate(myWindow);
	
	aglUpdateContext(aglGetCurrentContext());
	
	SetPort(origPort);
}
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:14,代码来源:mac_event.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ EndWaitCursor函数代码示例发布时间:2022-05-30
下一篇:
C++ EndTransaction函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap