Avoid jumping of entries in data-selector window -- restore scrollbar position after...
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveMacroExecutorWindow.h
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 #ifndef AliEveMacroExecutorWindow_H
11 #define AliEveMacroExecutorWindow_H
12
13 #include "TGFrame.h"
14
15 #include <vector>
16
17 class AliEveMacroExecutor;
18 class AliEveMacro;
19 class AliEveMEWEditor;
20
21 class TGLabel;
22 class TGListBox;
23 class TGTextEntry;
24
25 //______________________________________________________________________________
26 // Short description of AliEveMacroExecutorWindow
27 //
28
29 class AliEveMacroExecutorWindow : public TGMainFrame
30 {
31 public:
32   AliEveMacroExecutorWindow(AliEveMacroExecutor* master);
33   virtual ~AliEveMacroExecutorWindow();
34
35   void PopulateMacros(Bool_t keep_selected=kTRUE);
36
37   void SetActiveStateOfShownMacros(Bool_t active);
38
39   void NewEventLoaded();
40
41   void DoEnableAll()  { SetActiveStateOfShownMacros(kTRUE);  }
42   void DoDisableAll() { SetActiveStateOfShownMacros(kFALSE); }
43   void DoReloadEvent();
44   void DoSelectTags();
45   void DoMacroSelected(Int_t mid);
46
47 protected:
48   AliEveMacroExecutor *fM;
49
50   TGCompositeFrame *fMainFrame;
51   TGCompositeFrame *fCtrlFrame;
52   TGListBox        *fListBox;
53   AliEveMEWEditor  *fEditor;
54
55   TGTextEntry      *fSelectTags;
56
57   std::vector<AliEveMacro*> fBoxContents;
58
59   TGHorizontalFrame* MkHFrame(TGCompositeFrame* p=0);
60   TGLabel*           MkLabel (TGCompositeFrame* p, const char* txt, Int_t width,
61                               Int_t lo=0, Int_t ro=0, Int_t to=2, Int_t bo=0);
62
63 private:
64   AliEveMacroExecutorWindow(const AliEveMacroExecutorWindow&);            // Not implemented
65   AliEveMacroExecutorWindow& operator=(const AliEveMacroExecutorWindow&); // Not implemented
66
67   ClassDef(AliEveMacroExecutorWindow, 0); // Short description.
68 };
69
70 #endif