]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveBase/AliEveMacro.cxx
Use fixed-width font and zebra-stripes in macro browser.
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveMacro.cxx
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 #include "AliEveMacro.h"
11
12 //______________________________________________________________________________
13 // Full description of AliEveMacro
14 //
15 // !!! Eventually, fSources should be a bitfield, but we need a widget
16 // that can show/edit this. Like combo-box with a check-box for each
17 // entry.
18
19 ClassImp(AliEveMacro)
20
21 //______________________________________________________________________________
22 AliEveMacro::AliEveMacro(Int_t src, const TString& tags, const TString& mac,
23                          const TString& foo, const TString& args, Bool_t act) :
24   TObject(),
25   fSources(src), fTags(tags), fMacro (mac),
26   fFunc   (foo), fArgs(args), fActive(act)
27 {
28   // Constructor.
29 }
30
31 /******************************************************************************/
32
33 TString AliEveMacro::FormForExec() const
34 {
35   // Return string suitable for execution.
36
37   return fFunc + "(" + fArgs + ");";
38 }
39
40 TString AliEveMacro::FormForDisplay() const
41 {
42   // Return string suitable for display.
43
44   return TString::Format
45     (" %c %-20s  %-20s  %-30s  %-s", fActive ? 'x' : ' ',
46      fMacro.Data(), fFunc.Data(), fArgs.Data(), fTags.Data());
47 }