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


C++ MCStack::next方法代码示例

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


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

示例1:

MCStack *MCDispatch::findstackd(Window w)
{
	if (w == DNULL)
		return NULL;
	
	if (stacks != NULL)
	{
		MCStack *tstk = stacks;
		do
		{
			MCStack *foundstk;
			if ((foundstk = tstk->findstackd(w)) != NULL)
				return foundstk;
			tstk = (MCStack *)tstk->next();
		}
		while (tstk != stacks);
	}
	if (panels != NULL)
	{
		MCStack *tstk = panels;
		do
		{
			MCStack *foundstk;
			if ((foundstk = tstk->findstackd(w)) != NULL)
				return foundstk;
			tstk = (MCStack *)tstk->next();
		}
		while (tstk != panels);
	}

	// MW-2006-04-24: [[ Purify ]] It is possible to get here after MCtooltip has been
	//   deleted. So MCtooltip is now NULL in this situation and we test for it here.
	if (MCtooltip != NULL && MCtooltip->findstackd(w))
		return MCtooltip;
	return NULL;
}
开发者ID:runrevelanor,项目名称:livecode,代码行数:36,代码来源:dispatch.cpp

示例2: ismainstack

Boolean MCDispatch::ismainstack(MCStack *sptr)
{
	if (stacks != NULL)
	{
		MCStack *tstk = stacks;
		do
		{
			if (tstk == sptr)
				return True;
			tstk = (MCStack *)tstk->next();
		}
		while (tstk != stacks);
	}
	return False;
}
开发者ID:runrevelanor,项目名称:livecode,代码行数:15,代码来源:dispatch.cpp

示例3: getmainstacknames

void MCDispatch::getmainstacknames(MCExecPoint &ep)
{
	ep.clear();
	MCExecPoint ep2(ep);
	MCStack *tstk = stacks;
	bool first;
	first = true;
	do
	{
		tstk->getprop(0, P_SHORT_NAME, ep2, False);
		ep.concatmcstring(ep2.getsvalue(), EC_RETURN, first);
		first = false;
		tstk = (MCStack *)tstk->next();
	}
	while (tstk != stacks);
}
开发者ID:runrevelanor,项目名称:livecode,代码行数:16,代码来源:dispatch.cpp

示例4:

MCStack *MCStack::findstackd(Window w)
{
	if (w == window)
		return this;
	if (substacks != NULL)
	{
		MCStack *tptr = substacks;
		do
		{
			if (w == tptr->window)
				return tptr;
			tptr = (MCStack *)tptr->next();
		}
		while (tptr != substacks);
	}
	return NULL;
}
开发者ID:alilloyd,项目名称:livecode,代码行数:17,代码来源:srvstack.cpp

示例5:

MCStack *MCStack::findstackd(Window w)
{
	if (w == NULL)
		return NULL;
	if ((window != DNULL) && (w->handle.window == window->handle.window))
		return this;
	if (substacks != NULL)
	{
		MCStack *tptr = substacks;
		do
		{
			if ((tptr->window != DNULL) &&
			        (w->handle.window == tptr->window->handle.window))
				return tptr;
			tptr = (MCStack *)tptr->next();
		}
		while (tptr != substacks);
	}
	return NULL;
}
开发者ID:runrevelanor,项目名称:livecode,代码行数:20,代码来源:w32stack.cpp

示例6: getparentwindow

MCStack *MCStack::findchildstackd(Window w,uint2 &ccount,uint2 cindex)
{
	Window pwindow = getparentwindow();
	if (pwindow != DNULL && w->handle.window == pwindow->handle.window)
		if  (++ccount == cindex)
			return this;
	if (substacks != NULL)
	{
		MCStack *tptr = substacks;
		do
		{
			pwindow = tptr->getparentwindow();
			if (pwindow != DNULL && w->handle.window == pwindow->handle.window)
			{
				ccount++;
				if (ccount == cindex)
					return tptr;
			}
			tptr = (MCStack *)tptr->next();
		}
		while (tptr != substacks);
	}
	return NULL;
}
开发者ID:runrevelanor,项目名称:livecode,代码行数:24,代码来源:w32stack.cpp

