| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Attributes | List of all members
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 20 of file readMetaData.C.

## Constructor & Destructor Documentation

## ◆ Widget()

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

Definition at line 43 of file readMetaData.C.

43 {
44 MakeHeader();
45 MakeFooter();
46
47 map<string, string>::iterator iter;
48
49 fHtml_text = fHeader;
50 fHtml_text += "<table border='1' style='width:100%'>";
51
52 for ( iter = md.begin(); iter != md.end(); iter++ ) {
53 fHtml_text += "<tr><td><font color='black'><b>";
54 fHtml_text += iter->first;
55 fHtml_text += "</b></font></td><td><font color='blue'><b>";
56 fHtml_text += iter->second;
57 fHtml_text += "</b></font></td></tr>";
58 }
59 fHtml_text += "</table>";
60 fHtml_text += fFooter;
61
62 // Main window.
63 fMain = new TGMainFrame( gClient->GetRoot(), 10, 10, kVerticalFrame );
64 fMain->SetCleanup( kDeepCleanup ); // delete all subframes on exit
65 // create HTML widget
66 fHtml = new TGHtml( fMain, 1, 1 );
67 fMain->AddFrame( fHtml, new TGLayoutHints( kLHintsExpandX | kLHintsExpandY, 5, 5, 2, 2 ) );
68 fHtml->ParseText( (char*)fHtml_text.Data() );
69 // terminate ROOT session when window is closed
70 fMain->Connect( "CloseWindow()", "TApplication", gApplication, "Terminate()" );
71 fMain->DontCallClose();
72
73 fMain->MapSubwindows();
74 fMain->Resize( 700, 700 );
75
76 // set minimum size of main window
77 fMain->SetWMSizeHints( fMain->GetDefaultWidth(), fMain->GetDefaultHeight(), 1000, 1000, 0, 0 );
78 fMain->MapRaised();
79 }
Widget::MakeHeader
void MakeHeader()
Definition: readMetaData.C:36
std::map::end
T end(T... args)
Widget::fHtml
TGHtml * fHtml
Definition: readMetaData.C:27
std::map
STL class.
Widget::fHeader
TString fHeader
Definition: readMetaData.C:22
Widget::fMain
TGMainFrame * fMain
Definition: readMetaData.C:26
Widget::fFooter
TString fFooter
Definition: readMetaData.C:23
Widget::MakeFooter
void MakeFooter()
Definition: readMetaData.C:41
std::map::begin
T begin(T... args)
Widget::fHtml_text
TString fHtml_text
Definition: readMetaData.C:24

## ◆ ~Widget()

Widget::~Widget | ( |  | ) |
| virtual

Definition at line 80 of file readMetaData.C.

80 { delete fMain; }
Widget::fMain
TGMainFrame * fMain
Definition: readMetaData.C:26

## Member Function Documentation

## ◆ ClassDef()

Widget::ClassDef | ( | Widget | ,
|  | 0 |
| ) |  |

## ◆ Html()

TString Widget::Html | ( |  | ) | const
| inline

Definition at line 33 of file readMetaData.C.

33 { return fHtml_text; }
Widget::fHtml_text
TString fHtml_text
Definition: readMetaData.C:24

## ◆ MakeFooter()

void Widget::MakeFooter | ( |  | ) |

Definition at line 41 of file readMetaData.C.

41 { fFooter = "</body></html>"; }
Widget::fFooter
TString fFooter
Definition: readMetaData.C:23

## ◆ MakeHeader()

void Widget::MakeHeader | ( |  | ) |

Definition at line 36 of file readMetaData.C.

36 {
37 fHeader = "<html><head><title>Meta Data Viewer</title></head>";
38 fHeader += "<body>\n";
39 fHeader += "<center><H2>Meta Data Viewer</H2></center>";
40 }
Widget::fHeader
TString fHeader
Definition: readMetaData.C:22

## Member Data Documentation

## ◆ fFooter

TString Widget::fFooter
| private

Definition at line 23 of file readMetaData.C.

## ◆ fHeader

TString Widget::fHeader
| private

Definition at line 22 of file readMetaData.C.

## ◆ fHtml

TGHtml* Widget::fHtml
| private

Definition at line 27 of file readMetaData.C.

## ◆ fHtml_text

TString Widget::fHtml_text
| private

Definition at line 24 of file readMetaData.C.

## ◆ fMain

TGMainFrame* Widget::fMain
| private

Definition at line 26 of file readMetaData.C.

The documentation for this class was generated from the following file:

- GaudiSvc/doc/readMetaData.C