[192] | 1 | /* -*- C++ -*- |
---|
| 2 | * |
---|
| 3 | * This file is a part of LEMON, a generic C++ optimization library |
---|
| 4 | * |
---|
| 5 | * Copyright (C) 2003-2006 |
---|
| 6 | * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
---|
| 7 | * (Egervary Research Group on Combinatorial Optimization, EGRES). |
---|
| 8 | * |
---|
| 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. |
---|
| 12 | * |
---|
| 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 |
---|
| 15 | * purpose. |
---|
| 16 | * |
---|
| 17 | */ |
---|
| 18 | |
---|
| 19 | #ifndef EPS_WIN_H |
---|
| 20 | #define EPS_WIN_H |
---|
| 21 | |
---|
| 22 | #include <all_include.h> |
---|
| 23 | #include <libgnomecanvasmm.h> |
---|
| 24 | #include <libgnomecanvasmm/polygon.h> |
---|
| 25 | |
---|
| 26 | ///Graph visualization setup window. |
---|
| 27 | |
---|
| 28 | ///This class is responsible for creating a window, |
---|
| 29 | ///on which the visualization attributes can be |
---|
| 30 | ///assigned to maps. |
---|
| 31 | class EpsWin : public Gtk::Dialog |
---|
| 32 | { |
---|
| 33 | protected: |
---|
| 34 | ///Designing element |
---|
| 35 | Gtk::Table * table; |
---|
| 36 | |
---|
| 37 | ///Information holder |
---|
| 38 | Gtk::Label * label; |
---|
| 39 | |
---|
| 40 | ///configuration |
---|
| 41 | std::vector<Gtk::CheckButton *> options; |
---|
| 42 | |
---|
| 43 | ///OK, Cancel |
---|
| 44 | Gtk::Button * ok, * cancel; |
---|
| 45 | |
---|
| 46 | ///Container in which filename entry are organized. |
---|
| 47 | Gtk::HBox hbox; |
---|
| 48 | |
---|
| 49 | ///Filename |
---|
| 50 | Gtk::Entry name; |
---|
| 51 | |
---|
| 52 | public: |
---|
| 53 | ///Constructor |
---|
| 54 | |
---|
| 55 | ///It creates the widgets shown in \ref EpsWin and |
---|
| 56 | ///binds the needed signal to the correct place. |
---|
| 57 | ///\param title title of window |
---|
| 58 | ///\param eml edgemap list |
---|
| 59 | ///\param nml nodemap list |
---|
| 60 | ///\param mw the owner \ref NoteBookTab (\ref mytab) |
---|
[196] | 61 | EpsWin(const std::string& title); |
---|
[192] | 62 | |
---|
| 63 | ///Deregistrates \ref EpsWin in its \ref NoteBookTab (\ref mytab) |
---|
| 64 | virtual bool on_delete_event(GdkEventAny *); |
---|
| 65 | |
---|
| 66 | ///Close window if Esc key pressed. |
---|
| 67 | virtual bool closeIfEscapeIsPressed(GdkEventKey*); |
---|
| 68 | |
---|
| 69 | ///Callback function for OK button. It creates the map. |
---|
| 70 | |
---|
| 71 | ///If OK is pressed this function |
---|
| 72 | ///transmits the collected data to |
---|
| 73 | ///appropriate functions to be able |
---|
| 74 | ///to create EPS |
---|
| 75 | virtual void on_response(int response_id); |
---|
| 76 | |
---|
[196] | 77 | ///indicates that user is ready to export EPS file |
---|
| 78 | sigc::signal<void, std::vector<bool>, std::string > signal_eps_details; |
---|
| 79 | |
---|
| 80 | ///returns \ref signal_eps_details |
---|
| 81 | sigc::signal<void, std::vector<bool>, std::string > signal_eps_details_ch(){return signal_eps_details;}; |
---|
| 82 | |
---|
| 83 | ///indicates that the windows can be closed |
---|
| 84 | sigc::signal<void> signal_eps_close; |
---|
| 85 | |
---|
| 86 | ///returns \ref signal_eps_close |
---|
| 87 | sigc::signal<void> signal_eps_close_ch(){return signal_eps_close;}; |
---|
| 88 | |
---|
| 89 | |
---|
[192] | 90 | }; |
---|
| 91 | |
---|
| 92 | #endif //EPS_WIN_H |
---|