new_map_win.h
branchgui
changeset 42 f1b70894b953
child 85 0b2217328320
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/new_map_win.h	Tue Jul 26 21:20:01 2005 +0000
     1.3 @@ -0,0 +1,49 @@
     1.4 +// -*- C++ -*- //
     1.5 +
     1.6 +#ifndef NEWMAPWIN_H
     1.7 +#define NEWMAPWIN_H
     1.8 +
     1.9 +class NewMapWin;
    1.10 +
    1.11 +#include <all_include.h>
    1.12 +#include <graph_displayer_canvas.h>
    1.13 +#include <libgnomecanvasmm.h>
    1.14 +#include <libgnomecanvasmm/polygon.h>
    1.15 +
    1.16 +///This class is responsible for creating a window,
    1.17 +///on which the parameters of a new map can be set.
    1.18 +
    1.19 +class NewMapWin : public Gtk::Window
    1.20 +{
    1.21 +  ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
    1.22 +  ///It has to be known for this class, because
    1.23 +  ///when a map is created
    1.24 +  ///a function of the \ref GraphDisplayerCanvas will be called.
    1.25 +  GraphDisplayerCanvas & gdc;
    1.26 +
    1.27 + public:
    1.28 +  ///Constructor of NewMapWin creates the widgets shown in NewMapWin.
    1.29 +  NewMapWin(const std::string& title, GraphDisplayerCanvas &);
    1.30 +
    1.31 +
    1.32 +  ///Signal on button is connected to this function,
    1.33 +  ///Therefore this function determines whether to
    1.34 +  ///call the map/creatort function, and if yes, it
    1.35 +  //tells it the attributes.(name, default value)
    1.36 +  virtual void buttonPressed();
    1.37 +
    1.38 +  virtual bool closeIfEscapeIsPressed(GdkEventKey*);
    1.39 +
    1.40 +  Gtk::Entry name, default_value;
    1.41 +
    1.42 +  Gtk::VBox vbox;
    1.43 +
    1.44 +  Gtk::Button * button;
    1.45 +
    1.46 +  Gtk::Table * table;
    1.47 +  Gtk::Label * label;
    1.48 +
    1.49 +  Gtk::RadioButton node, edge;
    1.50 +};
    1.51 +
    1.52 +#endif //NEWMAPWIN_H