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