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"));
171 fBack->SetToolTipText(
"Go Back");
173 fBack->Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Back()");
177 fForward->SetToolTipText(
"Go Forward");
179 fForward->Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Forward()");
183 fReload->SetToolTipText(
"Reload Page");
185 fReload->Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Reload()");
189 fStop->SetToolTipText(
"Stop Loading");
191 fStop->Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Stop()");
195 fHome->SetToolTipText(
"Go to ROOT HomePage\n (http://root.cern)");
197 fHome->Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Selected(=\"http://root.cern\")");
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;
332 ::Error(
"ReadRemote",
"library compiled without SSL, https not supported");
379 gROOT->ProcessLine(
Form(
"TFile::Open(\"%s\");", surl.
Data()));
381 gROOT->RefreshBrowsers();
401 snprintf(imgHtml, 1000,
"<IMG src=\"%s\"> ", surl.
Data());
402 fHtml->ParseText(imgHtml);
419 fHtml->ParseText(buf);
428 fHtml->SetBaseUri(
"");
444 buf = (
char *)
calloc(4096,
sizeof(
char));
446 while (fgets(buf, 4096,
f)) {
447 fHtml->ParseText(buf);
459 fHtml->SetBaseUri(
"");
482 const char *
string =
fURL->GetText();
494 const char *
string =
fURL->GetText();
517 if (!
fHtml->GetBaseUri())
525 short1 = surl(0, idx);
527 short2 = actual(0, idy);
529 if (short1 == short2) {
555 const char *
string =
fURL->GetText();
575 const char *
string =
fURL->GetText();
657 gClient->GetPicture(
"htmlfile.gif"));
690 if (parm1 < 1000)
break;
693 const char *shortcut = entry->
GetName();
R__EXTERN const char gHelpAbout[]
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Ssiz_t ReadSize(const char *url)
Read (open) remote files.
static const char * gHtmlFTypes[]
static char * ReadRemote(const char *url)
Read (open) remote files.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void w
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TSystem * gSystem
Using a TBrowser one can browse all ROOT objects.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
This class creates a file selection dialog.
char * fFilename
selected file name
const char ** fFileTypes
file types used to filter selectable files
char * fIniDir
on input: initial directory, on output: new directory
void SetIniDir(const char *inidir)
Set directory name.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
void MapWindow() override
map window
A composite frame that layout their children in horizontal way.
A very simple HTML browser.
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
TGHtmlBrowser(const char *filename=nullptr, const TGWindow *p=nullptr, UInt_t w=900, UInt_t h=600)
TGHtmlBrowser constructor.
void Selected(const char *txt)
Open (browse) selected URL.
void MouseDown(const char *)
Handle "MouseDown" TGHtml signal.
TGHorizontalFrame * fHorizontalFrame
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t) override
Process Events.
TGPopupMenu * fMenuFavorites
TGPictureButton * fForward
void Forward()
Handle "Forward" navigation button.
void Stop()
Handle "Reload" navigation button.
TGPictureButton * fReload
void URLChanged()
URL combobox has changed.
This class describes layout hints used by the layout classes.
TGMainFrame(const TGMainFrame &)=delete
virtual void CloseWindow()
Close and delete main frame.
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
TGClient * fClient
Connection to display server.
Provides a StatusBar widget.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Text string listbox entries.
const char * GetTitle() const override
Returns title of object.
A TGText is a multi line text buffer.
Bool_t Save(const char *fn)
Save text buffer to file fn.
A composite frame that layout their children in vertical way.
ROOT GUI Window base class.
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
A TRootHelpDialog is used to display help text (or any text in a dialog window).
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
void Popup()
Show help dialog.
A TSocket wrapped in by SSL.
This class implements client sockets.
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
virtual Bool_t IsValid() const
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
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