Logo ROOT  
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 #include "TNamed.h"
16 
17 class TControlBarButton : public TNamed {
18 
19 protected:
20  Int_t fType; ///< button type
21  TString fAction; ///< action to be executed
22 
23 public:
24  enum { kButton = 1, kDrawnButton, kSeparator };
25 
27  TControlBarButton(const char *label, const char *action="", const char *hint="", const char *type="button");
28  virtual ~TControlBarButton() { }
29 
30  virtual void Create() { }
31  virtual void Action();
32  virtual const char *GetAction() const { return fAction.Data(); }
33  virtual Int_t GetType() const { return fType; }
34  virtual void SetAction(const char *action);
35  virtual void SetType(const char *type);
36  virtual void SetType(Int_t type);
37 
38  ClassDef(TControlBarButton,0) //The Control bar button
39 };
40 
41 #endif
TControlBarButton::~TControlBarButton
virtual ~TControlBarButton()
Definition: TControlBarButton.h:34
TControlBarButton::GetType
virtual Int_t GetType() const
Definition: TControlBarButton.h:39
TString::Data
const char * Data() const
Definition: TString.h:369
TControlBarButton::TControlBarButton
TControlBarButton()
Default control bar button ctor.
Definition: TControlBarButton.cxx:36
TControlBarButton::Create
virtual void Create()
Definition: TControlBarButton.h:36
TNamed.h
TControlBarButton::SetType
virtual void SetType(const char *type)
Set button type.
Definition: TControlBarButton.cxx:83
TControlBarButton::kSeparator
@ kSeparator
Definition: TControlBarButton.h:30
Int_t
int Int_t
Definition: RtypesCore.h:45
TString
Definition: TString.h:136
TControlBarButton::kButton
@ kButton
Definition: TControlBarButton.h:30
TControlBarButton::GetAction
virtual const char * GetAction() const
Definition: TControlBarButton.h:38
TControlBarButton::fType
Int_t fType
button type
Definition: TControlBarButton.h:26
TNamed
Definition: TNamed.h:29
TControlBarButton::fAction
TString fAction
action to be executed
Definition: TControlBarButton.h:27
TControlBarButton::Action
virtual void Action()
Execute control bar button command.
Definition: TControlBarButton.cxx:55
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TControlBarButton::kDrawnButton
@ kDrawnButton
Definition: TControlBarButton.h:30
TControlBarButton::SetAction
virtual void SetAction(const char *action)
Set action to be executed by this button.
Definition: TControlBarButton.cxx:68
type
int type
Definition: TGX11.cxx:121
TControlBarButton
Definition: TControlBarButton.h:17
int