Reimplemented from OglGui::WindowListener. Definition at line 68 of file BoostedGraph.h. References center, dragging, OglGui::OglWindow::GetDimensions(), OglGui::Graph::GetText(), graph, ILOG_DEBUG, layoutDone, and position. 00069 { 00070 if (but==oglLeftButton && msg == oglMouseMove) dragging = true; 00071 00072 if (dragging && but==oglLeftButton && msg == oglMouseUp) { 00073 OglGui::Graph* g = (OglGui::Graph*) userData; 00074 // update BoostGraph with move of node 00075 // TODO: This updating should be more elegant 00076 graph_traits<Graph>::vertex_iterator vi, vi_end; 00077 for (tie(vi, vi_end) = vertices(graph); vi != vi_end; ++vi) { 00078 string name = get(vertex_name, graph, *vi); 00079 if(name.compare(g->GetText()) != 0) continue; 00080 int x, y, w, h; 00081 g->GetDimensions(x, y, w, h); 00082 ILOG_DEBUG(g->GetText() + " moved");// to (" + MakeString(x) + "," + MakeString(y) + ")"); 00083 position[*vi].x = x-center.x; 00084 position[*vi].y = y-center.y; 00085 layoutDone = false; 00086 break; 00087 } 00088 dragging = false; 00089 } 00090 }
Here is the call graph for this function:
|