50 #define HTML_RELIEF_FLAT    0 
   51 #define HTML_RELIEF_SUNKEN  1 
   52 #define HTML_RELIEF_RAISED  2 
   61           "Unplanned behavior in the HTML Widget in file %s line %d\n", \ 
   66           "Untested code executed in the HTML Widget in file %s line %d\n", \ 
   72 #define HtmlAssert(X) \ 
   74     fprintf(stderr,"Assertion failed on line %d of %s\n",__LINE__,__FILE__); \ 
   76 #define HtmlCantHappen \ 
   77   fprintf(stderr,"Can't happen on line %d of %s\n",__LINE__,__FILE__); 
   80 #define HtmlCantHappen 
   85 #define HtmlTrace_Table1       0x00000001 
   86 #define HtmlTrace_Table2       0x00000002 
   87 #define HtmlTrace_Table3       0x00000004 
   88 #define HtmlTrace_Table4       0x00000008 
   89 #define HtmlTrace_Table5       0x00000010 
   90 #define HtmlTrace_Table6       0x00000020 
   91 #define HtmlTrace_GetLine      0x00000100 
   92 #define HtmlTrace_GetLine2     0x00000200 
   93 #define HtmlTrace_FixLine      0x00000400 
   94 #define HtmlTrace_BreakMarkup  0x00001000 
   95 #define HtmlTrace_Style        0x00002000 
   96 #define HtmlTrace_Input1       0x00004000 
  109 extern int HtmlTraceMask;
 
  110 extern int HtmlDepth;
 
  111 # define TRACE_INDENT  printf("%*s",HtmlDepth-3,"") 
  112 # define TRACE(Flag, Args) \ 
  113     if( (Flag)&HtmlTraceMask ){ \ 
  114        TRACE_INDENT; printf Args; fflush(stdout); \ 
  116 # define TRACE_PUSH(Flag)  if( (Flag)&HtmlTraceMask ){ HtmlDepth+=3; } 
  117 # define TRACE_POP(Flag)   if( (Flag)&HtmlTraceMask ){ HtmlDepth-=3; } 
  119 # define TRACE_INDENT 
  120 # define TRACE(Flag, Args) 
  121 # define TRACE_PUSH(Flag) 
  122 # define TRACE_POP(Flag) 
  135 typedef unsigned char  Html_u8_t;      
 
  136 typedef short          Html_16_t;      
 
  137 typedef unsigned short Html_u16_t;     
 
  138 typedef int            Html_32_t;      
 
  143 struct SHtmlStyle_t {
 
  144   unsigned int fFont      : 6;      
 
  145   unsigned int fColor     : 6;      
 
  146   signed int   fSubscript : 4;      
 
  147   unsigned int fAlign     : 2;      
 
  148   unsigned int fBgcolor   : 6;      
 
  149   unsigned int fExpbg     : 1;      
 
  150   unsigned int fFlags     : 7;      
 
  163 #define N_FONT_FAMILY     8 
  164 #define N_FONT_SIZE       7 
  166 #define NormalFont(X)     (X) 
  167 #define BoldFont(X)       ((X) | 8) 
  168 #define ItalicFont(X)     ((X) | 16) 
  169 #define CWFont(X)         ((X) | 32) 
  170 #define FontSize(X)       ((X) & 007) 
  171 #define FontFamily(X)     ((X) & 070) 
  173 #define FONT_Default      3 
  174 #define FontSwitch(Size, Bold, Italic, Cw) \ 
  175                           ((Size) | ((Bold+(Italic)*2+(Cw)*4) << 3)) 
  179 #define FontIsValid(I)     ((fFontValid[(I)>>3] &   (1<<((I)&3)))!=0) 
  180 #define FontSetValid(I)     (fFontValid[(I)>>3] |=  (1<<((I)&3))) 
  181 #define FontClearValid(I)   (fFontValid[(I)>>3] &= ~(1<<((I)&3))) 
  194 #define N_COLOR             32      // Total number of colors 
  196 #define COLOR_Normal         0      // Index for normal color (black) 
  197 #define COLOR_Unvisited      1      // Index for unvisited hyperlinks 
  198 #define COLOR_Visited        2      // Color for visited hyperlinks 
  199 #define COLOR_Selection      3      // Background color for the selection 
  200 #define COLOR_Background     4      // Default background color 
  201 #define N_PREDEFINED_COLOR   5      // Number of predefined colors 
  209 #define ALIGN_Right  2 
  210 #define ALIGN_Center 3 
  233 #define STY_Preformatted    0x001 
  234 #define STY_StrikeThru      0x002 
  235 #define STY_Underline       0x004 
  236 #define STY_NoBreak         0x008 
  237 #define STY_Anchor          0x010 
  239 #define STY_Invisible       0x040 
  240 #define STY_FontMask        (STY_StrikeThru|STY_Underline) 
  249 class TGHtmlElement : 
public TObject {
 
  251    TGHtmlElement(
int etype = 0);
 
  253    virtual int  IsMarkup()
 const { 
return (fType > Html_Block); }
 
  254    virtual const char *MarkupArg(
const char * , 
const char * ) { 
return 0; }
 
  255    virtual int  GetAlignment(
int dflt) { 
return dflt; }
 
  256    virtual int  GetOrderedListType(
int dflt) { 
return dflt; }
 
  257    virtual int  GetUnorderedListType(
int dflt) { 
return dflt; }
 
  258    virtual int  GetVerticalAlignment(
int dflt) { 
return dflt; }
 
  261    TGHtmlElement *fPNext;        
 
  262    TGHtmlElement *fPPrev;        
 
  274 #define HTML_Visible   0x01   // This element produces "ink" 
  275 #define HTML_NewLine   0x02   // type == Html_Space and ends with newline 
  276 #define HTML_Selected  0x04   // Some or all of this Html_Block is selected 
  285 class TGHtmlTextElement : 
public TGHtmlElement {
 
  287    TGHtmlTextElement(
const TGHtmlTextElement&);            
 
  288    TGHtmlTextElement &operator=(
const TGHtmlTextElement&); 
 
  291    TGHtmlTextElement(
int size);
 
  292    virtual ~TGHtmlTextElement();
 
  299    Html_u8_t    fSpaceWidth;       
 
  306 class TGHtmlSpaceElement : 
public TGHtmlElement {
 
  313    TGHtmlSpaceElement() : TGHtmlElement(Html_Space), fW(0), fAscent(0), fDescent(0) {}
 
  323 class TGHtmlMarkupElement : 
public TGHtmlElement {
 
  325    TGHtmlMarkupElement(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  326    virtual ~TGHtmlMarkupElement();
 
  328    virtual const char *MarkupArg(
const char *tag, 
const char *zDefault);
 
  329    virtual int  GetAlignment(
int dflt);
 
  330    virtual int  GetOrderedListType(
int dflt);
 
  331    virtual int  GetUnorderedListType(
int dflt);
 
  332    virtual int  GetVerticalAlignment(
int dflt);
 
  342 #define HTML_MAX_COLUMNS 40 
  353 class TGHtmlTable : 
public TGHtmlMarkupElement {
 
  355    TGHtmlTable(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  359    Html_u8_t      fBorderWidth;              
 
  366    int            fMinW[HTML_MAX_COLUMNS+1]; 
 
  367    int            fMaxW[HTML_MAX_COLUMNS+1]; 
 
  368    TGHtmlElement *fPEnd;                     
 
  380 class TGHtmlCell : 
public TGHtmlMarkupElement {
 
  382    TGHtmlCell(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  392    TGHtmlTable   *fPTable;       
 
  393    TGHtmlElement *fPRow;         
 
  394    TGHtmlElement *fPEnd;         
 
  404 class TGHtmlRef : 
public TGHtmlMarkupElement {
 
  406    TGHtmlRef(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  410    TGHtmlElement *fPOther;      
 
  418 class TGHtmlLi : 
public TGHtmlMarkupElement {
 
  420    TGHtmlLi(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  437 #define LI_TYPE_Undefined 0     // If in TGHtmlLi, use the TGHtmlListStart value 
  438 #define LI_TYPE_Bullet1   1     // A solid circle 
  439 #define LI_TYPE_Bullet2   2     // A hollow circle 
  440 #define LI_TYPE_Bullet3   3     // A hollow square 
  441 #define LI_TYPE_Enum_1    4     // Arabic numbers 
  442 #define LI_TYPE_Enum_A    5     // A, B, C, ... 
  443 #define LI_TYPE_Enum_a    6     // a, b, c, ... 
  444 #define LI_TYPE_Enum_I    7     // Capitalized roman numerals 
  445 #define LI_TYPE_Enum_i    8     // Lower-case roman numerals 
  450 class TGHtmlListStart : 
public TGHtmlMarkupElement {
 
  452    TGHtmlListStart(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  459    TGHtmlListStart  *fLPrev;     
 
  463 #define HTML_MAP_RECT    1 
  464 #define HTML_MAP_CIRCLE  2 
  465 #define HTML_MAP_POLY    3 
  467 class TGHtmlMapArea : 
public TGHtmlMarkupElement {
 
  469    TGHtmlMapArea(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  482 struct SHtmlExtensions_t {
 
  486    SHtmlExtensions_t *fNext;
 
  504 class TGHtmlImageMarkup;
 
  506 class TGHtmlImage : 
public TObject {
 
  508    TGHtmlImage(
const TGHtmlImage&);            
 
  509    TGHtmlImage &operator=(
const TGHtmlImage&); 
 
  512    TGHtmlImage(TGHtml *htm, 
const char *url, 
const char *width,
 
  514    virtual ~TGHtmlImage();
 
  522    char              *fZWidth, *fZHeight; 
 
  524    TGHtmlImageMarkup *fPList;             
 
  534 class TGHtmlImageMarkup : 
public TGHtmlMarkupElement {
 
  536    TGHtmlImageMarkup(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  540    Html_u8_t          fTextAscent;     
 
  541    Html_u8_t          fTextDescent;    
 
  542    Html_u8_t          fRedrawNeeded;   
 
  551    TGHtmlImage       *fPImage;         
 
  552    TGHtmlElement     *fPMap;           
 
  553    TGHtmlImageMarkup *fINext;          
 
  560 #define IMAGE_ALIGN_Bottom        0 
  561 #define IMAGE_ALIGN_Middle        1 
  562 #define IMAGE_ALIGN_Top           2 
  563 #define IMAGE_ALIGN_TextTop       3 
  564 #define IMAGE_ALIGN_AbsMiddle     4 
  565 #define IMAGE_ALIGN_AbsBottom     5 
  566 #define IMAGE_ALIGN_Left          6 
  567 #define IMAGE_ALIGN_Right         7 
  581 class TGHtmlInput : 
public TGHtmlMarkupElement {
 
  583    TGHtmlInput(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  592    TGHtmlElement  *fPEnd;        
 
  600    Html_u8_t       fTextAscent;  
 
  601    Html_u8_t       fTextDescent; 
 
  612 #define INPUT_TYPE_Unknown      0 
  613 #define INPUT_TYPE_Checkbox     1 
  614 #define INPUT_TYPE_File         2 
  615 #define INPUT_TYPE_Hidden       3 
  616 #define INPUT_TYPE_Image        4 
  617 #define INPUT_TYPE_Password     5 
  618 #define INPUT_TYPE_Radio        6 
  619 #define INPUT_TYPE_Reset        7 
  620 #define INPUT_TYPE_Select       8 
  621 #define INPUT_TYPE_Submit       9 
  622 #define INPUT_TYPE_Text        10 
  623 #define INPUT_TYPE_TextArea    11 
  624 #define INPUT_TYPE_Applet      12 
  625 #define INPUT_TYPE_Button      13 
  633 class TGHtmlForm : 
public TGHtmlMarkupElement {
 
  635    TGHtmlForm(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  639    unsigned int   fElements;  
 
  640    unsigned int   fHasctl;    
 
  641    TGHtmlElement *fPFirst;    
 
  642    TGHtmlElement *fPEnd;      
 
  648 class TGHtmlHr : 
public TGHtmlMarkupElement {
 
  650    TGHtmlHr(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  662 class TGHtmlAnchor : 
public TGHtmlMarkupElement {
 
  664    TGHtmlAnchor(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  678 class TGHtmlScript : 
public TGHtmlMarkupElement {
 
  680    TGHtmlScript(
int type, 
int argc, 
int arglen[], 
char *argv[]);
 
  710 class TGHtmlBlock : 
public TGHtmlElement {
 
  713    virtual ~TGHtmlBlock();
 
  718    Html_u16_t   fLeft, fRight;      
 
  720    TGHtmlBlock *fBPrev, *fBNext;    
 
  732 struct SHtmlStyleStack_t {
 
  733    SHtmlStyleStack_t *fPNext;   
 
  742 struct SHtmlMargin_t {
 
  746    SHtmlMargin_t *fPNext;     
 
  753 #define HTML_INDENT 36 
  760 class TGHtmlLayoutContext : 
public TObject {
 
  762    TGHtmlLayoutContext();
 
  771    void PushMargin(SHtmlMargin_t **ppMargin, 
int indent, 
int bottom, 
int tag);
 
  772    void PopOneMargin(SHtmlMargin_t **ppMargin);
 
  773    void PopMargin(SHtmlMargin_t **ppMargin, 
int tag);
 
  774    void PopExpiredMargins(SHtmlMargin_t **ppMarginStack, 
int y);
 
  775    void ClearMarginStack(SHtmlMargin_t **ppMargin);
 
  777    TGHtmlElement *GetLine(TGHtmlElement *pStart, TGHtmlElement *pEnd,
 
  778                           int width, 
int minX, 
int *actualWidth);
 
  780    void FixAnchors(TGHtmlElement *p, TGHtmlElement *pEnd, 
int y);
 
  781    int  FixLine(TGHtmlElement *pStart, TGHtmlElement *pEnd,
 
  782                 int bottom, 
int width, 
int actualWidth, 
int leftMargin,
 
  784    void Paragraph(TGHtmlElement *p);
 
  785    void ComputeMargins(
int *pX, 
int *pY, 
int *pW);
 
  786    void ClearObstacle(
int mode);
 
  787    TGHtmlElement *DoBreakMarkup(TGHtmlElement *p);
 
  789    void WidenLine(
int reqWidth, 
int *pX, 
int *pY, 
int *pW);
 
  791    TGHtmlElement *TableLayout(TGHtmlTable *p);
 
  795    TGHtmlElement    *fPStart;          
 
  796    TGHtmlElement    *fPEnd;            
 
  804    SHtmlMargin_t    *fLeftMargin;      
 
  805    SHtmlMargin_t    *fRightMargin;     
 
  818 #define N_CACHE_GC 32 
  831 struct SHtmlIndex_t {
 
  839 struct SHtmlTokenMap_t {
 
  843    SHtmlTokenMap_t  *fPCollide;     
 
  850 #define O_HtmlMarkupElement   0 
  852 #define O_HtmlTable           2 
  855 #define O_HtmlListStart       5 
  856 #define O_HtmlImageMarkup     6 
  857 #define O_HtmlInput           7 
  860 #define O_HtmlAnchor          10 
  861 #define O_HtmlScript          11 
  862 #define O_HtmlMapArea         12 
  872 class TGHtml : 
public TGView {
 
  874    TGHtml(
const TGWindow *p, 
int w, 
int h, 
int id = -1);
 
  877    virtual Bool_t HandleFocusChange(Event_t *event);
 
  878    virtual Bool_t HandleButton(Event_t *event);
 
  879    virtual Bool_t HandleMotion(Event_t *event);
 
  881    virtual Bool_t HandleIdleEvent(TGIdleHandler *i);
 
  882    virtual Bool_t HandleTimer(TTimer *timer);
 
  884    virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t);
 
  886    virtual void   DrawRegion(Int_t x, Int_t y, UInt_t w, UInt_t h);
 
  887    virtual Bool_t ItemLayout();
 
  889    Bool_t         HandleHtmlInput(TGHtmlInput *pr, Event_t *event);
 
  890    Bool_t         HandleRadioButton(TGHtmlInput *p);
 
  894    int  ParseText(
char *text, 
const char *index = 0);
 
  896    void SetTableRelief(
int relief);
 
  897    int  GetTableRelief()
 const { 
return fTableRelief; }
 
  899    void SetRuleRelief(
int relief);
 
  900    int  GetRuleRelief()
 const { 
return fRuleRelief; }
 
  901    int  GetRulePadding()
 const { 
return fRulePadding; }
 
  903    void UnderlineLinks(
int onoff);
 
  905    void SetBaseUri(
const char *uri);
 
  906    const char *GetBaseUri()
 const { 
return fZBase; }
 
  908    int GotoAnchor(
const char *name);
 
  913    virtual void Clear(Option_t * = 
"");
 
  916    virtual char *ResolveUri(
const char *uri);
 
  919    virtual TImage *LoadImage(
const char *uri, 
int w = 0, 
int h = 0) ;
 
  923    virtual int IsVisited(
const char * )
 
  927    virtual int ProcessToken(TGHtmlElement * , 
const char * , 
int )
 
  930    virtual TGFont *GetFont(
int iFont);
 
  937    virtual int ProcessFrame()
 
  941    virtual TGFrame *ProcessApplet(TGHtmlInput * )
 
  945    virtual int FormCreate(TGHtmlForm * , 
const char * , 
const char * )
 
  949    virtual int FormAction(TGHtmlForm * , 
int )
 
  953    virtual char *GetFontName()
 
  957    virtual char *ProcessScript(TGHtmlScript * )
 
  961    const char *GetText()
 const { 
return fZText; }
 
  963    int GetMarginWidth() { 
return fMargins.fL + fMargins.fR; }
 
  964    int GetMarginHeight() { 
return fMargins.fT + fMargins.fB; }
 
  966    TGHtmlInput *GetInputElement(
int x, 
int y);
 
  967    const char *GetHref(
int x, 
int y, 
const char **target = 0);
 
  969    TGHtmlImage *GetImage(TGHtmlImageMarkup *p);
 
  971    int  InArea(TGHtmlMapArea *p, 
int left, 
int top, 
int x, 
int y);
 
  972    TGHtmlElement *GetMap(
const char *name);
 
  974    void ResetBlocks() { fFirstBlock = fLastBlock = 0; }
 
  975    int  ElementCoords(TGHtmlElement *p, 
int i, 
int pct, 
int *coords);
 
  977    TGHtmlElement *TableDimensions(TGHtmlTable *pStart, 
int lineWidth);
 
  978    int  CellSpacing(TGHtmlElement *pTable);
 
  979    void MoveVertically(TGHtmlElement *p, TGHtmlElement *pLast, 
int dy);
 
  981    void PrintList(TGHtmlElement *first, TGHtmlElement *last);
 
  983    char *GetTokenName(TGHtmlElement *p);
 
  984    char *DumpToken(TGHtmlElement *p);
 
  986    void EncodeText(TGString *str, 
const char *z);
 
  991    void ResetLayoutContext();
 
  993    void ComputeVirtualSize();
 
  995    void ScheduleRedraw();
 
  997    void RedrawArea(
int left, 
int top, 
int right, 
int bottom);
 
  998    void RedrawBlock(TGHtmlBlock *p);
 
  999    void RedrawEverything();
 
 1000    void RedrawText(
int y);
 
 1002    float ColorDistance(ColorStruct_t *pA, ColorStruct_t *pB);
 
 1003    int IsDarkColor(ColorStruct_t *p);
 
 1004    int IsLightColor(ColorStruct_t *p);
 
 1005    int GetColorByName(
const char *zColor);
 
 1006    int GetDarkShadowColor(
int iBgColor);
 
 1007    int GetLightShadowColor(
int iBgColor);
 
 1008    int GetColorByValue(ColorStruct_t *pRef);
 
 1012    GContext_t GetGC(
int color, 
int font);
 
 1013    GContext_t GetAnyGC();
 
 1015    void AnimateImage(TGHtmlImage *image);
 
 1016    void ImageChanged(TGHtmlImage *image, 
int newWidth, 
int newHeight);
 
 1017    int  GetImageAlignment(TGHtmlElement *p);
 
 1018    int  GetImageAt(
int x, 
int y);
 
 1019    const char *GetPctWidth(TGHtmlElement *p, 
char *opt, 
char *ret);
 
 1020    void TableBgndImage(TGHtmlElement *p);
 
 1022    TGHtmlElement *FillOutBlock(TGHtmlBlock *p);
 
 1023    void UnlinkAndFreeBlock(TGHtmlBlock *pBlock);
 
 1024    void AppendBlock(TGHtmlElement *pToken, TGHtmlBlock *pBlock);
 
 1026    void StringHW(
const char *str, 
int *h, 
int *w);
 
 1027    TGHtmlElement *MinMax(TGHtmlElement *p, 
int *pMin, 
int *pMax,
 
 1028                          int lineWidth, 
int hasbg);
 
 1030    void DrawSelectionBackground(TGHtmlBlock *pBlock, Drawable_t Drawable_t,
 
 1032    void DrawRect(Drawable_t drawable, TGHtmlElement *src,
 
 1033                  int x, 
int y, 
int w, 
int h, 
int depth, 
int relief);
 
 1034    void BlockDraw(TGHtmlBlock *pBlock, Drawable_t wid,
 
 1036                   int width, 
int height, Pixmap_t pixmap);
 
 1037    void DrawImage(TGHtmlImageMarkup *image, Drawable_t wid,
 
 1039                   int right, 
int bottom);
 
 1040    void DrawTableBgnd(
int x, 
int y, 
int w, 
int h, Drawable_t d, TImage *image);
 
 1042    TGHtmlElement *FindStartOfNextBlock(TGHtmlElement *p, 
int *pCnt);
 
 1045    void AppendElement(TGHtmlElement *pElem);
 
 1047    void AppToken(TGHtmlElement *pNew, TGHtmlElement *p, 
int offs);
 
 1048    TGHtmlMarkupElement *MakeMarkupEntry(
int objType, 
int type, 
int argc,
 
 1049                                         int arglen[], 
char *argv[]);
 
 1050    void TokenizerAppend(
const char *text);
 
 1051    TGHtmlElement *InsertToken(TGHtmlElement *pToken,
 
 1052                               char *zType, 
char *zArgs, 
int offs);
 
 1053    SHtmlTokenMap_t *NameToPmap(
char *zType);
 
 1054    int  NameToType(
char *zType);
 
 1055    const char *TypeToName(
int type);
 
 1056    int  TextInsertCmd(
int argc, 
char **argv);
 
 1057    SHtmlTokenMap_t* GetMarkupMap(
int n);
 
 1059    TGHtmlElement *TokenByIndex(
int N, 
int flag);
 
 1060    int  TokenNumber(TGHtmlElement *p);
 
 1062    void MaxIndex(TGHtmlElement *p, 
int *pIndex, 
int isLast);
 
 1063    int  IndexMod(TGHtmlElement **pp, 
int *ip, 
char *cp);
 
 1064    void FindIndexInBlock(TGHtmlBlock *pBlock, 
int x,
 
 1065                          TGHtmlElement **ppToken, 
int *pIndex);
 
 1066    void IndexToBlockIndex(SHtmlIndex_t sIndex,
 
 1067                           TGHtmlBlock **ppBlock, 
int *piIndex);
 
 1068    int  DecodeBaseIndex(
const char *zBase,
 
 1069                         TGHtmlElement **ppToken, 
int *pIndex);
 
 1070    int  GetIndex(
const char *zIndex, TGHtmlElement **ppToken, 
int *pIndex);
 
 1075    void UnmapControls();
 
 1076    void DeleteControls();
 
 1077    int  ControlSize(TGHtmlInput *p);
 
 1078    void SizeAndLink(TGFrame *frame, TGHtmlInput *pElem);
 
 1079    int  FormCount(TGHtmlInput *p, 
int radio);
 
 1080    void AddFormInfo(TGHtmlElement *p);
 
 1081    void AddSelectOptions(TGListBox *lb, TGHtmlElement *p, TGHtmlElement *pEnd);
 
 1082    void AppendText(TGString *str, TGHtmlElement *pFirst, TGHtmlElement *pEnd);
 
 1084    void UpdateSelection(
int forceUpdate);
 
 1085    void UpdateSelectionDisplay();
 
 1086    void LostSelection();
 
 1087    int  SelectionSet(
const char *startIx, 
const char *endIx);
 
 1088    void UpdateInsert();
 
 1089    int  SetInsert(
const char *insIx);
 
 1091    const char *GetUid(
const char *
string);
 
 1092    ColorStruct_t *AllocColor(
const char *name);
 
 1093    ColorStruct_t *AllocColorByValue(ColorStruct_t *color);
 
 1094    void FreeColor(ColorStruct_t *color);
 
 1096    SHtmlStyle_t GetCurrentStyle();
 
 1097    void PushStyleStack(
int tag, SHtmlStyle_t style);
 
 1098    SHtmlStyle_t PopStyleStack(
int tag);
 
 1100    void MakeInvisible(TGHtmlElement *p_first, TGHtmlElement *p_last);
 
 1101    int  GetLinkColor(
const char *zURL);
 
 1102    void AddStyle(TGHtmlElement *p);
 
 1105    int  NextMarkupType(TGHtmlElement *p);
 
 1107    TGHtmlElement *AttrElem(
const char *name, 
char *value);
 
 1110    void AppendArglist(TGString *str, TGHtmlMarkupElement *pElem);
 
 1111    TGHtmlElement *FindEndNest(TGHtmlElement *sp, 
int en, TGHtmlElement *lp);
 
 1112    TGString *ListTokens(TGHtmlElement *p, TGHtmlElement *pEnd);
 
 1113    TGString *TableText(TGHtmlTable *pTable, 
int flags);
 
 1115    virtual void MouseOver(
const char *uri) { Emit(
"MouseOver(const char *)",uri); } 
 
 1116    virtual void MouseDown(
const char *uri)  { Emit(
"MouseDown(const char *)",uri); } 
 
 1117    virtual void ButtonClicked(
const char *name, 
const char *val); 
 
 1118    virtual void SubmitClicked(
const char *val); 
 
 1119    virtual void CheckToggled(
const char *name, Bool_t on, 
const char *val); 
 
 1120    virtual void RadioChanged(
const char *name, 
const char *val); 
 
 1121    virtual void InputSelected(
const char *name, 
const char *val);   
 
 1122    virtual void SavePrimitive(std::ostream &out, Option_t * = 
"");
 
 1125    virtual void UpdateBackgroundStart();
 
 1128    TGHtmlElement *fPFirst;          
 
 1129    TGHtmlElement *fPLast;           
 
 1132    TGHtmlElement *fLastSized;       
 
 1133    TGHtmlElement *fNextPlaced;      
 
 1135    TGHtmlBlock   *fFirstBlock;      
 
 1136    TGHtmlBlock   *fLastBlock;       
 
 1137    TGHtmlInput   *fFirstInput;      
 
 1138    TGHtmlInput   *fLastInput;       
 
 1148    SHtmlIndex_t   fSelBegin;        
 
 1149    SHtmlIndex_t   fSelEnd;          
 
 1150    TGHtmlBlock   *fPSelStartBlock;  
 
 1151    Html_16_t      fSelStartIndex;   
 
 1153    Html_16_t      fSelEndIndex;     
 
 1154    TGHtmlBlock   *fPSelEndBlock;    
 
 1163    TGHtmlBlock   *fPInsBlock;       
 
 1179    TGHtmlScript  *fPScript;         
 
 1181    TGIdleHandler *fIdle;
 
 1188    SHtmlStyleStack_t *fStyleStack;     
 
 1195    TGHtmlAnchor     *fAnchorStart;     
 
 1196    TGHtmlForm       *fFormStart;       
 
 1197    TGHtmlInput      *fFormElemStart;   
 
 1198    TGHtmlInput      *fFormElemLast;    
 
 1199    TGHtmlListStart  *fInnerList;       
 
 1200    TGHtmlElement    *fLoEndPtr;        
 
 1201    TGHtmlForm       *fLoFormStart;     
 
 1207    TGHtmlLayoutContext fLayoutContext;
 
 1211    int               fHighlightWidth;        
 
 1216    ColorStruct_t    *fHighlightBgColorPtr;   
 
 1218    ColorStruct_t    *fHighlightColorPtr;     
 
 1219    TGFont           *fAFont[N_FONT];         
 
 1220    char              fFontValid[(N_FONT+7)/8]; 
 
 1223    ColorStruct_t    *fApColor[N_COLOR];      
 
 1226    int               fIDark[N_COLOR];        
 
 1227    int               fILight[N_COLOR];       
 
 1228    ColorStruct_t    *fBgColor;               
 
 1229    ColorStruct_t    *fFgColor;               
 
 1230    ColorStruct_t    *fNewLinkColor;          
 
 1231    ColorStruct_t    *fOldLinkColor;          
 
 1232    ColorStruct_t    *fSelectionColor;        
 
 1233    GcCache_t         fAGcCache[N_CACHE_GC];  
 
 1236    TGHtmlImage      *fImageList;             
 
 1241    int               fOverrideColors;        
 
 1242    int               fUnderlineLinks;        
 
 1246    int               fTableBorderMin;        
 
 1251    int               fExportSelection;       
 
 1265    int               fDirtyLeft, fDirtyTop;  
 
 1268    int               fDirtyRight, fDirtyBottom;  
 
 1274    SHtmlExtensions_t *fExts;                 
 
 1276    THashTable       *fUidTable;              
 
 1278    const char       *fLastUri;               
 
 1281    ClassDef(TGHtml, 0); 
 
 1320 #define REDRAW_PENDING       0x000001 
 1321 #define GOT_FOCUS            0x000002 
 1322 #define HSCROLL              0x000004 
 1323 #define VSCROLL              0x000008 
 1324 #define RELAYOUT             0x000010 
 1325 #define RESIZE_ELEMENTS      0x000020 
 1326 #define REDRAW_FOCUS         0x000040 
 1327 #define REDRAW_TEXT          0x000080 
 1328 #define EXTEND_LAYOUT        0x000100 
 1329 #define STYLER_RUNNING       0x000200 
 1330 #define INSERT_FLASHING      0x000400 
 1331 #define REDRAW_IMAGES        0x000800 
 1332 #define ANIMATE_IMAGES       0x001000 
 1337 #define HtmlHasFlag(A,F)      (((A)->flags&(F))==(F)) 
 1338 #define HtmlHasAnyFlag(A,F)   (((A)->flags&(F))!=0) 
 1339 #define HtmlSetFlag(A,F)      ((A)->flags|=(F)) 
 1340 #define HtmlClearFlag(A,F)    ((A)->flags&=~(F)) 
 1345 #define LARGE_NUMBER 100000000 
 1350 #define DEF_HTML_BG_COLOR             DEF_FRAME_BG_COLOR 
 1351 #define DEF_HTML_BG_MONO              DEF_FRAME_BG_MONO 
 1352 #define DEF_HTML_EXPORT_SEL           1 
 1353 #define DEF_HTML_FG                   DEF_BUTTON_FG 
 1354 #define DEF_HTML_HIGHLIGHT_BG         DEF_BUTTON_HIGHLIGHT_BG 
 1355 #define DEF_HTML_HIGHLIGHT            DEF_BUTTON_HIGHLIGHT 
 1356 #define DEF_HTML_HIGHLIGHT_WIDTH      "0" 
 1357 #define DEF_HTML_INSERT_OFF_TIME      300 
 1358 #define DEF_HTML_INSERT_ON_TIME       600 
 1359 #define DEF_HTML_PADX                 (HTML_INDENT / 4) 
 1360 #define DEF_HTML_PADY                 (HTML_INDENT / 4) 
 1361 #define DEF_HTML_RELIEF               "raised" 
 1362 #define DEF_HTML_SELECTION_COLOR      "skyblue" 
 1363 #define DEF_HTML_TAKE_FOCUS           "0" 
 1364 #define DEF_HTML_UNVISITED            "blue2" 
 1365 #define DEF_HTML_VISITED              "purple4" 
 1367 #ifdef NAVIGATOR_TABLES 
 1369 #define DEF_HTML_TABLE_BORDER             "0" 
 1370 #define DEF_HTML_TABLE_CELLPADDING        "2" 
 1371 #define DEF_HTML_TABLE_CELLSPACING        "5" 
 1372 #define DEF_HTML_TABLE_BORDER_LIGHT_COLOR "gray80" 
 1373 #define DEF_HTML_TABLE_BORDER_DARK_COLOR  "gray40" 
 1375 #endif  // NAVIGATOR_TABLES 
 1398 #endif  // ROOT_TGHtml