#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)
{
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)
{
SetWindowName();
fEditDisabled = kEditDisableWidth;
}
void TGHorizontal3DLine::SavePrimitive(std::ostream &out, Option_t *option )
{
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 )
{
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;
}