TG3DLine.h

Go to the documentation of this file.
00001 // @(#)root/gui:$Id: TG3DLine.h 23115 2008-04-10 13:35:37Z rdm $
00002 // Author: Fons Rademakers   6/09/2000
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TG3DLine
00013 #define ROOT_TG3DLine
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TGHorizontal3DLine and TGVertical3DLine                              //
00019 //                                                                      //
00020 // A horizontal 3D line is a line that typically separates a toolbar    //
00021 // from the menubar.                                                    //
00022 // A vertical 3D line is a line that can be used to separate groups of  //
00023 // widgets.                                                             //
00024 //                                                                      //
00025 //////////////////////////////////////////////////////////////////////////
00026 
00027 #ifndef ROOT_TGFrame
00028 #include "TGFrame.h"
00029 #endif
00030 
00031 
00032 class TGHorizontal3DLine : public TGFrame {
00033 
00034 public:
00035    TGHorizontal3DLine(const TGWindow *p = 0, UInt_t w = 4, UInt_t h = 2,
00036                       UInt_t options = kChildFrame,
00037                       Pixel_t back = GetDefaultFrameBackground());
00038 
00039    virtual void DrawBorder() {
00040       gVirtualX->DrawLine(fId, GetShadowGC()(),  0, 0, fWidth-2, 0);
00041       gVirtualX->DrawLine(fId, GetHilightGC()(), 0, 1, fWidth-1, 1);
00042       gVirtualX->DrawLine(fId, GetHilightGC()(), fWidth-1, 0, fWidth-1, 1);
00043    }
00044    virtual void  SavePrimitive(ostream &out, Option_t *option = "");
00045 
00046    ClassDef(TGHorizontal3DLine,0)  //A horizontal 3D separator line
00047 };
00048 
00049 
00050 class TGVertical3DLine : public TGFrame {
00051 
00052 public:
00053    TGVertical3DLine(const TGWindow *p = 0, UInt_t w = 2, UInt_t h = 4,
00054                     UInt_t options = kChildFrame,
00055                     Pixel_t back = GetDefaultFrameBackground());
00056 
00057    virtual void DrawBorder() {
00058       gVirtualX->DrawLine(fId, GetShadowGC()(),  0, 0, 0, fHeight-2);
00059       gVirtualX->DrawLine(fId, GetHilightGC()(), 1, 0, 1, fHeight-1);
00060       gVirtualX->DrawLine(fId, GetHilightGC()(), 0, fHeight-1, 1, fHeight-1);
00061    }
00062    virtual void  SavePrimitive(ostream &out, Option_t *option = "");
00063 
00064    ClassDef(TGVertical3DLine,0)  //A vertical 3D separator line
00065 };
00066 
00067 #endif

Generated on Tue Jul 5 14:19:49 2011 for ROOT_528-00b_version by  doxygen 1.5.1