62 "HTML files",
"*.htm*",
68"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd\"> ",
69"<HTML><HEAD><TITLE>RHTML cannot display the webpage</TITLE> ",
70"<META http-equiv=Content-Type content=\"text/html; charset=UTF-8\"></HEAD> ",
72"<TABLE cellSpacing=0 cellPadding=0 width=730 border=0> ",
75" <TD id=infoIconAlign vAlign=top align=left width=60 rowSpan=2> ",
76" <IMG src=\"info.gif\"> ",
78" <TD id=mainTitleAlign vAlign=center align=left width=*> ",
79" <H1 id=mainTitle>RHTML cannot display the webpage</H1></TD></TR> ",
81" <TD class=errorCodeAndDivider id=errorCodeAlign align=right> ",
82" <DIV class=divider></DIV></TD></TR> ",
87" <TD id=MostLikelyAlign vAlign=top align=left> ",
88" <H3 id=likelyCauses>Most likely causes:</H3> ",
90" <LI id=causeNotConnected>You are not connected to the Internet. ",
91" <LI id=causeSiteProblem>The website is encountering problems. ",
92" <LI id=causeErrorInAddress>There might be a typing error in the address. ",
93" <LI id=causeOtherError> ",
94" </LI></UL></TD></TR> ",
96" <TD id=infoBlockAlign vAlign=top align=right> </TD> ",
97" <TD id=moreInformationAlign vAlign=center align=left> ",
102" <TD vAlign=top><SPAN id=moreInfoContainer></SPAN><ID ",
103" id=moreInformation>More information</ID> ",
104" </TD></TR></TBODY></TABLE></H4> ",
105" <DIV class=infoBlock id=infoBlockID> ",
106" <P><ID id=errorExpl1>This problem can be caused by a variety of issues, ",
109" <LI id=errorExpl2>Internet connectivity has been lost. ",
110" <LI id=errorExpl3>The website is temporarily unavailable. ",
111" <LI id=errorExpl4>The Domain Name Server (DNS) is not reachable. ",
112" <LI id=errorExpl5>The Domain Name Server (DNS) does not have a listing ",
113" for the website's domain. ",
115" <P></P></DIV></TD></TR></TBODY></TABLE></BODY></HTML> ",
131 gClient->GetPicture(
"ed_open.png"));
133 gClient->GetPicture(
"ed_save.png"));
137 gClient->GetPicture(
"bld_exit.png"));
142 gClient->GetPicture(
"bld_plus.png"));
145 gClient->GetPicture(
"htmlfile.gif"));
150 gClient->GetPicture(
"ed_delete.png"));
173 fBack->
Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Back()");
191 fStop->
Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Stop()");
197 fHome->
Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Selected(=\"http://root.cern.ch\")");
205 fURL->
Connect(
"ReturnPressed()",
"TGHtmlBrowser",
this,
"URLChanged()");
212 fComboBox->
Connect(
"Selected(char *)",
"TGHtmlBrowser",
this,
"Selected(char *)");
226 Int_t partsusBar[] = {75,25};
230 fHtml->
Connect(
"MouseOver(const char *)",
"TGHtmlBrowser",
this,
"MouseOver(const char *)");
231 fHtml->
Connect(
"MouseDown(const char *)",
"TGHtmlBrowser",
this,
"MouseDown(const char *)");
261 msg +=
"User-Agent: ROOT-TWebFile/1.1";
272 ::Error(
"ReadSize",
"library compiled without SSL, https not supported");
287 if (
s->RecvRaw(buf, 4096) == -1) {
308 static char *buf = 0;
312 if (size <= 0) size = 1024*1024;
332 ::Error(
"ReadRemote",
"library compiled without SSL, https not supported");
347 buf = (
char *)
calloc(size+1,
sizeof(
char));
348 if (
s->RecvRaw(buf, size) == -1) {
379 gROOT->ProcessLine(
Form(
"TFile::Open(\"%s\");", surl.
Data()));
381 gROOT->RefreshBrowsers();
401 snprintf(imgHtml, 1000,
"<IMG src=\"%s\"> ", surl.
Data());
444 buf = (
char *)
calloc(4096,
sizeof(
char));
446 while (fgets(buf, 4096,
f)) {
525 short1 = surl(0, idx);
527 short2 = actual(0, idy);
529 if (short1 == short2) {
559 if (index < fComboBox->GetNumberOfEntries()) {
657 gClient->GetPicture(
"htmlfile.gif"));
690 if (parm1 < 1000)
break;
693 const char *shortcut = entry->
GetName();
R__EXTERN const char gHelpAbout[]
void Error(const char *location, const char *msgfmt,...)
Ssiz_t ReadSize(const char *url)
Read (open) remote files.
static const char * gHtmlFTypes[]
static char * ReadRemote(const char *url)
Read (open) remote files.
char * Form(const char *fmt,...)
char * StrDup(const char *str)
Duplicate the string str.
R__EXTERN TSystem * gSystem
Using a TBrowser one can browse all ROOT objects.
const TGWindow * GetRoot() const
Returns current root (i.e.
virtual TGLBEntry * GetSelectedEntry() const
virtual TGTextEntry * GetTextEntry() const
virtual void AddEntry(TGString *s, Int_t id)
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
virtual Int_t GetNumberOfEntries() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual UInt_t GetDefaultHeight() const
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
void Reload()
Handle "Reload" navigation button.
Bool_t CheckAnchors(const char *)
Check if we just change position in the page (using anchor) and return kTRUE if any anchor has been f...
void MouseOver(const char *)
Handle "MouseOver" TGHtml signal.
void Back()
Handle "Back" navigation button.
TGVerticalFrame * fVerticalFrame
void Selected(const char *txt)
Open (browse) selected URL.
void MouseDown(const char *)
Handle "MouseDown" TGHtml signal.
TGHorizontalFrame * fHorizontalFrame
TGPopupMenu * fMenuFavorites
TGPictureButton * fForward
void Forward()
Handle "Forward" navigation button.
void Stop()
Handle "Reload" navigation button.
TGHtmlBrowser(const char *filename=0, const TGWindow *p=0, UInt_t w=900, UInt_t h=600)
TGHtmlBrowser constructor.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t)
Process Events.
TGPictureButton * fReload
void URLChanged()
URL combobox has changed.
int GotoAnchor(const char *name)
Go to anchor position.
virtual void Clear(Option_t *="")
Erase all HTML from this widget and clear the screen.
int ParseText(char *text, const char *index=0)
Appends (or insert at the specified position) the given HTML text to the end of any HTML text that ma...
void SetBaseUri(const char *uri)
Sets base URI.
const char * GetBaseUri() const
const char * GetText() const
virtual void CloseWindow()
Close and delete main frame.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
TGTextBuffer * GetBuffer() const
const char * GetText() const
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
virtual const char * GetTitle() const
Returns title of object.
Bool_t Save(const char *fn)
Save text buffer to file fn.
virtual void Layout()
layout view
virtual void ScrollToPosition(TGLongPosition newPos)
Scroll the canvas to pos.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
void Popup()
Show help dialog.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Prepend(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
This class represents a WWW compatible URL.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
const char * GetFile() const
const char * GetHost() const
const char * GetProtocol() const
static constexpr double s