51#define HTML_RELIEF_FLAT 0
52#define HTML_RELIEF_SUNKEN 1
53#define HTML_RELIEF_RAISED 2
62 "Unplanned behavior in the HTML Widget in file %s line %d\n", \
67 "Untested code executed in the HTML Widget in file %s line %d\n", \
73#define HtmlAssert(X) \
75 fprintf(stderr,"Assertion failed on line %d of %s\n",__LINE__,__FILE__); \
77#define HtmlCantHappen \
78 fprintf(stderr,"Can't happen on line %d of %s\n",__LINE__,__FILE__);
86#define HtmlTrace_Table1 0x00000001
87#define HtmlTrace_Table2 0x00000002
88#define HtmlTrace_Table3 0x00000004
89#define HtmlTrace_Table4 0x00000008
90#define HtmlTrace_Table5 0x00000010
91#define HtmlTrace_Table6 0x00000020
92#define HtmlTrace_GetLine 0x00000100
93#define HtmlTrace_GetLine2 0x00000200
94#define HtmlTrace_FixLine 0x00000400
95#define HtmlTrace_BreakMarkup 0x00001000
96#define HtmlTrace_Style 0x00002000
97#define HtmlTrace_Input1 0x00004000
112# define TRACE_INDENT printf("%*s",HtmlDepth-3,"")
113# define TRACE(Flag, Args) \
114 if( (Flag)&HtmlTraceMask ){ \
115 TRACE_INDENT; printf Args; fflush(stdout); \
117# define TRACE_PUSH(Flag) if( (Flag)&HtmlTraceMask ){ HtmlDepth+=3; }
118# define TRACE_POP(Flag) if( (Flag)&HtmlTraceMask ){ HtmlDepth-=3; }
121# define TRACE(Flag, Args)
122# define TRACE_PUSH(Flag)
123# define TRACE_POP(Flag)
164#define N_FONT_FAMILY 8
167#define NormalFont(X) (X)
168#define BoldFont(X) ((X) | 8)
169#define ItalicFont(X) ((X) | 16)
170#define CWFont(X) ((X) | 32)
171#define FontSize(X) ((X) & 007)
172#define FontFamily(X) ((X) & 070)
174#define FONT_Default 3
175#define FontSwitch(Size, Bold, Italic, Cw) \
176 ((Size) | ((Bold+(Italic)*2+(Cw)*4) << 3))
180#define FontIsValid(I) ((fFontValid[(I)>>3] & (1<<((I)&3)))!=0)
181#define FontSetValid(I) (fFontValid[(I)>>3] |= (1<<((I)&3)))
182#define FontClearValid(I) (fFontValid[(I)>>3] &= ~(1<<((I)&3)))
197#define COLOR_Normal 0
198#define COLOR_Unvisited 1
199#define COLOR_Visited 2
200#define COLOR_Selection 3
201#define COLOR_Background 4
202#define N_PREDEFINED_COLOR 5
211#define ALIGN_Center 3
234#define STY_Preformatted 0x001
235#define STY_StrikeThru 0x002
236#define STY_Underline 0x004
237#define STY_NoBreak 0x008
238#define STY_Anchor 0x010
240#define STY_Invisible 0x040
241#define STY_FontMask (STY_StrikeThru|STY_Underline)
255 virtual const char *
MarkupArg(
const char * ,
const char * ) {
return nullptr; }
275#define HTML_Visible 0x01
276#define HTML_NewLine 0x02
277#define HTML_Selected 0x04
329 virtual const char *
MarkupArg(
const char *tag,
const char *zDefault);
343#define HTML_MAX_COLUMNS 40
421 TGHtmlLi(
int type,
int argc,
int arglen[],
char *argv[]);
438#define LI_TYPE_Undefined 0
439#define LI_TYPE_Bullet1 1
440#define LI_TYPE_Bullet2 2
441#define LI_TYPE_Bullet3 3
442#define LI_TYPE_Enum_1 4
443#define LI_TYPE_Enum_A 5
444#define LI_TYPE_Enum_a 6
445#define LI_TYPE_Enum_I 7
446#define LI_TYPE_Enum_i 8
464#define HTML_MAP_RECT 1
465#define HTML_MAP_CIRCLE 2
466#define HTML_MAP_POLY 3
561#define IMAGE_ALIGN_Bottom 0
562#define IMAGE_ALIGN_Middle 1
563#define IMAGE_ALIGN_Top 2
564#define IMAGE_ALIGN_TextTop 3
565#define IMAGE_ALIGN_AbsMiddle 4
566#define IMAGE_ALIGN_AbsBottom 5
567#define IMAGE_ALIGN_Left 6
568#define IMAGE_ALIGN_Right 7
613#define INPUT_TYPE_Unknown 0
614#define INPUT_TYPE_Checkbox 1
615#define INPUT_TYPE_File 2
616#define INPUT_TYPE_Hidden 3
617#define INPUT_TYPE_Image 4
618#define INPUT_TYPE_Password 5
619#define INPUT_TYPE_Radio 6
620#define INPUT_TYPE_Reset 7
621#define INPUT_TYPE_Select 8
622#define INPUT_TYPE_Submit 9
623#define INPUT_TYPE_Text 10
624#define INPUT_TYPE_TextArea 11
625#define INPUT_TYPE_Applet 12
626#define INPUT_TYPE_Button 13
651 TGHtmlHr(
int type,
int argc,
int arglen[],
char *argv[]);
754#define HTML_INDENT 36
779 int width,
int minX,
int *actualWidth);
783 int bottom,
int width,
int actualWidth,
int leftMargin,
790 void WidenLine(
int reqWidth,
int *pX,
int *pY,
int *pW);
851#define O_HtmlMarkupElement 0
856#define O_HtmlListStart 5
857#define O_HtmlImageMarkup 6
861#define O_HtmlAnchor 10
862#define O_HtmlScript 11
863#define O_HtmlMapArea 12
1001 void RedrawArea(
int left,
int top,
int right,
int bottom);
1030 void StringHW(
const char *str,
int *
h,
int *
w);
1032 int lineWidth,
int hasbg);
1037 int x,
int y,
int w,
int h,
int depth,
int relief);
1043 int right,
int bottom);
1053 int arglen[],
char *argv[]);
1056 char *zType,
char *zArgs,
int offs);
1091 int SelectionSet(
const char *startIx,
const char *endIx);
1095 const char *
GetUid(
const char *
string);
1119 virtual void MouseOver(
const char *uri) {
Emit(
"MouseOver(const char *)",uri); }
1120 virtual void MouseDown(
const char *uri) {
Emit(
"MouseDown(const char *)",uri); }
1329#define REDRAW_PENDING 0x000001
1330#define GOT_FOCUS 0x000002
1331#define HSCROLL 0x000004
1332#define VSCROLL 0x000008
1333#define RELAYOUT 0x000010
1334#define RESIZE_ELEMENTS 0x000020
1335#define REDRAW_FOCUS 0x000040
1336#define REDRAW_TEXT 0x000080
1337#define EXTEND_LAYOUT 0x000100
1338#define STYLER_RUNNING 0x000200
1339#define INSERT_FLASHING 0x000400
1340#define REDRAW_IMAGES 0x000800
1341#define ANIMATE_IMAGES 0x001000
1346#define HtmlHasFlag(A,F) (((A)->flags&(F))==(F))
1347#define HtmlHasAnyFlag(A,F) (((A)->flags&(F))!=0)
1348#define HtmlSetFlag(A,F) ((A)->flags|=(F))
1349#define HtmlClearFlag(A,F) ((A)->flags&=~(F))
1354#define LARGE_NUMBER 100000000
1359#define DEF_HTML_BG_COLOR DEF_FRAME_BG_COLOR
1360#define DEF_HTML_BG_MONO DEF_FRAME_BG_MONO
1361#define DEF_HTML_EXPORT_SEL 1
1362#define DEF_HTML_FG DEF_BUTTON_FG
1363#define DEF_HTML_HIGHLIGHT_BG DEF_BUTTON_HIGHLIGHT_BG
1364#define DEF_HTML_HIGHLIGHT DEF_BUTTON_HIGHLIGHT
1365#define DEF_HTML_HIGHLIGHT_WIDTH "0"
1366#define DEF_HTML_INSERT_OFF_TIME 300
1367#define DEF_HTML_INSERT_ON_TIME 600
1368#define DEF_HTML_PADX (HTML_INDENT / 4)
1369#define DEF_HTML_PADY (HTML_INDENT / 4)
1370#define DEF_HTML_RELIEF "raised"
1371#define DEF_HTML_SELECTION_COLOR "skyblue"
1372#define DEF_HTML_TAKE_FOCUS "0"
1373#define DEF_HTML_UNVISITED "blue2"
1374#define DEF_HTML_VISITED "purple4"
1376#ifdef NAVIGATOR_TABLES
1378#define DEF_HTML_TABLE_BORDER "0"
1379#define DEF_HTML_TABLE_CELLPADDING "2"
1380#define DEF_HTML_TABLE_CELLSPACING "5"
1381#define DEF_HTML_TABLE_BORDER_LIGHT_COLOR "gray80"
1382#define DEF_HTML_TABLE_BORDER_DARK_COLOR "gray40"
Handle_t Pixmap_t
Pixmap handle.
Handle_t GContext_t
Graphics context handle.
Handle_t Drawable_t
Drawable handle.
Handle_t Cursor_t
Cursor handle.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
static void indent(ostringstream &buf, int indent_level)
unsigned short Html_u16_t
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
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 Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
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
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
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 Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void FreeColor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char text
Encapsulate fonts used in the GUI system.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
virtual ~TGHtmlBlock()
dtor.
~TGHtmlCell()
HTML cell element destructor.
virtual int GetVerticalAlignment(int dflt)
virtual int GetUnorderedListType(int dflt)
virtual const char * MarkupArg(const char *, const char *)
virtual int GetAlignment(int dflt)
virtual int GetOrderedListType(int dflt)
virtual int IsMarkup() const
TGHtmlImageMarkup * fINext
virtual ~TGHtmlImage()
dtor.
TGHtmlImageMarkup * fPList
TGHtmlImage & operator=(const TGHtmlImage &)=delete
TGHtmlImage(const TGHtmlImage &)=delete
int InWrapAround()
Return TRUE (non-zero) if we are currently wrapping text around one or more images.
TGHtmlElement * GetLine(TGHtmlElement *pStart, TGHtmlElement *pEnd, int width, int minX, int *actualWidth)
This routine gathers as many tokens as will fit on one line.
TGHtmlLayoutContext()
Html Layout Context constructor.
void ComputeMargins(int *pX, int *pY, int *pW)
Compute the current margins for layout.
TGHtmlElement * TableLayout(TGHtmlTable *p)
Do all layout for a single table.
void PopOneMargin(SHtmlMargin_t **ppMargin)
Pop one margin off of the given margin stack.
void PopMargin(SHtmlMargin_t **ppMargin, int tag)
Pop as many margins as necessary until the margin that was created with "tag" is popped off.
void LayoutBlock()
Do as much layout as possible on the block of text defined by the HtmlLayoutContext.
SHtmlMargin_t * fRightMargin
void PushMargin(SHtmlMargin_t **ppMargin, int indent, int bottom, int tag)
Push a new margin onto the given margin stack.
void ClearMarginStack(SHtmlMargin_t **ppMargin)
Clear a margin stack to reclaim memory.
TGHtmlElement * DoBreakMarkup(TGHtmlElement *p)
Break markup is any kind of markup that might force a line-break.
void Paragraph(TGHtmlElement *p)
Increase the headroom to create a paragraph break at the current token.
int FixLine(TGHtmlElement *pStart, TGHtmlElement *pEnd, int bottom, int width, int actualWidth, int leftMargin, int *maxX)
This routine computes the X and Y coordinates for all elements of a line that has been gathered using...
void PopIndent()
Adjust (pop) ident.
void ClearObstacle(int mode)
Clear a wrap-around obstacle.
void WidenLine(int reqWidth, int *pX, int *pY, int *pW)
Move past obstacles until a linewidth of reqWidth is obtained, or until all obstacles are cleared.
void PopExpiredMargins(SHtmlMargin_t **ppMarginStack, int y)
Pop all expired margins from the stack.
void FixAnchors(TGHtmlElement *p, TGHtmlElement *pEnd, int y)
Set the y coordinate for every anchor in the given list.
SHtmlMargin_t * fLeftMargin
void Reset()
Reset the layout context.
void PushIndent()
Adjust (push) ident.
virtual int GetAlignment(int dflt)
Return an alignment or justification flag associated with the given markup.
virtual int GetVerticalAlignment(int dflt)
Return the vertical alignment specified by the given element.
virtual ~TGHtmlMarkupElement()
HTML markup element destructor.
virtual const char * MarkupArg(const char *tag, const char *zDefault)
Lookup an argument in the given markup with the name given.
virtual int GetOrderedListType(int dflt)
The "type" argument to the given element might describe the type for an ordered list.
virtual int GetUnorderedListType(int dflt)
The "type" argument to the given element might describe a type for an unordered list.
~TGHtmlRef()
HTML ref element destructor.
~TGHtmlTable()
HTML table element destructor.
TGHtmlTextElement & operator=(const TGHtmlTextElement &)=delete
TGHtmlTextElement(const TGHtmlTextElement &)=delete
virtual ~TGHtmlTextElement()
HTML element destructor.
int GetLightShadowColor(int iBgColor)
Given that the background color is iBgColor, figure out an appropriate color for the bright part of t...
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a html widget as a C++ statement(s) on output stream out.
TGHtmlElement * GetMap(const char *name)
Returns html map element.
int IsDarkColor(ColorStruct_t *p)
Check to see if the given color is too dark to be easily distinguished from black.
void MoveVertically(TGHtmlElement *p, TGHtmlElement *pLast, int dy)
Move all elements in the given list vertically by the amount dy.
TGString * ListTokens(TGHtmlElement *p, TGHtmlElement *pEnd)
Return all tokens between the two elements as a string list.
void RedrawArea(int left, int top, int right, int bottom)
If any part of the screen needs to be redrawn, then call this routine with the values of a box (in wi...
const char * GetPctWidth(TGHtmlElement *p, char *opt, char *ret)
Return the height and width, converting to percent if required ret must be at least 16 characters lon...
int GotoAnchor(const char *name)
Go to anchor position.
void AppToken(TGHtmlElement *pNew, TGHtmlElement *p, int offs)
Insert token pNew before token p.
int SetInsert(const char *insIx)
Set the position of the insertion cursor.
virtual ~TGHtml()
HTML widget destructor.
virtual void RadioChanged(const char *name, const char *val)
Emit RadioChanged() signal.
TGHtmlElement * fLoEndPtr
virtual int FormCreate(TGHtmlForm *, const char *, const char *)
TGHtmlBlock * fPSelStartBlock
const char * GetHref(int x, int y, const char **target=nullptr)
This routine searches for a hyperlink beneath the coordinates x,y and returns a pointer to the HREF f...
int TextInsertCmd(int argc, char **argv)
Insert text into text token, or break token into two text tokens.
int IsLightColor(ColorStruct_t *p)
Check to see if the given color is too light to be easily distinguished from white.
void TokenizerAppend(const char *text)
Append text to the tokenizer engine.
void AddStyle(TGHtmlElement *p)
This routine adds information to the input texts that doesn't change when the display is resized or w...
virtual void MouseDown(const char *uri)
TGHtmlElement * MinMax(TGHtmlElement *p, int *pMin, int *pMax, int lineWidth, int hasbg)
Given a list of elements, compute the minimum and maximum width needed to render the list.
void ScheduleRedraw()
Make sure that a call to the Redraw() routine has been queued.
virtual char * ProcessScript(TGHtmlScript *)
void LostSelection()
Clear selection.
virtual TGFont * GetFont(int iFont)
The rendering and layout routines should call this routine in order to get a font structure.
ColorStruct_t * fApColor[32]
void UpdateInsert()
Recompute the position of the insertion cursor based on the position in fIns.
TGHtmlElement * InsertToken(TGHtmlElement *pToken, char *zType, char *zArgs, int offs)
This routine takes a text representation of a token, converts it into an TGHtmlElement object and ins...
TGHtmlElement * fLastSized
void LayoutDoc()
Advance the layout as far as possible.
void BlockDraw(TGHtmlBlock *pBlock, Drawable_t wid, int left, int top, int width, int height, Pixmap_t pixmap)
Display a single HtmlBlock. This is where all the drawing happens.
void AppendBlock(TGHtmlElement *pToken, TGHtmlBlock *pBlock)
Append a block to the block list and insert the block into the element list immediately prior to the ...
void IndexToBlockIndex(SHtmlIndex_t sIndex, TGHtmlBlock **ppBlock, int *piIndex)
Convert an Element-based index into a Block-based index.
int GetColorByName(const char *zColor)
This routine returns an index between 0 and N_COLOR-1 which indicates which ColorStruct_t structure i...
void DrawImage(TGHtmlImageMarkup *image, Drawable_t wid, int left, int top, int right, int bottom)
Draw all or part of an image.
TGHtmlInput * fFormElemLast
void AnimateImage(TGHtmlImage *image)
TGImage *img = image->image;.
virtual void InputSelected(const char *name, const char *val)
Emit Selected() signal.
const char * TypeToName(int type)
Convert a type into a symbolic name.
virtual void CheckToggled(const char *name, Bool_t on, const char *val)
Emit CheckToggled() signal.
void EncodeText(TGString *str, const char *z)
Append to the given TString an encoded version of the given text.
int SelectionSet(const char *startIx, const char *endIx)
Set selection.
virtual void Clear(Option_t *="")
Erase all HTML from this widget and clear the screen.
void UpdateSelectionDisplay()
The fPSelStartBlock and fPSelEndBlock values have been changed.
TGHtmlBlock * fPSelEndBlock
ColorStruct_t * fSelectionColor
int Tokenize()
Process as much of the input HTML as possible.
void SaveFileAs()
Save file.
virtual Bool_t HandleFocusChange(Event_t *event)
Handle focus change event.
virtual Bool_t ProcessMessage(Longptr_t, Longptr_t, Longptr_t)
Process messages (GUI events) in the html widget.
void FormBlocks()
Add additional blocks to the block list in order to cover all elements on the element list.
int NextMarkupType(TGHtmlElement *p)
Return the next markup type [TGHtmlElement::NextMarkupType].
void MaxIndex(TGHtmlElement *p, int *pIndex, int isLast)
Find the maximum index for the given token.
void StringHW(const char *str, int *h, int *w)
Return the height and width of string.
virtual void ButtonClicked(const char *name, const char *val)
Emit ButtonClicked() signal.
ColorStruct_t * fHighlightBgColorPtr
int NameToType(char *zType)
Convert a markup name into a type integer.
void SetRuleRelief(int relief)
Sets relief mode of html rule.
virtual void UpdateBackgroundStart()
Start background update.
int CellSpacing(TGHtmlElement *pTable)
Return the appropriate cell spacing for the given table.
TGHtmlElement * FillOutBlock(TGHtmlBlock *p)
Recompute the following fields of the given block structure:
SHtmlStyleStack_t * fStyleStack
virtual Bool_t HandleTimer(TTimer *timer)
Handle timer event.
ColorStruct_t * fNewLinkColor
TGHtmlListStart * fInnerList
void RedrawText(int y)
Call this routine to cause all of the rendered HTML at the virtual canvas coordinate of Y and beyond ...
int IndexMod(TGHtmlElement **pp, int *ip, char *cp)
Modify an index for both pointer and char +/-/=N.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
virtual void MouseOver(const char *uri)
Bool_t HandleRadioButton(TGHtmlInput *p)
Handle radio button event.
void AppendArglist(TGString *str, TGHtmlMarkupElement *pElem)
Append all the arguments of the given markup to the given TGString.
virtual int FormAction(TGHtmlForm *, int)
virtual Bool_t HandleMotion(Event_t *event)
handle mouse motion events
TGHtmlInput * GetInputElement(int x, int y)
This routine searches for a hyperlink beneath the coordinates x,y and returns a pointer to the HREF f...
void FindIndexInBlock(TGHtmlBlock *pBlock, int x, TGHtmlElement **ppToken, int *pIndex)
Given a Block and an x coordinate, find the Index of the character that is closest to the given x coo...
int ParseText(char *text, const char *index=nullptr)
Appends (or insert at the specified position) the given HTML text to the end of any HTML text that ma...
void TableBgndImage(TGHtmlElement *p)
Set background picture of a html table.
void UpdateSelection(int forceUpdate)
Given the selection end-points in fSelBegin and fSelEnd, recompute pSelBeginBlock and fPSelEndBlock,...
TGHtmlElement * TokenByIndex(int N, int flag)
Return a pointer to the Nth TGHtmlElement in the list.
void SetBaseUri(const char *uri)
Sets base URI.
void AppendElement(TGHtmlElement *pElem)
Append the given TGHtmlElement to the tokenizers list of elements.
void DeleteControls()
Delete all input controls.
void ImageChanged(TGHtmlImage *image, int newWidth, int newHeight)
This routine is called when an image changes.
virtual TImage * LoadImage(const char *uri, int w=0, int h=0)
This is the default LoadImage() procedure.
ColorStruct_t * AllocColorByValue(ColorStruct_t *color)
Allocate system color by value.
void MakeInvisible(TGHtmlElement *p_first, TGHtmlElement *p_last)
Add the STY_Invisible style to every token between p_first and p_last.
virtual Bool_t HandleIdleEvent(TGIdleHandler *i)
Handles idle event.
TGHtmlInput * fFirstInput
int GetImageAt(int x, int y)
This routine searchs for an image beneath the coordinates x,y and returns the token number of the ima...
void SetTableRelief(int relief)
Sets relief mode of html table.
void AppendText(TGString *str, TGHtmlElement *pFirst, TGHtmlElement *pEnd)
Append all text and space tokens between pStart and pEnd to the given TString.
void UnmapControls()
Unmap any input control that is currently mapped.
ColorStruct_t * AllocColor(const char *name)
Allocate system color by name.
TGString * TableText(TGHtmlTable *pTable, int flags)
Return text and images from a table as lists.
void DrawRect(Drawable_t drawable, TGHtmlElement *src, int x, int y, int w, int h, int depth, int relief)
Draw a rectangle.
int GetImageAlignment(TGHtmlElement *p)
Find the alignment for an image.
virtual int ProcessToken(TGHtmlElement *, const char *, int)
void HClear()
Erase all data from the HTML widget. Bring it back to an empty screen.
ColorStruct_t * fHighlightColorPtr
void AddSelectOptions(TGListBox *lb, TGHtmlElement *p, TGHtmlElement *pEnd)
The "p" argument points to a <select>.
GContext_t GetAnyGC()
Retrieve any valid GC.
TGHtmlElement * FindStartOfNextBlock(TGHtmlElement *p, int *pCnt)
Scan ahead looking for a place to put a block.
virtual Bool_t ItemLayout()
Layout html widget.
virtual int ProcessFrame()
TGHtmlBlock * fFirstBlock
void DrawTableBgnd(int x, int y, int w, int h, Drawable_t d, TImage *image)
Draw table background.
void RedrawBlock(TGHtmlBlock *p)
Redraw the TGHtmlBlock given.
const char * GetUid(const char *string)
Given a string, this procedure returns a unique identifier for the string.
void Redraw()
This routine is invoked in order to redraw all or part of the HTML widget.
int GetLinkColor(const char *zURL)
For the markup <a href=XXX>, find out if the URL has been visited before or not.
virtual char * GetFontName()
TGHtmlAnchor * fAnchorStart
int GetColorByValue(ColorStruct_t *pRef)
Find a color integer for the color whose color components are given by pRef.
char fFontValid[(71+7)/8]
void Sizer()
Compute the size of all elements in the widget.
const char * GetBaseUri() const
void DrawSelectionBackground(TGHtmlBlock *pBlock, Drawable_t Drawable_t, int x, int y)
Draw the selection background for the given block.
TGHtmlMarkupElement * MakeMarkupEntry(int objType, int type, int argc, int arglen[], char *argv[])
Make one markup entry.
SHtmlStyle_t PopStyleStack(int tag)
Pop a rendering style off of the stack.
void ComputeVirtualSize()
Computes virtual size of html area.
int FormCount(TGHtmlInput *p, int radio)
Return the number of elments of type p in a form.
int TokenNumber(TGHtmlElement *p)
Return the token number for the given TGHtmlElement.
TGHtmlElement * AttrElem(const char *name, char *value)
Returns html element matching attribute name and value.
virtual int IsVisited(const char *)
GContext_t GetGC(int color, int font)
Return a GC from the cache.
virtual char * ResolveUri(const char *uri)
This function resolves the specified URI and returns the result in a newly allocated string.
int GetRulePadding() const
int InArea(TGHtmlMapArea *p, int left, int top, int x, int y)
Only support rect and circles for now.
virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw region defined by [x,y] [w,h].
void PushStyleStack(int tag, SHtmlStyle_t style)
Push a new rendering style onto the stack.
TGHtmlElement * fNextPlaced
SHtmlTokenMap_t * GetMarkupMap(int n)
Returns token map at location n.
void SizeAndLink(TGFrame *frame, TGHtmlInput *pElem)
'frame' is the child widget that is used to implement an input element.
int ControlSize(TGHtmlInput *p)
This routine implements the Sizer() function for <INPUT>, <SELECT> and <TEXTAREA> markup.
SHtmlTokenMap_t * NameToPmap(char *zType)
Returns token map matching zType name.
TGHtmlLayoutContext fLayoutContext
TGHtmlElement * FindEndNest(TGHtmlElement *sp, int en, TGHtmlElement *lp)
Find End tag en, but ignore intervening begin/end tag pairs.
void RedrawEverything()
Call this routine to force the entire widget to be redrawn.
char * DumpToken(TGHtmlElement *p)
For debugging purposes, print information about a token.
virtual void SubmitClicked(const char *val)
Emit SubmitClicked() signal.
void UnderlineLinks(int onoff)
Set/reset html links underline.
SHtmlStyle_t GetCurrentStyle()
Get the current rendering style.
int GetTableRelief() const
int MapControls()
Map any control that should be visible according to the current scroll position.
TGHtmlImage * GetImage(TGHtmlImageMarkup *p)
Given an <IMG> markup, find or create an appropriate TGHtmlImage object and return a pointer to that ...
char * GetTokenName(TGHtmlElement *p)
Returns token name of html element p.
const char * GetText() const
void ClearGcCache()
Clear the cache of GCs.
int GetIndex(const char *zIndex, TGHtmlElement **ppToken, int *pIndex)
This routine decodes a complete index specification.
ColorStruct_t * fOldLinkColor
TGHtmlForm * fLoFormStart
TGHtmlInput * fFormElemStart
virtual TGFrame * ProcessApplet(TGHtmlInput *)
int ElementCoords(TGHtmlElement *p, int i, int pct, int *coords)
Return coordinates of item.
TGHtmlElement * TableDimensions(TGHtmlTable *pStart, int lineWidth)
pStart points to a <table>.
void PrintList(TGHtmlElement *first, TGHtmlElement *last)
Print a list of tokens.
void HandleMenu(Int_t)
Handle context menu entries events.
float ColorDistance(ColorStruct_t *pA, ColorStruct_t *pB)
Compute the squared distance between two colors.
void FlashCursor()
Flash the insertion cursor.
int GetDarkShadowColor(int iBgColor)
Given that the background color is iBgColor, figure out an appropriate color for the dark part of a 3...
int GetRuleRelief() const
Bool_t HandleHtmlInput(TGHtmlInput *pr, Event_t *event)
Handle html input (button, checkbox, ...) event.
void AddFormInfo(TGHtmlElement *p)
Add the DOM control information for form elements.
int DecodeBaseIndex(const char *zBase, TGHtmlElement **ppToken, int *pIndex)
Given a base index name (without any modifiers) return a pointer to the token described,...
void UnlinkAndFreeBlock(TGHtmlBlock *pBlock)
Destroy the given Block after first unlinking it from the element list.
SHtmlExtensions_t * fExts
void ResetLayoutContext()
Reset the main layout context in the main widget.
A listbox is a box, possibly with scrollbar, containing entries.
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
A TGView provides the infrastructure for text viewer and editor widgets.
ROOT GUI Window base class.
THashTable implements a hash table to store TObject's.
An abstract interface to image processing library.
Mother of all ROOT objects.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Handles synchronous and a-synchronous timer events.
SHtmlExtensions_t * fNext
SHtmlStyleStack_t * fPNext
SHtmlTokenMap_t * fPCollide