1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#ifndef flow_array_elem_h
#define flow_array_elem_h
#include <iostream>
#include <fstream>
#include "flow.h"
#include "flow_ctx.h"
using namespace std;
class FlowArrayElem {
public:
virtual void zoom() {};
virtual void nav_zoom() {};
virtual void print_zoom() {};
virtual void traverse( int x, int y) {};
virtual void get_borders(
double *x_right, double *x_left, double *y_high, double *y_low) {};
virtual void get_borders( double pos_x, double pos_y, double *x_right,
double *x_left, double *y_high, double *y_low, void *node) {};
virtual void get_borders() {};
virtual int event_handler( flow_eEvent event,
int x, int y) { return 0;};
virtual int event_handler( void *pos,
flow_eEvent event, int x, int y, void *node) { return 0;};
virtual void print( double ll_x, double ll_y, double ur_x, double ur_y) {};
virtual void save( ofstream& fp, flow_eSaveMode mode) {};
virtual void open( ifstream& fp) {};
virtual void print( void *pos, void *node, int highlight) {};
virtual void draw( int ll_x, int ll_y, int ur_x, int ur_y) {};
virtual void draw( void *pos, int highlight, int dimmed, int hot, void *node) {};
virtual void erase() {};
virtual void erase( void *pos, int hot, void *node) {};
virtual void draw_inverse( void *pos, int hot, void *node) {};
virtual void move( int delta_x, int delta_y, int grid) {};
virtual void move_noerase( int delta_x, int delta_y, int grid) {};
virtual void shift( void *pos, double delta_x, double delta_y,
int highlight, int dimmed, int hot) {};
virtual void nav_draw( int ll_x, int ll_y, int ur_x, int ur_y) {};
virtual void nav_draw( void *pos, int highlight, void *node) {};
virtual void nav_erase() {};
virtual void nav_erase( void *pos, void *node) {};
virtual void conpoint_select( void *pos, int x, int y, double *distance,
void **cp) {};
virtual int get_conpoint( int num, double *x, double *y,
flow_eDirection *dir) { return 0;};
virtual void redraw_node_cons( void *node) {};
virtual int delete_node_cons( void *node) {return 0;};
virtual void set_highlight( int on) {};
virtual int get_highlight() {return 1;};
virtual void set_dimmed( int on) {};
virtual int get_dimmed() {return 1;};
virtual void set_inverse( int on) {};
virtual void set_hot( int on) {};
virtual void select_region_insert( double ll_x, double ll_y, double ur_x,
double ur_y) {};
virtual flow_eObjectType type() { return flow_eObjectType_NoObject;};
virtual void link_insert( FlowArrayElem **start) {};
virtual int in_area( double ll_x, double ll_y, double ur_x, double ur_y)
{ return 0;};
virtual int in_area_exact( double ll_x, double ll_y, double ur_x, double ur_y)
{ return 0;};
virtual int in_vert_line( double x, double l_y, double u_y) { return 0;};
virtual int in_horiz_line( double y, double l_x, double u_x) { return 0;};
virtual void conpoint_refcon_redraw( void *node, int conpoint) {};
virtual void conpoint_refcon_erase( void *node, int conpoint) {};
virtual void remove_notify() {};
virtual void set_user_data( void *data) {};
virtual void get_user_data( void **data) {};
virtual void trace_scan() {};
virtual int trace_init() { return 1;};
virtual void trace_close() {};
virtual void set_trace_attr( const char *object, const char *attribute, flow_eTraceType type,
int inverted) {};
virtual void get_trace_attr( char *object, char *attribute, flow_eTraceType *type,
int *inverted) {};
virtual void *get_ctx() { return NULL;};
virtual void configure( void *previous) {};
virtual void move_widgets( int x, int y) {};
virtual void get_object_name( char *name) {};
friend ostream& operator<< ( ostream& o, const FlowArrayElem e) { return o;};
virtual ~FlowArrayElem() {};
};
#endif