Logo ROOT   6.08/07
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 #ifndef ROOT_Rtypes
17 #include "Rtypes.h"
18 #endif
19 
20 #ifndef ROOT_TNamed
21 #include "TNamed.h"
22 #endif
23 
24 
25 class TControlBarButton : public TNamed {
26 
27 protected:
28  Int_t fType; ///< button type
29  TString fAction; ///< action to be executed
30 
31 public:
33 
35  TControlBarButton(const char *label, const char *action="", const char *hint="", const char *type="button");
36  virtual ~TControlBarButton() { }
37 
38  virtual void Create() { }
39  virtual void Action();
40  virtual const char *GetAction() const { return fAction.Data(); }
41  virtual Int_t GetType() const { return fType; }
42  virtual void SetAction(const char *action);
43  virtual void SetType(const char *type);
44  virtual void SetType(Int_t type);
45 
46  ClassDef(TControlBarButton,0) //The Control bar button
47 };
48 
49 #endif
virtual Int_t GetType() const
virtual ~TControlBarButton()
TControlBarButton()
Default control bar button ctor.
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.
#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 const char * GetAction() const
Int_t fType
button type
virtual void Action()
Execute control bar button command.
virtual void SetAction(const char *action)
Set action to be executed by this button.
TString fAction
action to be executed
int type
Definition: TGX11.cxx:120
This class defines the control bar buttons.
const char * Data() const
Definition: TString.h:349