model_server/gra/src/graSymbol.h.cxx
//------------------------------------------
// find_insertion
//
// This function determines the insertion point if a symbol was picked.
//------------------------------------------
find_insertion
This function determines the insertion point if a symbol was picked.
find_insertion This function determines the insertion point if a symbol was picked .
void graParametricSymbol::find_insertion(
    graWindow*,
    Graphic** selected, int num_selected,
    viewSelection* selection)
{
    Initialize (graParametricSymbol::find_insertion);
    selection->view_node = this->get_viewnode ();
    selection->connector = NULL;
    selection->sub_type = 0;
    for (int selno = 0; selno < num_selected; selno++)
    {
	Graphic* sel;
        if (selected[selno]->IsA(INSTANCE))
	    ((Instance*) selected[selno])->GetOriginal(sel);
        else
	    sel = selected[selno];
        for (int layer = graLayerNoDecorationLL;
	     layer <= graLayerNoDecorationUR; layer++)
	{
            Graphic* decoration = get_pictel(layer);
            if (decoration && sel == decoration)
	    {
                selection->sub_type = layer;
                return;
            }
        }
    }
}
void graParametricSymbol :: find_insertion ( graWindow * , Graphic * * selected , int num_selected , viewSelection * selection ) { Initialize ( graParametricSymbol :: find_insertion ) ; selection -> view_node = this -> get_viewnode ( ) ; selection -> connector = NULL ; selection -> sub_type = 0 ; for ( int selno = 0 ; selno < num_selected ; selno ++ ) { Graphic * sel ; if ( selected [ selno ] -> IsA ( INSTANCE ) ) ( ( Instance * ) selected [ selno ] ) -> GetOriginal ( sel ) ; else sel = selected [ selno ] ; for ( int layer = graLayerNoDecorationLL ; layer <= graLayerNoDecorationUR ; layer ++ ) { Graphic * decoration = get_pictel ( layer ) ; if ( decoration && sel == decoration ) { selection -> sub_type = layer ; return ; } } } }
find_insertion
This function determines the insertion point if a symbol was picked.
find_insertion This function determines the insertion point if a symbol was picked .