您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ EndUpdate函数代码示例

51自学网 2021-06-01 20:37:58
  C++
这篇教程C++ EndUpdate函数代码示例写得很实用,希望能帮到您。

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

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


示例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,


示例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,


示例4: BeginUpdate

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


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例11: update_window

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


示例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,


示例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,


示例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,


示例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,


示例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,


示例17: BeginUpdate

nsresultnsStyleSet::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,


示例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,


示例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,


示例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,


示例21: HandleUpdateEvent

static void HandleUpdateEvent(EventRecord *pevent) {	WindowPtr	hWnd;	hWnd = (WindowPtr)pevent->message;	BeginUpdate(hWnd);	if (np2running) {		scrndraw_redraw();	}	else {		np2open();	}	EndUpdate(hWnd);}
开发者ID:perabuss,项目名称:np2wii,代码行数:14,


示例22: doUpdate

void doUpdate(EventRecord *eventStrucPtr){    WindowRef windowRef;    windowRef = (WindowRef) eventStrucPtr->message;    window_adjust_scrollbars(windowRef);    BeginUpdate(windowRef);    SetPortWindowPort(windowRef);    doUpdateWindow(eventStrucPtr);    EndUpdate(windowRef);}
开发者ID:hackqiang,项目名称:gs,代码行数:15,


示例23: BeginUpdate

void TStrings::SetDelimitedText(const UnicodeString & Value){  BeginUpdate();  SCOPE_EXIT  {    EndUpdate();  };  Clear();  rde::vector<UnicodeString> Lines;  UnicodeString Delimiter(UnicodeString(GetDelimiter()) + L'/n');  tokenize(Value, Lines, Delimiter, true);  for (size_t Index = 0; Index < Lines.size(); Index++)  {    Add(Lines[Index]);  }}
开发者ID:gvsurenderreddy,项目名称:Far-NetBox,代码行数:16,


示例24: NB_STATIC_DOWNCAST_CONST

void TStrings::Assign(const TPersistent * Source){  const TStrings * Strings = NB_STATIC_DOWNCAST_CONST(TStrings, Source);  if (Strings != nullptr)  {    BeginUpdate();    SCOPE_EXIT    {      EndUpdate();    };    Clear();    DebugAssert(Strings);    FQuoteChar = Strings->FQuoteChar;    FDelimiter = Strings->FDelimiter;    AddStrings(Strings);  }
开发者ID:gvsurenderreddy,项目名称:Far-NetBox,代码行数:16,


示例25: doEventLoop

void doEventLoop(){	EventRecord anEvent;	WindowPtr   evtWind;	short       clickArea;	Rect        screenRect;	while (!gDone)	{		if (WaitNextEvent( everyEvent, &anEvent, 0, nil ))		{			if (anEvent.what == mouseDown)			{				clickArea = FindWindow( anEvent.where, &evtWind );								if (clickArea == inMenuBar)					handleMenuSelection(MenuSelect(anEvent.where));				else if (clickArea == inDrag)				{					//screenRect = (**GetGrayRgn ()).rgnBBox;					GetRegionBounds(GetGrayRgn(), &screenRect);					DragWindow( evtWind, anEvent.where, &screenRect );				}				else if (clickArea == inContent)				{					if (evtWind != FrontWindow())						SelectWindow( evtWind );				}				else if (clickArea == inGoAway)					if (TrackGoAway( evtWind, anEvent.where ))						gDone = true;			}			else if (anEvent.what == updateEvt)			{				evtWind = (WindowPtr)anEvent.message;					//SetPort( evtWind );				SetPortWindowPort( evtWind );								BeginUpdate( evtWind );				drawImage( evtWind );				EndUpdate (evtWind);			}			else if (anEvent.what == autoKey || anEvent.what == keyDown)				handleKeyPress(&anEvent);		}	}}
开发者ID:fruitsamples,项目名称:Snapshot,代码行数:47,


示例26: help

void wxTopLevelWindowMac::MacUpdate( long timestamp){    wxMacPortStateHelper help( (GrafPtr) GetWindowPort( (WindowRef) m_macWindow) ) ;    RgnHandle       visRgn = NewRgn() ;    GetPortVisibleRegion( GetWindowPort( (WindowRef)m_macWindow ), visRgn );    BeginUpdate( (WindowRef)m_macWindow ) ;    RgnHandle       updateRgn = NewRgn();    RgnHandle       diffRgn = NewRgn() ;    if ( updateRgn && diffRgn )    {#if 1        // macos internal control redraws clean up areas we'd like to redraw ourselves        // therefore we pick the boundary rect and make sure we can redraw it        // this has to be intersected by the visRgn in order to avoid drawing over its own        // boundaries        RgnHandle trueUpdateRgn = NewRgn() ;        Rect trueUpdateRgnBoundary ;        GetPortVisibleRegion( GetWindowPort( (WindowRef)m_macWindow ), trueUpdateRgn );        GetRegionBounds( trueUpdateRgn , &trueUpdateRgnBoundary ) ;        RectRgn( updateRgn , &trueUpdateRgnBoundary ) ;        SectRgn( updateRgn , visRgn , updateRgn ) ;        if ( trueUpdateRgn )            DisposeRgn( trueUpdateRgn ) ;        SetPortVisibleRegion(  GetWindowPort( (WindowRef)m_macWindow ), updateRgn ) ;#else        GetPortVisibleRegion( GetWindowPort( (WindowRef)m_macWindow ), updateRgn );#endif        DiffRgn( updateRgn , (RgnHandle) m_macNoEraseUpdateRgn , diffRgn ) ;        if ( !EmptyRgn( updateRgn ) )        {            MacRedraw( updateRgn , timestamp , m_macNeedsErasing || !EmptyRgn( diffRgn )  ) ;        }    }    if ( updateRgn )        DisposeRgn( updateRgn );    if ( diffRgn )        DisposeRgn( diffRgn );    if ( visRgn )        DisposeRgn( visRgn ) ;    EndUpdate( (WindowRef)m_macWindow ) ;    SetEmptyRgn( (RgnHandle) m_macNoEraseUpdateRgn ) ;    m_macNeedsErasing = false ;}
开发者ID:Duion,项目名称:Torsion,代码行数:47,



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


C++ EndWaitCursor函数代码示例
C++ EndTransaction函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。