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