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


C++ UI_GADGET::destroy方法代码示例

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


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

示例1: destroy

void UI_WINDOW::destroy()
{
	UI_GADGET *cur;
	int idx;

	// free up any bitmaps
	release_bitmaps();

	// destroy all gadgets
	if (first_gadget) {
		cur = first_gadget;
		do {
			cur->destroy();
			cur = cur->next;

		} while (cur != first_gadget);
	}

	// free up all xstrs
	for(idx=0; idx<MAX_UI_XSTRS; idx++){
		// free up this struct
		if(xstrs[idx] != NULL){
			if(xstrs[idx]->xstr != NULL){
				// This const_cast is safe since the string was allocated by vm_strdup
				vm_free(const_cast<char*>(xstrs[idx]->xstr));
			}
			vm_free(xstrs[idx]);
			xstrs[idx] = NULL;
		}
	}
}
开发者ID:Echelon9,项目名称:fs2open.github.com,代码行数:31,代码来源:window.cpp

示例2: destroy

//	Free up bitmaps used by the gadget, and call children to destroy themselves as well.
//
void UI_GADGET::destroy()
{
	int i;
	UI_GADGET *cur;

	for ( i=0; i<m_num_frames; i++ ) {
		if (bmap_ids[i] != -1) {
			bm_release(bmap_ids[i]);
			bmap_ids[i] = -1;
		}
	}

	if (children) {
		cur = children;
		do {
			cur->destroy();
			cur = cur->next;

		} while (cur != children);
	}
}
开发者ID:lubomyr,项目名称:freespace2,代码行数:23,代码来源:gadget.cpp

示例3: destroy

//	Free up bitmaps used by the gadget, and call children to destroy themselves as well.
//
void UI_GADGET::destroy()
{
	int i;
	UI_GADGET *cur;

	for ( i=0; i<m_num_frames; i++ ) {
		if (bmap_ids[i] != -1) {
			// we need to unload here rather than release since some controls
			// may still need access to the bitmap slot.  if it can be released
			// then the child should do it - taylor
			bm_unload(bmap_ids[i]);
			bmap_ids[i] = -1;
		}
	}

	if (children) {
		cur = children;
		do {
			cur->destroy();
			cur = cur->next;

		} while (cur != children);
	}
}
开发者ID:derek-yeung,项目名称:fs2open.github.com,代码行数:26,代码来源:gadget.cpp


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