38 : TGTransientFrame( p,
main, 360, 750 ) {
42 fWidgets =
new TList();
44 this->SetBackgroundPixmap( GetPic(
"AboutBckgnd.gif" ) );
47 fTitleFrame =
new TGHorizontalFrame(
this, 10, 10 );
48 fTitleFrame->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
58 FontStruct_t titlefont;
59 titlefont = gClient->GetFontByName(
60 gEnv->GetValue(
"Gui.BoldFont",
"-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1" ) );
64 gval.fFont = gVirtualX->GetFontHandle( titlefont );
65 GContext_t titlegc = gVirtualX->CreateGC( gClient->GetRoot()->GetId(), &gval );
67 TString
title(
"BesVis " );
69 TString( TString( rcsname ).Strip( TString::kBoth,
'$' ) ).Remove( 0, 5 ).Data() );
70 fTitle =
new TGLabel( fTitleFrame,
title.Data(), titlegc );
71 fLayout =
new TGLayoutHints( kLHintsLeft | kLHintsCenterY, 10, 5, 5, 5 );
72 fWidgets->Add( fLayout );
75 fLayout =
new TGLayoutHints( kLHintsTop | kLHintsLeft, 0, 0, 75, 0 );
76 fWidgets->Add( fLayout );
77 AddFrame( fTitleFrame, fLayout );
80 fMain =
new TGTab(
this, 300, 650 );
81 fMain->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
86 tf = fMain->AddTab(
"About" );
87 tf->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
89 fAbout =
new TGVerticalFrame( tf, 200, 750 );
90 fAbout->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
91 fLayout =
new TGLayoutHints( kLHintsExpandX | kLHintsCenterY );
92 fWidgets->Add( fLayout );
93 tf->AddFrame( fAbout, fLayout );
95 fDescription1 =
new TGLabel( fAbout,
"BESIII Visualizaion Software" );
96 fDescription1->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
97 fLayout =
new TGLayoutHints( kLHintsCenterX | kLHintsCenterY );
98 fWidgets->Add( fLayout );
99 fAbout->AddFrame( fDescription1, fLayout );
102 ( TString( TString( rcsdate ).Strip( TString::kBoth,
'$' ) ).Remove( 0, 5 ) ).Data() );
103 fDescription2 =
new TGLabel( fAbout,
"" );
104 fDescription2->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
105 fLayout =
new TGLayoutHints( kLHintsCenterX | kLHintsCenterY );
106 fWidgets->Add( fLayout );
108 fAbout->AddFrame( fDescription2, fLayout );
109 fDescription3 =
new TGLabel( fAbout,
"Developed by Zhengyun YOU in Peking University" );
110 fDescription3->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
111 fLayout =
new TGLayoutHints( kLHintsCenterX | kLHintsCenterY );
112 fWidgets->Add( fLayout );
113 fAbout->AddFrame( fDescription3, fLayout );
115 fDescription4 =
new TGLabel( fAbout,
"Emai: youzy@hep.pku.cn" );
116 fDescription4->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
117 fLayout =
new TGLayoutHints( kLHintsCenterX | kLHintsCenterY );
118 fWidgets->Add( fLayout );
119 fAbout->AddFrame( fDescription4, fLayout );
122 tf = fMain->AddTab(
"Version" );
123 tf->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
125 fVersion =
new TGListBox( tf );
126 fVersion->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
128 fLayout =
new TGLayoutHints( kLHintsExpandX | kLHintsExpandY, 2, 2, 2, 2 );
129 fWidgets->Add( fLayout );
130 tf->AddFrame( fVersion, fLayout );
132 fVersion->AddEntry(
"2005-12-23", 0 );
133 fVersion->AddEntry(
" V 1.0.0", 0 );
135 fVersion->AddEntry(
"2018-4-28", 0 );
136 fVersion->AddEntry(
" V 2.0.0.B, contains MRPC", 0 );
137 fVersion->AddEntry(
"", 0 );
141 fVersion->Resize( 80, 80 );
143 for ( Int_t iTab = 0; iTab < fMain->GetNumberOfTabs(); iTab++ )
144 { fMain->GetTabTab( iTab )->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) ); }
146 fLayout =
new TGLayoutHints( kLHintsTop | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5 );
147 fWidgets->Add( fLayout );
148 AddFrame( fMain, fLayout );
151 fBottomFrame =
new TGHorizontalFrame(
this, 10, 10 );
152 fBottomFrame->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
155 fCloseBtn =
new TGTextButton( fBottomFrame,
" &Close ", 1 );
156 fCloseBtn->Associate(
this );
157 fCloseBtn->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
158 fLayout =
new TGLayoutHints( kLHintsRight | kLHintsCenterY, 2, 2, 2, 2 );
159 fWidgets->Add( fLayout );
160 fBottomFrame->AddFrame( fCloseBtn, fLayout );
162 fLayout =
new TGLayoutHints( kLHintsBottom | kLHintsExpandX, 5, 5, 0, 5 );
163 fWidgets->Add( fLayout );
164 AddFrame( fBottomFrame, fLayout );
167 tf = fMain->AddTab(
"Palette" );
168 tf->SetBackgroundPixmap( GetPic(
"AboutGrey.gif" ) );
170 fMdcPaletteFrame =
new TGVerticalFrame( tf, 200, 700 );
171 fMdcPaletteFrame->SetBackgroundPixmap( GetPic(
"MdcPalette.gif" ) );
172 fLayout =
new TGLayoutHints( kLHintsExpandX | kLHintsCenterY );
173 fWidgets->Add( fLayout );
184 SetWindowName(
"About BesVis" );
190 gVirtualX->TranslateCoordinates(
main->GetId(), GetParent()->GetId(),
191 (Int_t)( ( (TGFrame*)
main )->GetWidth() - fWidth ) >> 1,
192 (Int_t)( ( (TGFrame*)
main )->GetHeight() - fHeight ) >> 1,
195 SetWMPosition( ax, ay );
197 Resize( GetDefaultSize() );