本文整理汇总了C++中ItemBase::close方法的典型用法代码示例。如果您正苦于以下问题:C++ ItemBase::close方法的具体用法?C++ ItemBase::close怎么用?C++ ItemBase::close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ItemBase
的用法示例。
在下文中一共展示了ItemBase::close方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tblnav_brow_cb
//.........这里部分代码省略.........
doubleclick_event->event = flow_eEvent_MB1DoubleClick;
sts = tblnav_brow_cb( ctx, doubleclick_event);
free( (char *) doubleclick_event);
return sts;
}
if ( brow_FindSelectedObject( tblnav->brow->ctx, event->object.object)) {
brow_SelectClear( tblnav->brow->ctx);
}
else {
brow_SelectClear( tblnav->brow->ctx);
brow_SetInverse( event->object.object, 1);
brow_SelectInsert( tblnav->brow->ctx, event->object.object);
}
break;
default:
brow_SelectClear( tblnav->brow->ctx);
}
break;
}
case flow_eEvent_Key_Left: {
brow_tNode *node_list;
int node_count;
brow_tObject object;
int sts;
brow_GetSelectedNodes( tblnav->brow->ctx, &node_list, &node_count);
if ( !node_count)
return 1;
if ( brow_IsOpen( node_list[0]))
// Close this node
object = node_list[0];
else {
// Close parent
sts = brow_GetParent( tblnav->brow->ctx, node_list[0], &object);
if ( EVEN(sts)) {
free( node_list);
return 1;
}
}
brow_GetUserData( object, (void **)&item);
item->close( tblnav, 0, 0);
brow_SelectClear( tblnav->brow->ctx);
brow_SetInverse( object, 1);
brow_SelectInsert( tblnav->brow->ctx, object);
if ( !brow_IsVisible( tblnav->brow->ctx, object, flow_eVisible_Full))
brow_CenterObject( tblnav->brow->ctx, object, 0.25);
free( node_list);
break;
}
case flow_eEvent_Key_Right: {
brow_tNode *node_list;
int node_count;
brow_GetSelectedNodes( tblnav->brow->ctx, &node_list, &node_count);
if ( !node_count)
return 1;
brow_GetUserData( node_list[0], (void **)&item);
switch( item->type) {
case tblnav_eItemType_Local:
case tblnav_eItemType_TreeLocal:
((ItemLocal *)item)->open_attributes( tblnav, 0, 0);
break;
case tblnav_eItemType_TreeNode:
((ItemTreeNode *)item)->open_children( tblnav, 0, 0);
break;
default:
;
}
}
case flow_eEvent_MB1DoubleClick:
switch ( event->object.object_type) {
case flow_eObjectType_Node:
brow_GetUserData( event->object.object, (void **)&item);
switch( item->type) {
case tblnav_eItemType_Local:
case tblnav_eItemType_TreeLocal:
((ItemLocal *)item)->open_attributes( tblnav,
event->object.x, event->object.y);
break;
case tblnav_eItemType_TreeNode:
((ItemTreeNode *)item)->open_children( tblnav,
event->object.x, event->object.y);
break;
default:
;
}
break;
default:
;
}
break;
default:
;
}
return 1;
}