Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
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
17class TControlBarButton : public TNamed {
18
19protected:
20 Int_t fType; ///< button type
21 TString fAction; ///< action to be executed
22
23public:
24 enum {
25// clang++ <v20 (-Wshadow) complains about shadowing Buttons.h global enum EEditMode. Let's silence warning:
26#if defined(__clang__) && __clang_major__ < 20
27#pragma clang diagnostic push
28#pragma clang diagnostic ignored "-Wshadow"
29#endif
31#if defined(__clang__) && __clang_major__ < 20
32#pragma clang diagnostic pop
33#endif
35
37 TControlBarButton(const char *label, const char *action="", const char *hint="", const char *type="button");
38 ~TControlBarButton() override {}
39
40 virtual void Create() {}
41 virtual void Action();
42 virtual const char *GetAction() const { return fAction.Data(); }
43 virtual Int_t GetType() const { return fType; }
44 virtual void SetAction(const char *action);
45 virtual void SetType(const char *type);
46 virtual void SetType(Int_t type);
47
48 ClassDefOverride(TControlBarButton,0) //The Control bar button
49};
50
51#endif
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
virtual Int_t GetType() const
virtual const char * GetAction() const
virtual void Create()
virtual void SetType(const char *type)
Set button type.
~TControlBarButton() override
virtual void SetAction(const char *action)
Set action to be executed by this button.
Int_t fType
button type
TControlBarButton()
Default control bar button ctor.
TString fAction
action to be executed
virtual void Action()
Execute control bar button command.
TNamed()
Definition TNamed.h:38
Basic string class.
Definition TString.h:138