63 "HTML files",
"*.htm*",
69"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd\"> ",
70"<HTML><HEAD><TITLE>RHTML cannot display the webpage</TITLE> ",
71"<META http-equiv=Content-Type content=\"text/html; charset=UTF-8\"></HEAD> ",
73"<TABLE cellSpacing=0 cellPadding=0 width=730 border=0> ",
76" <TD id=infoIconAlign vAlign=top align=left width=60 rowSpan=2> ",
77" <IMG src=\"info.gif\"> ",
79" <TD id=mainTitleAlign vAlign=center align=left width=*> ",
80" <H1 id=mainTitle>RHTML cannot display the webpage</H1></TD></TR> ",
82" <TD class=errorCodeAndDivider id=errorCodeAlign align=right> ",
83" <DIV class=divider></DIV></TD></TR> ",
88" <TD id=MostLikelyAlign vAlign=top align=left> ",
89" <H3 id=likelyCauses>Most likely causes:</H3> ",
91" <LI id=causeNotConnected>You are not connected to the Internet. ",
92" <LI id=causeSiteProblem>The website is encountering problems. ",
93" <LI id=causeErrorInAddress>There might be a typing error in the address. ",
94" <LI id=causeOtherError> ",
95" </LI></UL></TD></TR> ",
97" <TD id=infoBlockAlign vAlign=top align=right> </TD> ",
98" <TD id=moreInformationAlign vAlign=center align=left> ",
103" <TD vAlign=top><SPAN id=moreInfoContainer></SPAN><ID ",
104" id=moreInformation>More information</ID> ",
105" </TD></TR></TBODY></TABLE></H4> ",
106" <DIV class=infoBlock id=infoBlockID> ",
107" <P><ID id=errorExpl1>This problem can be caused by a variety of issues, ",
110" <LI id=errorExpl2>Internet connectivity has been lost. ",
111" <LI id=errorExpl3>The website is temporarily unavailable. ",
112" <LI id=errorExpl4>The Domain Name Server (DNS) is not reachable. ",
113" <LI id=errorExpl5>The Domain Name Server (DNS) does not have a listing ",
114" for the website's domain. ",
116" <P></P></DIV></TD></TR></TBODY></TABLE></BODY></HTML> ",
132 gClient->GetPicture(
"ed_open.png"));
134 gClient->GetPicture(
"ed_save.png"));
138 gClient->GetPicture(
"bld_exit.png"));
143 gClient->GetPicture(
"bld_plus.png"));
146 gClient->GetPicture(
"htmlfile.gif"));
151 gClient->GetPicture(
"ed_delete.png"));
172 fBack->SetToolTipText(
"Go Back");
174 fBack->Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Back()");
178 fForward->SetToolTipText(
"Go Forward");
180 fForward->Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Forward()");
184 fReload->SetToolTipText(
"Reload Page");
186 fReload->Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Reload()");
190 fStop->SetToolTipText(
"Stop Loading");
192 fStop->Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Stop()");
196 fHome->SetToolTipText(
"Go to ROOT HomePage\n (http://root.cern)");
198 fHome->Connect(
"Clicked()",
"TGHtmlBrowser",
this,
"Selected(=\"http://root.cern\")");
206 fURL->Connect(
"ReturnPressed()",
"TGHtmlBrowser",
this,
"URLChanged()");
210 fURL->SetText(filename);
213 fComboBox->Connect(
"Selected(char *)",
"TGHtmlBrowser",
this,
"Selected(char *)");
227 Int_t partsusBar[] = {75,25};
231 fHtml->Connect(
"MouseOver(const char *)",
"TGHtmlBrowser",
this,
"MouseOver(const char *)");
232 fHtml->Connect(
"MouseDown(const char *)",
"TGHtmlBrowser",
this,
"MouseDown(const char *)");
262 msg +=
"User-Agent: ROOT-TWebFile/1.1";
273 ::Error(
"ReadSize",
"library compiled without SSL, https not supported");
288 if (s->
RecvRaw(buf, 4096) == -1) {
309 static char *buf = 0;
333 ::Error(
"ReadRemote",
"library compiled without SSL, https not supported");
380 gROOT->ProcessLine(
Form(
"TFile::Open(\"%s\");", surl.
Data()));
382 gROOT->RefreshBrowsers();
402 snprintf(imgHtml, 1000,
"<IMG src=\"%s\"> ", surl.
Data());
403 fHtml->ParseText(imgHtml);
420 fHtml->ParseText(buf);
429 fHtml->SetBaseUri(
"");
445 buf = (
char *)
calloc(4096,
sizeof(
char));
447 while (fgets(buf, 4096,
f)) {
448 fHtml->ParseText(buf);
460 fHtml->SetBaseUri(
"");
483 const char *
string =
fURL->GetText();
495 const char *
string =
fURL->GetText();
518 if (!
fHtml->GetBaseUri())
526 short1 = surl(0, idx);
528 short2 = actual(0, idy);
530 if (short1 == short2) {
556 const char *
string =
fURL->GetText();
560 if (index < fComboBox->GetNumberOfEntries()) {
576 const char *
string =
fURL->GetText();
658 gClient->GetPicture(
"htmlfile.gif"));
686 if (parm1 < 1000)
break;
689 const char *shortcut = entry->
GetName();
R__EXTERN const char gHelpAbout[]
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
int Ssiz_t
String size (currently int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
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,...)
Formats a string in a circular formatting buffer.
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.
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.
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