Changeset 82:ee009c0f4bcf in glemon-0.x
- Timestamp:
- 10/21/05 15:32:12 (19 years ago)
- Branch:
- gui
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2260
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main_win.cc
r76 r82 3 3 4 4 MainWin::MainWin() : 5 mapwin("Map Setup", mapstorage, gd_canvas), 6 newmapwin("Creating new map", gd_canvas), gd_canvas(mapstorage, mapwin, (Gtk::Window *)this) 5 newmapwin("Creating new map", gd_canvas), 6 mapwin("Map Setup", mapstorage, gd_canvas, newmapwin), 7 gd_canvas(mapstorage, mapwin, (Gtk::Window *)this) 7 8 { 8 9 set_title ("unsaved file - " + prog_name); -
main_win.h
r68 r82 26 26 27 27 protected: 28 ///We need to store newmapwin, to be able to set the appropriate values for properties of new map. 29 NewMapWin newmapwin; 30 28 31 ///Window of map-showing setup. Its type is \ref MapWin 29 32 MapWin mapwin; 30 31 ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.32 NewMapWin newmapwin;33 33 34 34 ///The graph will be drawn on this \ref GraphDisplayerCanvas -
map_win.cc
r81 r82 11 11 } 12 12 13 MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc ):gdc(grdispc),ms(mapst)13 MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc, NewMapWin & newmapwin):gdc(grdispc),ms(mapst), nmw(newmapwin) 14 14 { 15 15 set_title(title); … … 24 24 for(int i=0;i<EDGE_PROPERTY_NUM;i++) 25 25 { 26 e_combo_array[i]=new MapSelector(gdc, ms, *this, i, true);26 e_combo_array[i]=new MapSelector(gdc, ms, nmw, i, true); 27 27 28 28 (*table).attach((*(e_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); … … 41 41 for(int i=0;i<NODE_PROPERTY_NUM;i++) 42 42 { 43 n_combo_array[i]=new MapSelector(gdc, ms, *this, i, false);43 n_combo_array[i]=new MapSelector(gdc, ms, nmw, i, false); 44 44 45 45 (*table).attach((*(n_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); … … 102 102 { 103 103 //filling in combo box with choices 104 e_combo_array[i]->append_text((Glib::ustring)newmapname);104 n_combo_array[i]->append_text((Glib::ustring)newmapname); 105 105 } 106 106 //setting text property for the new map -
map_win.h
r81 r82 9 9 #include "graph_displayer_canvas.h" 10 10 #include "mapstorage.h" 11 #include "new_map_win.h" 11 12 #include "mapselector.h" 12 13 #include <libgnomecanvasmm.h> … … 28 29 MapStorage & ms; 29 30 31 NewMapWin & nmw; 32 30 33 Gtk::Table * table; 31 34 … … 38 41 public: 39 42 ///Constructor of MapWin creates the widgets shown in MapWin. 40 MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas & );43 MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &, NewMapWin &); 41 44 42 45 ///This function is created to set the appropriate maps on the newly created node -
mapselector.cc
r81 r82 1 1 #include "mapselector.h" 2 2 3 MapSelector::MapSelector(GraphDisplayerCanvas & grdispc, MapStorage & mapst, MapWin & mapw, int identifier, bool edge):gdc(grdispc),ms(mapst),mw(mapw),id(identifier),itisedge(edge),default_state(true),node_to_update(INVALID),edge_to_update(INVALID)3 MapSelector::MapSelector(GraphDisplayerCanvas & grdispc, MapStorage & mapst, NewMapWin & newmapw, int identifier, bool edge):gdc(grdispc),ms(mapst),nmw(newmapw),id(identifier),itisedge(edge),default_state(true),node_to_update(INVALID),edge_to_update(INVALID) 4 4 { 5 5 update_list(); … … 34 34 35 35 newbut=new Gtk::Button(Gtk::Stock::NEW); 36 37 newbut->signal_pressed().connect 38 ( 39 sigc::mem_fun(nmw, &NewMapWin::show) 40 ); 36 41 37 42 add(*label); -
mapselector.h
r81 r82 8 8 #include "all_include.h" 9 9 #include "mapstorage.h" 10 #include " map_win.h"10 #include "new_map_win.h" 11 11 #include "graph_displayer_canvas.h" 12 12 #include <libgnomecanvasmm.h> … … 19 19 ///The \ref MapStorage in which the visualizable maps are stored 20 20 MapStorage & ms; 21 MapWin &mw;21 NewMapWin & nmw; 22 22 23 23 int id; … … 41 41 public: 42 42 43 MapSelector(GraphDisplayerCanvas &, MapStorage &, MapWin &, int, bool);43 MapSelector(GraphDisplayerCanvas &, MapStorage &, NewMapWin &, int, bool); 44 44 45 45 void update_list();
Note: See TracChangeset
for help on using the changeset viewer.