_copyLp(), _newLp() implemented.
4 MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc):gdc(grdispc),ms(mapst)
7 set_default_size(400, 200);
9 rb_array=new Gtk::RadioButton * [PROPERTY_NUM];
10 vbox_r1=new Gtk::VBox[PROPERTY_NUM];
11 vbox_r2=new Gtk::VBox[PROPERTY_NUM];
12 radios=new Gtk::HBox[PROPERTY_NUM];
13 for(int i=0;i<PROPERTY_NUM;i++)
15 rb_array[i]=new Gtk::RadioButton[ms.numOfEdgeMaps()+1];
17 Gtk::RadioButton::Group group;
19 std::map< std::string,Graph::EdgeMap<double> * >::iterator emsi=ms.beginOfEdgeMaps();
23 for(int j=0;j<ms.numOfEdgeMaps();j++)
26 if(emsi->second==&(ms.default_edgemaps[i]))
30 for(int k=0;k<PROPERTY_NUM;k++)
32 if(emsi->second==&(ms.default_edgemaps[k]))
40 rb_array[i][0].set_group(group);
41 rb_array[i][0].set_label("Default");
42 rb_array[i][0].signal_clicked().connect( sigc::bind( sigc::bind( sigc::mem_fun(*this, &MapWin::radio_click), 0), i) );
43 vbox_r1[i].pack_start(rb_array[i][0]);
46 emsi=ms.beginOfEdgeMaps();
48 for(int j=0;j<ms.numOfEdgeMaps();j++)
50 if( ( props.find(j) )==( props.end() ) )
52 rb_array[i][actpos].set_group(group);
53 rb_array[i][actpos].set_label(emsi->first);
54 rb_array[i][actpos].signal_clicked().connect
58 sigc::mem_fun(*this, &MapWin::radio_click),
65 if(actpos<(ms.numOfEdgeMaps()-PROPERTY_NUM+1)/2)
67 vbox_r1[i].pack_start(rb_array[i][actpos]);
71 vbox_r2[i].pack_start(rb_array[i][actpos]);
77 radios[i].pack_start(vbox_r1[i]);
78 radios[i].pack_start(vbox_r2[i]);
79 notebook.append_page(radios[i], property_strings[i]);
83 vbox_b.pack_start(notebook);
89 void MapWin::radio_click(int prop, int actpos)
91 if(rb_array[prop][actpos].get_active())
94 std::string mapname=rb_array[prop][actpos].get_label();
96 if(mapname=="Default")
98 mapname=property_strings[prop];
104 gdc.changeLineWidth(mapname);
107 gdc.changeColor(mapname);
110 gdc.changeText(mapname);
113 std::cout<<"Error\n";