// @(#)root/gui:$Id$
// Author: Fons Rademakers   6/09/2000

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TGHorizontal3DLine and TGVertical3DLine                              //
//                                                                      //
// A horizontal 3D line is a line that typically separates a toolbar    //
// from the menubar.                                                    //
// A vertical 3D line is a line that can be used to separate groups of  //
// widgets.                                                             //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TG3DLine.h"
#include "Riostream.h"


ClassImp(TGHorizontal3DLine)
ClassImp(TGVertical3DLine)

//______________________________________________________________________________
TGHorizontal3DLine::TGHorizontal3DLine(const TGWindow *p, UInt_t w, UInt_t h,
                                       UInt_t options, Pixel_t back) : 
                    TGFrame(p, w, h, options, back)
{
   // constructor

   SetWindowName();
   fEditDisabled = kEditDisableHeight;
}

//______________________________________________________________________________
TGVertical3DLine::TGVertical3DLine(const TGWindow *p, UInt_t w, UInt_t h,
                                   UInt_t options, Pixel_t back) : 
                  TGFrame(p, w, h, options, back)
{
   // constructor

   SetWindowName();
   fEditDisabled = kEditDisableWidth;
}

//______________________________________________________________________________
void TGHorizontal3DLine::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
{
    // Save an vertical 3D line as a C++ statement(s) on output stream out.

   if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);

   out << "   TGHorizontal3DLine *";
   out << GetName() << " = new TGHorizontal3DLine(" << fParent->GetName()
       << "," << GetWidth() << "," << GetHeight();

   if (fBackground == GetDefaultFrameBackground()) {
      if (!GetOptions()) {
         out << ");" << std::endl;
      } else {
         out << "," << GetOptionString() << ");" << std::endl;
      }
   } else {
      out << "," << GetOptionString() << ",ucolor);" << std::endl;
   }
   if (option && strstr(option, "keep_names"))
      out << "   " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
}

//______________________________________________________________________________
void TGVertical3DLine::SavePrimitive(std::ostream &out, Option_t *option /*= ""*/)
{
    // Save an vertical 3D line as a C++ statement(s) on output stream out.

   if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);

   out << "   TGVertical3DLine *";
   out << GetName() << " = new TGVertical3DLine(" << fParent->GetName()
       << "," << GetWidth() << "," << GetHeight();

   if (fBackground == GetDefaultFrameBackground()) {
      if (!GetOptions()) {
         out << ");" << std::endl;
      } else {
         out << "," << GetOptionString() <<");" << std::endl;
      }
   } else {
      out << "," << GetOptionString() << ",ucolor);" << std::endl;
   }
   if (option && strstr(option, "keep_names"))
      out << "   " << GetName() << "->SetName(\"" << GetName() << "\");" << std::endl;
}
 TG3DLine.cxx:1
 TG3DLine.cxx:2
 TG3DLine.cxx:3
 TG3DLine.cxx:4
 TG3DLine.cxx:5
 TG3DLine.cxx:6
 TG3DLine.cxx:7
 TG3DLine.cxx:8
 TG3DLine.cxx:9
 TG3DLine.cxx:10
 TG3DLine.cxx:11
 TG3DLine.cxx:12
 TG3DLine.cxx:13
 TG3DLine.cxx:14
 TG3DLine.cxx:15
 TG3DLine.cxx:16
 TG3DLine.cxx:17
 TG3DLine.cxx:18
 TG3DLine.cxx:19
 TG3DLine.cxx:20
 TG3DLine.cxx:21
 TG3DLine.cxx:22
 TG3DLine.cxx:23
 TG3DLine.cxx:24
 TG3DLine.cxx:25
 TG3DLine.cxx:26
 TG3DLine.cxx:27
 TG3DLine.cxx:28
 TG3DLine.cxx:29
 TG3DLine.cxx:30
 TG3DLine.cxx:31
 TG3DLine.cxx:32
 TG3DLine.cxx:33
 TG3DLine.cxx:34
 TG3DLine.cxx:35
 TG3DLine.cxx:36
 TG3DLine.cxx:37
 TG3DLine.cxx:38
 TG3DLine.cxx:39
 TG3DLine.cxx:40
 TG3DLine.cxx:41
 TG3DLine.cxx:42
 TG3DLine.cxx:43
 TG3DLine.cxx:44
 TG3DLine.cxx:45
 TG3DLine.cxx:46
 TG3DLine.cxx:47
 TG3DLine.cxx:48
 TG3DLine.cxx:49
 TG3DLine.cxx:50
 TG3DLine.cxx:51
 TG3DLine.cxx:52
 TG3DLine.cxx:53
 TG3DLine.cxx:54
 TG3DLine.cxx:55
 TG3DLine.cxx:56
 TG3DLine.cxx:57
 TG3DLine.cxx:58
 TG3DLine.cxx:59
 TG3DLine.cxx:60
 TG3DLine.cxx:61
 TG3DLine.cxx:62
 TG3DLine.cxx:63
 TG3DLine.cxx:64
 TG3DLine.cxx:65
 TG3DLine.cxx:66
 TG3DLine.cxx:67
 TG3DLine.cxx:68
 TG3DLine.cxx:69
 TG3DLine.cxx:70
 TG3DLine.cxx:71
 TG3DLine.cxx:72
 TG3DLine.cxx:73
 TG3DLine.cxx:74
 TG3DLine.cxx:75
 TG3DLine.cxx:76
 TG3DLine.cxx:77
 TG3DLine.cxx:78
 TG3DLine.cxx:79
 TG3DLine.cxx:80
 TG3DLine.cxx:81
 TG3DLine.cxx:82
 TG3DLine.cxx:83
 TG3DLine.cxx:84
 TG3DLine.cxx:85
 TG3DLine.cxx:86
 TG3DLine.cxx:87
 TG3DLine.cxx:88
 TG3DLine.cxx:89
 TG3DLine.cxx:90
 TG3DLine.cxx:91
 TG3DLine.cxx:92
 TG3DLine.cxx:93
 TG3DLine.cxx:94
 TG3DLine.cxx:95
 TG3DLine.cxx:96
 TG3DLine.cxx:97
 TG3DLine.cxx:98