eps_win.h
changeset 1 67188bd752db
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/eps_win.h	Mon Jul 07 08:10:39 2008 -0500
     1.3 @@ -0,0 +1,109 @@
     1.4 +/* -*- C++ -*-
     1.5 + *
     1.6 + * This file is a part of LEMON, a generic C++ optimization library
     1.7 + *
     1.8 + * Copyright (C) 2003-2006
     1.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11 + *
    1.12 + * Permission to use, modify and distribute this software is granted
    1.13 + * provided that this copyright notice appears in all copies. For
    1.14 + * precise terms see the accompanying LICENSE file.
    1.15 + *
    1.16 + * This software is provided "AS IS" with no warranty of any kind,
    1.17 + * express or implied, and with no claim as to its suitability for any
    1.18 + * purpose.
    1.19 + *
    1.20 + */
    1.21 +
    1.22 +#ifndef EPS_WIN_H
    1.23 +#define EPS_WIN_H
    1.24 +
    1.25 +class MapSelector;
    1.26 +
    1.27 +#include <all_include.h>
    1.28 +#include <libgnomecanvasmm.h>
    1.29 +#include <libgnomecanvasmm/polygon.h>
    1.30 +#include "map_value.h"
    1.31 +
    1.32 +///Digraph visualization setup window.
    1.33 +
    1.34 +///This class is responsible for creating a window,
    1.35 +///on which the visualization attributes can be
    1.36 +///assigned to maps.
    1.37 +class EpsWin : public Gtk::Dialog
    1.38 +{
    1.39 +protected:
    1.40 +  ///Designing element
    1.41 +  Gtk::Table * table;
    1.42 +  
    1.43 +  ///Information holder
    1.44 +  Gtk::Label * label;
    1.45 +
    1.46 +  ///configuration
    1.47 +  std::vector<Gtk::CheckButton *> options;
    1.48 +
    1.49 +  ///OK, Cancel
    1.50 +  Gtk::Button * ok, * cancel;
    1.51 +
    1.52 +  ///Container in which filename entry are organized.
    1.53 +  Gtk::HBox hbox;
    1.54 +
    1.55 +  ///Filename
    1.56 +  Gtk::Entry name;
    1.57 +
    1.58 +  MapSelector * mapselector;
    1.59 +public:
    1.60 +  ///Constructor
    1.61 +
    1.62 +  ///It creates the widgets shown in \ref EpsWin and
    1.63 +  ///binds the needed signal to the correct place.
    1.64 +  ///\param title title of window
    1.65 +  ///\param eml arcmap list
    1.66 +  ///\param nml nodemap list
    1.67 +  ///\param mw the owner \ref NoteBookTab (\ref mytab)
    1.68 +  EpsWin(const std::string& title, std::vector<std::string>, std::vector<std::string>);
    1.69 +
    1.70 +  ///Deregistrates \ref EpsWin in its \ref NoteBookTab (\ref mytab)
    1.71 +  virtual bool on_delete_event(GdkEventAny *);
    1.72 +
    1.73 +  ///Close window if Esc key pressed.
    1.74 +  virtual bool closeIfEscapeIsPressed(GdkEventKey*);
    1.75 +
    1.76 +  ///Callback function for OK button. It creates the map.
    1.77 +  
    1.78 +  ///If OK is pressed this function
    1.79 +  ///transmits the collected data to
    1.80 +  ///appropriate functions to be able
    1.81 +  ///to create EPS
    1.82 +  virtual void on_response(int response_id);
    1.83 +
    1.84 +  ///indicates that user is ready to export EPS file
    1.85 +  sigc::signal<void, std::vector<bool>, std::string, std::string > signal_eps_details;
    1.86 +
    1.87 +  ///returns \ref signal_eps_details
    1.88 +  sigc::signal<void, std::vector<bool>, std::string, std::string > signal_eps_details_ch(){return signal_eps_details;};
    1.89 +
    1.90 +  ///indicates that the windows can be closed
    1.91 +  sigc::signal<void> signal_eps_close;
    1.92 +
    1.93 +  ///returns \ref signal_eps_close
    1.94 +  sigc::signal<void> signal_eps_close_ch(){return signal_eps_close;};
    1.95 +  
    1.96 +  ///indicates that the windows can be closed
    1.97 +  sigc::signal<void, bool> signal_new_map;
    1.98 +
    1.99 +  ///returns \ref signal_eps_close
   1.100 +  sigc::signal<void, bool> signal_new_map_ch(){return signal_new_map;};
   1.101 +
   1.102 +  ///Function is called when new map is required.
   1.103 +  void newMapWinNeeded(bool);
   1.104 +
   1.105 +  ///This function inserts name of the new nodemap in the name list in \ref MapSelector s
   1.106 +
   1.107 +  ///\param new_name
   1.108 +  ///name of new map
   1.109 +  void registerNewNodeMap(std::string new_name, MapValue::Type type);
   1.110 +};
   1.111 +
   1.112 +#endif //EPS_WIN_H