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 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);
333 virtual int GetAlignment(
int dflt);
334 virtual int GetOrderedListType(
int dflt);
335 virtual int GetUnorderedListType(
int dflt);
336 virtual int GetVerticalAlignment(
int dflt);
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,
789 void ComputeMargins(
int *pX,
int *pY,
int *pW);
790 void ClearObstacle(
int mode);
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 891 virtual Bool_t ItemLayout();
898 int ParseText(
char *
text,
const char *index = 0);
900 void SetTableRelief(
int relief);
903 void SetRuleRelief(
int relief);
907 void UnderlineLinks(
int onoff);
909 void SetBaseUri(
const char *uri);
912 int GotoAnchor(
const char *
name);
917 virtual void Clear(
Option_t * =
"");
920 virtual char *ResolveUri(
const char *uri);
923 virtual TImage *LoadImage(
const char *uri,
int w = 0,
int h = 0) ;
934 virtual TGFont *GetFont(
int iFont);
965 const char *
GetText()
const {
return fZText; }
971 const char *GetHref(
int x,
int y,
const char **target = 0);
975 int InArea(
TGHtmlMapArea *p,
int left,
int top,
int x,
int y);
979 int ElementCoords(
TGHtmlElement *p,
int i,
int pct,
int *coords);
990 void EncodeText(
TGString *str,
const char *
z);
995 void ResetLayoutContext();
997 void ComputeVirtualSize();
999 void ScheduleRedraw();
1001 void RedrawArea(
int left,
int top,
int right,
int bottom);
1003 void RedrawEverything();
1004 void RedrawText(
int y);
1009 int GetColorByName(
const char *zColor);
1010 int GetDarkShadowColor(
int iBgColor);
1011 int GetLightShadowColor(
int iBgColor);
1020 void ImageChanged(
TGHtmlImage *image,
int newWidth,
int newHeight);
1022 int GetImageAt(
int x,
int y);
1023 const char *GetPctWidth(
TGHtmlElement *p,
char *opt,
char *ret);
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);
1038 void BlockDraw(
TGHtmlBlock *pBlock, Drawable_t wid,
1040 int width,
int height,
Pixmap_t pixmap);
1043 int right,
int bottom);
1044 void DrawTableBgnd(
int x,
int y,
int w,
int h, Drawable_t d,
TImage *image);
1053 int arglen[],
char *argv[]);
1054 void TokenizerAppend(
const char *text);
1056 char *zType,
char *zArgs,
int offs);
1058 int NameToType(
char *zType);
1059 const char *TypeToName(
int type);
1060 int TextInsertCmd(
int argc,
char **argv);
1072 int DecodeBaseIndex(
const char *zBase,
1074 int GetIndex(
const char *zIndex,
TGHtmlElement **ppToken,
int *pIndex);
1079 void UnmapControls();
1080 void DeleteControls();
1088 void UpdateSelection(
int forceUpdate);
1089 void UpdateSelectionDisplay();
1090 void LostSelection();
1091 int SelectionSet(
const char *startIx,
const char *endIx);
1092 void UpdateInsert();
1093 int SetInsert(
const char *insIx);
1095 const char *GetUid(
const char *
string);
1105 int GetLinkColor(
const char *zURL);
1119 virtual void MouseOver(
const char *uri) { Emit(
"MouseOver(const char *)",uri); }
1120 virtual void MouseDown(
const char *uri) { Emit(
"MouseDown(const char *)",uri); }
1121 virtual void ButtonClicked(
const char *name,
const char *val);
1122 virtual void SubmitClicked(
const char *val);
1123 virtual void CheckToggled(
const char *name,
Bool_t on,
const char *val);
1124 virtual void RadioChanged(
const char *name,
const char *val);
1125 virtual void InputSelected(
const char *name,
const char *val);
1126 virtual void SavePrimitive(std::ostream &out,
Option_t * =
"");
1129 virtual void UpdateBackgroundStart();
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
virtual int FormCreate(TGHtmlForm *, const char *, const char *)
TGHtmlBlock * fPSelStartBlock
TGHtmlElement * fLoEndPtr
SHtmlStyleStack_t * fStyleStack
TGHtmlImageMarkup * fINext
virtual int ProcessFrame()
TGHtmlElement * fNextPlaced
virtual int IsMarkup() const
TGHtmlBlock * fPSelEndBlock
SHtmlTokenMap_t * fPCollide
virtual int GetUnorderedListType(int dflt)
virtual int GetVerticalAlignment(int dflt)
SHtmlMargin_t * fLeftMargin
TGHtmlBlock * fFirstBlock
virtual void MouseDown(const char *uri)
An abstract interface to image processing library.
virtual int ProcessToken(TGHtmlElement *, const char *, int)
TGHtmlAnchor * fAnchorStart
int GetRuleRelief() const
THashTable implements a hash table to store TObject's.
#define ClassDef(name, id)
virtual const char * MarkupArg(const char *, const char *)
ColorStruct_t * fSelectionColor
virtual int GetAlignment(int dflt)
TGHtmlListStart * fInnerList
SHtmlExtensions_t * fNext
TGHtmlInput * fFirstInput
virtual char * GetFontName()
int GetTableRelief() const
TGHtmlForm * fLoFormStart
virtual int FormAction(TGHtmlForm *, int)
virtual char * ProcessScript(TGHtmlScript *)
ColorStruct_t * fNewLinkColor
TGHtmlInput * fFormElemLast
const char * GetBaseUri() const
virtual void MouseOver(const char *uri)
virtual TGFrame * ProcessApplet(TGHtmlInput *)
Handles synchronous and a-synchronous timer events.
void Reset(Detail::TBranchProxy *x)
static void indent(ostringstream &buf, int indent_level)
virtual int IsVisited(const char *)
int GetRulePadding() const
unsigned short Html_u16_t
virtual int GetOrderedListType(int dflt)
ColorStruct_t * fHighlightColorPtr
SHtmlStyleStack_t * fPNext
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
TGHtmlInput * fFormElemStart
const char * GetText() const
SHtmlExtensions_t * fExts
TGHtmlElement * fLastSized
ColorStruct_t * fOldLinkColor
TGHtmlImageMarkup * fPList
SHtmlMargin_t * fRightMargin
ColorStruct_t * fHighlightBgColorPtr
TGHtmlLayoutContext fLayoutContext