File: graph.h

package info (click to toggle)
geda 20050313-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,568 kB
  • ctags: 1,716
  • sloc: ansic: 16,308; sh: 4,233; makefile: 562; yacc: 316; sed: 16
file content (118 lines) | stat: -rw-r--r-- 3,811 bytes parent folder | download | duplicates (2)
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
/*******************************************************************************/
/*                                                                             */
/* gEDA Suite Project Manager                                                  */
/*                                                                             */
/* Copyright (C) 2002 Piotr Miarecki, sp9rve@radioam.net                       */
/*                                                                             */
/* 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 version 2.                     */
/*                                                                             */
/* 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 this program; if not, email to the author                        */
/*                                                                             */
/*******************************************************************************/

#ifndef __GRAPH_H_INCLUDED
#define __GRAPH_H_INCLUDED

#include "global.h"



/* plot definition */
struct Plot_t
{
	char *szFormula;
	char *szColor;
	char *szStyle;

	struct Plot_t *pNext;
};

/* graph definition */
struct Graph_t
{
	char *szFileName;               /* graph filename, without extenstion */
	char *szDataSource;             /* data source filename, without ext. */
	char *szViewer;                    /* graph viewer identifier (as below) */
	char *szBorderColor;
                   

	struct Plot_t *PlotList;        /* pointer to a list of graph plots */

	double dfXmin;
	double dfXmax;
	BOOL bXAuto;
	char *szXScale;                    /* see below */
	double dfXmainDiv;
	BOOL bXmainAuto;
	char *szXmainStyle;                 /* see below */
	char *szXmainColor;              /* see below */
	int iXaddNumber;
	BOOL bXaddAuto;
	char *szXaddStyle;                 /* see below */
	char *szXaddColor;              /* see below */

	double dfYmin;
	double dfYmax;
	BOOL bYAuto;
	char *szYScale;                    /* see below */
	double dfYmainDiv;
	BOOL bYmainAuto;
	char *szYmainStyle;                 /* see below */
	char *szYmainColor;              /* see below */
	int iYaddNumber;
	BOOL bYaddAuto;
	char *szYaddStyle;                 /* see below */
	char *szYaddColor;              /* see below */
};



/* graph viewers */
#define VIEWER_NOT_SELECTED ""
#define VIEWER_GWAVE        "GWAVE"

/* scale types */
#define SCALE_NOT_SELECTED  ""
#define SCALE_LIN           "LIN"
#define SCALE_LOG           "LOG"

/* styles */
#define STYLE_NOT_SELECTED  ""
#define STYLE_SOLID         "SOLID"

/* colors */
#define COLOR_NOT_SELECTED  ""
#define COLOR_WHITE         "White"
#define COLOR_BLACK         "Black"
#define COLOR_YELLOW        "Yellow"
#define COLOR_RED           "Red"
#define COLOR_BLUE          "Blue"
#define COLOR_GREEN         "Green"
#define COLOR_ORANGE        "Orange"
#define COLOR_MAGENTA       "Pink"
#define COLOR_OTHER         "0x"

#define AUTO_ON             "AUTO"


/* public variables */
extern struct Graph_t Graph;



/* public functions */
BOOL GraphNew(const char *szFileName);
BOOL GraphLoad(const char *szFileName);
BOOL GraphSave(const char *szFileName);



#endif /* __GRAPH_H_INCLUDED */