41 #ifndef ROOT_TGHtmlTokens
54 #define HTML_RELIEF_FLAT 0
55 #define HTML_RELIEF_SUNKEN 1
56 #define HTML_RELIEF_RAISED 2
65 "Unplanned behavior in the HTML Widget in file %s line %d\n", \
70 "Untested code executed in the HTML Widget in file %s line %d\n", \
76 #define HtmlAssert(X) \
78 fprintf(stderr,"Assertion failed on line %d of %s\n",__LINE__,__FILE__); \
80 #define HtmlCantHappen \
81 fprintf(stderr,"Can't happen on line %d of %s\n",__LINE__,__FILE__);
84 #define HtmlCantHappen
89 #define HtmlTrace_Table1 0x00000001
90 #define HtmlTrace_Table2 0x00000002
91 #define HtmlTrace_Table3 0x00000004
92 #define HtmlTrace_Table4 0x00000008
93 #define HtmlTrace_Table5 0x00000010
94 #define HtmlTrace_Table6 0x00000020
95 #define HtmlTrace_GetLine 0x00000100
96 #define HtmlTrace_GetLine2 0x00000200
97 #define HtmlTrace_FixLine 0x00000400
98 #define HtmlTrace_BreakMarkup 0x00001000
99 #define HtmlTrace_Style 0x00002000
100 #define HtmlTrace_Input1 0x00004000
113 extern int HtmlTraceMask;
115 # define TRACE_INDENT printf("%*s",HtmlDepth-3,"")
116 # define TRACE(Flag, Args) \
117 if( (Flag)&HtmlTraceMask ){ \
118 TRACE_INDENT; printf Args; fflush(stdout); \
120 # define TRACE_PUSH(Flag) if( (Flag)&HtmlTraceMask ){ HtmlDepth+=3; }
121 # define TRACE_POP(Flag) if( (Flag)&HtmlTraceMask ){ HtmlDepth-=3; }
123 # define TRACE_INDENT
124 # define TRACE(Flag, Args)
125 # define TRACE_PUSH(Flag)
126 # define TRACE_POP(Flag)
167 #define N_FONT_FAMILY 8
168 #define N_FONT_SIZE 7
170 #define NormalFont(X) (X)
171 #define BoldFont(X) ((X) | 8)
172 #define ItalicFont(X) ((X) | 16)
173 #define CWFont(X) ((X) | 32)
174 #define FontSize(X) ((X) & 007)
175 #define FontFamily(X) ((X) & 070)
177 #define FONT_Default 3
178 #define FontSwitch(Size, Bold, Italic, Cw) \
179 ((Size) | ((Bold+(Italic)*2+(Cw)*4) << 3))
183 #define FontIsValid(I) ((fFontValid[(I)>>3] & (1<<((I)&3)))!=0)
184 #define FontSetValid(I) (fFontValid[(I)>>3] |= (1<<((I)&3)))
185 #define FontClearValid(I) (fFontValid[(I)>>3] &= ~(1<<((I)&3)))
198 #define N_COLOR 32 // Total number of colors
200 #define COLOR_Normal 0 // Index for normal color (black)
201 #define COLOR_Unvisited 1 // Index for unvisited hyperlinks
202 #define COLOR_Visited 2 // Color for visited hyperlinks
203 #define COLOR_Selection 3 // Background color for the selection
204 #define COLOR_Background 4 // Default background color
205 #define N_PREDEFINED_COLOR 5 // Number of predefined colors
213 #define ALIGN_Right 2
214 #define ALIGN_Center 3
237 #define STY_Preformatted 0x001
238 #define STY_StrikeThru 0x002
239 #define STY_Underline 0x004
240 #define STY_NoBreak 0x008
241 #define STY_Anchor 0x010
243 #define STY_Invisible 0x040
244 #define STY_FontMask (STY_StrikeThru|STY_Underline)
258 virtual const char *
MarkupArg(
const char * ,
const char * ) {
return 0; }
278 #define HTML_Visible 0x01 // This element produces "ink"
279 #define HTML_NewLine 0x02 // type == Html_Space and ends with newline
280 #define HTML_Selected 0x04 // Some or all of this Html_Block is selected
332 virtual const char *
MarkupArg(
const char *tag,
const char *zDefault);
346 #define HTML_MAX_COLUMNS 40
424 TGHtmlLi(
int type,
int argc,
int arglen[],
char *argv[]);
441 #define LI_TYPE_Undefined 0 // If in TGHtmlLi, use the TGHtmlListStart value
442 #define LI_TYPE_Bullet1 1 // A solid circle
443 #define LI_TYPE_Bullet2 2 // A hollow circle
444 #define LI_TYPE_Bullet3 3 // A hollow square
445 #define LI_TYPE_Enum_1 4 // Arabic numbers
446 #define LI_TYPE_Enum_A 5 // A, B, C, ...
447 #define LI_TYPE_Enum_a 6 // a, b, c, ...
448 #define LI_TYPE_Enum_I 7 // Capitalized roman numerals
449 #define LI_TYPE_Enum_i 8 // Lower-case roman numerals
467 #define HTML_MAP_RECT 1
468 #define HTML_MAP_CIRCLE 2
469 #define HTML_MAP_POLY 3
564 #define IMAGE_ALIGN_Bottom 0
565 #define IMAGE_ALIGN_Middle 1
566 #define IMAGE_ALIGN_Top 2
567 #define IMAGE_ALIGN_TextTop 3
568 #define IMAGE_ALIGN_AbsMiddle 4
569 #define IMAGE_ALIGN_AbsBottom 5
570 #define IMAGE_ALIGN_Left 6
571 #define IMAGE_ALIGN_Right 7
616 #define INPUT_TYPE_Unknown 0
617 #define INPUT_TYPE_Checkbox 1
618 #define INPUT_TYPE_File 2
619 #define INPUT_TYPE_Hidden 3
620 #define INPUT_TYPE_Image 4
621 #define INPUT_TYPE_Password 5
622 #define INPUT_TYPE_Radio 6
623 #define INPUT_TYPE_Reset 7
624 #define INPUT_TYPE_Select 8
625 #define INPUT_TYPE_Submit 9
626 #define INPUT_TYPE_Text 10
627 #define INPUT_TYPE_TextArea 11
628 #define INPUT_TYPE_Applet 12
629 #define INPUT_TYPE_Button 13
654 TGHtmlHr(
int type,
int argc,
int arglen[],
char *argv[]);
757 #define HTML_INDENT 36
782 int width,
int minX,
int *actualWidth);
786 int bottom,
int width,
int actualWidth,
int leftMargin,
793 void WidenLine(
int reqWidth,
int *pX,
int *pY,
int *pW);
822 #define N_CACHE_GC 32
854 #define O_HtmlMarkupElement 0
856 #define O_HtmlTable 2
859 #define O_HtmlListStart 5
860 #define O_HtmlImageMarkup 6
861 #define O_HtmlInput 7
864 #define O_HtmlAnchor 10
865 #define O_HtmlScript 11
866 #define O_HtmlMapArea 12
971 const char *
GetHref(
int x,
int y,
const char **target = 0);
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);
1040 int width,
int height,
Pixmap_t pixmap);
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); }
1324 #define REDRAW_PENDING 0x000001
1325 #define GOT_FOCUS 0x000002
1326 #define HSCROLL 0x000004
1327 #define VSCROLL 0x000008
1328 #define RELAYOUT 0x000010
1329 #define RESIZE_ELEMENTS 0x000020
1330 #define REDRAW_FOCUS 0x000040
1331 #define REDRAW_TEXT 0x000080
1332 #define EXTEND_LAYOUT 0x000100
1333 #define STYLER_RUNNING 0x000200
1334 #define INSERT_FLASHING 0x000400
1335 #define REDRAW_IMAGES 0x000800
1336 #define ANIMATE_IMAGES 0x001000
1341 #define HtmlHasFlag(A,F) (((A)->flags&(F))==(F))
1342 #define HtmlHasAnyFlag(A,F) (((A)->flags&(F))!=0)
1343 #define HtmlSetFlag(A,F) ((A)->flags|=(F))
1344 #define HtmlClearFlag(A,F) ((A)->flags&=~(F))
1349 #define LARGE_NUMBER 100000000
1354 #define DEF_HTML_BG_COLOR DEF_FRAME_BG_COLOR
1355 #define DEF_HTML_BG_MONO DEF_FRAME_BG_MONO
1356 #define DEF_HTML_EXPORT_SEL 1
1357 #define DEF_HTML_FG DEF_BUTTON_FG
1358 #define DEF_HTML_HIGHLIGHT_BG DEF_BUTTON_HIGHLIGHT_BG
1359 #define DEF_HTML_HIGHLIGHT DEF_BUTTON_HIGHLIGHT
1360 #define DEF_HTML_HIGHLIGHT_WIDTH "0"
1361 #define DEF_HTML_INSERT_OFF_TIME 300
1362 #define DEF_HTML_INSERT_ON_TIME 600
1363 #define DEF_HTML_PADX (HTML_INDENT / 4)
1364 #define DEF_HTML_PADY (HTML_INDENT / 4)
1365 #define DEF_HTML_RELIEF "raised"
1366 #define DEF_HTML_SELECTION_COLOR "skyblue"
1367 #define DEF_HTML_TAKE_FOCUS "0"
1368 #define DEF_HTML_UNVISITED "blue2"
1369 #define DEF_HTML_VISITED "purple4"
1371 #ifdef NAVIGATOR_TABLES
1373 #define DEF_HTML_TABLE_BORDER "0"
1374 #define DEF_HTML_TABLE_CELLPADDING "2"
1375 #define DEF_HTML_TABLE_CELLSPACING "5"
1376 #define DEF_HTML_TABLE_BORDER_LIGHT_COLOR "gray80"
1377 #define DEF_HTML_TABLE_BORDER_DARK_COLOR "gray40"
1379 #endif // NAVIGATOR_TABLES
1402 #endif // ROOT_TGHtml
TGHtmlElement * GetLine(TGHtmlElement *pStart, TGHtmlElement *pEnd, int width, int minX, int *actualWidth)
This routine gathers as many tokens as will fit on one line.
virtual int FormCreate(TGHtmlForm *, const char *, const char *)
TGHtmlBlock * fPSelStartBlock
virtual void InputSelected(const char *name, const char *val)
Emit Selected() signal.
void UpdateInsert()
Recompute the position of the insertion cursor based on the position in fIns.
TGString * TableText(TGHtmlTable *pTable, int flags)
Return text and images from a table as lists.
void TokenizerAppend(const char *text)
Append text to the tokenizer engine.
void RedrawBlock(TGHtmlBlock *p)
Redraw the TGHtmlBlock given.
void PrintList(TGHtmlElement *first, TGHtmlElement *last)
Print a list of tokens.
TGHtmlElement * fLoEndPtr
SHtmlStyleStack_t * fStyleStack
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save a html widget as a C++ statement(s) on output stream out.
void Paragraph(TGHtmlElement *p)
Increase the headroom to create a paragraph break at the current token.
TGHtmlImageMarkup * fINext
int GotoAnchor(const char *name)
Go to anchor position.
virtual int ProcessFrame()
TGHtmlElement * fNextPlaced
TGHtmlElement * AttrElem(const char *name, char *value)
Returns html element matching attribute name and value.
virtual void DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw region defined by [x,y] [w,h].
virtual int IsMarkup() const
void AppendText(TGString *str, TGHtmlElement *pFirst, TGHtmlElement *pEnd)
Append all text and space tokens between pStart and pEnd to the given TString.
SHtmlTokenMap_t * NameToPmap(char *zType)
Returns token map matching zType name.
TGHtmlBlock * fPSelEndBlock
TGHtmlMarkupElement(int type, int argc, int arglen[], char *argv[])
HTML mrkup element constructor.
void UpdateSelectionDisplay()
The fPSelStartBlock and fPSelEndBlock values have been changed.
void ResetLayoutContext()
Reset the main layout context in the main widget.
TGHtmlTable(int type, int argc, int arglen[], char *argv[])
HTML table element constructor.
void Sizer()
Compute the size of all elements in the widget.
void SizeAndLink(TGFrame *frame, TGHtmlInput *pElem)
'frame' is the child widget that is used to implement an input element.
virtual void Clear(Option_t *="")
Erase all HTML from this widget and clear the screen.
int NameToType(char *zType)
Convert a markup name into a type integer.
void LayoutBlock()
Do as much layout as possible on the block of text defined by the HtmlLayoutContext.
SHtmlTokenMap_t * fPCollide
void ClearObstacle(int mode)
Clear a wrap-around obstacle.
virtual void SubmitClicked(const char *val)
Emit SubmitClicked() signal.
virtual int GetUnorderedListType(int dflt)
virtual int GetVerticalAlignment(int dflt)
void MaxIndex(TGHtmlElement *p, int *pIndex, int isLast)
Find the maximum index for the given token.
void DrawTableBgnd(int x, int y, int w, int h, Drawable_t d, TImage *image)
Draw table background.
void PushIndent()
Adjust (push) ident.
int fMaxW[HTML_MAX_COLUMNS+1]
int IndexMod(TGHtmlElement **pp, int *ip, char *cp)
Modify an index for both pointer and char +/-/=N.
SHtmlMargin_t * fLeftMargin
TGHtmlBlock * fFirstBlock
TGHtmlLayoutContext()
Html Layout Context constructor.
void LostSelection()
Clear selection.
void DeleteControls()
Delete all input controls.
virtual TGFont * GetFont(int iFont)
The rendering and layout routines should call this routine in order to get a font structure...
virtual void MouseDown(const char *uri)
TGHtmlRef(int type, int argc, int arglen[], char *argv[])
HTML ref element constructor.
Bool_t HandleRadioButton(TGHtmlInput *p)
Handle radio button event.
char fFontValid[(N_FONT+7)/8]
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.
TGHtmlMarkupElement * MakeMarkupEntry(int objType, int type, int argc, int arglen[], char *argv[])
Make one markup entry.
void UnderlineLinks(int onoff)
Set/reset html links underline.
virtual ~TGHtmlTextElement()
HTML element destructor.
An abstract interface to image processing library.
int TextInsertCmd(int argc, char **argv)
Insert text into text token, or break token into two text tokens.
void RedrawEverything()
Call this routine to force the entire widget to be redrawn.
GcCache_t fAGcCache[N_CACHE_GC]
TGHtmlElement * TableLayout(TGHtmlTable *p)
Do all layout for a single table.
virtual int ProcessToken(TGHtmlElement *, const char *, int)
void AddFormInfo(TGHtmlElement *p)
Add the DOM control information for form elements.
void AddSelectOptions(TGListBox *lb, TGHtmlElement *p, TGHtmlElement *pEnd)
The "p" argument points to a <select>.
int SelectionSet(const char *startIx, const char *endIx)
Set selection.
TGHtmlMapArea(int type, int argc, int arglen[], char *argv[])
HTML map area constructor.
void AppendElement(TGHtmlElement *pElem)
Append the given TGHtmlElement to the tokenizers list of elements.
void DrawSelectionBackground(TGHtmlBlock *pBlock, Drawable_t Drawable_t, int x, int y)
Draw the selection background for the given block.
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...
TGHtmlAnchor * fAnchorStart
TGHtmlElement * DoBreakMarkup(TGHtmlElement *p)
Break markup is any kind of markup that might force a line-break.
void PushMargin(SHtmlMargin_t **ppMargin, int indent, int bottom, int tag)
Push a new margin onto the given margin stack.
void PopExpiredMargins(SHtmlMargin_t **ppMarginStack, int y)
Pop all expired margins from the stack.
void UnmapControls()
Unmap any input control that is currently mapped.
int GetRuleRelief() const
virtual Bool_t HandleFocusChange(Event_t *event)
Handle focus change event.
virtual ~TGHtml()
HTML widget destructor.
void DrawRect(Drawable_t drawable, TGHtmlElement *src, int x, int y, int w, int h, int depth, int relief)
Draw a rectangle.
THashTable implements a hash table to store TObject's.
void PushStyleStack(int tag, SHtmlStyle_t style)
Push a new rendering style onto the stack.
TGHtmlElement * FillOutBlock(TGHtmlBlock *p)
Recompute the following fields of the given block structure:
virtual const char * MarkupArg(const char *, const char *)
void StringHW(const char *str, int *h, int *w)
Return the height and width of string.
ColorStruct_t * AllocColor(const char *name)
Allocate system color by name.
void FixAnchors(TGHtmlElement *p, TGHtmlElement *pEnd, int y)
Set the y coordinate for every anchor in the given list.
void UpdateSelection(int forceUpdate)
Given the selection end-points in fSelBegin and fSelEnd, recompute pSelBeginBlock and fPSelEndBlock...
const char * GetUid(const char *string)
Given a string, this procedure returns a unique identifier for the string.
int MapControls()
Map any control that should be visible according to the current scroll position.
void LayoutDoc()
Advance the layout as far as possible.
ColorStruct_t * fSelectionColor
int DecodeBaseIndex(const char *zBase, TGHtmlElement **ppToken, int *pIndex)
Given a base index name (without any modifiers) return a pointer to the token described, and the character within that token.
ColorStruct_t * AllocColorByValue(ColorStruct_t *color)
Allocate system color by value.
virtual int GetAlignment(int dflt)
TGHtml(const TGWindow *p, int w, int h, int id=-1)
HTML Widget constructor.
GContext_t GetAnyGC()
Retrieve any valid GC.
TGHtmlElement * FindEndNest(TGHtmlElement *sp, int en, TGHtmlElement *lp)
Find End tag en, but ignore intervening begin/end tag pairs.
void UnlinkAndFreeBlock(TGHtmlBlock *pBlock)
Destroy the given Block after first unlinking it from the element 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...
virtual void ButtonClicked(const char *name, const char *val)
Emit ButtonClicked() signal.
virtual Bool_t HandleMotion(Event_t *event)
handle mouse motion events
TGHtmlListStart * fInnerList
int CellSpacing(TGHtmlElement *pTable)
Return the appropriate cell spacing for the given table.
ColorStruct_t * fApColor[N_COLOR]
SHtmlExtensions_t * fNext
int Tokenize()
Process as much of the input HTML as possible.
TGHtmlInput * fFirstInput
void MakeInvisible(TGHtmlElement *p_first, TGHtmlElement *p_last)
Add the STY_Invisible style to every token between p_first and p_last.
int ControlSize(TGHtmlInput *p)
This routine implements the Sizer() function for <INPUT>, <SELECT> and <TEXTAREA> markup...
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
Process messages (GUI events) in the html widget.
void IndexToBlockIndex(SHtmlIndex_t sIndex, TGHtmlBlock **ppBlock, int *piIndex)
Convert an Element-based index into a Block-based index.
virtual char * GetFontName()
void MoveVertically(TGHtmlElement *p, TGHtmlElement *pLast, int dy)
Move all elements in the given list vertically by the amount dy.
SHtmlStyle_t PopStyleStack(int tag)
Pop a rendering style off of the stack.
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 DrawImage(TGHtmlImageMarkup *image, Drawable_t wid, int left, int top, int right, int bottom)
Draw all or part of an image.
void HClear()
Erase all data from the HTML widget. Bring it back to an empty screen.
void Emit(const char *signal)
Acitvate signal without args.
int GetTableRelief() const
virtual char * ResolveUri(const char *uri)
This function resolves the specified URI and returns the result in a newly allocated string...
TGHtmlForm * fLoFormStart
void SetTableRelief(int relief)
Sets relief mode of html table.
virtual int FormAction(TGHtmlForm *, int)
SHtmlTokenMap_t * GetMarkupMap(int n)
Returns token map at location n.
virtual char * ProcessScript(TGHtmlScript *)
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.
int GetIndex(const char *zIndex, TGHtmlElement **ppToken, int *pIndex)
This routine decodes a complete index specification.
void ImageChanged(TGHtmlImage *image, int newWidth, int newHeight)
This routine is called when an image changes.
void RedrawText(int y)
Call this routine to cause all of the rendered HTML at the virtual canvas coordinate of Y and beyond ...
void EncodeText(TGString *str, const char *z)
Append to the given TString an encoded version of the given text.
ColorStruct_t * fNewLinkColor
void AddStyle(TGHtmlElement *p)
This routine adds information to the input texts that doesn't change when the display is resized or w...
int FormCount(TGHtmlInput *p, int radio)
Return the number of elments of type p in a form.
TGHtmlInput * fFormElemLast
TGHtmlLi(int type, int argc, int arglen[], char *argv[])
HTML li element constructor.
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 ...
virtual Bool_t HandleIdleEvent(TGIdleHandler *i)
Handles idle event.
int GetDarkShadowColor(int iBgColor)
Given that the background color is iBgColor, figure out an appropriate color for the dark part of a 3...
char * GetTokenName(TGHtmlElement *p)
Returns token name of html element p.
virtual ~TGHtmlMarkupElement()
HTML markup element destructor.
void AppendArglist(TGString *str, TGHtmlMarkupElement *pElem)
Append all the arguments of the given markup to the given TGString.
int GetImageAt(int x, int y)
This routine searchs for an image beneath the coordinates x,y and returns the token number of the the...
void TableBgndImage(TGHtmlElement *p)
Set background picture of a html table.
void Redraw()
This routine is invoked in order to redraw all or part of the HTML widget.
virtual void CheckToggled(const char *name, Bool_t on, const char *val)
Emit CheckToggled() signal.
int GetColorByValue(ColorStruct_t *pRef)
Find a color integer for the color whose color components are given by pRef.
TGHtmlInput * GetInputElement(int x, int y)
This routine searchs for a hyperlink beneath the coordinates x,y and returns a pointer to the HREF fo...
const char * GetBaseUri() const
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 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...
void AnimateImage(TGHtmlImage *image)
TGImage *img = image->image;.
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...
virtual void MouseOver(const char *uri)
virtual TGFrame * ProcessApplet(TGHtmlInput *)
Handles synchronous and a-synchronous timer events.
virtual Bool_t HandleTimer(TTimer *timer)
Handle timer event.
int IsDarkColor(ColorStruct_t *p)
Check to see if the given color is too dark to be easily distinguished from black.
TGHtmlCell(int type, int argc, int arglen[], char *argv[])
HTML cell element constructor.
static void indent(ostringstream &buf, int indent_level)
TGHtmlHr(int type, int argc, int arglen[], char *argv[])
HTML hr element constructor.
virtual int IsVisited(const char *)
TGHtmlTextElement & operator=(const TGHtmlTextElement &)
TGHtmlElement * FindStartOfNextBlock(TGHtmlElement *p, int *pCnt)
Scan ahead looking for a place to put a block.
int InArea(TGHtmlMapArea *p, int left, int top, int x, int y)
Only support rect and circles for now.
virtual ~TGHtmlImage()
dtor.
Bool_t HandleHtmlInput(TGHtmlInput *pr, Event_t *event)
Handle html input (button, checkbox, ...) event.
virtual void RadioChanged(const char *name, const char *val)
Emit RadioChanged() signal.
TGHtmlElement * TokenByIndex(int N, int flag)
Return a pointer to the Nth TGHtmlElement in the list.
int GetRulePadding() const
virtual int GetUnorderedListType(int dflt)
The "type" argument to the given element might describe a type for an unordered list.
unsigned short Html_u16_t
int SetInsert(const char *insIx)
Set the position of the insertion cursor.
SHtmlStyle_t GetCurrentStyle()
Get the current rendering style.
virtual void UpdateBackgroundStart()
Start background update.
virtual int GetVerticalAlignment(int dflt)
Return the vertical alignment specified by the given element.
TGHtmlImage * GetImage(TGHtmlImageMarkup *p)
Given an.
virtual int GetOrderedListType(int dflt)
GContext_t GetGC(int color, int font)
Return a GC from the cache.
ColorStruct_t * fHighlightColorPtr
TGHtmlImage(const TGHtmlImage &)
void PopOneMargin(SHtmlMargin_t **ppMargin)
Pop one margin off of the given margin stack.
const char * TypeToName(int type)
Convert a type into a symbolic name.
int ElementCoords(TGHtmlElement *p, int i, int pct, int *coords)
Return coordinates of item.
SHtmlStyleStack_t * fPNext
virtual int GetOrderedListType(int dflt)
The "type" argument to the given element might describe the type for an ordered list.
~TGHtmlCell()
HTML cell element destructor.
TGHtmlElement * TableDimensions(TGHtmlTable *pStart, int lineWidth)
pStart points to a
void PopMargin(SHtmlMargin_t **ppMargin, int tag)
Pop as many margins as necessary until the margin that was created with "tag" is popped off...
TGHtmlAnchor(int type, int argc, int arglen[], char *argv[])
HTML anchor element constructor.
int GetLightShadowColor(int iBgColor)
Given that the background color is iBgColor, figure out an appropriate color for the bright part of t...
TGHtmlScript(int type, int argc, int arglen[], char *argv[])
HTML script element constructor.
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...
TGString * ListTokens(TGHtmlElement *p, TGHtmlElement *pEnd)
Return all tokens between the two elements as a string list.
Mother of all ROOT objects.
~TGHtmlRef()
HTML ref element destructor.
TGHtmlInput * fFormElemStart
int TokenNumber(TGHtmlElement *p)
Return the token number for the given TGHtmlElement.
int fMinW[HTML_MAX_COLUMNS+1]
virtual ~TGHtmlBlock()
dtor.
float ColorDistance(ColorStruct_t *pA, ColorStruct_t *pB)
Compute the squared distance between two colors.
const char * GetText() const
std::vector< std::pair< double, double > > coords
void SetRuleRelief(int relief)
Sets relief mode of html rule.
int IsLightColor(ColorStruct_t *p)
Check to see if the given color is too light to be easily distinguished from white.
SHtmlExtensions_t * fExts
int GetLinkColor(const char *zURL)
For the markup , find out if the URL has been visited before or not.
void AppToken(TGHtmlElement *pNew, TGHtmlElement *p, int offs)
Insert token pNew before token p.
char * DumpToken(TGHtmlElement *p)
For debugging purposes, print information about a token.
TGHtmlElement * fLastSized
int InWrapAround()
Return TRUE (non-zero) if we are currently wrapping text around one or more images.
void SetBaseUri(const char *uri)
Sets base URI.
int GetColorByName(const char *zColor)
This routine returns an index between 0 and N_COLOR-1 which indicates which ColorStruct_t structure i...
void FormBlocks()
Add additional blocks to the block list in order to cover all elements on the element list...
TGHtmlListStart(int type, int argc, int arglen[], char *argv[])
HTML list start element constructor.
void ComputeMargins(int *pX, int *pY, int *pW)
Compute the current margins for layout.
TGHtmlElement * GetMap(const char *name)
Returns html map element.
int GetImageAlignment(TGHtmlElement *p)
Find the alignment for an image.
TGHtmlImage & operator=(const TGHtmlImage &)
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event.
void ClearMarginStack(SHtmlMargin_t **ppMargin)
Clear a margin stack to reclaim memory.
virtual TImage * LoadImage(const char *uri, int w=0, int h=0)
This is the default LoadImage() procedure.
TGHtmlElement(int etype=0)
HTML element constructor.
ColorStruct_t * fOldLinkColor
const char * GetHref(int x, int y, const char **target=0)
This routine searchs for a hyperlink beneath the coordinates x,y and returns a pointer to the HREF fo...
virtual const char * MarkupArg(const char *tag, const char *zDefault)
Lookup an argument in the given markup with the name given.
void ClearGcCache()
Clear the cache of GCs.
void FlashCursor()
Flash the insertion cursor.
TGHtmlImageMarkup * fPList
TGHtmlTextElement(const TGHtmlTextElement &)
SHtmlMargin_t * fRightMargin
~TGHtmlTable()
HTML table element destructor.
void ComputeVirtualSize()
Computes virtual size of html area.
ColorStruct_t * fHighlightBgColorPtr
void FreeColor(ColorStruct_t *color)
Free system color.
void PopIndent()
Adjust (pop) ident.
TGHtmlLayoutContext fLayoutContext
virtual int GetAlignment(int dflt)
Return an alignment or justification flag associated with the given markup.
TGHtmlImageMarkup(int type, int argc, int arglen[], char *argv[])
HTML image element constructor.
void Reset()
Reset the layout context.
const char Int_t const char * image
int NextMarkupType(TGHtmlElement *p)
Return the next markup type [TGHtmlElement::NextMarkupType].
virtual Bool_t ItemLayout()
Layout html widget.