108 if (type <= 0 || type > Html_TypeCount) {
112 if (type != tag && priority[type] > priority[tag]) {
117 if (type == tag)
break;
132 }
else if (size > 6) {
136 pStyle->
fFont += delta;
144 if (p_first == 0)
return;
145 p_first = p_first->
fPNext;
146 while (p_first && p_first != p_last) {
148 p_first = p_first->
fPNext;
167 const char *cp = str;
169 int *cr, i,
n = 0, sz = 4;
173 while (*cp && (!isdigit(*cp))) cp++;
174 if ((!*cp) || (!isdigit(*cp)))
break;
175 cr[
n] = (int) strtol(cp, &ncp, 10);
176 if (cp == ncp)
break;
180 int *tmp =
new int[sz+4];
181 for (i = 0; i < sz; ++i) tmp[i] = cr[i];
222 int useNextStyle = 0;
226 static int header_sizes[] = { +2, +1, 1, 1, -1, -1 };
279 if (strcasecmp(z,
"circle") == 0) {
281 }
else if (strcasecmp(z,
"poly") == 0) {
348 SetupBackgroundPic(img->GetPicture());
356 gcv.fGraphicsExposures =
kTRUE;
549 }
else if (*z ==
'+') {
554 if (size <= 0) size = 1;
577 if (zUrl == 0) zUrl =
fZBase;
579 if (zUrl == 0) zUrl =
StrDup(
"");
581 snprintf(zToken, 50,
" %d form ", form->
fFormId);
612 if (i >= 1 && i <= 6) {
734 if (n > 0) list->
fCnt =
n;
775 if (e2)
while (e2->fPNext) e2 = e2->
fPNext;
777 if (e2 && e2 != p && ((e3 = b3 = e2->fPNext))) {
778 while (e3->fPNext) e3 = e3->fPNext;
780 e2->fPNext = 0; b2->
fPPrev = e3;
1001 (
"Style font=%02d color=%02d bg=%02d "
1002 "align=%d flags=0x%04x token=%s\n",
1014 fFlags &= ~STYLER_RUNNING;
1052 if (img)
delete img;
1093 for (; !stop && p; p = p ? p->
fPNext : 0) {
1098 if (iFont != (
int)p->fStyle.fFont) {
1099 iFont = p->fStyle.fFont;
1111 if (spaceWidth == 0) spaceWidth = font->
TextWidth(
" ", 1);
1118 if (spaceWidth == 0) spaceWidth = font->
TextWidth(
" ", 1);
1119 space->
fW = spaceWidth;
1131 z = p->MarkupArg(
"colspan",
"1");
1147 z = p->MarkupArg(
"usemap", 0);
1148 if (z && *z ==
'#') {
1161 image->
fZAlt = p->MarkupArg(
"alt",
"<image>");
1162 if (image->
fZAlt == 0) image->
fZAlt =
"<image>";
1175 if ((z = p->MarkupArg(
"width", 0)) != 0) {
1177 if (z[strlen(z)-1] ==
'%') w = 0;
1178 if (w > 0) image->
fW =
w;
1180 if ((z = p->MarkupArg(
"height", 0)) != 0) {
1182 if (h > 0) image->
fH =
h;
virtual int FormCreate(TGHtmlForm *, const char *, const char *)
void TokenizerAppend(const char *text)
Append text to the tokenizer engine.
static void ScaleFont(SHtmlStyle_t *pStyle, int delta)
Change the font size on the given style by the delta-amount given.
SHtmlStyleStack_t * fStyleStack
TGHtmlImageMarkup * fINext
void Sizer()
Compute the size of all elements in the widget.
#define TRACE(Flag, Args)
virtual UInt_t GetWidth() const
virtual TGFont * GetFont(int iFont)
The rendering and layout routines should call this routine in order to get a font structure...
An abstract interface to image processing library.
virtual Pixmap_t GetPixmap()
TGHtmlAnchor * fAnchorStart
void PushStyleStack(int tag, SHtmlStyle_t style)
Push a new rendering style onto the stack.
virtual const char * MarkupArg(const char *, const char *)
ColorStruct_t * AllocColor(const char *name)
Allocate system color by name.
virtual int GetAlignment(int dflt)
TString & Append(const char *cs)
TGHtmlListStart * fInnerList
ColorStruct_t * fApColor[N_COLOR]
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...
SHtmlStyle_t PopStyleStack(int tag)
Pop a rendering style off of the stack.
virtual char * ResolveUri(const char *uri)
This function resolves the specified URI and returns the result in a newly allocated string...
virtual UInt_t GetHeight() const
virtual char * ProcessScript(TGHtmlScript *)
static int * GetCoords(const char *str, int *nptr)
Returns coordinates of string str.
void AddStyle(TGHtmlElement *p)
This routine adds information to the input texts that doesn't change when the display is resized or w...
void AppendArglist(TGString *str, TGHtmlMarkupElement *pElem)
Append all the arguments of the given markup to the given TGString.
void TableBgndImage(TGHtmlElement *p)
Set background picture of a html table.
virtual void SetBackgroundPixmap(Pixmap_t pixmap)
virtual int IsVisited(const char *)
virtual void SetBackgroundColor(Pixel_t)
Set background color of the canvas frame.
char * StrDup(const char *str)
Duplicate the string str.
virtual int GetUnorderedListType(int dflt)
The "type" argument to the given element might describe a type for an unordered list.
SHtmlStyle_t GetCurrentStyle()
Get the current rendering style.
TGHtmlImage * GetImage(TGHtmlImageMarkup *p)
Given an.
virtual void SetBackgroundPixmap(Pixmap_t p)
Set backgound pixmap.
void GetFontMetrics(FontMetrics_t *m) const
Get font metrics.
SHtmlStyleStack_t * fPNext
virtual int GetOrderedListType(int dflt)
The "type" argument to the given element might describe the type for an ordered list.
Int_t TextWidth(const char *string, Int_t numChars=-1) const
A wrapper function for the more complicated interface of MeasureChars.
TGHtmlInput * fFormElemStart
int GetLinkColor(const char *zURL)
For the markup , find out if the URL has been visited before or not.
char * DumpToken(TGHtmlElement *p)
For debugging purposes, print information about a token.
TGHtmlElement * fLastSized
int GetColorByName(const char *zColor)
This routine returns an index between 0 and N_COLOR-1 which indicates which ColorStruct_t structure i...
TGHtmlElement * GetMap(const char *name)
Returns html map element.
int GetImageAlignment(TGHtmlElement *p)
Find the alignment for an image.
const char * GetString() const
virtual TImage * LoadImage(const char *uri, int w=0, int h=0)
This is the default LoadImage() procedure.
virtual const char * MarkupArg(const char *tag, const char *zDefault)
Lookup an argument in the given markup with the name given.
TGHtmlImageMarkup * fPList
const char Int_t const char * image