Changeset 47:9a0e6e92d06c in glemon-0.x
- Timestamp:
- 07/28/05 16:31:32 (20 years ago)
- Branch:
- gui
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2103
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
graph_displayer_canvas-edge.cc
r45 r47 23 23 if(w>=0) 24 24 { 25 edgesmap[i]->property_width_ pixels().set_value(w);25 edgesmap[i]->property_width_units().set_value(w); 26 26 } 27 27 } … … 32 32 if(w>=0) 33 33 { 34 edgesmap[edge]->property_width_ pixels().set_value(w);34 edgesmap[edge]->property_width_units().set_value(w); 35 35 } 36 36 } -
graph_displayer_canvas-event.cc
r46 r47 590 590 entry_coos.y-=edgetextmap[active_edge]->property_text_height().get_value()*1.5/2; 591 591 canvasentrywidget=new Gnome::Canvas::Widget(displayed_graph, entry_coos.x, entry_coos.y, entrywidget); 592 canvasentrywidget->property_width().set_value(edgetextmap[active_edge]->property_text_width().get_value()* 1.5);592 canvasentrywidget->property_width().set_value(edgetextmap[active_edge]->property_text_width().get_value()*4); 593 593 canvasentrywidget->property_height().set_value(edgetextmap[active_edge]->property_text_height().get_value()*1.5); 594 594 } … … 768 768 edgetextmap[active_edge]->property_text().set_value(ostr.str()); 769 769 (*(mapstorage.edgemap_storage)[edgemap_to_edit])[active_edge]=mapvalue_d; 770 mapwin->updateEdge(active_edge); 770 771 break; 771 772 case NODE_MAP_EDIT: 772 773 nodetextmap[active_node]->property_text().set_value(ostr.str()); 773 774 (*(mapstorage.nodemap_storage)[nodemap_to_edit])[active_node]=mapvalue_d; 775 mapwin->updateNode(active_node); 774 776 break; 775 777 default: -
graph_displayer_canvas.cc
r41 r47 33 33 edgesmap[i]=new BrokenEdge(displayed_graph, coos, *this); 34 34 *(edgesmap[i]) << Gnome::Canvas::Properties::fill_color("green"); 35 edgesmap[i]->property_width_ pixels().set_value(10);35 edgesmap[i]->property_width_units().set_value(10); 36 36 37 37 //initializing edge-text as well, to empty string -
main_win.cc
r41 r47 2 2 3 3 MainWin::MainWin(const std::string& title, Graph & graph, CoordinatesMap & cm, 4 MapStorage & ms):mapwin("Map Setup", ms, gd_canvas), editwin("Editorial Window", gd_canvas),newmapwin("Creating new map",gd_canvas),gd_canvas(graph, cm, ms, &mapwin)4 MapStorage & ms):mapwin("Map Setup", ms, gd_canvas),newmapwin("Creating new map",gd_canvas),gd_canvas(graph, cm, ms, &mapwin) 5 5 { 6 //Creating a window for setting new maps.7 // newmapwin=new NewMapWi("Creating new map",*this);8 9 6 10 7 set_title (title); … … 24 21 sigc::mem_fun(*this, &MainWin::saveFileAs)); 25 22 ag->add( Gtk::Action::create("FileQuit", Gtk::Stock::QUIT), 26 sigc::mem_fun(*this, &MainWin:: quit));23 sigc::mem_fun(*this, &MainWin::hide)); 27 24 28 25 ag->add( Gtk::Action::create("ViewMenu", "_View") ); … … 38 35 ag->add( Gtk::Action::create("ShowMenu", "_Show") ); 39 36 ag->add( Gtk::Action::create("ShowMaps", "_Maps"), 40 sigc::mem_fun(*this, &MainWin::showMaps)); 41 ag->add( Gtk::Action::create("ShowEditorials", "_Editorials"), 42 sigc::mem_fun(*this, &MainWin::showEditorials)); 37 sigc::mem_fun(this->mapwin, &MapWin::show)); 43 38 44 39 ag->add( Gtk::Action::create("CreateNode", Gtk::Stock::NO), … … 82 77 " <menu action='ShowMenu'>" 83 78 " <menuitem action='ShowMaps'/>" 84 " <menuitem action='ShowEditorials'/>"85 79 " </menu>" 86 80 " </menubar>" … … 133 127 } 134 128 135 void MainWin::showMaps()136 {137 mapwin.show();138 }139 140 void MainWin::showEditorials()141 {142 editwin.show();143 }144 145 void MainWin::quit()146 {147 hide();148 }149 150 129 void MainWin::newFile() 151 130 { -
main_win.h
r41 r47 8 8 #include <map_win.h> 9 9 #include <new_map_win.h> 10 #include <edit_win.h>11 10 #include <libgnomecanvasmm.h> 12 11 #include <libgnomecanvasmm/polygon.h> … … 28 27 MapWin mapwin; 29 28 30 ///Window of editorial tools. Its type is \ref EditWin31 EditWin editwin;32 33 29 ///We need to store newmapwin, to be able to set the appropriate values for properties of new map. 34 30 NewMapWin newmapwin; … … 46 42 Gtk::VBox vbox; 47 43 48 ///This function makes map-setup window popped up.49 virtual void showMaps();50 ///This function makes editorial window popped up.51 virtual void showEditorials();52 44 ///Callback for 'FileNew' action. 53 45 virtual void newFile(); … … 58 50 ///Callback for 'FileSaveAs' action. 59 51 virtual void saveFileAs(); 60 ///Callback for 'Quit' action.61 virtual void quit();62 52 }; 63 53
Note: See TracChangeset
for help on using the changeset viewer.