]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Reve/RGBrowser.h
Setup check-box pictures when inserting in a list-tree.
[u/mrichter/AliRoot.git] / EVE / Reve / RGBrowser.h
1 #ifndef REVE_RGBrowser_H
2 #define REVE_RGBrowser_H
3
4 #include <TGFrame.h>
5 #include <TGButton.h>
6 #include <TGListTree.h>
7 #include <TGNumberEntry.h>
8 #include <TGColorSelect.h>
9
10 #include <TParticle.h>
11 #include <TTree.h>
12 #include <TCanvas.h>
13 #include <TGeoVolume.h>
14 #include <TContextMenu.h>
15
16 namespace Reve {
17
18 class RGEditor;
19
20 class RGBrowser : public TGCompositeFrame
21 {
22   RGBrowser(const RGBrowser&);            // Not implemented
23   RGBrowser& operator=(const RGBrowser&); // Not implemented
24
25 protected:
26   TGCompositeFrame* fMainFrame;
27   TGVerticalFrame*  fV1;
28   TGVerticalFrame*  fV2;
29
30   TGCompositeFrame* fSelectionFrame; // in fact list-tree frame
31   TGCanvas*         fTreeView;
32
33   TGCanvas*         fCanvasWindow;
34   TGCompositeFrame* fDisplayFrame;   // detailed-vire frame, used in Classic look
35   
36   TGListTree*       fListTree;
37   TContextMenu*     fCtxMenu;
38
39  protected:
40   void SetupCintExport(TClass* cl);
41   void CalculateReparentXY(TGObject* parent, Int_t& x, Int_t& y);
42
43  public:
44   RGBrowser(const TGWindow *p, UInt_t w, UInt_t h);
45   virtual ~RGBrowser() {}
46
47   void SetupClassicLook(RGEditor*& editor, TCanvas* glpad);
48   void SetupEditorLook(RGEditor*& editor, TCanvas* glpad);
49   void SetupGLViewerLook(RGEditor*& editor, TCanvas* glpad);
50
51   void RedrawListTree();
52
53   void ItemClicked(TGListTreeItem *entry, Int_t btn, Int_t x, Int_t y);
54   void ExportToCINT(Text_t* var_name, TObject* obj);
55
56   void DbClickListItem(TGListTreeItem* item, Int_t btn);
57   void UpdateListItems(TGListTreeItem* item, Int_t btn);
58
59   TGListTree* GetListTree() { return fListTree; }
60
61   ClassDef(RGBrowser, 1);
62 };
63
64 } // namespace Reve
65
66 #endif