The Gaudi Framework  master (37c0b60a)
Widget Class Reference

Public Member Functions

void MakeHeader ()
 
void MakeFooter ()
 
 Widget (map< string, string > md)
 
virtual ~Widget ()
 
TString Html () const
 
 ClassDef (Widget, 0)
 

Private Attributes

TString fHeader
 
TString fFooter
 
TString fHtml_text
 
TGMainFrame * fMain
 
TGHtml * fHtml
 

Detailed Description

Definition at line 30 of file readMetaData.C.

Constructor & Destructor Documentation

◆ Widget()

Widget::Widget ( map< string, string md)

Definition at line 53 of file readMetaData.C.

53  {
54  MakeHeader();
55  MakeFooter();
56 
58 
60  fHtml_text += "<table border='1' style='width:100%'>";
61 
62  for ( iter = md.begin(); iter != md.end(); iter++ ) {
63  fHtml_text += "<tr><td><font color='black'><b>";
64  fHtml_text += iter->first;
65  fHtml_text += "</b></font></td><td><font color='blue'><b>";
66  fHtml_text += iter->second;
67  fHtml_text += "</b></font></td></tr>";
68  }
69  fHtml_text += "</table>";
71 
72  // Main window.
73  fMain = new TGMainFrame( gClient->GetRoot(), 10, 10, kVerticalFrame );
74  fMain->SetCleanup( kDeepCleanup ); // delete all subframes on exit
75  // create HTML widget
76  fHtml = new TGHtml( fMain, 1, 1 );
77  fMain->AddFrame( fHtml, new TGLayoutHints( kLHintsExpandX | kLHintsExpandY, 5, 5, 2, 2 ) );
78  fHtml->ParseText( (char*)fHtml_text.Data() );
79  // terminate ROOT session when window is closed
80  fMain->Connect( "CloseWindow()", "TApplication", gApplication, "Terminate()" );
81  fMain->DontCallClose();
82 
83  fMain->MapSubwindows();
84  fMain->Resize( 700, 700 );
85 
86  // set minimum size of main window
87  fMain->SetWMSizeHints( fMain->GetDefaultWidth(), fMain->GetDefaultHeight(), 1000, 1000, 0, 0 );
88  fMain->MapRaised();
89 }

◆ ~Widget()

Widget::~Widget ( )
virtual

Definition at line 90 of file readMetaData.C.

90 { delete fMain; }

Member Function Documentation

◆ ClassDef()

Widget::ClassDef ( Widget  ,
 
)

◆ Html()

TString Widget::Html ( ) const
inline

Definition at line 43 of file readMetaData.C.

43 { return fHtml_text; }

◆ MakeFooter()

void Widget::MakeFooter ( )

Definition at line 51 of file readMetaData.C.

51 { fFooter = "</body></html>"; }

◆ MakeHeader()

void Widget::MakeHeader ( )

Definition at line 46 of file readMetaData.C.

46  {
47  fHeader = "<html><head><title>Meta Data Viewer</title></head>";
48  fHeader += "<body>\n";
49  fHeader += "<center><H2>Meta Data Viewer</H2></center>";
50 }

Member Data Documentation

◆ fFooter

TString Widget::fFooter
private

Definition at line 33 of file readMetaData.C.

◆ fHeader

TString Widget::fHeader
private

Definition at line 32 of file readMetaData.C.

◆ fHtml

TGHtml* Widget::fHtml
private

Definition at line 37 of file readMetaData.C.

◆ fHtml_text

TString Widget::fHtml_text
private

Definition at line 34 of file readMetaData.C.

◆ fMain

TGMainFrame* Widget::fMain
private

Definition at line 36 of file readMetaData.C.


The documentation for this class was generated from the following file:
Widget::MakeHeader
void MakeHeader()
Definition: readMetaData.C:46
Widget::fHtml
TGHtml * fHtml
Definition: readMetaData.C:37
std::map
STL class.
Widget::fHeader
TString fHeader
Definition: readMetaData.C:32
std::map::begin
T begin(T... args)
Widget::MakeFooter
void MakeFooter()
Definition: readMetaData.C:51
std::map::end
T end(T... args)
Widget::fFooter
TString fFooter
Definition: readMetaData.C:33
Widget::fMain
TGMainFrame * fMain
Definition: readMetaData.C:36
Widget::fHtml_text
TString fHtml_text
Definition: readMetaData.C:34