Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TWbox.h
Go to the documentation of this file.
1 // @(#)root/graf:$Id$
2 // Author: Rene Brun 12/12/94
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_TWbox
13 #define ROOT_TWbox
14 
15 
16 #include "TBox.h"
17 
18 #include "TColor.h"
19 
20 class TWbox : public TBox {
21 
22 protected:
23  Short_t fBorderSize{0}; ///< window box bordersize in pixels
24  Short_t fBorderMode{0}; ///< Bordermode (-1=down, 0 = no border, 1=up)
25 
26 public:
27  TWbox() {} // NOLINT: not allowed to use = default because of TObject::kIsOnHeap detection, see ROOT-10300
28  TWbox(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
29  Color_t color=18, Short_t bordersize=5 ,Short_t bordermode=1);
30  TWbox(const TWbox &wbox);
31  virtual ~TWbox() = default;
32 
33  TWbox &operator=(const TWbox &src);
34 
35  void Copy(TObject &wbox) const;
36  virtual void Draw(Option_t *option="");
37  virtual void DrawWbox(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
38  Color_t color=33 ,Short_t bordersize=5 ,Short_t bordermode=-1);
39  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
40  Short_t GetBorderMode() const { return fBorderMode;}
41  Short_t GetBorderSize() const { return fBorderSize;}
42  Int_t GetDarkColor() const {return TColor::GetColorDark(GetFillColor());}
43  Int_t GetLightColor() const {return TColor::GetColorBright(GetFillColor());}
44  virtual void Paint(Option_t *option="");
45  virtual void PaintFrame(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
46  Color_t color, Short_t bordersize, Short_t bordermode,
47  Bool_t tops);
48  virtual void PaintWbox(Double_t x1, Double_t y1,Double_t x2 ,Double_t y2,
49  Color_t color=33, Short_t bordersize=5, Short_t bordermode=-1);
50  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
51  virtual void SetBorderMode(Short_t bordermode) {fBorderMode = bordermode;} // *MENU*
52  virtual void SetBorderSize(Short_t bordersize) {fBorderSize = bordersize;} // *MENU*
53 
54  ClassDef(TWbox,1) //A window box (box with 3-D effects)
55 };
56 
57 #endif
58