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>
28 #include "map_value.h"
30 ///Digraph visualization setup window.
32 ///This class is responsible for creating a window,
33 ///on which the visualization attributes can be
35 class MapWin : public Gtk::Window
38 ///\ref NoteBookTab to that the \ref MapWin belongs to.
44 ///\ref MapSelectors for each property
46 ///Each property has an own \ref MapSelector through which
47 ///the map to visualize by the property van be set.
48 MapSelector ** e_combo_array;
50 ///\ref MapSelectors for each property
52 ///Each property has an own \ref MapSelector through which
53 ///the map to visualize by the property van be set.
54 MapSelector ** n_combo_array;
59 ///Container in which elements are organized.
65 ///It creates the widgets shown in \ref MapWin and
66 ///binds the needed signal to the correct place.
67 ///\param title title of window
68 ///\param mw the owner \ref NoteBookTab (\ref mytab)
69 MapWin(const std::string& title,
70 std::vector<std::string> n_eml,
71 std::vector<std::string> s_eml,
72 std::vector<std::string> n_nml,
73 std::vector<std::string> s_nml,
76 ///Deregistrates \ref MapWin in its \ref NoteBookTab (\ref mytab)
77 virtual bool on_delete_event(GdkEventAny *);
79 ///Handles changement in nodemap selection
81 ///If \ref MapSelector emits a signal that indicates
82 ///changement in nodemap selection this function will
83 ///be called. It calls the appropriate handler function,
84 ///\ref NoteBookTab::propertyChange with parameters describing the changement.
85 ///\param mapname the recently selected map
86 ///\param prop the changed property
87 void nodeMapChanged(std::string mapname, int prop);
89 ///Handles changement in arcmap selection
91 ///If \ref MapSelector emits a signal that indicates
92 ///changement in arcmap selection this function will
93 ///be called. It calls the appropriate handler function,
94 ///\ref NoteBookTab::propertyChange with parameters describing the changement.
95 ///\param mapname the recently selected map
96 ///\param prop the changed property
97 void arcMapChanged(std::string mapname, int prop);
99 ///Indicates to the owner \ref NoteBookTab that a \ref NewMapWin should be opened.
101 ///This function is bound to the
102 ///signal emitted by the \ref MapSelector in case of
103 ///the user wants to create a new map. It only pass the
104 ///information further to the tab owning this \ref MapWin that is needed to open the
105 ///\ref NewMapWin. (\ref NoteBookTab::popupNewMapWin)
106 ///\param itisarc should the new map will be an arcmap? (or nodemap)
107 void newMapWinNeeded(bool itisarc);
109 ///This function inserts name of the new arcmap in the name list in \ref MapSelector s
113 void registerNewArcMap(std::string new_name, MapValue::Type type);
115 ///This function inserts name of the new nodemap in the name list in \ref MapSelector s
119 void registerNewNodeMap(std::string new_name, MapValue::Type type);
121 ///Close window if Esc key pressed.
122 virtual bool closeIfEscapeIsPressed(GdkEventKey*);
124 ///Updates list of maps in all \ref MapSelector
126 ///This function is called by \ref NoteBookTab, when the file
127 ///showed in it has changed, therefore the contained maps
128 ///have changed as well. \ref NoteBookTab knows, whether it
129 ///has to call this function or not from the \ref NoteBookTab::mapwinexists
132 std::vector<std::string> n_eml,
133 std::vector<std::string> s_eml,
134 std::vector<std::string> n_nml,
135 std::vector<std::string> s_nml);
137 void changeEntry(bool, int, std::string);
139 void set_title(std::string);