ROOT  6.06/09
Reference Guide
TControlBarButton.h
Go to the documentation of this file.
1 // @(#)root/gpad:$Id$
2 // Author: Nenad Buncic 20/02/96
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TControlBarButton
13 #define ROOT_TControlBarButton
14 
15 
16 ////////////////////////////////////////////////////////////////////////////////
17 // //
18 // TControlBarButton //
19 // //
20 // This class defines the control bar buttons. //
21 // //
22 // //
23 // //
24 ////////////////////////////////////////////////////////////////////////////////
25 
26 #ifndef ROOT_Rtypes
27 #include "Rtypes.h"
28 #endif
29 
30 #ifndef ROOT_TNamed
31 #include "TNamed.h"
32 #endif
33 
34 
35 class TControlBarButton : public TNamed {
36 
37 protected:
38  Int_t fType; //button type
39  TString fAction; //action to be executed
40 
41 public:
43 
45  TControlBarButton(const char *label, const char *action="", const char *hint="", const char *type="button");
46  virtual ~TControlBarButton() { }
47 
48  virtual void Create() { }
49  virtual void Action();
50  virtual const char *GetAction() const { return fAction.Data(); }
51  virtual Int_t GetType() const { return fType; }
52  virtual void SetAction(const char *action);
53  virtual void SetType(const char *type);
54  virtual void SetType(Int_t type);
55 
56  ClassDef(TControlBarButton,0) //The Control bar button
57 };
58 
59 #endif
virtual ~TControlBarButton()
virtual void Create()
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
virtual void SetType(const char *type)
Set button type.
const char * Data() const
Definition: TString.h:349
#define ClassDef(name, id)
Definition: Rtypes.h:254
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
virtual Int_t GetType() const
virtual const char * GetAction() const
virtual void Action()
Execute control bar button command.
virtual void SetAction(const char *action)
Set action to be executed by this button.
int type
Definition: TGX11.cxx:120
Created by the TControlBar.