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