-
Notifications
You must be signed in to change notification settings - Fork 2
/
PEventControlWindow.h
60 lines (49 loc) · 1.94 KB
/
PEventControlWindow.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
#ifndef __PEventControlWindow_h__
#define __PEventControlWindow_h__
#include <Xm/Xm.h>
#include "PWindow.h"
#include "PListener.h"
#include "PMenu.h"
#include "ImageData.h"
enum TriggerFlag {
TRIGGER_OFF, /* trigger is off */
TRIGGER_SINGLE, /* capture next event only */
TRIGGER_CONTINUOUS /* run continuously */
};
class PEventControlWindow : public PWindow, public PListener, public PMenuHandler {
public:
PEventControlWindow(ImageData *data);
virtual void Listen(int message, void *dataPt);
virtual void Show();
virtual void DoMenuCommand(int anID);
void UpdateTriggerText();
void UpdateEventNumber();
void UpdateHistoryLabel(int isHistory);
int GetTriggerFlag() { return mTriggerFlag; }
static void UpdateTriggerText(ImageData *data);
static void UpdateEventNumber(ImageData *data);
static void SetEventFilter(ImageData *data);
static void SetNhitLogic(ImageData *data, char *str);
static void SetTriggerMaskLogic(ImageData *data, char *str);
static void SetPmtNcdLogic(ImageData *data, char *str);
static int PrintTriggerMask(ImageData *data, char *buff);
static int PrintNhitLogic(ImageData *data, char *buff);
static int PrintPmtNcdLogic(ImageData *data, char *buff);
static void GotoProc(Widget w,PEventControlWindow *pe_win, caddr_t call_data);
static void WriteProc(Widget w,PEventControlWindow *pe_win, caddr_t call_data);
private:
void SetNhitText();
void SetTriggerMaskText();
void SetPmtNcdLogicText();
void SetGotoType(int type);
void CreateTriggerRadio(int num);
int mTriggerFlag; // flag for radio button activated
Widget trigger_radio[3]; /* trigger types */
Widget event_text, thresh_text, trigger_text;
Widget trigger_label, history_label, goto_button;
Widget pmt_ncd_text;
Widget outfile_text[NUM_WRITERS];
Widget outfile_button[NUM_WRITERS];
Widget mDeadButton;
};
#endif // __PEventControlWindow_h__