Logo ROOT   6.14/05
Reference Guide
TG3DLine.h
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 6/09/2000
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_TG3DLine
13 #define ROOT_TG3DLine
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGHorizontal3DLine and TGVertical3DLine //
19 // //
20 // A horizontal 3D line is a line that typically separates a toolbar //
21 // from the menubar. //
22 // A vertical 3D line is a line that can be used to separate groups of //
23 // widgets. //
24 // //
25 //////////////////////////////////////////////////////////////////////////
26 
27 #include "TGFrame.h"
28 
29 
30 class TGHorizontal3DLine : public TGFrame {
31 
32 public:
33  TGHorizontal3DLine(const TGWindow *p = 0, UInt_t w = 4, UInt_t h = 2,
34  UInt_t options = kChildFrame,
36 
37  virtual void DrawBorder() {
38  gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, fWidth-2, 0);
39  gVirtualX->DrawLine(fId, GetHilightGC()(), 0, 1, fWidth-1, 1);
40  gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, 0, fWidth-1, 1);
41  }
42  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
43 
44  ClassDef(TGHorizontal3DLine,0) //A horizontal 3D separator line
45 };
46 
47 
48 class TGVertical3DLine : public TGFrame {
49 
50 public:
51  TGVertical3DLine(const TGWindow *p = 0, UInt_t w = 2, UInt_t h = 4,
52  UInt_t options = kChildFrame,
54 
55  virtual void DrawBorder() {
56  gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
57  gVirtualX->DrawLine(fId, GetHilightGC()(), 1, 0, 1, fHeight-1);
58  gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, 1, fHeight-1);
59  }
60  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
61 
62  ClassDef(TGVertical3DLine,0) //A vertical 3D separator line
63 };
64 
65 #endif
virtual void DrawBorder()
Draw frame border.
Definition: TG3DLine.h:55
const char Option_t
Definition: RtypesCore.h:62
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition: TGFrame.cxx:737
virtual void DrawBorder()
Draw frame border.
Definition: TG3DLine.h:37
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save an vertical 3D line as a C++ statement(s) on output stream out.
Definition: TG3DLine.cxx:55
#define ClassDef(name, id)
Definition: Rtypes.h:320
ULong_t Pixel_t
Definition: GuiTypes.h:39
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
unsigned int UInt_t
Definition: RtypesCore.h:42
#define gVirtualX
Definition: TVirtualX.h:350
#define h(i)
Definition: RSha256.hxx:106
UInt_t fWidth
Definition: TGFrame.h:134
UInt_t fHeight
Definition: TGFrame.h:135
Handle_t fId
Definition: TGObject.h:36
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition: TGFrame.cxx:747
TGHorizontal3DLine(const TGWindow *p=0, UInt_t w=4, UInt_t h=2, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
constructor
Definition: TG3DLine.cxx:33