-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathDataset.H
116 lines (96 loc) · 3.5 KB
/
Dataset.H
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
// ---------------------------------------------------------------
// Dataset.H
// ---------------------------------------------------------------
#ifndef _DATASET_H_
#define _DATASET_H_
#include <AMReX_ParallelDescriptor.H>
#include <Xm/Xm.h>
#undef index
#include <GlobalUtilities.H>
#include <GraphicsAttributes.H>
#include <AMReX_Box.H>
#include <AMReX_AmrvisConstants.H>
#include <AMReX_DataServices.H>
namespace {
const int MAXSTRINGWIDTH(64);
}
class PltApp;
class PltAppState;
class AmrPicture;
class StringLoc;
class Dataset {
public:
Dataset(const amrex::Box &alignedRegion, AmrPicture *apptr,
PltApp *pltappptr, PltAppState *pltappstateptr,
int hdir, int vdir, int sdir);
~Dataset();
void DatasetRender(const amrex::Box &alignedRegion, AmrPicture *apptr,
PltApp *pltappptr, PltAppState *pltappstateptr,
int hdir, int vdir, int sdir);
void DrawIndices();
void DoRaise();
void DoExpose(int fromExpose);
static void CBColorButton(Widget, XtPointer, XtPointer);
static void CBQuitButton(Widget, XtPointer, XtPointer);
static void CBPixInput(Widget, XtPointer, XtPointer);
static void CBEndScrolling(Widget, XtPointer, XtPointer);
static void CBScrolling(Widget, XtPointer, XtPointer);
static void CBDoExposeDataset(Widget, XtPointer, XEvent *, Boolean *);
void DoColorButton();
void DoQuitButton();
void DoPixInput(XmDrawingAreaCallbackStruct *);
void SetTimeline(bool b) { bTimeline = b; }
void SetRegions(bool b) { bRegions = b; }
AmrPicture *GetAmrPicturePtr() { return amrPicturePtr; }
static bool GetInitialColor();
static void SetInitialColor(const bool bColor);
private:
Widget wDatasetTopLevel, wDatasetForm;
Widget wDatasetTools, wScrollArea, wPixArea;
Widget wFormat, wColorButton, wQuitButton, wLevels, wMinValue, wMaxValue;
Arg args[amrex::Amrvis::MAXARGS];
amrex::Box *datasetRegion;
unsigned int pixSizeX, pixSizeY;
int dataItemWidth, dataItemHeight;
int maxAllowableLevel, maxDrawnLevel, minDrawnLevel, stringOk;
int noData, hDIR, vDIR, sDIR, numStrings, *myStringCount;
char buffer[BUFSIZ], dataString[MAXSTRINGWIDTH];
StringLoc *dataStringArray, **myDataStringArray;
bool bDataStringArrayAllocated;
AmrPicture *amrPicturePtr;
amrex::DataServices *dataServicesPtr;
PltApp *pltAppPtr;
PltAppState *pltAppStatePtr;
GraphicsAttributes *gaPtr;
int dragging, drags;
int hStringOffset, vStringOffset;
string hAxisString, vAxisString;
int indexWidth, indexHeight;
int hScrollBarPos, vScrollBarPos;
int hIndexAreaHeight, hIndexAreaStart, hIndexAreaEnd;
int vIndexAreaWidth, vIndexAreaStart, vIndexAreaEnd;
int xh, yv;
Dimension width, height;
StringLoc **hIndexArray, **vIndexArray;
bool datasetPoint;
Atom WM_DELETE_WINDOW;
bool bTimeline, bRegions;
static bool initialColor;
Pixel blackIndex, whiteIndex;
void DrawGrid(int startX, int startY, int finishX, int finishY,
int gridspacingX, int gridspacingY,
Pixel foreground, Pixel background);
void DrawGrid(int startX, int startY, int finishX, int finishY,
int refRatio,
Pixel foreground, Pixel background);
};
class StringLoc {
public:
StringLoc() { }
~StringLoc() { }
char ds[MAXSTRINGWIDTH];
int xloc, yloc, color, olflag, dslen;
};
#endif
// -------------------------------------------------------------------
// -------------------------------------------------------------------