本文整理汇总了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;
}
}
}
示例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);
}
}
示例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);
}
}