Re: How to introduce my own Web link

Rene Brun (Rene.Brun@cern.ch)
Tue, 24 Mar 1998 08:34:52 +0100


Valery Fine wrote:
>
> Hello Rootter,
>
> I am begging a pardon I am asking via Roottalk. I suppose it is
> a common interest question and the people would like to "know how".
>
> I want to insert my own web link into the "ROOT" HTML document.
>
> For example I want the "Class description" does contain a link to
> some "third party" Web site.
>
> Unfortunately ROOT THtml class converts all symbols "<" and ">"
> into "&lt" and "&gt". As result my own Web link looks like the plain
> text via the Web Browser.
>
> Is there any option to disable this conversion to keep my links
> within C++ comments visible and "clickable"?
>
> I.e. I want to type
>
> MyClass.cxx:
>
> /////////////
> //
> // The further explanations are present on <A HREF="http://mypage.html"> MyPage </A>
> //
>
> And want my user can see this via "ROOT Html page" as
>
> /////////////
> //
> // The further explanations are present on <MyPage (in blue)>
> //
>
> Is it possible to manage ?

The possibility to embed html source or references in the Root
documentation is possible since the early versions of the Root system.
Many Root classes contain pure html code. See for example the source
of the classes TMinuit, TDataMember. The html code must be inserted
between the keywords "Begin_Html" and "End_Html" starting/finishing
anywhere in a comment line.

For example in TDataMember,
I extract:
//Begin_Html
/*
<img align=center src="gif/classinfo.gif">
*/
//End_Html
...

//Begin_Html <pre>
/**************************************************************************

class MyClass{
private:
Float_t fX1;
...
public:
void SetX1(Float_t x) {fX1 = x;};
Float_t GetX1() {return fX1;};
...
}

</pre>
***************************************************************************/
//
//End_Html

All tutorials refer to a gif file with this technique.
For example, the tutorial hsum starts with this line:
//
// To see the output of this macro, click begin_html <a
href="gif/hsum.gif" >here</a> end_html.

I have updated the documentation of the class THtml to refer
to this important and nice feature.

Rene Brun