Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // @(#)root/graf:$Id$
0002 // Author: Rene Brun   12/12/94
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_TWbox
0013 #define ROOT_TWbox
0014 
0015 
0016 #include "TBox.h"
0017 
0018 #include "TColor.h"
0019 
0020 class TWbox : public TBox {
0021 
0022 protected:
0023    Short_t      fBorderSize{0};    ///< window box bordersize in pixels
0024    Short_t      fBorderMode{0};    ///< Bordermode (-1=down, 0 = no border, 1=up)
0025 
0026 public:
0027    TWbox() {} // NOLINT: not allowed to use = default because of TObject::kIsOnHeap detection, see ROOT-10300
0028    TWbox(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
0029          Color_t color=18, Short_t bordersize=5 ,Short_t bordermode=1);
0030    TWbox(const TWbox &wbox);
0031    ~TWbox() override = default;
0032 
0033    TWbox &operator=(const TWbox &src);
0034 
0035    void           Copy(TObject &wbox) const override;
0036    void           Draw(Option_t *option="") override;
0037    virtual TWbox *DrawWbox(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
0038                            Color_t color=33 ,Short_t bordersize=5 ,Short_t bordermode=-1);
0039    void           ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0040    Short_t        GetBorderMode() const { return fBorderMode;}
0041    Short_t        GetBorderSize() const { return fBorderSize;}
0042    Int_t          GetDarkColor() const  {return TColor::GetColorDark(GetFillColor());}
0043    Int_t          GetLightColor() const {return TColor::GetColorBright(GetFillColor());}
0044    void           Paint(Option_t *option="") override;
0045    virtual void   PaintFrame(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
0046                              Color_t color, Short_t bordersize, Short_t bordermode,
0047                              Bool_t tops);
0048    virtual void   PaintWbox(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
0049                   Color_t color=33, Short_t bordersize=5, Short_t bordermode=-1);
0050    void           SavePrimitive(std::ostream &out, Option_t *option = "") override;
0051    virtual void   SetBorderMode(Short_t bordermode) {fBorderMode = bordermode;} // *MENU*
0052    virtual void   SetBorderSize(Short_t bordersize) {fBorderSize = bordersize;} // *MENU*
0053 
0054    ClassDefOverride(TWbox,1)  //A window box (box with 3-D effects)
0055 };
0056 
0057 #endif
0058