82 if (p->
fFrame == 0)
continue;
84 p->
fX <
x + w && p->
fX + p->
fW >
x) {
114 for (; p; p = p->
fINext) {
158 for (i = 0; i <
int(
sizeof(types) /
sizeof(types[0])); i++) {
159 if (strcasecmp(types[i].zName, z) == 0) {
160 type = types[i].type;
249 while (pFirs && pFirs != pEnd) {
250 switch (pFirs->
fType) {
260 static char zSpaces[] =
" ";
262 while (cnt > (
int)
sizeof(zSpaces) - 1) {
263 str->Append(zSpaces,
sizeof(zSpaces) - 1);
264 cnt -=
sizeof(zSpaces) - 1;
267 str->Append(zSpaces, cnt);
313 const char *zValue = p->
MarkupArg(
"value",
"");
314 const char *sel = p->
MarkupArg(
"selected",
"");
315 if (sel && !strcmp(sel,
"selected"))
321 while (p && p != pEnd &&
361 if (pElem->
fSized)
return 0;
385 f->Resize(
f->GetDefaultSize());
396 f->Resize(
f->GetDefaultSize());
403 const char *z = pElem->
MarkupArg(
"value", 0);
408 f->Resize(
f->GetDefaultSize());
416 const char *z = pElem->
MarkupArg(
"value", 0);
417 if (!z) z =
"Submit";
422 f->Resize(
f->GetDefaultSize());
429 const char *z = pElem->
MarkupArg(
"maxlength", 0);
430 int maxlen = z ? atoi(z) : 256;
431 if (maxlen < 2) maxlen = 2;
433 int size = z ? atoi(z) * 5 : 150;
437 if (z)
f->AppendText(z);
438 f->Resize(
size,
f->GetDefaultHeight());
445 const char *z = pElem->
MarkupArg(
"maxlength", 0);
446 int maxlen = z ? atoi(z) : 256;
447 if (maxlen < 2) maxlen = 2;
449 int size = z ? atoi(z) * 5 : 150;
454 if (z)
f->AppendText(z);
455 f->Resize(
size,
f->GetDefaultHeight());
462 const char *z = pElem->
MarkupArg(
"size", 0);
463 int size = z ? atoi(z) : 1;
464 UInt_t width = 0, height = 0;
479 cb->
Resize(width > 0 ? width+30 : 200,
480 height > 22 ? height : 22);
494 lb->
Resize(width > 0 ? width+30 : 200, height *
size);
556 while ((
q =
q->fPPrev))
569 const char *
name, *z;
589 if ((z =
q->MarkupArg(
"name", 0)) && !strcmp(z,
name)) {
628 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
629 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
630 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0,
631 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
632 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
633 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0,
634 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
635 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1,
637#define NeedToEscape(C) ((C)>0 && (C)<127 && gNeedEscape[(int)(C)])
648 if (i > 0) str->Append(z, i);
653 }
else if (*z ==
'\n') {
654 str->Append(
"%0D%0A", 6);
655 }
else if (*z ==
'\r') {
659 snprintf(zBuf, 10,
"%%%02X", 0xff & *z);
660 str->Append(zBuf, 3);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
#define INPUT_TYPE_Button
#define INPUT_TYPE_Applet
#define INPUT_TYPE_Submit
#define INPUT_TYPE_Unknown
#define INPUT_TYPE_Hidden
#define INPUT_TYPE_Password
#define INPUT_TYPE_TextArea
#define INPUT_TYPE_Checkbox
#define INPUT_TYPE_Select
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
virtual TGListBox * GetListBox() const
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move and/or resize the frame.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
TGFrame(const TGFrame &)=delete
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
void MapWindow() override
map window
virtual UInt_t GetOptions() const
void UnmapWindow() override
unmap window
void MapSubwindows() override
map sub windows
TGHotString is a string with a "hot" character underlined.
virtual const char * MarkupArg(const char *, const char *)
const char * GetValue() const
TGHtmlLBEntry(const TGWindow *p, TGString *s, TGString *val, int ID)
~TGHtmlLBEntry() override
const char * MarkupArg(const char *tag, const char *zDefault) override
Lookup an argument in the given markup with the name given.
ColorStruct_t * fApColor[32]
TGHtmlInput * fFormElemLast
void EncodeText(TGString *str, const char *z)
Append to the given TString an encoded version of the given text.
void DeleteControls()
Delete all input controls.
TGHtmlInput * fFirstInput
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.
void AddSelectOptions(TGListBox *lb, TGHtmlElement *p, TGHtmlElement *pEnd)
The "p" argument points to a <select>.
int FormCount(TGHtmlInput *p, int radio)
Return the number of elments of type p in a form.
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.
int MapControls()
Map any control that should be visible according to the current scroll position.
virtual TGFrame * ProcessApplet(TGHtmlInput *)
void AddFormInfo(TGHtmlElement *p)
Add the DOM control information for form elements.
Bool_t ProcessMessage(Longptr_t, Longptr_t, Longptr_t) override
Process messages (GUI events) in the html widget.
This class describes layout hints used by the layout classes.
A listbox is a box, possibly with scrollbar, containing entries.
virtual TGLBEntry * Select(Int_t id, Bool_t sel=kTRUE)
virtual Int_t GetNumberOfEntries() const
virtual TGLBEntry * GetSelectedEntry() const
void Resize(UInt_t w, UInt_t h) override
Resize the listbox widget.
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
void Layout() override
Layout the listbox components.
virtual TGLBEntry * GetEntry(Int_t id) const
Returns list box entry with specified id.
UInt_t GetItemVsize() const
virtual void SetMultipleSelections(Bool_t multi=kTRUE)
virtual TGFrame * GetContainer() const
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
A TGTextEdit is a specialization of TGTextView.
A TGTextEntry is a one line text input widget.
const TGString * GetText() const
TGTextLBEntry(const TGTextLBEntry &)=delete
Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override
Process scrollbar messages.
TGLongPosition fVisible
position of visible region
TGViewFrame * fCanvas
frame containing the text
ROOT GUI Window base class.
virtual void DestroyWindow()
destroy window
ULong_t fPixel
color pixel value (index in color table)