PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
html.h
Go to the documentation of this file.
1 /*
2 * html.h
3 *
4 * HyperText Markup Language stream classes.
5 *
6 * Portable Windows Library
7 *
8 * Copyright (c) 1993-2002 Equivalence Pty. Ltd.
9 *
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.mozilla.org/MPL/
14 *
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * The Original Code is Portable Windows Library.
21 *
22 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
23 *
24 * Contributor(s): ______________________________________.
25 *
26 * $Revision: 27547 $
27 * $Author: rjongbloed $
28 * $Date: 2012-04-28 13:17:28 +1000 (Sat, 28 Apr 2012) $
29 */
30
31 #ifndef PTLIB_HTML_H
32 #define PTLIB_HTML_H
33
34 #ifdef P_USE_PRAGMA
35 #pragma interface
36 #endif
37
38
39
41 // PHTML
42
49 class PHTML : public PStringStream
50 {
51 PCLASSINFO(PHTML, PStringStream)
52
53 public:
54 enum ElementInSet {
55 InHTML,
56 InHead,
57 InBody,
58 InTitle,
59 InHeading,
60 InDivision,
61 InPreFormat,
62 InAnchor,
63 InNote,
64 InAddress,
65 InBlockQuote,
66 InCredit,
67 InBold,
68 InItalic,
69 InTeleType,
70 InUnderline,
71 InStrikeThrough,
72 InBig,
73 InSmall,
74 InSubscript,
75 InSuperscript,
76 InEmphasis,
77 InCite,
78 InStrong,
79 InCode,
80 InSample,
81 InKeyboard,
82 InVariable,
83 InDefinition,
84 InQuote,
85 InAuthor,
86 InPerson,
87 InAcronym,
88 InAbbrev,
89 InInsertedText,
90 InDeletedText,
91 InList,
92 InListHeading,
93 InDefinitionTerm,
94 InTable,
95 InForm,
96 InSelect,
97 InTextArea,
98 NumElementsInSet
99 };
100
105 PHTML(
106 ElementInSet initialState = NumElementsInSet
107 );
108 PHTML(
109 const char * cstr
110 );
111 PHTML(
112 const PString & str
113 );
114
115 ~PHTML();
116
121 PHTML & operator=(
122 const PHTML & html
123 ) { AssignContents(html); return *this; }
124 PHTML & operator=(
125 const PString & str
126 ) { AssignContents(str); return *this; }
127 PHTML & operator=(
128 const char * cstr
129 ) { AssignContents(PString(cstr)); return *this; }
130 PHTML & operator=(
131 char ch
132 ) { AssignContents(PString(ch)); return *this; }
133
134
135 // New functions for class.
136 PBoolean Is(ElementInSet elmt) const;
137 void Set(ElementInSet elmt);
138 void Clr(ElementInSet elmt);
139 void Toggle(ElementInSet elmt);
140
141
142 class Escaped {
143 public:
144 Escaped(const char * str) : m_str(str) { }
145 private:
146 void Output(ostream & strm) const;
147 const char * m_str;
148 friend ostream & operator<<(ostream & strm, const Escaped & e) { e.Output(strm); return strm; }
149 };
150 static PString Escape(const char * str);
151
152 class Element {
153 public:
154 virtual ~Element() {}
155 protected:
156 enum OptionalCRLF { NoCRLF, OpenCRLF, CloseCRLF, BothCRLF };
157 Element(
158 const char * nam,
159 const char * att,
160 ElementInSet elmt,
161 ElementInSet req,
162 OptionalCRLF opt
163 ) { name = nam; attr= att; inElement = elmt; reqElement = req; crlf = opt; }
164 virtual void Output(PHTML & html) const;
165 virtual void AddAttr(PHTML & html) const;
166 private:
167 const char * name;
168 const char * attr;
169 ElementInSet inElement;
170 ElementInSet reqElement;
171 OptionalCRLF crlf;
172 friend ostream & operator<<(ostream & strm, const Element & elmt)
173 { elmt.Output((PHTML&)strm); return strm; }
174 };
175
176 class HTML : public Element {
177 public:
178 HTML(const char * attr = NULL);
179 virtual ~HTML() {}
180 };
181
182 class Head : public Element {
183 public:
184 Head();
185 virtual ~Head() {}
186 protected:
187 virtual void Output(PHTML & html) const;
188 };
189
190 class Body : public Element {
191 public:
192 Body(const char * attr = NULL);
193 virtual ~Body() {}
194 protected:
195 virtual void Output(PHTML & html) const;
196 };
197
198 class Title : public Element {
199 public:
200 Title();
201 Title(const char * titleCStr);
202 Title(const PString & titleStr);
203 virtual ~Title() {}
204 protected:
205 virtual void Output(PHTML & html) const;
206 private:
207 const char * titleString;
208 };
209
210 class Banner : public Element {
211 public:
212 Banner(const char * attr = NULL);
213 virtual ~Banner() {}
214 };
215
216 class Division : public Element {
217 public:
218 Division(const char * attr = NULL);
219 virtual ~Division() {}
220 };
221
222 class Heading : public Element {
223 public:
224 Heading(int number,
225 int sequence = 0,
226 int skip = 0,
227 const char * attr = NULL);
228 Heading(int number,
229 const char * image,
230 int sequence = 0,
231 int skip = 0,
232 const char * attr = NULL);
233 Heading(int number,
234 const PString & imageStr,
235 int sequence = 0,
236 int skip = 0,
237 const char * attr = NULL);
238 virtual ~Heading() {}
239 protected:
240 virtual void AddAttr(PHTML & html) const;
241 private:
242 int num;
243 const char * srcString;
244 int seqNum, skipSeq;
245 };
246
247 class BreakLine : public Element {
248 public:
249 BreakLine(const char * attr = NULL);
250 virtual ~BreakLine() {}
251 };
252
253 class Paragraph : public Element {
254 public:
255 Paragraph(const char * attr = NULL);
256 virtual ~Paragraph() {}
257 };
258
259 class PreFormat : public Element {
260 public:
261 PreFormat(int widthInChars = 0,
262 const char * attr = NULL);
263 virtual ~PreFormat() {}
264 protected:
265 virtual void AddAttr(PHTML & html) const;
266 private:
267 int width;
268 };
269
270 class HotLink : public Element {
271 public:
272 HotLink(const char * href = NULL, const char * attr = NULL);
273 virtual ~HotLink() {}
274 protected:
275 virtual void AddAttr(PHTML & html) const;
276 private:
277 const char * hrefString;
278 };
279
280 class Target : public Element {
281 public:
282 Target(const char * name = NULL, const char * attr = NULL);
283 virtual ~Target() {}
284 protected:
285 virtual void AddAttr(PHTML & html) const;
286 private:
287 const char * nameString;
288 };
289
290 class ImageElement : public Element {
291 protected:
292 ImageElement(const char * nam,
293 const char * attr,
294 ElementInSet elmt,
295 ElementInSet req,
296 OptionalCRLF opt,
297 const char * image);
298 virtual ~ImageElement() {}
299 virtual void AddAttr(PHTML & html) const;
300 const char * srcString;
301 };
302
303 class Image : public ImageElement {
304 public:
305 Image(const char * src,
306 int width = 0,
307 int height = 0,
308 const char * attr = NULL);
309 Image(const char * src,
310 const char * alt,
311 int width = 0,
312 int height = 0,
313 const char * attr = NULL);
314 virtual ~Image() {}
315 protected:
316 virtual void AddAttr(PHTML & html) const;
317 private:
318 const char * altString;
319 int width, height;
320 };
321
322 class HRule : public ImageElement {
323 public:
324 HRule(const char * image = NULL, const char * attr = NULL);
325 virtual ~HRule() {}
326 };
327
328 class Note : public ImageElement {
329 public:
330 Note(const char * image = NULL, const char * attr = NULL);
331 virtual ~Note() {}
332 };
333
334 class Address : public Element {
335 public:
336 Address(const char * attr = NULL);
337 virtual ~Address() {}
338 };
339
340 class BlockQuote : public Element {
341 public:
342 BlockQuote(const char * attr = NULL);
343 virtual ~BlockQuote() {}
344 };
345
346 class Credit : public Element {
347 public:
348 Credit(const char * attr = NULL);
349 virtual ~Credit() {}
350 };
351
352 class SetTab : public Element {
353 public:
354 SetTab(const char * id, const char * attr = NULL);
355 virtual ~SetTab() {}
356 protected:
357 virtual void AddAttr(PHTML & html) const;
358 private:
359 const char * ident;
360 };
361
362 class Tab : public Element {
363 public:
364 Tab(int indent, const char * attr = NULL);
365 Tab(const char * id, const char * attr = NULL);
366 virtual ~Tab() {}
367 protected:
368 virtual void AddAttr(PHTML & html) const;
369 private:
370 const char * ident;
371 int indentSize;
372 };
373
374
375 class Bold : public Element {
376 public: Bold() : Element("B", NULL, InBold, InBody, NoCRLF) { }
377 virtual ~Bold() {}
378 };
379 class Italic : public Element {
380 public:
381 Italic()
382 : Element("I", NULL, InItalic, InBody, NoCRLF) { }
383 virtual ~Italic() {}
384 };
385 class TeleType : public Element {
386 public:
387 TeleType()
388 : Element("TT", NULL, InTeleType, InBody, NoCRLF) { }
389 virtual ~TeleType() {}
390 };
391 class Underline : public Element {
392 public:
393 Underline()
394 : Element("U", NULL, InUnderline, InBody, NoCRLF) { }
395 virtual ~Underline() {}
396 };
397 class StrikeThrough : public Element {
398 public:
399 StrikeThrough()
400 : Element("S", NULL, InStrikeThrough, InBody, NoCRLF) { }
401 virtual ~StrikeThrough() {}
402 };
403 class Big : public Element {
404 public:
405 Big()
406 : Element("BIG", NULL, InBig, InBody, NoCRLF) { }
407 virtual ~Big() {}
408 };
409 class Small : public Element {
410 public:
411 Small()
412 : Element("SMALL", NULL, InSmall, InBody, NoCRLF) { }
413 virtual ~Small() {}
414 };
415 class Subscript : public Element {
416 public:
417 Subscript()
418 : Element("SUB", NULL, InSubscript, InBody, NoCRLF) { }
419 virtual ~Subscript() {}
420 };
421 class Superscript : public Element {
422 public:
423 Superscript()
424 : Element("SUP", NULL, InSuperscript, InBody, NoCRLF) { }
425 virtual ~Superscript() {}
426 };
427 class Emphasis : public Element {
428 public:
429 Emphasis()
430 : Element("EM", NULL, InEmphasis, InBody, NoCRLF) { }
431 virtual ~Emphasis() {}
432 };
433 class Cite : public Element {
434 public:
435 Cite()
436 : Element("CITE", NULL, InCite, InBody, NoCRLF) { }
437 virtual ~Cite() {}
438 };
439 class Strong : public Element {
440 public:
441 Strong()
442 : Element("STRONG", NULL, InStrong, InBody, NoCRLF) { }
443 virtual ~Strong() {}
444 };
445 class Code : public Element {
446 public:
447 Code()
448 : Element("CODE", NULL, InCode, InBody, NoCRLF) { }
449 virtual ~Code() {}
450 };
451 class Sample : public Element {
452 public:
453 Sample()
454 : Element("SAMP", NULL, InSample, InBody, NoCRLF) { }
455 virtual ~Sample() {}
456 };
457 class Keyboard : public Element {
458 public:
459 Keyboard()
460 : Element("KBD", NULL, InKeyboard, InBody, NoCRLF) { }
461 virtual ~Keyboard() {}
462 };
463 class Variable : public Element {
464 public:
465 Variable()
466 : Element("VAR", NULL, InVariable, InBody, NoCRLF) { }
467 virtual ~Variable() {}
468 };
469 class Definition : public Element {
470 public:
471 Definition()
472 : Element("DFN", NULL, InDefinition, InBody, NoCRLF) { }
473 virtual ~Definition() {}
474 };
475 class Quote : public Element {
476 public:
477 Quote()
478 : Element("Q", NULL, InQuote, InBody, NoCRLF) { }
479 virtual ~Quote() {}
480 };
481 class Author : public Element {
482 public:
483 Author()
484 : Element("AU", NULL, InAuthor, InBody, NoCRLF) { }
485 virtual ~Author() {}
486 };
487 class Person : public Element {
488 public:
489 Person()
490 : Element("PERSON", NULL, InPerson, InBody, NoCRLF) { }
491 virtual ~Person() {}
492 };
493 class Acronym : public Element {
494 public:
495 Acronym()
496 : Element("ACRONYM", NULL, InAcronym, InBody, NoCRLF) { }
497 virtual ~Acronym() {}
498 };
499 class Abbrev : public Element {
500 public:
501 Abbrev()
502 : Element("ABBREV", NULL, InAbbrev, InBody, NoCRLF) { }
503 virtual ~Abbrev() {}
504 };
505 class InsertedText : public Element {
506 public:
507 InsertedText()
508 : Element("INS", NULL, InInsertedText, InBody, NoCRLF) { }
509 virtual ~InsertedText() {}
510 };
511 class DeletedText : public Element {
512 public:
513 DeletedText()
514 : Element("DEL", NULL, InDeletedText, InBody, NoCRLF) { }
515 public:
516 virtual ~DeletedText() {}
517 };
518
519 class SimpleList : public Element {
520 public:
521 SimpleList(const char * attr = NULL);
522 virtual ~SimpleList() {}
523 protected:
524 virtual void AddAttr(PHTML & html) const;
525 };
526
527 class BulletList : public Element {
528 public:
529 BulletList(const char * attr = NULL);
530 virtual ~BulletList() {}
531 };
532
533 class OrderedList : public Element {
534 public:
535 OrderedList(int seqNum = 0, const char * attr = NULL);
536 virtual ~OrderedList() {}
537 protected:
538 virtual void AddAttr(PHTML & html) const;
539 private:
540 int sequenceNum;
541 };
542
543 class DefinitionList : public Element {
544 public:
545 DefinitionList(const char * attr = NULL);
546 virtual ~DefinitionList() {}
547 };
548
549 class ListHeading : public Element {
550 public:
551 ListHeading(const char * attr = NULL);
552 virtual ~ListHeading() {}
553 };
554
555 class ListItem : public Element {
556 public:
557 ListItem(int skip = 0, const char * attr = NULL);
558 virtual ~ListItem() {}
559 protected:
560 virtual void AddAttr(PHTML & html) const;
561 private:
562 int skipSeq;
563 };
564
565 class DefinitionTerm : public Element {
566 public:
567 DefinitionTerm(const char * attr = NULL);
568 virtual ~DefinitionTerm() {}
569 protected:
570 virtual void Output(PHTML & html) const;
571 };
572
573 class DefinitionItem : public Element {
574 public:
575 DefinitionItem(const char * attr = NULL);
576 virtual ~DefinitionItem() {}
577 protected:
578 virtual void Output(PHTML & html) const;
579 };
580
581
582 enum BorderCodes {
583 NoBorder,
584 Border
585 };
586 class TableStart : public Element {
587 public:
588 TableStart(const char * attr = NULL);
589 TableStart(BorderCodes border, const char * attr = NULL);
590 virtual ~TableStart() {}
591 protected:
592 virtual void Output(PHTML & html) const;
593 virtual void AddAttr(PHTML & html) const;
594 private:
595 PBoolean borderFlag;
596 };
597 friend class TableStart;
598
599 class TableEnd : public Element {
600 public:
601 TableEnd();
602 virtual ~TableEnd() {}
603 protected:
604 virtual void Output(PHTML & html) const;
605 };
606 friend class TableEnd;
607
608 class TableRow : public Element {
609 public:
610 TableRow(const char * attr = NULL);
611 virtual ~TableRow() {}
612 };
613
614 class TableHeader : public Element {
615 public:
616 TableHeader(const char * attr = NULL);
617 virtual ~TableHeader() {}
618 };
619
620 class TableData : public Element {
621 public:
622 TableData(const char * attr = NULL);
623 virtual ~TableData() {}
624 };
625
626
627 class Form : public Element {
628 public:
629 Form(
630 const char * method = NULL,
631 const char * action = NULL,
632 const char * encoding = NULL,
633 const char * script = NULL
634 );
635 virtual ~Form() {}
636 protected:
637 virtual void AddAttr(PHTML & html) const;
638 private:
639 const char * methodString;
640 const char * actionString;
641 const char * mimeTypeString;
642 const char * scriptString;
643 };
644
645 enum DisableCodes {
646 Enabled,
647 Disabled
648 };
649 class FieldElement : public Element {
650 protected:
651 FieldElement(
652 const char * nam,
653 const char * attr,
654 ElementInSet elmt,
655 OptionalCRLF opt,
656 DisableCodes disabled
657 );
658 virtual ~FieldElement() {}
659 virtual void AddAttr(PHTML & html) const;
660 private:
661 PBoolean disabledFlag;
662 };
663
664 class Select : public FieldElement {
665 public:
666 Select(
667 const char * fname = NULL,
668 const char * attr = NULL
669 );
670 Select(
671 const char * fname,
672 DisableCodes disabled,
673 const char * attr = NULL
674 );
675 virtual ~Select() {}
676 protected:
677 virtual void AddAttr(PHTML & html) const;
678 private:
679 const char * nameString;
680 };
681
682 enum SelectionCodes {
683 NotSelected,
684 Selected
685 };
686 class Option : public FieldElement {
687 public:
688 Option(
689 const char * attr = NULL
690 );
691 Option(
692 SelectionCodes select,
693 const char * attr = NULL
694 );
695 Option(
696 DisableCodes disabled,
697 const char * attr = NULL
698 );
699 Option(
700 SelectionCodes select,
701 DisableCodes disabled,
702 const char * attr = NULL
703 );
704 virtual ~Option() {}
705 protected:
706 virtual void AddAttr(PHTML & html) const;
707 private:
708 PBoolean selectedFlag;
709 };
710
711 class FormField : public FieldElement {
712 protected:
713 FormField(
714 const char * nam,
715 const char * attr,
716 ElementInSet elmt,
717 OptionalCRLF opt,
718 DisableCodes disabled,
719 const char * fname
720 );
721 virtual ~FormField() {}
722 virtual void AddAttr(PHTML & html) const;
723 private:
724 const char * nameString;
725 };
726
727 class TextArea : public FormField {
728 public:
729 TextArea(
730 const char * fname,
731 DisableCodes disabled = Enabled,
732 const char * attr = NULL
733 );
734 TextArea(
735 const char * fname,
736 int rows, int cols,
737 DisableCodes disabled = Enabled,
738 const char * attr = NULL
739 );
740 virtual ~TextArea() {}
741 protected:
742 virtual void AddAttr(PHTML & html) const;
743 private:
744 int numRows, numCols;
745 };
746
747 class InputField : public FormField {
748 protected:
749 InputField(
750 const char * type,
751 const char * fname,
752 DisableCodes disabled,
753 const char * attr
754 );
755 virtual ~InputField() {}
756 virtual void AddAttr(PHTML & html) const;
757 private:
758 const char * typeString;
759 };
760
761 class HiddenField : public InputField {
762 public:
763 HiddenField(
764 const char * fname,
765 const char * value,
766 const char * attr = NULL
767 );
768 virtual ~HiddenField() {}
769 protected:
770 virtual void AddAttr(PHTML & html) const;
771 private:
772 const char * valueString;
773 };
774
775 class InputText : public InputField {
776 public:
777 InputText(
778 const char * fname,
779 int size,
780 const char * init = NULL,
781 const char * attr = NULL
782 );
783 InputText(
784 const char * fname,
785 int size,
786 DisableCodes disabled,
787 const char * attr = NULL
788 );
789 InputText(
790 const char * fname,
791 int size,
792 int maxLength,
793 DisableCodes disabled = Enabled,
794 const char * attr = NULL
795 );
796 InputText(
797 const char * fname,
798 int size,
799 const char * init,
800 int maxLength,
801 DisableCodes disabled = Enabled,
802 const char * attr = NULL
803 );
804 virtual ~InputText() {}
805 protected:
806 InputText(
807 const char * type,
808 const char * fname,
809 int size,
810 const char * init,
811 int maxLength,
812 DisableCodes disabled,
813 const char * attr
814 );
815 virtual void AddAttr(PHTML & html) const;
816 private:
817 const char * value;
818 int width, length;
819 };
820
821 class InputPassword : public InputText {
822 public:
823 InputPassword(
824 const char * fname,
825 int size,
826 const char * init = NULL,
827 const char * attr = NULL
828 );
829 InputPassword(
830 const char * fname,
831 int size,
832 DisableCodes disabled,
833 const char * attr = NULL
834 );
835 InputPassword(
836 const char * fname,
837 int size,
838 int maxLength,
839 DisableCodes disabled = Enabled,
840 const char * attr = NULL
841 );
842 InputPassword(
843 const char * fname,
844 int size,
845 const char * init,
846 int maxLength,
847 DisableCodes disabled = Enabled,
848 const char * attr = NULL
849 );
850 virtual ~InputPassword() {}
851 };
852
853 enum CheckedCodes {
854 UnChecked,
855 Checked
856 };
857 class RadioButton : public InputField {
858 public:
859 RadioButton(
860 const char * fname,
861 const char * value,
862 const char * attr = NULL
863 );
864 RadioButton(
865 const char * fname,
866 const char * value,
867 DisableCodes disabled,
868 const char * attr = NULL
869 );
870 RadioButton(
871 const char * fname,
872 const char * value,
873 CheckedCodes check,
874 DisableCodes disabled = Enabled,
875 const char * attr = NULL
876 );
877 virtual ~RadioButton() {}
878 protected:
879 RadioButton(
880 const char * type,
881 const char * fname,
882 const char * value,
883 CheckedCodes check,
884 DisableCodes disabled,
885 const char * attr
886 );
887 virtual void AddAttr(PHTML & html) const;
888 private:
889 const char * valueString;
890 PBoolean checkedFlag;
891 };
892
893 class CheckBox : public RadioButton {
894 public:
895 CheckBox(
896 const char * fname,
897 const char * attr = NULL
898 );
899 CheckBox(
900 const char * fname,
901 DisableCodes disabled,
902 const char * attr = NULL
903 );
904 CheckBox(
905 const char * fname,
906 CheckedCodes check,
907 DisableCodes disabled = Enabled,
908 const char * attr = NULL
909 );
910 virtual ~CheckBox() {}
911 };
912
913
914 class InputNumber : public InputField {
915 public:
916 InputNumber(
917 const char * fname,
918 int min, int max,
919 int value = 0,
920 DisableCodes disabled = Enabled,
921 const char * attr = NULL
922 );
923 virtual ~InputNumber() {}
924 protected:
925 InputNumber(
926 const char * type,
927 const char * fname,
928 int min, int max,
929 int value,
930 DisableCodes disabled,
931 const char * attr
932 );
933 virtual void AddAttr(PHTML & html) const;
934 private:
935 void Construct(int min, int max, int value);
936 int minValue, maxValue, initValue;
937 };
938
939 class InputRange : public InputNumber {
940 public:
941 InputRange(
942 const char * fname,
943 int min, int max,
944 int value = 0,
945 DisableCodes disabled = Enabled,
946 const char * attr = NULL
947 );
948 virtual ~InputRange() {}
949 };
950
951 class InputFile : public InputField {
952 public:
953 InputFile(
954 const char * fname,
955 const char * accept = NULL,
956 DisableCodes disabled = Enabled,
957 const char * attr = NULL
958 );
959 virtual ~InputFile() {}
960 protected:
961 virtual void AddAttr(PHTML & html) const;
962 private:
963 const char * acceptString;
964 };
965
966 class InputImage : public InputField {
967 public:
968 InputImage(
969 const char * fname,
970 const char * src = NULL,
971 DisableCodes disabled = Enabled,
972 const char * attr = NULL
973 );
974 virtual ~InputImage() {}
975 protected:
976 InputImage(
977 const char * type,
978 const char * fname,
979 const char * src,
980 DisableCodes disabled,
981 const char * attr
982 );
983 virtual void AddAttr(PHTML & html) const;
984 private:
985 const char * srcString;
986 };
987
988 class InputScribble : public InputImage {
989 public:
990 InputScribble(
991 const char * fname,
992 const char * src = NULL,
993 DisableCodes disabled = Enabled,
994 const char * attr = NULL
995 );
996 virtual ~InputScribble() {}
997 };
998
999 class ResetButton : public InputImage {
1000 public:
1001 ResetButton(
1002 const char * title,
1003 const char * fname = NULL,
1004 const char * src = NULL,
1005 DisableCodes disabled = Enabled,
1006 const char * attr = NULL
1007 );
1008 virtual ~ResetButton() {}
1009 protected:
1010 ResetButton(
1011 const char * type,
1012 const char * title,
1013 const char * fname = NULL,
1014 const char * src = NULL,
1015 DisableCodes disabled = Enabled,
1016 const char * attr = NULL
1017 );
1018 virtual void AddAttr(PHTML & html) const;
1019 private:
1020 const char * titleString;
1021 };
1022
1023 class SubmitButton : public ResetButton {
1024 public:
1025 SubmitButton(
1026 const char * title,
1027 const char * fname = NULL,
1028 const char * src = NULL,
1029 DisableCodes disabled = Enabled,
1030 const char * attr = NULL
1031 );
1032 virtual ~SubmitButton() {}
1033 };
1034
1035
1036 protected:
1037 virtual void AssignContents(const PContainer & c);
1038
1039 private:
1040 ElementInSet initialElement;
1041 BYTE elementSet[NumElementsInSet/8+1];
1042 PINDEX tableNestLevel;
1043 };
1044
1045
1046 #endif // PTLIB_HTML_H
1047
1048
1049 // End Of File ///////////////////////////////////////////////////////////////