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