model_server/ui_browser/src/projectBrowser1.h.cxx
//  Callback for the complement of group(s)
Callback for the complement of group(s)
Callback for the complement of group ( s )
void projectBrowser::complement_groups_CB(gtPushButton*, gtEventPtr, void* pb_data, gtReason)
{
    Initialize(projectBrowser::complement_groups_CB);
#ifndef NEW_UI
    projectBrowser* pb = (projectBrowser*)pb_data;
    push_busy_cursor();
    if (pb) {
	int* indices, size, group_count, i=0;
	groups_rtl->get_selected_pos(&indices, &size);
	group_count = origin_browser->group_lists.size();
	RTLPtr list;
	symbolArr union_array, other_array;
	int *groups_seen = new int[group_count];
	for(i = 0; i < group_count; i++)
	    groups_seen[i] = 0;
	for(i = 0; i < size && i < group_count; i++) {
	    const int index = indices[i] - 1;
	    list = *(origin_browser->group_lists)[index];
	    symbolArr& array = RTLNodePtr(list->get_root())->rtl_contents();
	    union_array.insert_last(array);
	    groups_seen[index] = 1;
	}
	for (i = 0; i < group_count; i++) 
	    if (!groups_seen[i]) {
		const int index = i;
		list = *(origin_browser->group_lists)[index];
		symbolArr& array = RTLNodePtr(list->get_root())->rtl_contents();
		other_array.insert_last(array);
	    }
	delete groups_seen;
	union_array.usort();
	other_array.usort();
	symbolPtr sym;
	ForEachS(sym, union_array) {
	    if (other_array.includes_cross_xref(sym))
		other_array.remove_cross_xref(sym);
	}
	origin_browser->reset();
	origin_browser->domain_list->set_rtl(other_array);
	if(indices)
	    gtFree(indices);
    }
    pop_cursor();
#endif
}
void projectBrowser :: complement_groups_CB ( gtPushButton * , gtEventPtr , void * pb_data , gtReason ) { Initialize ( projectBrowser :: complement_groups_CB ) ; #ifndef NEW_UI projectBrowser * pb = ( projectBrowser * ) pb_data ; push_busy_cursor ( ) ; if ( pb ) { int * indices , size , group_count , i = 0 ; groups_rtl -> get_selected_pos ( & indices , & size ) ; group_count = origin_browser -> group_lists . size ( ) ; RTLPtr list ; symbolArr union_array , other_array ; int * groups_seen = new int [ group_count ] ; for ( i = 0 ; i < group_count ; i ++ ) groups_seen [ i ] = 0 ; for ( i = 0 ; i < size && i < group_count ; i ++ ) { const int index = indices [ i ] - 1 ; list = * ( origin_browser -> group_lists ) [ index ] ; symbolArr & array = RTLNodePtr ( list -> get_root ( ) ) -> rtl_contents ( ) ; union_array . insert_last ( array ) ; groups_seen [ index ] = 1 ; } for ( i = 0 ; i < group_count ; i ++ ) if ( ! groups_seen [ i ] ) { const int index = i ; list = * ( origin_browser -> group_lists ) [ index ] ; symbolArr & array = RTLNodePtr ( list -> get_root ( ) ) -> rtl_contents ( ) ; other_array . insert_last ( array ) ; } delete groups_seen ; union_array . usort ( ) ; other_array . usort ( ) ; symbolPtr sym ; ForEachS ( sym , union_array ) { if ( other_array . includes_cross_xref ( sym ) ) other_array . remove_cross_xref ( sym ) ; } origin_browser -> reset ( ) ; origin_browser -> domain_list -> set_rtl ( other_array ) ; if ( indices ) gtFree ( indices ) ; } pop_cursor ( ) ; #endif }
Callback for the complement of group(s)
Callback for the complement of group ( s )