Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-28 09:27:59

0001 // @(#)root/gpad:$Id$
0002 // Author: Nenad Buncic   20/02/96
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TControlBarButton
0013 #define ROOT_TControlBarButton
0014 
0015 #include "TNamed.h"
0016 
0017 class TControlBarButton : public TNamed {
0018 
0019 protected:
0020    Int_t    fType;       ///< button type
0021    TString  fAction;     ///< action to be executed
0022 
0023 public:
0024    enum {
0025 // clang++ <v20 (-Wshadow) complains about shadowing Buttons.h global enum EEditMode. Let's silence warning:
0026 #if defined(__clang__) && __clang_major__ < 20
0027 #pragma clang diagnostic push
0028 #pragma clang diagnostic ignored "-Wshadow"
0029 #endif
0030       kButton = 1,
0031 #if defined(__clang__) && __clang_major__ < 20
0032 #pragma clang diagnostic pop
0033 #endif
0034       kDrawnButton, kSeparator };
0035 
0036    TControlBarButton();
0037    TControlBarButton(const char *label, const char *action="", const char *hint="", const char *type="button");
0038    ~TControlBarButton() override {}
0039 
0040    virtual void        Create() {}
0041    virtual void        Action();
0042    virtual const char *GetAction() const { return fAction.Data(); }
0043    virtual Int_t       GetType() const { return fType; }
0044    virtual void        SetAction(const char *action);
0045    virtual void        SetType(const char *type);
0046    virtual void        SetType(Int_t type);
0047 
0048    ClassDefOverride(TControlBarButton,0) //The Control bar button
0049 };
0050 
0051 #endif