00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "TG3DLine.h"
00024 #include "Riostream.h"
00025
00026
00027 ClassImp(TGHorizontal3DLine)
00028 ClassImp(TGVertical3DLine)
00029
00030
00031 TGHorizontal3DLine::TGHorizontal3DLine(const TGWindow *p, UInt_t w, UInt_t h,
00032 UInt_t options, Pixel_t back) :
00033 TGFrame(p, w, h, options, back)
00034 {
00035
00036
00037 SetWindowName();
00038 fEditDisabled = kEditDisableHeight;
00039 }
00040
00041
00042 TGVertical3DLine::TGVertical3DLine(const TGWindow *p, UInt_t w, UInt_t h,
00043 UInt_t options, Pixel_t back) :
00044 TGFrame(p, w, h, options, back)
00045 {
00046
00047
00048 SetWindowName();
00049 fEditDisabled = kEditDisableWidth;
00050 }
00051
00052
00053 void TGHorizontal3DLine::SavePrimitive(ostream &out, Option_t *option )
00054 {
00055
00056
00057 if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);
00058
00059 out << " TGHorizontal3DLine *";
00060 out << GetName() << " = new TGHorizontal3DLine(" << fParent->GetName()
00061 << "," << GetWidth() << "," << GetHeight();
00062
00063 if (fBackground == GetDefaultFrameBackground()) {
00064 if (!GetOptions()) {
00065 out << ");" << endl;
00066 } else {
00067 out << "," << GetOptionString() << ");" << endl;
00068 }
00069 } else {
00070 out << "," << GetOptionString() << ",ucolor);" << endl;
00071 }
00072 if (option && strstr(option, "keep_names"))
00073 out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << endl;
00074 }
00075
00076
00077 void TGVertical3DLine::SavePrimitive(ostream &out, Option_t *option )
00078 {
00079
00080
00081 if (fBackground != GetDefaultFrameBackground()) SaveUserColor(out, option);
00082
00083 out << " TGVertical3DLine *";
00084 out << GetName() << " = new TGVertical3DLine(" << fParent->GetName()
00085 << "," << GetWidth() << "," << GetHeight();
00086
00087 if (fBackground == GetDefaultFrameBackground()) {
00088 if (!GetOptions()) {
00089 out << ");" << endl;
00090 } else {
00091 out << "," << GetOptionString() <<");" << endl;
00092 }
00093 } else {
00094 out << "," << GetOptionString() << ",ucolor);" << endl;
00095 }
00096 if (option && strstr(option, "keep_names"))
00097 out << " " << GetName() << "->SetName(\"" << GetName() << "\");" << endl;
00098 }