ParameterSetEdit.h
Go to the documentation of this file.
1 #ifndef EDVB_PARAMETERSETEDIT_H
2 #define EDVB_PARAMETERSETEDIT_H
3 #include "TQObject.h"
4 #include "RQ_OBJECT.h"
5 #include "TGFrame.h"
6 #include <vector>
7 #include <string>
8 class TGCanvas;
9 class TGMainFrame;
10 class TGCompositeFrame;
11 class TGGroupFrame;
12 class TGMatrixLayout;
13 class TGLayoutHints;
14 class TGLabel;
15 class TGTextButton;
16 class TGTextEntry;
17 class TGVScrollBar;
18 
19 namespace evdb {
20  /// Helper class to setup scroll bars in evdb::ParameterSetEdit
21  class ParamFrame {
22  RQ_OBJECT("evdb::ParamFrame")
23 
24  private:
25  TGGroupFrame *fFrame;
26  TGCanvas *fCanvas;
27  TGMatrixLayout *fML;
28 
29  public:
30  ParamFrame(const TGWindow *p,
31  std::vector<std::string>& names,
32  std::vector<std::string>& value,
33  std::vector<TGTextEntry*>& fT2
34  );
35  virtual ~ParamFrame() { delete fFrame; }
36 
37  TGGroupFrame *GetFrame() const { return fFrame; }
38 
39  void SetCanvas(TGCanvas *canvas) { fCanvas = canvas; }
40  void HandleMouseWheel(Event_t *event);
41 
42  int GetHeight() const;
43  int GetWidth() const;
44 
45  };
46 }
47 
48 //......................................................................
49 
50 namespace evdb {
51  /// Dialog window to edit a parameter set
52  class ParameterSetEdit : public TGTransientFrame
53  {
54  RQ_OBJECT("evdb::ParameterSetEdit")
55  public:
56  ParameterSetEdit(TGMainFrame* mf,
57  const std::string& module,
58  const std::string& label,
59  const std::string& params,
60  std::string* newpset);
62 
63  int Edit();
64 
65  void Apply();
66  void Cancel();
67  void Done();
68  void CloseWindow();
69 
70  void HandleTab();
71 
72  private:
73  TGCompositeFrame* fF1;
75  TGCanvas* fCanvas;
76  TGCompositeFrame* fF3;
77  TGLayoutHints* fLH1;
78  TGLayoutHints* fLH2;
79  TGLayoutHints* fLH3;
80  TGLayoutHints* fLH4;
81  TGLabel* fL1;
82  TGTextButton* fB3;
83  TGTextButton* fB4;
84  TGTextButton* fB5;
85  std::vector<TGTextEntry*> fT2;
86  private:
87  std::vector<std::string> fName;
88  std::vector<std::string> fType;
89  std::vector<std::string> fValue;
90  std::string* fResult; ///< New parameter set
91 
93  };
94 }
95 #endif // EDVB_PARAMETERSETEDIT_H
int GetHeight() const
Dialog window to edit a parameter set.
TGGroupFrame * GetFrame() const
std::string string
Definition: nybbler.cc:12
std::vector< TGTextEntry * > fT2
std::vector< std::string > fType
std::vector< std::string > fName
Manage all things related to colors for the event display.
TGMatrixLayout * fML
TGCompositeFrame * fF3
void SetCanvas(TGCanvas *canvas)
ParamFrame(const TGWindow *p, std::vector< std::string > &names, std::vector< std::string > &value, std::vector< TGTextEntry * > &fT2)
p
Definition: test.py:223
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
TGGroupFrame * fFrame
std::vector< std::string > fValue
TGCompositeFrame * fF1
std::string * fResult
New parameter set.
Helper class to setup scroll bars in evdb::ParameterSetEdit.
void HandleMouseWheel(Event_t *event)
Event finding and building.