示例7: doreadfile


//.........这里部分代码省略.........
			if (MCresult -> isclear())
				MCresult->sets("stack is corrupted, check for ~ backup file");
			destroystack(sptr, False);
			sptr = NULL;
			return IO_ERROR;
		}

		if (stacks != NULL)
		{
			MCStack *tstk = stacks;
			do
			{
				if (sptr->hasname(tstk->getname()))
				{
					MCAutoNameRef t_stack_name;
					/* UNCHECKED */ t_stack_name . Clone(sptr -> getname());

					delete sptr;
					sptr = NULL;

					if (strequal(tstk->getfilename(), openpath))
						sptr = tstk;
					else
					{
						MCdefaultstackptr->getcard()->message_with_args(MCM_reload_stack, MCNameGetOldString(tstk->getname()), openpath);
						tstk = stacks;
						do
						{
							if (MCNameIsEqualTo(t_stack_name, tstk->getname(), kMCCompareCaseless))
							{
								sptr = tstk;
								break;
							}
							tstk = (MCStack *)tstk->next();
						}
						while (tstk != stacks);
					}

					return IO_NORMAL;
				}
				tstk = (MCStack *)tstk->next();
			}
			while (tstk != stacks);
		}
		
		appendstack(sptr);
		
		sptr->extraopen(false);

		// MW-2008-10-28: [[ ParentScript ]]
		// We just loaded a stackfile, so check to see if parentScript resolution
		// is required and if so do it.
		// MW-2009-01-28: [[ Inherited parentScripts ]]
		// Resolving parentScripts may allocate memory, so 'resolveparentscripts'
		// will return false if it fails to allocate what it needs. At some point
		// this needs to be dealt with by deleting the stack and returning an error,
		// *However* at the time of writing, 'readfile' isn't designed to handle
		// this - so we just ignore the result for now (note that all the 'load'
		// methods *fail* to check for no-memory errors!).
		if (s_loaded_parent_script_reference)
			sptr -> resolveparentscripts();
		
	}
	else
	{
		MCS_seek_set(stream, 0);
开发者ID:runrevelanor,项目名称:livecode,代码行数:67,代码来源:dispatch.cpp

示例8: ep

MCObject *MCDispatch::getobjname(Chunk_term type, const MCString &s)
{
	if (stacks != NULL)
	{
		MCStack *tstk = stacks;
		do
		{
			MCObject *optr;
			if ((optr = tstk->getsubstackobjname(type, s)) != NULL)
				return optr;
			tstk = (MCStack *)tstk->next();
		}
		while (tstk != stacks);
	}

	if (type == CT_IMAGE)
	{
		const char *sptr = s.getstring();
		uint4 l = s.getlength();

		MCAutoNameRef t_image_name;
		if (MCU_strchr(sptr, l, ':'))
			/* UNCHECKED */ t_image_name . CreateWithOldString(s);

		MCImage *iptr = imagecache;
		if (iptr != NULL)
		{
			do
			{
check:
				if (t_image_name != nil && iptr -> hasname(t_image_name))
					return iptr;
				if (!iptr->getopened())
				{
					iptr->remove(imagecache);
					delete iptr;
					iptr = imagecache;
					if (iptr == NULL)
						break;
					goto check;
				}
				iptr = (MCImage *)iptr->next();
			}
			while (iptr != imagecache);
		}

		if (MCU_strchr(sptr, l, ':'))
		{
			MCresult->clear(False);
			MCExecPoint ep(MCdefaultstackptr, NULL, NULL);
			MCExecPoint *epptr = MCEPptr == NULL ? &ep : MCEPptr;
			epptr->setsvalue(s);
			MCU_geturl(*epptr);
			if (MCresult->isempty())
			{
				iptr = new MCImage;
				iptr->appendto(imagecache);
				iptr->setprop(0, P_TEXT, *epptr, False);
				iptr->setname(t_image_name);
				return iptr;
			}
		}
	}
	return NULL;
}
开发者ID:runrevelanor,项目名称:livecode,代码行数:65,代码来源:dispatch.cpp


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