gui/edit_win.h
author hegyi
Fri, 17 Jun 2005 12:25:53 +0000
changeset 1501 39d59aee2a1a
parent 1469 104aab6e5d86
child 1524 587a823bcdd0
permissions -rwxr-xr-x
Very small bug is corrected: if node creator tool is active, the small red arrows won't move, if you click on them and if you drag the newly created node... 'was hard to notice it :-)
hegyi@1469
     1
// -*- C++ -*- //
hegyi@1469
     2
hegyi@1469
     3
#ifndef EDIT_WIN_H
hegyi@1469
     4
#define EDIT_WIN_H
hegyi@1469
     5
hegyi@1469
     6
#include <all_include.h>
hegyi@1469
     7
#include <mapstorage.h>
hegyi@1469
     8
#include <graph_displayer_canvas.h>
hegyi@1469
     9
#include <libgnomecanvasmm.h>
hegyi@1469
    10
#include <libgnomecanvasmm/polygon.h>
hegyi@1469
    11
hegyi@1469
    12
///This class is responsible for creating a window,
hegyi@1469
    13
///on which the wished editorial tool can be activated.
hegyi@1469
    14
class EditWin : public Gtk::Window
hegyi@1469
    15
{
hegyi@1469
    16
protected:
hegyi@1469
    17
  ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
hegyi@1478
    18
  ///It has to be known for this class, because the appropriate
hegyi@1478
    19
  //callback function for each tool is implemented in that class
hegyi@1469
    20
  GraphDisplayerCanvas & gdc;
hegyi@1469
    21
hegyi@1478
    22
  ///Table that holds the tools.
hegyi@1469
    23
  Gtk::Table table;
hegyi@1469
    24
  
hegyi@1478
    25
  ///these buttons are RadioButtons with classic look
hegyi@1478
    26
  Gtk::RadioButton ** buttons;
hegyi@1469
    27
hegyi@1469
    28
public:
hegyi@1469
    29
  ///Constructor of EditWin creates the widgets shown in EditWin.
hegyi@1469
    30
  EditWin(const std::string& title, GraphDisplayerCanvas &);
hegyi@1469
    31
hegyi@1469
    32
  virtual bool close_if_escape_is_pressed(GdkEventKey*);
hegyi@1469
    33
hegyi@1469
    34
  ///Callback function in case of button pression.
hegyi@1469
    35
  ///It changes the actual tool ins editor's hand.
hegyi@1469
    36
  void makeEditorialToolChanged(int);
hegyi@1469
    37
hegyi@1469
    38
};
hegyi@1469
    39
hegyi@1469
    40
#endif //EDIT_WIN_H