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 ALL_INCLUDE_H
|
hegyi@1
|
20 |
#define ALL_INCLUDE_H
|
hegyi@1
|
21 |
|
hegyi@1
|
22 |
#include <fstream>
|
hegyi@1
|
23 |
#include <iostream>
|
hegyi@1
|
24 |
|
hegyi@1
|
25 |
#include <vector>
|
hegyi@1
|
26 |
|
hegyi@1
|
27 |
#include <lemon/list_graph.h>
|
hegyi@1
|
28 |
#include <lemon/graph_utils.h>
|
hegyi@1
|
29 |
#include <lemon/maps.h>
|
hegyi@1
|
30 |
#include <lemon/error.h>
|
hegyi@1
|
31 |
#include <lemon/dim2.h>
|
hegyi@1
|
32 |
|
hegyi@1
|
33 |
enum {E_WIDTH, E_COLOR, E_TEXT, EDGE_PROPERTY_NUM}; // arc properties;
|
hegyi@1
|
34 |
enum {N_RADIUS, N_COLOR, N_TEXT, NODE_PROPERTY_NUM}; // node properties;
|
hegyi@1
|
35 |
enum {N_MAPS, E_MAPS, ARROWS, PAR, EPS_PROPERTY_NUM}; // eps properties;
|
hegyi@1
|
36 |
enum {MOVE, CREATE_NODE, CREATE_EDGE, ERASER, MAP_EDIT, TOOL_NUM}; // tools;
|
hegyi@1
|
37 |
#define RANGE 3
|
hegyi@1
|
38 |
#define WIN_WIDTH 900
|
hegyi@1
|
39 |
#define WIN_HEIGHT 600
|
hegyi@1
|
40 |
#define MIN_EDGE_WIDTH 2
|
hegyi@1
|
41 |
#define MAX_EDGE_WIDTH 40
|
hegyi@1
|
42 |
#define MIN_NODE_RADIUS 2
|
hegyi@1
|
43 |
#define MAX_NODE_RADIUS 80
|
hegyi@1
|
44 |
|
hegyi@1
|
45 |
#ifndef MAIN_PART
|
hegyi@1
|
46 |
extern std::vector <std::string> arc_property_strings;
|
hegyi@1
|
47 |
extern std::vector <double> arc_property_defaults;
|
hegyi@1
|
48 |
extern std::vector <std::string> node_property_strings;
|
hegyi@1
|
49 |
extern std::vector <double> node_property_defaults;
|
hegyi@1
|
50 |
extern int longest_property_string_length;
|
hegyi@1
|
51 |
#endif //MAIN_PART
|
hegyi@1
|
52 |
|
hegyi@1
|
53 |
using namespace lemon;
|
hegyi@1
|
54 |
|
hegyi@1
|
55 |
typedef lemon::dim2::Point<double> XY;
|
hegyi@1
|
56 |
typedef ListDigraph Digraph;
|
hegyi@1
|
57 |
typedef Digraph::Node Node;
|
hegyi@1
|
58 |
typedef Digraph::Arc Arc;
|
hegyi@1
|
59 |
typedef Digraph::ArcIt ArcIt;
|
hegyi@1
|
60 |
typedef Digraph::InArcIt InArcIt;
|
hegyi@1
|
61 |
typedef Digraph::OutArcIt OutArcIt;
|
hegyi@1
|
62 |
typedef Digraph::NodeIt NodeIt;
|
hegyi@1
|
63 |
|
hegyi@1
|
64 |
const std::string prog_name = "LEMON Digraph Editor";
|
hegyi@1
|
65 |
|
hegyi@1
|
66 |
enum MapType
|
hegyi@1
|
67 |
{
|
hegyi@1
|
68 |
NUM = 1 << 0,
|
hegyi@1
|
69 |
STR = 1 << 1,
|
hegyi@1
|
70 |
ALL = (1 << 0) | (1 << 1)
|
hegyi@1
|
71 |
};
|
hegyi@1
|
72 |
|
hegyi@1
|
73 |
#endif // ALL_INCLUDE_H
|