rework rendering to use the value/period settings, and to correctly render from the...
[AROS.git] / workbench / classes / zune / graph / graph_intern.h
blob149214b8c12a509c75f79a4e482b4fb10c199edb
1 #ifndef _GRAPH_INTERN_H_
2 #define _GRAPH_INTERN_H_
4 #include <exec/types.h>
5 #include <utility/date.h>
6 #include <libraries/mui.h>
7 #include <intuition/intuition.h>
8 #include <graphics/gfx.h>
10 /* Descriptions and data for a single source .. */
11 struct Graph_SourceDATA
13 struct Hook *gs_ReadHook;
14 WORD gs_PlotPen;
15 WORD gs_PlotFillPen;
16 IPTR *gs_Entries;
19 /*** Instance data **********************************************************/
20 struct Graph_DATA
22 struct MUI_InputHandlerNode ihn;
24 IPTR graph_Flags; // see below
26 struct BitMap *graph_BitMap; // Bitmap we render to ...
27 struct RastPort *graph_RastPort; // RastPort to render into graph_BitMap
29 IPTR graph_SourceCount; // Number of data sources
30 IPTR graph_EntryCount; // Total number of entries in a source's array
31 IPTR graph_EntryPtr; // "current" entry in the source's array
32 struct Graph_SourceDATA *graph_Sources; // Data sources ...
34 /* Settings for Input values .. */
35 IPTR graph_ValCeiling;
36 IPTR graph_ValStepping;
38 /* Settings for the graph's Period .. */
39 IPTR graph_PeriodCeiling;
40 IPTR graph_PeriodStepping;
42 /* InfoText displayed on the graph ... */
43 struct List graph_InfoText; // Text displayed infront of graph
44 IPTR graph_ITHeight;
46 /* Used Pens ... */
48 WORD graph_BackPen; // The backrgound pen
49 WORD graph_AxisPen; // The outer frame pan and larger divisions
50 WORD graph_SegmentPen; // the secment pen
52 /* Private rendering values .. */
53 IPTR graph_Tick; // tick counter used in periodic rendering
54 UWORD graph_SegmentSize; // size of a segment in pixels
55 UWORD graph_PeriodSize; // size of a segment in pixels
58 #define GRAPHF_SETUP (1 << 0)
59 #define GRAPHF_HANDLER (1 << 1)
60 #define GRAPHF_PERIODIC (1 << 2)
61 #define GRAPHF_FIXEDLEN (1 << 3)
62 #define GRAPHF_AGGR (1 << 4)
63 #define GRAPHF_CHANGED (1 << 31)
65 #endif /* _GRAPH_INTERN_H_ */