]>
Commit | Line | Data |
---|---|---|
1a7cb232 | 1 | #ifndef ALIALIENBROWSER_H |
2 | #define ALIALIENBROWSER_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
9 | // Class AliAlienBrowser | |
10 | // AliAlienBrowser class that describes the alien browser of the GUI | |
11 | // | |
12 | // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch | |
13 | //------------------------------------------------------------------------- | |
14 | ||
15 | ||
16 | ||
17 | ////////////////////////////////////////////////////////////////////////// | |
18 | // // | |
19 | // AliAlienBrowser // | |
20 | // // | |
21 | // AliEn browser of the GUI. // | |
22 | // // | |
23 | ////////////////////////////////////////////////////////////////////////// | |
24 | ||
25 | ||
26 | #include <TGCanvas.h> | |
27 | ||
28 | class TGFrame; | |
29 | class TGListTree; | |
30 | class TGListTreeItem; | |
31 | ||
32 | enum EBrowseType{ | |
33 | kGridBrowse, | |
34 | kLocalBrowse | |
35 | }; | |
36 | ||
37 | //___________________________________________________________________________ | |
38 | class AliAlienBrowser : public TGCanvas { | |
39 | public: | |
40 | AliAlienBrowser(const TGWindow* p, UInt_t w, UInt_t h, TGFrame* frame, const char* objectToConnect, EBrowseType type); | |
41 | ~AliAlienBrowser(); | |
42 | ||
43 | void AddItem(TGListTreeItem* parent, const char* txt); | |
44 | void OnDoubleClick(TGListTreeItem* item, Int_t btn); | |
45 | const char* GetPath(); | |
46 | void GotoDir(const char* dir); | |
47 | ||
48 | EBrowseType GetBrowseType() const {return fBrowseType;} | |
49 | ||
50 | //___________________________________________________________________________ | |
51 | private: | |
52 | AliAlienBrowser(const AliAlienBrowser&); // copy ctor | |
53 | AliAlienBrowser& operator= (const AliAlienBrowser&); // assignment operator | |
54 | ||
55 | TString DirName(TGListTreeItem* item) const; | |
56 | const char* GetPath(TGListTreeItem *item) const; | |
57 | void Refresh() const; | |
58 | ||
59 | void OnDoubleClickGrid(TGListTreeItem* item, Int_t btn); | |
60 | void OnDoubleClickLocal(TGListTreeItem* item, Int_t btn); | |
61 | ||
62 | ||
63 | TGFrame *fFrame; //main browser frame | |
64 | TGListTree *fListTree; //tree structure | |
65 | ||
66 | EBrowseType fBrowseType; // whether is for Local or Grid browsing | |
67 | ||
68 | ClassDef(AliAlienBrowser, 0) // AliAlienBrowser | |
69 | }; | |
70 | ||
71 | #endif |