Logo ROOT   6.16/01
Reference Guide
TGHtmlBrowser.h
Go to the documentation of this file.
1// @(#)root/guihtml:$Id$
2// Author: Bertrand Bellenot 26/09/2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGHtmlBrowser
13#define ROOT_TGHtmlBrowser
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TGHtmlBrowser //
18// //
19//////////////////////////////////////////////////////////////////////////
20
21#include "TGFrame.h"
22
23class TGMenuBar;
24class TGPopupMenu;
25class TGStatusBar;
26class TGVerticalFrame;
28class TGComboBox;
29class TGTextBuffer;
30class TGTextEntry;
31class TGPictureButton;
32class TGHtml;
33
34class TGHtmlBrowser : public TGMainFrame {
35
36protected:
37
38 TGMenuBar *fMenuBar; // menu bar
39 TGPopupMenu *fMenuFile; // "File" menu entry
40 TGPopupMenu *fMenuFavorites; // "Favorites" menu entry
41 TGPopupMenu *fMenuTools; // "Tools" menu entry
42 TGPopupMenu *fMenuHelp; // "Help" menu entry
43 TGStatusBar *fStatusBar; // status bar
44 TGVerticalFrame *fVerticalFrame; // main vertical frame
45 TGHorizontalFrame *fHorizontalFrame; // main horizontal frame
46 TGPictureButton *fBack; // "Back" picture button
47 TGPictureButton *fForward; // "Forward" picture button
48 TGPictureButton *fReload; // "Reload Page" picture button
49 TGPictureButton *fStop; // "Stop Loading" picture button
50 TGPictureButton *fHome; // "Home" picture button
51 TGComboBox *fComboBox; // combo box for URLs history
52 TGTextBuffer *fURLBuf; // text buffer for current URL text entry
53 TGTextEntry *fURL; // current URL text entry
54 TGHtml *fHtml; // main TGHtml widget
55 Int_t fNbFavorites; // number of favorites in the menu
56
57public:
58 TGHtmlBrowser(const char *filename = 0, const TGWindow *p = 0,
59 UInt_t w = 900, UInt_t h = 600);
60 virtual ~TGHtmlBrowser() { ; }
61
62 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t);
63 void Selected(const char *txt);
64 void URLChanged();
65 void Back();
66 Bool_t CheckAnchors(const char *);
67 void Forward();
68 void Reload();
69 void Stop();
70 void MouseOver(const char *);
71 void MouseDown(const char *);
72 void Clicked(char *uri) { Emit("Clicked(char *)",uri); } // *SIGNAL*
73
74 ClassDef(TGHtmlBrowser, 0) // very simple html browser
75};
76
77#endif
78
#define h(i)
Definition: RSha256.hxx:106
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:324
virtual ~TGHtmlBrowser()
Definition: TGHtmlBrowser.h:60
void Reload()
Handle "Reload" navigation button.
TGHtml * fHtml
Definition: TGHtmlBrowser.h:54
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...
TGTextBuffer * fURLBuf
Definition: TGHtmlBrowser.h:52
void MouseOver(const char *)
Handle "MouseOver" TGHtml signal.
void Back()
Handle "Back" navigation button.
TGVerticalFrame * fVerticalFrame
Definition: TGHtmlBrowser.h:44
TGPopupMenu * fMenuHelp
Definition: TGHtmlBrowser.h:42
Int_t fNbFavorites
Definition: TGHtmlBrowser.h:55
TGPictureButton * fStop
Definition: TGHtmlBrowser.h:49
TGMenuBar * fMenuBar
Definition: TGHtmlBrowser.h:38
void Selected(const char *txt)
Open (browse) selected URL.
void MouseDown(const char *)
Handle "MouseDown" TGHtml signal.
TGPictureButton * fHome
Definition: TGHtmlBrowser.h:50
TGHorizontalFrame * fHorizontalFrame
Definition: TGHtmlBrowser.h:45
void Clicked(char *uri)
Definition: TGHtmlBrowser.h:72
TGPopupMenu * fMenuFile
Definition: TGHtmlBrowser.h:39
TGPictureButton * fBack
Definition: TGHtmlBrowser.h:46
TGStatusBar * fStatusBar
Definition: TGHtmlBrowser.h:43
TGPopupMenu * fMenuFavorites
Definition: TGHtmlBrowser.h:40
TGPictureButton * fForward
Definition: TGHtmlBrowser.h:47
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
Definition: TGHtmlBrowser.h:48
TGTextEntry * fURL
Definition: TGHtmlBrowser.h:53
void URLChanged()
URL combobox has changed.
TGComboBox * fComboBox
Definition: TGHtmlBrowser.h:51
TGPopupMenu * fMenuTools
Definition: TGHtmlBrowser.h:41
Definition: TGHtml.h:872
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:165