60 #ifndef D4D_GRAPH_BORDER_OFF
61 #define D4D_GRAPH_BORDER_OFF 5
66 #ifndef D4D_GRAPH_VALUE_OFF
67 #define D4D_GRAPH_VALUE_OFF 2
72 #ifndef D4D_COLOR_GRAPH_GRID
73 #define D4D_COLOR_GRAPH_GRID D4D_COLOR_LIGHT_GREY
89 #define D4D_GRAPH_F_MODE_MASK (0x03 << D4D_OBJECT_F_OBJECT_SHIFT)
90 #define D4D_GRAPH_F_MODE_NORMAL (0x00 << D4D_OBJECT_F_OBJECT_SHIFT)
91 #define D4D_GRAPH_F_MODE_ROLLOVER (0x01 << D4D_OBJECT_F_OBJECT_SHIFT)
93 #define D4D_GRAPH_F_VALUE_X_NONE (0x00 << D4D_OBJECT_F_OBJECT_SHIFT)
94 #define D4D_GRAPH_F_VALUE_X_BOTT (0x04 << D4D_OBJECT_F_OBJECT_SHIFT)
95 #define D4D_GRAPH_F_VALUE_X_TOP (0x08 << D4D_OBJECT_F_OBJECT_SHIFT)
97 #define D4D_GRAPH_F_VALUE_Y_NONE (0x00 << D4D_OBJECT_F_OBJECT_SHIFT)
98 #define D4D_GRAPH_F_VALUE_Y_LEFT (0x10 << D4D_OBJECT_F_OBJECT_SHIFT)
99 #define D4D_GRAPH_F_VALUE_Y_RIGHT (0x20 << D4D_OBJECT_F_OBJECT_SHIFT)
104 #ifndef D4D_GRAPH_F_DEFAULT
105 #define D4D_GRAPH_F_DEFAULT (D4D_OBJECT_F_VISIBLE | D4D_OBJECT_F_ENABLED | D4D_OBJECT_F_BEVEL_RAISED | D4D_GRAPH_F_MODE_ROLLOVER | D4D_GRAPH_F_VALUE_X_BOTT | D4D_GRAPH_F_VALUE_Y_RIGHT )
110 #ifndef D4D_GRAPH_TXT_PRTY_DEFAULT
111 #define D4D_GRAPH_TXT_PRTY_DEFAULT (D4D_ALIGN_H_CENTER_MASK | D4D_ALIGN_V_CENTER_MASK)
116 #ifndef D4D_GRAPH_FNT_PRTY_DEFAULT
117 #define D4D_GRAPH_FNT_PRTY_DEFAULT ( 0 )
122 #ifndef D4D_GRAPH_LBL_FNT_PRTY_DEFAULT
123 #define D4D_GRAPH_LBL_FNT_PRTY_DEFAULT ( 0 )
137 #define D4D_GRAPH_TRACE_TYPE_MASK 0x03
138 #define D4D_GRAPH_TRACE_TYPE_LINE 0x00
139 #define D4D_GRAPH_TRACE_TYPE_DOT 0x01
140 #define D4D_GRAPH_TRACE_TYPE_AREA 0x02
141 #define D4D_GRAPH_TRACE_TYPE_AREA_INV 0x03
154 typedef Byte D4D_GRAPH_VALUE;
234 #define D4D_GET_GRAPH(pObj) ((D4D_GRAPH*)((pObj)->pParam))
271 #define _D4D_DECLARE_GRAPH_BEGIN(type, name, text, x, y, cx, cy, radius, pMargin, pRelations, gx, gy, dataLen, flags, pScheme, fontId, lblFontId, pOnNeedLblTxt, pUser, pOnValch, pOnUsrMsg) \
272 extern type D4D_GRAPH_TRACE name##_traces[];\
273 static D4D_GRAPH_DATA name##_data = { 0, 0, 0, 0, 0, 0, 0, 0}; \
274 static D4D_STR_PROPERTIES name##_strPrties = { D4D_GRAPH_FNT_PRTY_DEFAULT, D4D_GRAPH_TXT_PRTY_DEFAULT}; \
275 static type D4D_GRAPH name##_params = \
277 { text, D4D_TEXT_LEN(text), fontId, &name##_strPrties, D4D_OBJECT_MAX_TEXT_LEN(text), 0}, \
279 &(name##_traces[0]), \
287 D4D_DECLARE_OBJECT(type, name, x, y, cx, cy, radius, pMargin, pRelations, pOnUsrMsg, &d4d_graphSysFunc, &(name##_params), (flags), pUser, pScheme)\
289 type D4D_GRAPH_TRACE name##_traces[] = \
310 #define D4D_DECLARE_GRAPH_TRACE(pData, clr, line, type) { pData, clr , line, type},
325 #define D4D_DECLARE_GRAPH_END() { NULL, D4D_COLOR_WHITE , D4D_LINE_THIN, 0}};
353 #define D4D_DECLARE_GRAPH_BEGIN(name, text, x, y, cx, cy, gx, gy, dataLen, flags, pScheme, fontId, lblFontId, pOnNeedLblTxt, pUser, pOnValch, pOnUsrMsg) \
354 _D4D_DECLARE_GRAPH_BEGIN(D4D_CONST, name, text, x, y, cx, cy, 0, NULL, NULL, gx, gy, dataLen, flags, pScheme, fontId, lblFontId, pOnNeedLblTxt, pUser, pOnValch, pOnUsrMsg)
375 #define D4D_DECLARE_STD_GRAPH_BEGIN(name, text, x, y, cx, cy, gx, gy, dataLen, fontId, lblFontId) \
376 D4D_DECLARE_GRAPH_BEGIN(name, text, x, y, cx, cy, gx, gy, dataLen, (D4D_GRAPH_F_DEFAULT), NULL, fontId, lblFontId, NULL, NULL, NULL, NULL)
405 #define D4D_DECLARE_RGRAPH_BEGIN(name, text, x, y, cx, cy, radius, gx, gy, dataLen, flags, pScheme, fontId, lblFontId, pOnNeedLblTxt, pUser, pOnValch, pOnUsrMsg) \
406 _D4D_DECLARE_GRAPH_BEGIN(D4D_CONST, name, text, x, y, cx, cy, radius, NULL, NULL, gx, gy, dataLen, flags, pScheme, fontId, lblFontId, pOnNeedLblTxt, pUser, pOnValch, pOnUsrMsg)
428 #define D4D_DECLARE_STD_RGRAPH_BEGIN(name, text, x, y, cx, cy, radius, gx, gy, dataLen, fontId, lblFontId) \
429 D4D_DECLARE_RGRAPH_BEGIN(name, text, x, y, cx, cy, radius, gx, gy, dataLen, (D4D_GRAPH_F_DEFAULT), NULL, fontId, lblFontId, NULL, NULL, NULL, NULL)
436 #define D4D_DECLARE_GRAPH_BEGIN_INRAM(name, text, x, y, cx, cy, gx, gy, dataLen, flags, pScheme, fontId, lblFontId, pOnNeedLblTxt, pUser, pOnValch, pOnUsrMsg) \
437 _D4D_DECLARE_GRAPH_BEGIN(D4D_NO_CONST, name, text, x, y, cx, cy, 0, NULL, NULL, gx, gy, dataLen, flags, pScheme, fontId, lblFontId, pOnNeedLblTxt, pUser, pOnValch, pOnUsrMsg)
442 #define D4D_DECLARE_STD_GRAPH_BEGIN_INRAM(name, text, x, y, cx, cy, gx, gy, dataLen, fontId, lblFontId) \
443 D4D_DECLARE_STD_GRAPH_BEGIN_INRAM(name, text, x, y, cx, cy, gx, gy, dataLen, (D4D_GRAPH_F_DEFAULT), NULL, fontId, lblFontId, NULL, NULL, NULL, NULL)
450 #define D4D_DECLARE_RGRAPH_BEGIN_INRAM(name, text, x, y, cx, cy, radius, gx, gy, dataLen, flags, pScheme, fontId, lblFontId, pOnNeedLblTxt, pUser, pOnValch, pOnUsrMsg) \
451 _D4D_DECLARE_GRAPH_BEGIN(D4D_NO_CONST, name, text, x, y, cx, cy, radius, NULL, NULL, gx, gy, dataLen, flags, pScheme, fontId, lblFontId, pOnNeedLblTxt, pUser, pOnValch, pOnUsrMsg)
456 #define D4D_DECLARE_STD_RGRAPH_BEGIN_INRAM(name, text, x, y, cx, cy, radius, gx, gy, dataLen, fontId, lblFontId) \
457 D4D_DECLARE_RGRAPH_BEGIN_INRAM(name, text, x, y, cx, cy, radius, gx, gy, dataLen, (D4D_GRAPH_F_DEFAULT), NULL, fontId, lblFontId, NULL, NULL, NULL, NULL)
483 #define D4D_GraphSetText D4D_SetText
D4D_LINETYPE
Type definition of eGUI line type.
D4D_WCHAR D4D_TCHAR
Type definition of eGUI character (it depends on UNICODE setting if this is D4D_CHAR or D4D_WCHAR)...
D4D_BOOL D4D_GraphSetScaleX(D4D_OBJECT_PTR pObj, Byte mul, Byte div)
Function sets the new scale of axis X of the graph.
D4D_BOOL D4D_GraphAddTraceData(D4D_OBJECT_PTR pObj, D4D_INDEX trace_ix, D4D_GRAPH_VALUE value)
The function add new data to one trace.
The string type. This structure contains all properties about string in eGUI.
D4D_COOR D4D_GraphGetSizeX(D4D_OBJECT_PTR pObj)
The function returns the size of graph traces in axis X.
Byte D4D_COOR
Type definition of eGUI coordination variables.
void(* D4D_GRAPH_ON_CHANGE)(D4D_OBJECT *pThis)
Type definition of graph on change callback function.
D4D_GRAPH_DATA_LEN lastShowPos
D4D_GRAPH_SAMPLE_IX xPosCnt
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
D4D_BOOL D4D_GraphSetDataWidth(D4D_OBJECT_PTR pObj, D4D_INDEX samples)
Function sets the new scale of the axis X of the graph.
const D4D_OBJECT_SYS_FUNCTION d4d_graphSysFunc
D4D_GRAPH_DATA_LEN lastDataPos
D4D_GRAPH_ON_CHANGE OnValueChanged
unsigned long LWord
Type definition of LWord (unsigned 32-bit).
Byte D4D_GRAPH_VALUE
Type definition of graph value type - this is standard type used for graph data input.
D4D_GRAPH_DATA_LEN dataShowX
LWord D4D_INDEX
Type definition of eGUI general index variables.
The object main structure type definition.
D4D_GRAPH_DATA_LEN dataLenght
LWord D4D_GRAPH_SAMPLE_IX
Type definition of graph dat asample type.
D4D_TCHAR *(* D4D_GRAPH_ON_NEED_LABEL)(D4D_OBJECT_PTR pThis, D4D_BOOL axisX, D4D_INDEX gridIx, D4D_GRAPH_SAMPLE_IX sampleIx)
Type definition of graph on need label call back function.
The object system function needed for each object - this is part of D4D_OBJECT main structure...
D4D_GRAPH_DATA_LEN initData
LWord D4D_BOOL
Type definition of eGUI boolean.
D4D_GRAPH_ON_NEED_LABEL OnNeedLabelText
void D4D_GraphAddTracesData(D4D_OBJECT_PTR pObj, D4D_GRAPH_VALUE *pValues)
The function add new data to all traces.
const D4D_GRAPH_TRACE * traces
void D4D_GraphClearAll(D4D_OBJECT_PTR pObj)
The function clears all internal data of graph object.
LWord D4D_COLOR
Type definition of eGUI color variables.
unsigned short Word
Type definition of Word (unsigned 16-bit).
LWord D4D_GraphGetSampleIndex(D4D_OBJECT_PTR pObj)
The function returns the current data sample index.