COIN-OR::LEMON - Graph Library

Changeset 1737:dc821d2668c1 in lemon-0.x for gui


Ignore:
Timestamp:
10/24/05 12:15:40 (18 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2265
Message:

Newly created map is realized by the property givening by common sense.

Location:
gui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • gui/map_win.cc

    r1733 r1737  
    9393    e_combo_array[i]->append_text((Glib::ustring)newmapname);
    9494  }
    95   //setting text property for the new map
    96   e_combo_array[N_TEXT]->set_active_text((Glib::ustring)newmapname);
    9795}
    9896
     
    104102    n_combo_array[i]->append_text((Glib::ustring)newmapname);
    105103  }
    106   //setting text property for the new map
    107   n_combo_array[N_TEXT]->set_active_text((Glib::ustring)newmapname);
    108104}
  • gui/mapselector.cc

    r1733 r1737  
    11#include "mapselector.h"
    22
    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)
     3MapSelector::MapSelector(GraphDisplayerCanvas & grdispc, MapStorage & mapst, NewMapWin & newmapw, int identifier, bool edge):gdc(grdispc),ms(mapst),nmw(newmapw),id(identifier),itisedge(edge),default_state(true),set_new_map(false),node_to_update(INVALID),edge_to_update(INVALID)
    44{
    55  update_list();
     
    3737  newbut->signal_pressed().connect
    3838    (
    39      sigc::mem_fun(nmw, &NewMapWin::show)
     39     sigc::mem_fun(*this, &MapSelector::new_but_pressed)
    4040     );
    4141
     
    4646  add(*defbut);
    4747  add(*newbut);
     48}
     49
     50void MapSelector::new_but_pressed()
     51{
     52  set_new_map=true;
     53  nmw.showByPreChoose(itisedge);
    4854}
    4955
     
    212218{
    213219  cbt.append_text(text);
    214 }
     220  if(set_new_map)
     221    {
     222      set_active_text(text);
     223      set_new_map=false;
     224    }
     225}
  • gui/mapselector.h

    r1733 r1737  
    2727  bool default_state;
    2828
     29  bool set_new_map;
     30
    2931  Gtk::ComboBoxText cbt;
    3032
     
    5153  virtual void comboChanged();
    5254
     55  virtual void new_but_pressed();
     56
    5357  virtual void reset();
    5458
  • gui/new_map_win.cc

    r1597 r1737  
    6161}
    6262
     63void NewMapWin::showByPreChoose(bool itisedge)
     64{
     65  if(itisedge)
     66    {
     67      edge.set_active();
     68    }
     69  else
     70    {
     71      node.set_active();
     72    }
     73  node.hide();
     74  edge.hide();
     75  show();
     76}
     77
    6378void NewMapWin::buttonPressed()
    6479{
     
    103118          name.set_text("");
    104119          default_value.set_text("0");
     120          edge.show();
     121          node.show();
    105122          hide();
    106123        }
  • gui/new_map_win.h

    r1593 r1737  
    3333  virtual void buttonPressed();
    3434
     35  virtual void showByPreChoose(bool);
     36
    3537  virtual bool closeIfEscapeIsPressed(GdkEventKey*);
    3638
Note: See TracChangeset for help on using the changeset viewer.