Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TToggleGroup.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/meta:$Id$
0002 // Author: Piotr Golonka   31/07/97
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_TToggleGroup
0013 #define ROOT_TToggleGroup
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TToggleGroup                                                         //
0019 //                                                                      //
0020 // This class defines check-box facility for TToggle objects            //
0021 // It is used in context menu "selectors" for picking up a value.       //
0022 //                                                                      //
0023 //////////////////////////////////////////////////////////////////////////
0024 
0025 #include "TNamed.h"
0026 #include "TToggle.h"
0027 #include "TOrdCollection.h"
0028 
0029 
0030 class TToggleGroup : public TNamed {
0031 
0032 private:
0033    TOrdCollection *fToggles;        // list of TToggle objects
0034 
0035 public:
0036    TToggleGroup();
0037    TToggleGroup(const TToggleGroup&);
0038    TToggleGroup &operator=(const TToggleGroup&);
0039    virtual ~TToggleGroup();
0040    virtual Int_t       GetTogglesCount() {return fToggles->GetSize();}
0041    virtual TToggle    *At(Int_t idx) {return (TToggle*)fToggles->At(idx);}
0042 
0043    virtual void        Remove(TToggle *t) {fToggles->Remove(t);}
0044    virtual void        Remove(Int_t pos) {fToggles->RemoveAt(pos);}
0045 
0046    virtual void        DeleteAll();
0047    virtual TToggle    *First() {return (TToggle*)fToggles->First();}
0048    virtual TToggle    *Last()  {return (TToggle*)fToggles->Last();}
0049 
0050    virtual Int_t       IndexOf(TToggle *t) {return fToggles->IndexOf(t);}
0051 
0052    virtual Int_t       Add(TToggle *t, Bool_t select=1);
0053    virtual Int_t       InsertAt(TToggle *t, Int_t pos,Bool_t select=1);
0054    virtual void        Select(Int_t idx);
0055    virtual void        Select(TToggle *t);
0056 
0057    ClassDefOverride(TToggleGroup,0)  // Group of contex-menu toggle objects
0058 };
0059 
0060 #endif
0061