gui/mapselector.h
author deba
Wed, 26 Oct 2005 10:50:47 +0000
changeset 1741 7a98fe2ed989
parent 1733 5e0d97823ba2
permissions -rw-r--r--
Some modifications on shortest path algoritms:
- heap traits
- checked execution
hegyi@1731
     1
// -*- C++ -*- //
hegyi@1731
     2
hegyi@1731
     3
#ifndef MAP_SELECTOR_H
hegyi@1731
     4
#define MAP_SELECTOR_H
hegyi@1731
     5
hegyi@1731
     6
class MapSelector;
hegyi@1731
     7
hegyi@1731
     8
#include "all_include.h"
hegyi@1731
     9
#include "mapstorage.h"
hegyi@1733
    10
#include "new_map_win.h"
hegyi@1731
    11
#include "graph_displayer_canvas.h"
hegyi@1731
    12
#include <libgnomecanvasmm.h>
hegyi@1731
    13
#include <libgnomecanvasmm/polygon.h>
hegyi@1731
    14
hegyi@1731
    15
class MapSelector : public Gtk::HBox
hegyi@1731
    16
{
hegyi@1731
    17
protected:
hegyi@1731
    18
  GraphDisplayerCanvas & gdc;
hegyi@1731
    19
  ///The \ref MapStorage in which the visualizable maps are stored
hegyi@1731
    20
  MapStorage & ms;
hegyi@1733
    21
  NewMapWin & nmw;
hegyi@1731
    22
hegyi@1731
    23
  int id;
hegyi@1731
    24
hegyi@1731
    25
  bool itisedge;
hegyi@1731
    26
hegyi@1731
    27
  bool default_state;
hegyi@1731
    28
hegyi@1737
    29
  bool set_new_map;
hegyi@1737
    30
hegyi@1731
    31
  Gtk::ComboBoxText cbt;
hegyi@1731
    32
hegyi@1731
    33
  Gtk::Button * newbut, * defbut;
hegyi@1731
    34
hegyi@1731
    35
  Gtk::HBox hbox;
hegyi@1731
    36
hegyi@1731
    37
  Gtk::Label * label;
hegyi@1731
    38
hegyi@1731
    39
  Node node_to_update;
hegyi@1731
    40
  Edge edge_to_update;
hegyi@1731
    41
hegyi@1731
    42
hegyi@1731
    43
public:
hegyi@1731
    44
hegyi@1733
    45
  MapSelector(GraphDisplayerCanvas &, MapStorage &, NewMapWin &, int, bool);
hegyi@1731
    46
hegyi@1731
    47
  void update_list();
hegyi@1731
    48
hegyi@1731
    49
  ///If a radiobutton is clicked, this function determines
hegyi@1731
    50
  ///which button was that and after that calls the
hegyi@1731
    51
  ///appropriate function of the \ref GraphDisplayerCanvas
hegyi@1731
    52
  ///to change the visible values of that attribute.
hegyi@1731
    53
  virtual void comboChanged();
hegyi@1731
    54
hegyi@1737
    55
  virtual void new_but_pressed();
hegyi@1737
    56
hegyi@1731
    57
  virtual void reset();
hegyi@1731
    58
hegyi@1731
    59
  virtual void update(Node node);
hegyi@1731
    60
  virtual void update(Edge edge);
hegyi@1731
    61
hegyi@1731
    62
  Glib::ustring get_active_text();
hegyi@1731
    63
  void set_active_text(Glib::ustring);
hegyi@1731
    64
  void append_text(Glib::ustring);
hegyi@1731
    65
};
hegyi@1731
    66
hegyi@1731
    67
#endif