Changeset 201:879e47e5b731 in glemon-0.x for map_win.cc
- Timestamp:
- 01/02/08 22:03:09 (16 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@3431
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
map_win.cc
r194 r201 32 32 } 33 33 34 MapWin::MapWin(const std::string& title, std::vector<std::string> eml, std::vector<std::string> nml, NoteBookTab & mw):mytab(mw) 34 MapWin::MapWin(const std::string& title, 35 std::vector<std::string> n_eml, 36 std::vector<std::string> s_eml, 37 std::vector<std::string> n_nml, 38 std::vector<std::string> s_nml, 39 NoteBookTab & mw):mytab(mw) 35 40 { 36 41 set_title(title); … … 49 54 for(int i=0;i<EDGE_PROPERTY_NUM;i++) 50 55 { 51 e_combo_array[i]=new MapSelector(eml, mytab.getActiveEdgeMap(i), edge_property_strings[i], true); 56 switch (i) 57 { 58 case E_WIDTH: 59 e_combo_array[i]=new MapSelector(n_eml, s_eml, 60 mytab.getActiveEdgeMap(i), edge_property_strings[i], 61 true, true, NUM); 62 break; 63 case E_COLOR: 64 e_combo_array[i]=new MapSelector(n_eml, s_eml, 65 mytab.getActiveEdgeMap(i), edge_property_strings[i], 66 true, true, NUM); 67 break; 68 case E_TEXT: 69 e_combo_array[i]=new MapSelector(n_eml, s_eml, 70 mytab.getActiveEdgeMap(i), edge_property_strings[i], 71 true, true, ALL); 72 break; 73 } 52 74 53 75 (*table).attach((*(e_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); … … 69 91 for(int i=0;i<NODE_PROPERTY_NUM;i++) 70 92 { 71 n_combo_array[i]=new MapSelector(nml, mytab.getActiveNodeMap(i), node_property_strings[i], false); 93 switch (i) 94 { 95 case N_RADIUS: 96 n_combo_array[i]=new MapSelector(n_nml, s_nml, 97 mytab.getActiveNodeMap(i), node_property_strings[i], 98 false, true, NUM); 99 break; 100 case N_COLOR: 101 n_combo_array[i]=new MapSelector(n_nml, s_nml, 102 mytab.getActiveNodeMap(i), node_property_strings[i], 103 false, true, NUM); 104 break; 105 case N_TEXT: 106 n_combo_array[i]=new MapSelector(n_nml, s_nml, 107 mytab.getActiveNodeMap(i), node_property_strings[i], 108 false, true, ALL); 109 break; 110 } 72 111 73 112 (*table).attach((*(n_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); … … 83 122 vbox.pack_start(*table); 84 123 124 update(n_eml, s_eml, n_nml, s_nml); 125 85 126 show_all_children(); 86 127 … … 102 143 } 103 144 104 void MapWin::update(std::vector<std::string> eml, std::vector<std::string> nml) 145 void MapWin::update( 146 std::vector<std::string> n_eml, 147 std::vector<std::string> s_eml, 148 std::vector<std::string> n_nml, 149 std::vector<std::string> s_nml) 105 150 { 106 151 for(int i=0;i<EDGE_PROPERTY_NUM;i++) 107 152 { 108 e_combo_array[i]->update_list( eml);153 e_combo_array[i]->update_list(n_eml, s_eml); 109 154 } 110 155 111 156 for(int i=0;i<NODE_PROPERTY_NUM;i++) 112 157 { 113 n_combo_array[i]->update_list(n ml);158 n_combo_array[i]->update_list(n_nml, s_nml); 114 159 } 115 160 … … 117 162 } 118 163 119 void MapWin::registerNewEdgeMap(std::string newmapname )164 void MapWin::registerNewEdgeMap(std::string newmapname, MapValue::Type type) 120 165 { 121 166 for(int i=0;i<EDGE_PROPERTY_NUM;i++) 122 167 { 123 168 //filling in combo box with choices 124 e_combo_array[i]->append_text((Glib::ustring)newmapname );125 } 126 } 127 128 void MapWin::registerNewNodeMap(std::string newmapname )169 e_combo_array[i]->append_text((Glib::ustring)newmapname, type); 170 } 171 } 172 173 void MapWin::registerNewNodeMap(std::string newmapname, MapValue::Type type) 129 174 { 130 175 for(int i=0;i<NODE_PROPERTY_NUM;i++) 131 176 { 132 177 //filling in combo box with choices 133 n_combo_array[i]->append_text((Glib::ustring)newmapname );178 n_combo_array[i]->append_text((Glib::ustring)newmapname, type); 134 179 } 135 180 }
Note: See TracChangeset
for help on using the changeset viewer.