Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
146 f9daq 1
#ifndef __TEST_H__
2
#define __TEST_H__
3
 
4
#include "root_include.h"
5
#include <string.h>
6
 
7
// Format for Number Entry fields:
8
// [digit space] [num type] [neg-pos] [limit] [min limit], [max limit]
9
//
10
// [digit space]: Number of spaces for the entered digits (width)
11
// [num type]: 0 = Integer, 1 = Real one digit, 2 = Real two digits, 3 = Real three digits, 4 = Real four digits, -1 = Arbitrary real
12
// [neg-pos]: 0 = Any number, 1 = Positive numbers, 2 = Nonnegative numbers
13
// [limit]: 0 = No limits, 1 = Maximum limit, 2 = Min and Max limits, -1 = Minimum limit
14
// [min limit], [max limit]: Min and Max limits, if applicable
15
 
16
class TSubStructure
17
{
18
RQ_OBJECT("TSubStructure")
19
 
20
protected:
21
   TGLabel *lab;
22
   TGHorizontalFrame *fH1;
23
   TGLayoutHints *f0, *f0expandX, *f1, *f2, *f3;
24
public:
25
   TSubStructure();
26
   virtual ~TSubStructure();
27
 
28
   // Label + Text Entry -> layout can be "oneline", "twoline"
29
   bool TGLabelTEntry(TGWindow *parent, int w, int h, const char *label, const char *deftext, const char *layout);
30
   // Label + Text Entry + Button -> layout can be "oneline", "twoline"
31
   bool TGLabelTEntryButton(TGWindow *parent, int w, int h, const char *label, const char *deftext, const char *buttext, const char *layout);
32
   // Label + Button
33
   bool TGLabelButton(TGWindow *parent, int w, int h, const char *label, const char *buttext, const char *pos);
34
   // Label + Number Entry
35
   bool TGLabelNEntry(TGWindow *parent, int w, int h, const char *label, double defval, double *format, const char *pos);
36
   // Text Entry + Button
37
   bool TGTEntryButton(TGWindow *parent, int w, int h, const char *deftext, const char *buttext);
38
   // Label + Dropdown menu
39
   bool TGLabelDrop(TGWindow *parent, int w, int h, const char *label, int nrentries, const char *entrytext[512], const char *selecttext);
40
   // 2 or more buttons
41
   bool TGMultiButton(TGWindow *parent, int w, int h, int nrbuttons, const char *buttext[512], const char *pos);
42
   // Label + 2 Number Entries
43
   bool TGLabelDoubleNEntry(TGWindow *parent, int w, int h, const char *label, double defval1, double *format1, double defval2, double *format2, const char *pos);
44
   // Checkbutton list (1 - 9) -> layout can be "horizontal", "vertical", "twoline", "threeline"
45
   bool TGCheckList(TGWindow *parent, int w, int h, int nrchecks, const char *labels[512], int *onoff, const char *layout, const char *pos);
46
   // Button + Horizontal progress bar
47
   bool TGButtonProgress(TGWindow *parent, int w, int h, const char *buttext);
48
   // Label + Horizontal progress bar
49
   bool TGLabelProgress(TGWindow *parent, int w, int h, const char *label);
50
   // Button + Horizontal progress bar + Text Entry
51
   bool TGButtonProgressTEntry(TGWindow *parent, int w, int h, const char *buttext, const char *deftext);
52
   // Checkbutton + Number entry
53
   bool TGCheckNEntry(TGWindow *parent, int w, int h, const char *label, int onoff, double defval, double *format, const char *pos);
54
   // Checkbutton + Text entry
55
   bool TGCheckTEntry(TGWindow *parent, int w, int h, const char *label, int onoff, const char *deftext, const char *layout);
56
 
57
   TGTextEntry *widgetTE;
58
   TGTextButton *widgetTB[6];
59
   TGNumberEntry *widgetNE[2];
60
   TGComboBox *widgetCB;
61
   TGCompositeFrame *outsidebox;
62
   TGCheckButton *widgetChBox[9];
63
   TGHProgressBar *widgetPB;
64
   int id;
65
};
66
 
67
#endif