COIN-OR::LEMON - Graph Library

source: lemon-0.x/gui/new_map_win.h @ 1887:22fdc00894aa

Last change on this file since 1887:22fdc00894aa was 1887:22fdc00894aa, checked in by Hegyi Péter, 15 years ago

The tree that is created for evaluation of expression string at new map creation is deleted after usage.

File size: 1.5 KB
RevLine 
[1593]1// -*- C++ -*- //
2
3#ifndef NEWMAPWIN_H
4#define NEWMAPWIN_H
5
6class NewMapWin;
7
8#include <all_include.h>
[1849]9#include <nbtab.h>
[1593]10#include <libgnomecanvasmm.h>
11#include <libgnomecanvasmm/polygon.h>
[1814]12#include <stack>
[1593]13
14///This class is responsible for creating a window,
15///on which the parameters of a new map can be set.
16
[1823]17class NewMapWin : public Gtk::Dialog
[1593]18{
[1849]19  NoteBookTab & mytab;
[1593]20
[1814]21public:
22  struct tree_node
23  {
24    char ch;
25    tree_node * left_child;
26    tree_node * right_child;
27  };
28 
[1593]29  ///Constructor of NewMapWin creates the widgets shown in NewMapWin.
[1849]30  NewMapWin(const std::string& title, NoteBookTab &, bool itisedge=true, bool edgenode=true);
[1887]31
[1593]32  ///Signal on button is connected to this function,
33  ///Therefore this function determines whether to
34  ///call the map/creatort function, and if yes, it
35  //tells it the attributes.(name, default value)
[1823]36  virtual void on_response(int response_id);
[1737]37
[1593]38  virtual bool closeIfEscapeIsPressed(GdkEventKey*);
39
[1814]40  ///Function that creates a tree from an appropriately manipulated string
41  tree_node * weightedString2Tree(std::string, std::vector<unsigned int> &, int);
42
43  ///Function  that creates a string from a tree by postorder reading.
44  std::string postOrder(tree_node *);
45
46  std::string string2Polishform(std::string, bool);
47
48  bool validVariable(std::string, bool);
49
[1887]50  void deleteTree(tree_node *);
51
[1814]52  std::map<char, std::string> ch2var;
53
[1593]54  Gtk::Entry name, default_value;
55
56  Gtk::Table * table;
57  Gtk::Label * label;
58
59  Gtk::RadioButton node, edge;
60};
61
62#endif //NEWMAPWIN_H
Note: See TracBrowser for help on using the repository browser.