COIN-OR::LEMON - Graph Library

Changeset 47:9a0e6e92d06c in glemon-0.x


Ignore:
Timestamp:
07/28/05 16:31:32 (14 years ago)
Author:
Hegyi Péter
Branch:
gui
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2103
Message:

Redundant functions from main_win disappeared, entry is now bigger, properties refresh upon edition, edgewidth is zoomable.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • graph_displayer_canvas-edge.cc

    r45 r47  
    2323          if(w>=0)
    2424            {
    25               edgesmap[i]->property_width_pixels().set_value(w);
     25              edgesmap[i]->property_width_units().set_value(w);
    2626            }
    2727        }
     
    3232      if(w>=0)
    3333        {
    34           edgesmap[edge]->property_width_pixels().set_value(w);
     34          edgesmap[edge]->property_width_units().set_value(w);
    3535        }
    3636    }
  • graph_displayer_canvas-event.cc

    r46 r47  
    590590                    entry_coos.y-=edgetextmap[active_edge]->property_text_height().get_value()*1.5/2;
    591591                    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);
    593593                    canvasentrywidget->property_height().set_value(edgetextmap[active_edge]->property_text_height().get_value()*1.5);
    594594                  }
     
    768768                        edgetextmap[active_edge]->property_text().set_value(ostr.str());
    769769                        (*(mapstorage.edgemap_storage)[edgemap_to_edit])[active_edge]=mapvalue_d;
     770                        mapwin->updateEdge(active_edge);
    770771                        break;
    771772                      case NODE_MAP_EDIT:
    772773                        nodetextmap[active_node]->property_text().set_value(ostr.str());
    773774                        (*(mapstorage.nodemap_storage)[nodemap_to_edit])[active_node]=mapvalue_d;
     775                        mapwin->updateNode(active_node);
    774776                        break;
    775777                      default:
  • graph_displayer_canvas.cc

    r41 r47  
    3333    edgesmap[i]=new BrokenEdge(displayed_graph, coos, *this);
    3434    *(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);   
    3636   
    3737    //initializing edge-text as well, to empty string
  • main_win.cc

    r41 r47  
    22
    33MainWin::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)
    55{
    6   //Creating a window for setting new maps.
    7 //   newmapwin=new NewMapWi("Creating new map",*this);
    8 
    96
    107  set_title (title);
     
    2421      sigc::mem_fun(*this, &MainWin::saveFileAs));
    2522  ag->add( Gtk::Action::create("FileQuit", Gtk::Stock::QUIT),
    26       sigc::mem_fun(*this, &MainWin::quit));
     23      sigc::mem_fun(*this, &MainWin::hide));
    2724
    2825  ag->add( Gtk::Action::create("ViewMenu", "_View") );
     
    3835  ag->add( Gtk::Action::create("ShowMenu", "_Show") );
    3936  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));
    4338
    4439  ag->add( Gtk::Action::create("CreateNode", Gtk::Stock::NO),
     
    8277      "    <menu action='ShowMenu'>"
    8378      "      <menuitem action='ShowMaps'/>"
    84       "      <menuitem action='ShowEditorials'/>"
    8579      "    </menu>"
    8680      "  </menubar>"
     
    133127}
    134128
    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 
    150129void MainWin::newFile()
    151130{
  • main_win.h

    r41 r47  
    88#include <map_win.h>
    99#include <new_map_win.h>
    10 #include <edit_win.h>
    1110#include <libgnomecanvasmm.h>
    1211#include <libgnomecanvasmm/polygon.h>
     
    2827  MapWin mapwin;
    2928
    30   ///Window of editorial tools. Its type is \ref EditWin
    31   EditWin editwin;
    32 
    3329  ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
    3430  NewMapWin newmapwin;
     
    4642  Gtk::VBox vbox;
    4743
    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();
    5244  ///Callback for 'FileNew' action.
    5345  virtual void newFile();
     
    5850  ///Callback for 'FileSaveAs' action.
    5951  virtual void saveFileAs();
    60   ///Callback for 'Quit' action.
    61   virtual void quit();
    6252};
    6353
Note: See TracChangeset for help on using the changeset viewer.