eps_win.h
author Akos Ladanyi <ladanyi@tmit.bme.hu>
Mon, 07 Jul 2008 14:54:54 +0100
changeset 2 fdb8a163000f
permissions -rw-r--r--
Use libintl.h instead of locale.h.
hegyi@1
     1
/* -*- C++ -*-
hegyi@1
     2
 *
hegyi@1
     3
 * This file is a part of LEMON, a generic C++ optimization library
hegyi@1
     4
 *
hegyi@1
     5
 * Copyright (C) 2003-2006
hegyi@1
     6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
hegyi@1
     7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
hegyi@1
     8
 *
hegyi@1
     9
 * Permission to use, modify and distribute this software is granted
hegyi@1
    10
 * provided that this copyright notice appears in all copies. For
hegyi@1
    11
 * precise terms see the accompanying LICENSE file.
hegyi@1
    12
 *
hegyi@1
    13
 * This software is provided "AS IS" with no warranty of any kind,
hegyi@1
    14
 * express or implied, and with no claim as to its suitability for any
hegyi@1
    15
 * purpose.
hegyi@1
    16
 *
hegyi@1
    17
 */
hegyi@1
    18
hegyi@1
    19
#ifndef EPS_WIN_H
hegyi@1
    20
#define EPS_WIN_H
hegyi@1
    21
hegyi@1
    22
class MapSelector;
hegyi@1
    23
hegyi@1
    24
#include <all_include.h>
hegyi@1
    25
#include <libgnomecanvasmm.h>
hegyi@1
    26
#include <libgnomecanvasmm/polygon.h>
hegyi@1
    27
#include "map_value.h"
hegyi@1
    28
hegyi@1
    29
///Digraph visualization setup window.
hegyi@1
    30
hegyi@1
    31
///This class is responsible for creating a window,
hegyi@1
    32
///on which the visualization attributes can be
hegyi@1
    33
///assigned to maps.
hegyi@1
    34
class EpsWin : public Gtk::Dialog
hegyi@1
    35
{
hegyi@1
    36
protected:
hegyi@1
    37
  ///Designing element
hegyi@1
    38
  Gtk::Table * table;
hegyi@1
    39
  
hegyi@1
    40
  ///Information holder
hegyi@1
    41
  Gtk::Label * label;
hegyi@1
    42
hegyi@1
    43
  ///configuration
hegyi@1
    44
  std::vector<Gtk::CheckButton *> options;
hegyi@1
    45
hegyi@1
    46
  ///OK, Cancel
hegyi@1
    47
  Gtk::Button * ok, * cancel;
hegyi@1
    48
hegyi@1
    49
  ///Container in which filename entry are organized.
hegyi@1
    50
  Gtk::HBox hbox;
hegyi@1
    51
hegyi@1
    52
  ///Filename
hegyi@1
    53
  Gtk::Entry name;
hegyi@1
    54
hegyi@1
    55
  MapSelector * mapselector;
hegyi@1
    56
public:
hegyi@1
    57
  ///Constructor
hegyi@1
    58
hegyi@1
    59
  ///It creates the widgets shown in \ref EpsWin and
hegyi@1
    60
  ///binds the needed signal to the correct place.
hegyi@1
    61
  ///\param title title of window
hegyi@1
    62
  ///\param eml arcmap list
hegyi@1
    63
  ///\param nml nodemap list
hegyi@1
    64
  ///\param mw the owner \ref NoteBookTab (\ref mytab)
hegyi@1
    65
  EpsWin(const std::string& title, std::vector<std::string>, std::vector<std::string>);
hegyi@1
    66
hegyi@1
    67
  ///Deregistrates \ref EpsWin in its \ref NoteBookTab (\ref mytab)
hegyi@1
    68
  virtual bool on_delete_event(GdkEventAny *);
hegyi@1
    69
hegyi@1
    70
  ///Close window if Esc key pressed.
hegyi@1
    71
  virtual bool closeIfEscapeIsPressed(GdkEventKey*);
hegyi@1
    72
hegyi@1
    73
  ///Callback function for OK button. It creates the map.
hegyi@1
    74
  
hegyi@1
    75
  ///If OK is pressed this function
hegyi@1
    76
  ///transmits the collected data to
hegyi@1
    77
  ///appropriate functions to be able
hegyi@1
    78
  ///to create EPS
hegyi@1
    79
  virtual void on_response(int response_id);
hegyi@1
    80
hegyi@1
    81
  ///indicates that user is ready to export EPS file
hegyi@1
    82
  sigc::signal<void, std::vector<bool>, std::string, std::string > signal_eps_details;
hegyi@1
    83
hegyi@1
    84
  ///returns \ref signal_eps_details
hegyi@1
    85
  sigc::signal<void, std::vector<bool>, std::string, std::string > signal_eps_details_ch(){return signal_eps_details;};
hegyi@1
    86
hegyi@1
    87
  ///indicates that the windows can be closed
hegyi@1
    88
  sigc::signal<void> signal_eps_close;
hegyi@1
    89
hegyi@1
    90
  ///returns \ref signal_eps_close
hegyi@1
    91
  sigc::signal<void> signal_eps_close_ch(){return signal_eps_close;};
hegyi@1
    92
  
hegyi@1
    93
  ///indicates that the windows can be closed
hegyi@1
    94
  sigc::signal<void, bool> signal_new_map;
hegyi@1
    95
hegyi@1
    96
  ///returns \ref signal_eps_close
hegyi@1
    97
  sigc::signal<void, bool> signal_new_map_ch(){return signal_new_map;};
hegyi@1
    98
hegyi@1
    99
  ///Function is called when new map is required.
hegyi@1
   100
  void newMapWinNeeded(bool);
hegyi@1
   101
hegyi@1
   102
  ///This function inserts name of the new nodemap in the name list in \ref MapSelector s
hegyi@1
   103
hegyi@1
   104
  ///\param new_name
hegyi@1
   105
  ///name of new map
hegyi@1
   106
  void registerNewNodeMap(std::string new_name, MapValue::Type type);
hegyi@1
   107
};
hegyi@1
   108
hegyi@1
   109
#endif //EPS_WIN_H