Logo ROOT  
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
31
32public:
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
48class TGVertical3DLine : public TGFrame {
49
50public:
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
ULong_t Pixel_t
Definition: GuiTypes.h:39
#define h(i)
Definition: RSha256.hxx:106
unsigned int UInt_t
Definition: RtypesCore.h:42
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
@ kChildFrame
Definition: TGFrame.h:57
#define gVirtualX
Definition: TVirtualX.h:345
UInt_t fHeight
Definition: TGFrame.h:135
static const TGGC & GetHilightGC()
Get highlight color graphics context.
Definition: TGFrame.cxx:737
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
static const TGGC & GetShadowGC()
Get shadow color graphics context.
Definition: TGFrame.cxx:747
UInt_t fWidth
Definition: TGFrame.h:134
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
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
Handle_t fId
Definition: TGObject.h:36
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
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
virtual void DrawBorder()
Draw frame border.
Definition: TG3DLine.h:55