/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/EventDisplay/BesVisClient/BesVisClient-00-04-04/src/BesAboutHelp.cxx File Reference

#include "BesVisClient/BesAboutHelp.h"
#include <iostream>
#include <TGLabel.h>
#include <TList.h>
#include <TEnv.h>
#include <TVirtualX.h>
#include <TGButton.h>
#include <TGClient.h>
#include <TGTab.h>
#include <TGLayout.h>
#include <TGListBox.h>
#include <TString.h>
#include <TGIcon.h>
#include <TGPicture.h>
#include <TASImage.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

 ClassImp (BesAboutHelp) BesAboutHelp

Variables

static char * rcsname = "$Name: BesVisClient-00-04-04 $"
static char * rcsdate = "$Date: 2014/04/18 02:12:32 $"


Function Documentation

ClassImp ( BesAboutHelp   ) 

Definition at line 30 of file BesAboutHelp.cxx.

References rcsdate, rcsname, and title.

00039                                                                   :
00040         TGTransientFrame(p, main, 360, 750) {
00041     //
00042     // BesAboutHelp normal constructor
00043 
00044     fWidgets = new TList();
00045 
00046     this->SetBackgroundPixmap(GetPic("AboutBckgnd.gif"));
00047 
00048     // Create title frame
00049     fTitleFrame = new TGHorizontalFrame(this, 10, 10);
00050     fTitleFrame->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00051 
00052     // Add icon
00053     //const TGPicture *icon = fClient->GetPicture("mb_asterisk_s.xpm");
00054     //fIcon = new TGIcon(fTitleFrame, icon, icon->GetWidth(), icon->GetHeight());
00055     //fLayout = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 5, 5, 5);
00056     //fWidgets->Add(fLayout);
00057     //fTitleFrame->AddFrame(fIcon, fLayout);
00058 
00059     // Create title
00060     FontStruct_t titlefont;
00061     titlefont = gClient->GetFontByName(gEnv->GetValue("Gui.BoldFont",
00062                                        "-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1"));
00063 
00064     GCValues_t gval;
00065     gval.fMask = kGCFont;
00066     gval.fFont = gVirtualX->GetFontHandle(titlefont);
00067     GContext_t titlegc = gVirtualX->CreateGC(gClient->GetRoot()->GetId(), &gval);
00068 
00069     TString title("BesVis ");
00070     title.Append(TString(TString(rcsname).Strip(TString::kBoth, '$')).Remove(0,5).Data());
00071     fTitle = new TGLabel(fTitleFrame, title.Data(), titlegc);
00072     fLayout = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 10, 5, 5, 5);
00073     fWidgets->Add(fLayout);
00074     //fTitleFrame->AddFrame(fTitle, fLayout);
00075 
00076     fLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 75, 0);
00077     fWidgets->Add(fLayout);
00078     AddFrame(fTitleFrame, fLayout);
00079 
00080     // Create tabs
00081     fMain = new TGTab(this, 300, 650);
00082     fMain->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00083 
00084     TGCompositeFrame *tf;
00085 
00086     // About
00087     tf = fMain->AddTab("About");
00088     tf->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00089 
00090     fAbout = new TGVerticalFrame(tf, 200, 750);
00091     fAbout->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00092     fLayout = new TGLayoutHints(kLHintsExpandX | kLHintsCenterY);
00093     fWidgets->Add(fLayout);
00094     tf->AddFrame(fAbout, fLayout);
00095 
00096     fDescription1 = new TGLabel(fAbout, "BESIII  Visualizaion Software");
00097     fDescription1->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00098     fLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY);
00099     fWidgets->Add(fLayout);
00100     fAbout->AddFrame(fDescription1, fLayout);
00101 
00102     TString date((TString(TString(rcsdate).Strip(TString::kBoth, '$')).Remove(0,5)).Data());
00103     fDescription2 = new TGLabel(fAbout, ""/*date.Data()*/);
00104     fDescription2->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00105     fLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY);
00106     fWidgets->Add(fLayout);
00107 
00108     fAbout->AddFrame(fDescription2, fLayout);
00109     fDescription3 = new TGLabel(fAbout, "Developed by Zhengyun YOU in Peking University");
00110     fDescription3->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00111     fLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY);
00112     fWidgets->Add(fLayout);
00113     fAbout->AddFrame(fDescription3, fLayout);
00114 
00115     fDescription4 = new TGLabel(fAbout, "Emai: youzy@hep.pku.cn");
00116     fDescription4->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00117     fLayout = new TGLayoutHints(kLHintsCenterX | kLHintsCenterY);
00118     fWidgets->Add(fLayout);
00119     fAbout->AddFrame(fDescription4, fLayout);
00120 
00121     // Version
00122     tf = fMain->AddTab("Version");
00123     tf->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00124 
00125     fVersion = new TGListBox(tf);
00126     fVersion->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00127 
00128     fLayout = new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 2, 2, 2, 2);
00129     fWidgets->Add(fLayout);
00130     tf->AddFrame(fVersion, fLayout);
00131 
00132 
00133     fVersion->AddEntry("2005-12-23", 0);
00134     fVersion->AddEntry("    V 1.0.0", 0);
00135     fVersion->AddEntry("", 0);
00136     //for (Int_t iEntry = 0; iEntry < fVersion->GetNumberOfEntries(); iEntry++) {
00137     //fVersion->GetEntry(iEntry)->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00138     //}
00139     fVersion->Resize(80, 80);
00140 
00141     for (Int_t iTab = 0; iTab < fMain->GetNumberOfTabs(); iTab++) {
00142         fMain->GetTabTab(iTab)->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00143     }
00144 
00145     fLayout = new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5);
00146     fWidgets->Add(fLayout);
00147     AddFrame(fMain, fLayout);
00148 
00149     // Create bottom frame
00150     fBottomFrame = new TGHorizontalFrame(this, 10, 10);
00151     fBottomFrame->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00152 
00153     // Close button
00154     fCloseBtn = new TGTextButton(fBottomFrame, "    &Close    ", 1);
00155     fCloseBtn->Associate(this);
00156     fCloseBtn->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00157     fLayout = new TGLayoutHints(kLHintsRight | kLHintsCenterY, 2, 2, 2, 2);
00158     fWidgets->Add(fLayout);
00159     fBottomFrame->AddFrame(fCloseBtn, fLayout);
00160 
00161     fLayout = new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 5, 5, 0, 5);
00162     fWidgets->Add(fLayout);
00163     AddFrame(fBottomFrame, fLayout);
00164 
00165     // Palette
00166     tf = fMain->AddTab("Palette");
00167     tf->SetBackgroundPixmap(GetPic("AboutGrey.gif"));
00168 
00169     fMdcPaletteFrame= new TGVerticalFrame(tf, 200, 700);
00170     fMdcPaletteFrame->SetBackgroundPixmap(GetPic("MdcPalette.gif"));
00171     fLayout = new TGLayoutHints(kLHintsExpandX | kLHintsCenterY);
00172     fWidgets->Add(fLayout);
00174     //fMdcPaletteFrame = new TGHorizontalFrame(this, 10, 10);
00175     //fMdcPaletteFrame->SetBackgroundPixmap(GetPic("MdcPalette.gif"));
00176     //fLayout = new TGLayoutHints(kLHintsRight | kLHintsCenterY, 2, 2, 2, 2);
00177     //fWidgets->Add(fLayout);
00178     //fBottomFrame->AddFrame(fMdcPaletteFrame, fLayout);
00179 
00180     //fLayout = new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 5, 5, 0, 5);
00181 
00182     // Widget layout
00183     SetWindowName("About BesVis");
00184     MapSubwindows();
00185 
00186     // position relative to the parent's window
00187     Int_t  ax, ay;
00188     Window_t wdum;
00189     gVirtualX->TranslateCoordinates(main->GetId(), GetParent()->GetId(),
00190                                     (Int_t)(((TGFrame *) main)->GetWidth() - fWidth) >> 1,
00191                                     (Int_t)(((TGFrame *) main)->GetHeight() - fHeight) >> 1,
00192                                     ax, ay, wdum);
00193     Move(ax, ay);
00194     SetWMPosition(ax, ay);
00195 
00196     Resize(GetDefaultSize());
00197     Resize(360,750);
00198     MapWindow();
00199 }


Variable Documentation

char* rcsdate = "$Date: 2014/04/18 02:12:32 $" [static]

Definition at line 6 of file BesAboutHelp.cxx.

Referenced by ClassImp().

char* rcsname = "$Name: BesVisClient-00-04-04 $" [static]

Definition at line 5 of file BesAboutHelp.cxx.

Referenced by ClassImp().


Generated on Tue Nov 29 23:15:41 2016 for BOSS_7.0.2 by  doxygen 1.4.7