Bugfix.
3 * This file is a part of LEMON, a generic C++ optimization library
5 * Copyright (C) 2003-2006
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
25 #include <all_include.h>
26 #include <libgnomecanvasmm.h>
27 #include <libgnomecanvasmm/polygon.h>
29 ///Graph visualization setup window.
31 ///This class is responsible for creating a window,
32 ///on which the visualization attributes can be
34 class MapWin : public Gtk::Window
37 ///\ref NoteBookTab to that the \ref MapWin belongs to.
43 ///\ref MapSelectors for each property
45 ///Each property has an own \ref MapSelector through which
46 ///the map to visualize by the property van be set.
47 MapSelector ** e_combo_array;
49 ///\ref MapSelectors for each property
51 ///Each property has an own \ref MapSelector through which
52 ///the map to visualize by the property van be set.
53 MapSelector ** n_combo_array;
58 ///Container in which elements are organized.
64 ///It creates the widgets shown in \ref MapWin and
65 ///binds the needed signal to the correct place.
66 ///\param title title of window
67 ///\param eml edgemap list
68 ///\param nml nodemap list
69 ///\param mw the owner \ref NoteBookTab (\ref mytab)
70 MapWin(const std::string& title, std::vector<std::string> eml, std::vector<std::string> nml, NoteBookTab & mw);
72 ///Deregistrates \ref MapWin in its \ref NoteBookTab (\ref mytab)
73 virtual bool on_delete_event(GdkEventAny *);
75 ///Handles changement in nodemap selection
77 ///If \ref MapSelector emits a signal that indicates
78 ///changement in nodemap selection this function will
79 ///be called. It calls the appropriate handler function,
80 ///\ref NoteBookTab::propertyChange with parameters describing the changement.
81 ///\param mapname the recently selected map
82 ///\param prop the changed property
83 void nodeMapChanged(std::string mapname, int prop);
85 ///Handles changement in edgemap selection
87 ///If \ref MapSelector emits a signal that indicates
88 ///changement in edgemap selection this function will
89 ///be called. It calls the appropriate handler function,
90 ///\ref NoteBookTab::propertyChange with parameters describing the changement.
91 ///\param mapname the recently selected map
92 ///\param prop the changed property
93 void edgeMapChanged(std::string mapname, int prop);
95 ///Indicates to the owner \ref NoteBookTab that a \ref NewMapWin should be opened.
97 ///This function is bound to the
98 ///signal emitted by the \ref MapSelector in case of
99 ///the user wants to create a new map. It only pass the
100 ///information further to the tab owning this \ref MapWin that is needed to open the
101 ///\ref NewMapWin. (\ref NoteBookTab::popupNewMapWin)
102 ///\param itisedge should the new map will be an edgemap? (or nodemap)
103 void newMapWinNeeded(bool itisedge);
105 ///This function inserts name of the new edgemap in the name list in \ref MapSelector s
109 void registerNewEdgeMap(std::string new_name);
111 ///This function inserts name of the new nodemap in the name list in \ref MapSelector s
115 void registerNewNodeMap(std::string new_name);
117 ///Close window if Esc key pressed.
118 virtual bool closeIfEscapeIsPressed(GdkEventKey*);
120 ///Updates list of maps in all \ref MapSelector
122 ///This function is called by \ref NoteBookTab, when the file
123 ///showed in it has changed, therefore the contained maps
124 ///have changed as well. \ref NoteBookTab knows, whether it
125 ///has to call this function or not from the \ref NoteBookTab::mapwinexists
127 ///\param eml edge map list
128 ///\param nml node map list
129 void update(std::vector<std::string> eml, std::vector<std::string> nml);
131 void changeEntry(bool, int, std::string);
133 void set_title(std::string);