eps_win.h
author hegyi
Thu, 01 Mar 2007 16:28:13 +0000
changeset 198 d6cc0579b94b
parent 196 c220f9de6545
child 201 879e47e5b731
permissions -rw-r--r--
Shape feature of EPS can be used.
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>
hegyi@192
    27
hegyi@192
    28
///Graph visualization setup window.
hegyi@192
    29
hegyi@192
    30
///This class is responsible for creating a window,
hegyi@192
    31
///on which the visualization attributes can be
hegyi@192
    32
///assigned to maps.
hegyi@192
    33
class EpsWin : public Gtk::Dialog
hegyi@192
    34
{
hegyi@192
    35
protected:
hegyi@192
    36
  ///Designing element
hegyi@192
    37
  Gtk::Table * table;
hegyi@192
    38
  
hegyi@192
    39
  ///Information holder
hegyi@192
    40
  Gtk::Label * label;
hegyi@192
    41
hegyi@192
    42
  ///configuration
hegyi@192
    43
  std::vector<Gtk::CheckButton *> options;
hegyi@192
    44
hegyi@192
    45
  ///OK, Cancel
hegyi@192
    46
  Gtk::Button * ok, * cancel;
hegyi@192
    47
hegyi@192
    48
  ///Container in which filename entry are organized.
hegyi@192
    49
  Gtk::HBox hbox;
hegyi@192
    50
hegyi@192
    51
  ///Filename
hegyi@192
    52
  Gtk::Entry name;
hegyi@192
    53
hegyi@198
    54
  MapSelector * mapselector;
hegyi@192
    55
public:
hegyi@192
    56
  ///Constructor
hegyi@192
    57
hegyi@192
    58
  ///It creates the widgets shown in \ref EpsWin and
hegyi@192
    59
  ///binds the needed signal to the correct place.
hegyi@192
    60
  ///\param title title of window
hegyi@192
    61
  ///\param eml edgemap list
hegyi@192
    62
  ///\param nml nodemap list
hegyi@192
    63
  ///\param mw the owner \ref NoteBookTab (\ref mytab)
hegyi@198
    64
  EpsWin(const std::string& title, std::vector<std::string>);
hegyi@192
    65
hegyi@192
    66
  ///Deregistrates \ref EpsWin in its \ref NoteBookTab (\ref mytab)
hegyi@192
    67
  virtual bool on_delete_event(GdkEventAny *);
hegyi@192
    68
hegyi@192
    69
  ///Close window if Esc key pressed.
hegyi@192
    70
  virtual bool closeIfEscapeIsPressed(GdkEventKey*);
hegyi@192
    71
hegyi@192
    72
  ///Callback function for OK button. It creates the map.
hegyi@192
    73
  
hegyi@192
    74
  ///If OK is pressed this function
hegyi@192
    75
  ///transmits the collected data to
hegyi@192
    76
  ///appropriate functions to be able
hegyi@192
    77
  ///to create EPS
hegyi@192
    78
  virtual void on_response(int response_id);
hegyi@192
    79
hegyi@196
    80
  ///indicates that user is ready to export EPS file
hegyi@198
    81
  sigc::signal<void, std::vector<bool>, std::string, std::string > signal_eps_details;
hegyi@196
    82
hegyi@196
    83
  ///returns \ref signal_eps_details
hegyi@198
    84
  sigc::signal<void, std::vector<bool>, std::string, std::string > signal_eps_details_ch(){return signal_eps_details;};
hegyi@196
    85
hegyi@196
    86
  ///indicates that the windows can be closed
hegyi@196
    87
  sigc::signal<void> signal_eps_close;
hegyi@196
    88
hegyi@196
    89
  ///returns \ref signal_eps_close
hegyi@196
    90
  sigc::signal<void> signal_eps_close_ch(){return signal_eps_close;};
hegyi@196
    91
  
hegyi@198
    92
  ///indicates that the windows can be closed
hegyi@198
    93
  sigc::signal<void, bool> signal_new_map;
hegyi@196
    94
hegyi@198
    95
  ///returns \ref signal_eps_close
hegyi@198
    96
  sigc::signal<void, bool> signal_new_map_ch(){return signal_new_map;};
hegyi@198
    97
hegyi@198
    98
  ///Function is called when new map is required.
hegyi@198
    99
  void newMapWinNeeded(bool);
hegyi@198
   100
hegyi@198
   101
  ///This function inserts name of the new nodemap in the name list in \ref MapSelector s
hegyi@198
   102
hegyi@198
   103
  ///\param new_name
hegyi@198
   104
  ///name of new map
hegyi@198
   105
  void registerNewNodeMap(std::string new_name);
hegyi@192
   106
};
hegyi@192
   107
hegyi@192
   108
#endif //EPS_WIN_H