예제 #1
0
void ModuleModel::setArrowsSelected(bool sel)
{
    for(int i=0; i<this->get_n_children(); i++)
    {
        Glib::RefPtr<InternalPortModel> port = 
            Glib::RefPtr<InternalPortModel>::cast_dynamic(this->get_child(i));
        if(port)
        {   
            std::vector<ArrowModel*>::iterator itr;
            for(itr = port->getSourceArrows().begin(); itr!= port->getSourceArrows().end(); itr++)
               (*itr)->setSelected(sel);
            for(itr = port->getDestinationArrows().begin(); itr!= port->getDestinationArrows().end(); itr++)
               (*itr)->setSelected(sel);
        }
    }
}
예제 #2
0
void ModuleModel::updateArrowCoordination(void)
{
    for(int i=0; i<this->get_n_children(); i++)
    {
        Glib::RefPtr<InternalPortModel> port = 
            Glib::RefPtr<InternalPortModel>::cast_dynamic(this->get_child(i));
        if(port)
        {   
            std::vector<ArrowModel*>::iterator itr;
            for(itr = port->getSourceArrows().begin(); itr!= port->getSourceArrows().end(); itr++)
               (*itr)->updatCoordiantes();                
            for(itr = port->getDestinationArrows().begin(); itr!= port->getDestinationArrows().end(); itr++)
               (*itr)->updatCoordiantes();
        }
    }
}