ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #ifndef ROOT_TGFrame
28 #include "TGFrame.h"
29 #endif
30 
31 
32 class TGHorizontal3DLine : public TGFrame {
33 
34 public:
35  TGHorizontal3DLine(const TGWindow *p = 0, UInt_t w = 4, UInt_t h = 2,
36  UInt_t options = kChildFrame,
38 
39  virtual void DrawBorder() {
40  gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, fWidth-2, 0);
41  gVirtualX->DrawLine(fId, GetHilightGC()(), 0, 1, fWidth-1, 1);
42  gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, 0, fWidth-1, 1);
43  }
44  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
45 
46  ClassDef(TGHorizontal3DLine,0) //A horizontal 3D separator line
47 };
48 
49 
50 class TGVertical3DLine : public TGFrame {
51 
52 public:
53  TGVertical3DLine(const TGWindow *p = 0, UInt_t w = 2, UInt_t h = 4,
54  UInt_t options = kChildFrame,
56 
57  virtual void DrawBorder() {
58  gVirtualX->DrawLine(fId, GetShadowGC()(), 0, 0, 0, fHeight-2);
59  gVirtualX->DrawLine(fId, GetHilightGC()(), 1, 0, 1, fHeight-1);
60  gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, 1, fHeight-1);
61  }
62  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
63 
64  ClassDef(TGVertical3DLine,0) //A vertical 3D separator line
65 };
66 
67 #endif
virtual void DrawBorder()
Draw frame border.
Definition: TG3DLine.h:57
const char Option_t
Definition: RtypesCore.h:62
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition: TGFrame.cxx:737
TH1 * h
Definition: legend2.C:5
virtual void DrawBorder()
Draw frame border.
Definition: TG3DLine.h:39
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
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:79
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
char * out
Definition: TBase64.cxx:29
unsigned int UInt_t
Definition: RtypesCore.h:42
tuple w
Definition: qtexample.py:51
TGVertical3DLine(const TGWindow *p=0, UInt_t w=2, UInt_t h=4, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
constructor
Definition: TG3DLine.cxx:44
#define gVirtualX
Definition: TVirtualX.h:362
UInt_t fWidth
Definition: TGFrame.h:150
UInt_t fHeight
Definition: TGFrame.h:151
Handle_t fId
Definition: TGObject.h:40
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())