PTLib  Version 2.18.8
 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 
27 #ifndef PTLIB_HTML_H
28 #define PTLIB_HTML_H
29 
30 #ifdef P_USE_PRAGMA
31 #pragma interface
32 #endif
33 
34 
35 
37 // PHTML
38 
45 class PHTML : public PStringStream
46 {
48 
49  public:
50  enum ElementInSet {
105  };
106 
111  PHTML(
112  ElementInSet initialState = NumElementsInSet
113  );
114  PHTML(
115  const char * cstr
116  );
117  PHTML(
118  const PString & str
119  );
120 
121  ~PHTML();
122 
128  const PHTML & html
129  ) { AssignContents(html); return *this; }
131  const PString & str
132  ) { AssignContents(str); return *this; }
134  const char * cstr
135  ) { AssignContents(PString(cstr)); return *this; }
137  char ch
138  ) { AssignContents(PString(ch)); return *this; }
139 
140 
141  // New functions for class.
142  PBoolean Is(ElementInSet elmt) const;
143  void Set(ElementInSet elmt);
144  void Clr(ElementInSet elmt);
145  void Toggle(ElementInSet elmt);
146 
147 
148  class Escaped {
149  public:
150  Escaped(const char * str) : m_str(str) { }
151  private:
152  void Output(ostream & strm) const;
153  PString m_str;
154  friend ostream & operator<<(ostream & strm, const Escaped & e) { e.Output(strm); return strm; }
155  };
156  static PString Escape(const char * str);
157 
158  static const PString & GetNonBreakSpace();
160  public:
161  NonBreakSpace(unsigned count = 1) : m_count(count) { }
162  private:
163  void Output(ostream & strm) const;
164  unsigned m_count;
165  friend ostream & operator<<(ostream & strm, const NonBreakSpace & e) { e.Output(strm); return strm; }
166  };
167 
168  class Element {
169  public:
170  virtual ~Element() {}
172  Element(
173  const char * nam,
175  ElementInSet req = InBody,
176  OptionalCRLF opt = BothCRLF
177  );
178  Element(
179  const char * nam,
180  const char * att,
182  ElementInSet req = InBody,
183  OptionalCRLF opt = BothCRLF
184  );
185  protected:
186  virtual void Output(PHTML & html) const;
187  virtual void AddAttr(PHTML & html) const;
188  private:
189  PString m_name;
190  PString m_attr;
191  ElementInSet m_inElement;
192  ElementInSet m_reqElement;
193  OptionalCRLF m_crlf;
194  friend ostream & operator<<(ostream & strm, const Element & elmt)
195  { elmt.Output(dynamic_cast<PHTML&>(strm)); return strm; }
196  };
197 
198  class HTML : public Element {
199  public:
200  HTML(const char * attr = NULL);
201  };
202 
203  class Head : public Element {
204  public:
205  Head();
206  protected:
207  virtual void Output(PHTML & html) const;
208  };
209 
210  class Body : public Element {
211  public:
212  Body(const char * attr = NULL);
213  protected:
214  virtual void Output(PHTML & html) const;
215  };
216 
217  class Title : public Element {
218  public:
219  Title();
220  Title(const char * titleCStr);
221  Title(const PString & titleStr);
222  protected:
223  virtual void Output(PHTML & html) const;
224  private:
225  PString m_titleString;
226  };
227 
228  class Style : public Element {
229  public:
230  Style();
231  Style(const char * cssText);
232  Style(const PString & titleStr);
233  protected:
234  virtual void Output(PHTML & html) const;
235  private:
236  PString m_cssString;
237  };
238 
239  class StyleLink : public Element {
240  public:
241  StyleLink(const char * linkCStr);
242  StyleLink(const PString & linkStr);
243  protected:
244  virtual void AddAttr(PHTML & html) const;
245  virtual void Output(PHTML & html) const;
246  private:
247  PString m_styleLink;
248  };
249 
250  class Banner : public Element {
251  public:
252  Banner(const char * attr = NULL);
253  };
254 
255  class DivisionStart : public Element {
256  public:
257  DivisionStart(const char * attr = NULL);
258  protected:
259  virtual void Output(PHTML & html) const;
260  virtual void AddAttr(PHTML & html) const;
261  };
262 
263  class DivisionEnd : public Element {
264  public:
265  DivisionEnd();
266  protected:
267  virtual void Output(PHTML & html) const;
268  };
269 
270  class Heading : public Element {
271  public:
272  Heading(int number,
273  int sequence = 0,
274  int skip = 0,
275  const char * attr = NULL);
276  Heading(int number,
277  const char * image,
278  int sequence = 0,
279  int skip = 0,
280  const char * attr = NULL);
281  Heading(int number,
282  const PString & imageStr,
283  int sequence = 0,
284  int skip = 0,
285  const char * attr = NULL);
286  protected:
287  virtual void AddAttr(PHTML & html) const;
288  private:
289  int m_level;
290  PString m_srcString;
291  int m_seqNum;
292  int m_skipSeq;
293  };
294 
295  class BreakLine : public Element {
296  public:
297  BreakLine(const char * attr = NULL);
298  };
299 
300  class Paragraph : public Element {
301  public:
302  Paragraph(const char * attr = NULL);
303  };
304 
305  class PreFormat : public Element {
306  public:
307  PreFormat(int widthInChars = 0,
308  const char * attr = NULL);
309  protected:
310  virtual void AddAttr(PHTML & html) const;
311  private:
312  int m_width;
313  };
314 
315  class HotLink : public Element {
316  public:
317  HotLink(const char * href = NULL, const char * attr = NULL);
318  protected:
319  virtual void AddAttr(PHTML & html) const;
320  private:
321  PString m_hrefString;
322  };
323 
324  class Target : public Element {
325  public:
326  Target(const char * name = NULL, const char * attr = NULL);
327  protected:
328  virtual void AddAttr(PHTML & html) const;
329  private:
330  PString m_nameString;
331  };
332 
333  class ImageElement : public Element {
334  protected:
335  ImageElement(const char * nam,
336  const char * attr,
337  ElementInSet elmt,
338  ElementInSet req,
339  OptionalCRLF opt,
340  const char * image);
341  virtual void AddAttr(PHTML & html) const;
342 
344  };
345 
346  class Image : public ImageElement {
347  public:
348  Image(const char * src,
349  int width = 0,
350  int height = 0,
351  const char * attr = NULL);
352  Image(const char * src,
353  const char * alt,
354  int width = 0,
355  int height = 0,
356  const char * attr = NULL);
357  protected:
358  virtual void AddAttr(PHTML & html) const;
359  private:
360  PString m_altString;
361  int m_width, m_height;
362  };
363 
364  class HRule : public ImageElement {
365  public:
366  HRule(const char * image = NULL, const char * attr = NULL);
367  };
368 
369  class Note : public ImageElement {
370  public:
371  Note(const char * image = NULL, const char * attr = NULL);
372  };
373 
374  class Address : public Element {
375  public:
376  Address(const char * attr = NULL);
377  };
378 
379  class BlockQuote : public Element {
380  public:
381  BlockQuote(const char * attr = NULL);
382  };
383 
384  class Credit : public Element {
385  public:
386  Credit(const char * attr = NULL);
387  };
388 
389  class SetTab : public Element {
390  public:
391  SetTab(const char * id, const char * attr = NULL);
392  protected:
393  virtual void AddAttr(PHTML & html) const;
394  private:
395  PString m_ident;
396  };
397 
398  class Tab : public Element {
399  public:
400  Tab(int indent, const char * attr = NULL);
401  Tab(const char * id, const char * attr = NULL);
402  protected:
403  virtual void AddAttr(PHTML & html) const;
404  private:
405  PString m_ident;
406  int m_indentSize;
407  };
408 
409 
410  class Bold : public Element {
411  public: Bold() : Element("B", NULL, InBold, InBody, NoCRLF) { }
412  };
413  class Italic : public Element {
414  public:
416  : Element("I", NULL, InItalic, InBody, NoCRLF) { }
417  };
418  class TeleType : public Element {
419  public:
421  : Element("TT", NULL, InTeleType, InBody, NoCRLF) { }
422  };
423  class Underline : public Element {
424  public:
426  : Element("U", NULL, InUnderline, InBody, NoCRLF) { }
427  };
428  class StrikeThrough : public Element {
429  public:
431  : Element("S", NULL, InStrikeThrough, InBody, NoCRLF) { }
432  };
433  class Big : public Element {
434  public:
435  Big()
436  : Element("BIG", NULL, InBig, InBody, NoCRLF) { }
437  };
438  class Small : public Element {
439  public:
440  Small()
441  : Element("SMALL", NULL, InSmall, InBody, NoCRLF) { }
442  };
443  class Subscript : public Element {
444  public:
446  : Element("SUB", NULL, InSubscript, InBody, NoCRLF) { }
447  };
448  class Superscript : public Element {
449  public:
451  : Element("SUP", NULL, InSuperscript, InBody, NoCRLF) { }
452  };
453  class Emphasis : public Element {
454  public:
456  : Element("EM", NULL, InEmphasis, InBody, NoCRLF) { }
457  };
458  class Cite : public Element {
459  public:
460  Cite()
461  : Element("CITE", NULL, InCite, InBody, NoCRLF) { }
462  };
463  class Strong : public Element {
464  public:
466  : Element("STRONG", NULL, InStrong, InBody, NoCRLF) { }
467  };
468  class Code : public Element {
469  public:
470  Code()
471  : Element("CODE", NULL, InCode, InBody, NoCRLF) { }
472  };
473  class Sample : public Element {
474  public:
476  : Element("SAMP", NULL, InSample, InBody, NoCRLF) { }
477  };
478  class Keyboard : public Element {
479  public:
481  : Element("KBD", NULL, InKeyboard, InBody, NoCRLF) { }
482  };
483  class Variable : public Element {
484  public:
486  : Element("VAR", NULL, InVariable, InBody, NoCRLF) { }
487  };
488  class Definition : public Element {
489  public:
491  : Element("DFN", NULL, InDefinition, InBody, NoCRLF) { }
492  };
493  class Quote : public Element {
494  public:
495  Quote()
496  : Element("Q", NULL, InQuote, InBody, NoCRLF) { }
497  };
498  class Author : public Element {
499  public:
501  : Element("AU", NULL, InAuthor, InBody, NoCRLF) { }
502  };
503  class Person : public Element {
504  public:
506  : Element("PERSON", NULL, InPerson, InBody, NoCRLF) { }
507  };
508  class Acronym : public Element {
509  public:
511  : Element("ACRONYM", NULL, InAcronym, InBody, NoCRLF) { }
512  };
513  class Abbrev : public Element {
514  public:
516  : Element("ABBREV", NULL, InAbbrev, InBody, NoCRLF) { }
517  };
518  class InsertedText : public Element {
519  public:
521  : Element("INS", NULL, InInsertedText, InBody, NoCRLF) { }
522  };
523  class DeletedText : public Element {
524  public:
526  : Element("DEL", NULL, InDeletedText, InBody, NoCRLF) { }
527  public:
528  };
529 
530  class SimpleList : public Element {
531  public:
532  SimpleList(const char * attr = NULL);
533  protected:
534  virtual void AddAttr(PHTML & html) const;
535  };
536 
537  class BulletList : public Element {
538  public:
539  BulletList(const char * attr = NULL);
540  };
541 
542  class OrderedList : public Element {
543  public:
544  OrderedList(int seqNum = 0, const char * attr = NULL);
545  protected:
546  virtual void AddAttr(PHTML & html) const;
547  private:
548  int m_sequenceNum;
549  };
550 
551  class DefinitionList : public Element {
552  public:
553  DefinitionList(const char * attr = NULL);
554  };
555 
556  class ListHeading : public Element {
557  public:
558  ListHeading(const char * attr = NULL);
559  };
560 
561  class ListItem : public Element {
562  public:
563  ListItem(int skip = 0, const char * attr = NULL);
564  protected:
565  virtual void AddAttr(PHTML & html) const;
566  private:
567  int m_skipSeq;
568  };
569 
570  class DefinitionTerm : public Element {
571  public:
572  DefinitionTerm(const char * attr = NULL);
573  protected:
574  virtual void Output(PHTML & html) const;
575  };
576 
577  class DefinitionItem : public Element {
578  public:
579  DefinitionItem(const char * attr = NULL);
580  protected:
581  virtual void Output(PHTML & html) const;
582  };
583 
584 
585  enum TableAttr {
608  };
609  #define P_DECL_HTML_TABLE_CTOR(cls) \
610  cls(const char * attr = NULL); \
611  cls(TableAttr attr1, const char * attr = NULL); \
612  cls(TableAttr attr1, TableAttr attr2, const char * attr = NULL); \
613  cls(TableAttr attr1, TableAttr attr2, TableAttr attr3, const char * attr = NULL); \
614  cls(TableAttr attr1, TableAttr attr2, TableAttr attr3, TableAttr attr4, const char * attr = NULL); \
615  cls(TableAttr attr1, TableAttr attr2, TableAttr attr3, TableAttr attr4, TableAttr attr5, const char * attr = NULL); \
616 
617  class TableElement : public Element {
618  public:
620  const char * nam,
621  const char * att,
622  ElementInSet elmt,
623  ElementInSet req,
624  OptionalCRLF opt
625  ) : Element(nam, att, elmt, req, opt) { }
626  virtual void Output(PHTML & html) const;
627  };
628 
629  class TableStart : public TableElement
630  {
631  public:
633  protected:
634  virtual void Output(PHTML & html) const;
635  virtual void AddAttr(PHTML & html) const;
636  };
637  friend class TableStart;
638 
639  class TableEnd : public TableElement {
640  public:
641  TableEnd();
642  protected:
643  virtual void Output(PHTML & html) const;
644  };
645  friend class TableEnd;
646 
647  class TableRow : public TableElement {
648  public:
650  };
651 
652  class TableHeader : public TableElement {
653  public:
655  };
656 
657  class TableData : public TableElement {
658  public:
660  };
661 
662 
663  class Form : public Element {
664  public:
665  Form(
666  const char * method = NULL,
667  const char * action = NULL,
668  const char * encoding = NULL,
669  const char * script = NULL,
670  const char * attr = NULL
671  );
672  protected:
673  virtual void AddAttr(PHTML & html) const;
674  private:
675  PString m_methodString;
676  PString m_actionString;
677  PString m_mimeTypeString;
678  PString m_scriptString;
679  };
680 
684  };
685  class FieldElement : public Element {
686  protected:
687  FieldElement(
688  const char * nam,
689  const char * attr,
690  ElementInSet elmt,
691  OptionalCRLF opt,
692  DisableCodes disabled
693  );
694  virtual void AddAttr(PHTML & html) const;
695  private:
696  bool m_disabledFlag;
697  };
698 
699  class Select : public FieldElement {
700  public:
701  Select(
702  const char * fname = NULL,
703  const char * attr = NULL
704  );
705  Select(
706  const char * fname,
707  DisableCodes disabled,
708  const char * attr = NULL
709  );
710  protected:
711  virtual void AddAttr(PHTML & html) const;
712  private:
713  PString m_nameString;
714  };
715 
719  };
720  class Option : public FieldElement {
721  public:
722  Option(
723  const char * attr = NULL
724  );
725  Option(
726  SelectionCodes select,
727  const char * attr = NULL
728  );
729  Option(
730  DisableCodes disabled,
731  const char * attr = NULL
732  );
733  Option(
734  SelectionCodes select,
735  DisableCodes disabled,
736  const char * attr = NULL
737  );
738  protected:
739  virtual void AddAttr(PHTML & html) const;
740  private:
741  bool m_selectedFlag;
742  };
743 
744  class FormField : public FieldElement {
745  protected:
746  FormField(
747  const char * nam,
748  const char * attr,
749  ElementInSet elmt,
750  OptionalCRLF opt,
751  DisableCodes disabled,
752  const char * fname
753  );
754  virtual void AddAttr(PHTML & html) const;
755  private:
756  PString m_nameString;
757  };
758 
759  class TextArea : public FormField {
760  public:
761  TextArea(
762  const char * fname,
763  DisableCodes disabled = Enabled,
764  const char * attr = NULL
765  );
766  TextArea(
767  const char * fname,
768  int rows, int cols,
769  DisableCodes disabled = Enabled,
770  const char * attr = NULL
771  );
772  protected:
773  virtual void AddAttr(PHTML & html) const;
774  private:
775  int m_numRows, m_numCols;
776  };
777 
778  class InputField : public FormField {
779  protected:
780  InputField(
781  const char * type,
782  const char * fname,
783  DisableCodes disabled,
784  const char * attr
785  );
786  virtual void AddAttr(PHTML & html) const;
787  private:
788  PString m_typeString;
789  };
790 
791  class HiddenField : public InputField {
792  public:
793  HiddenField(
794  const char * fname,
795  const char * value,
796  const char * attr = NULL
797  );
798  protected:
799  virtual void AddAttr(PHTML & html) const;
800  private:
801  PString m_valueString;
802  };
803 
804  class InputText : public InputField {
805  public:
806  InputText(
807  const char * fname,
808  int size,
809  const char * init = NULL,
810  const char * attr = NULL
811  );
812  InputText(
813  const char * fname,
814  int size,
815  DisableCodes disabled,
816  const char * attr = NULL
817  );
818  InputText(
819  const char * fname,
820  int size,
821  int maxLength,
822  DisableCodes disabled = Enabled,
823  const char * attr = NULL
824  );
825  InputText(
826  const char * fname,
827  int size,
828  const char * init,
829  int maxLength,
830  DisableCodes disabled = Enabled,
831  const char * attr = NULL
832  );
833  protected:
834  InputText(
835  const char * type,
836  const char * fname,
837  int size,
838  const char * init,
839  int maxLength,
840  DisableCodes disabled,
841  const char * attr
842  );
843  virtual void AddAttr(PHTML & html) const;
844  private:
845  PString m_value;
846  int m_width, m_length;
847  };
848 
849  class InputPassword : public InputText {
850  public:
852  const char * fname,
853  int size,
854  const char * init = NULL,
855  const char * attr = NULL
856  );
858  const char * fname,
859  int size,
860  DisableCodes disabled,
861  const char * attr = NULL
862  );
864  const char * fname,
865  int size,
866  int maxLength,
867  DisableCodes disabled = Enabled,
868  const char * attr = NULL
869  );
871  const char * fname,
872  int size,
873  const char * init,
874  int maxLength,
875  DisableCodes disabled = Enabled,
876  const char * attr = NULL
877  );
878  };
879 
883  };
884  class RadioButton : public InputField {
885  public:
886  RadioButton(
887  const char * fname,
888  const char * value,
889  const char * attr = NULL
890  );
891  RadioButton(
892  const char * fname,
893  const char * value,
894  DisableCodes disabled,
895  const char * attr = NULL
896  );
897  RadioButton(
898  const char * fname,
899  const char * value,
900  CheckedCodes check,
901  DisableCodes disabled = Enabled,
902  const char * attr = NULL
903  );
904  protected:
905  RadioButton(
906  const char * type,
907  const char * fname,
908  const char * value,
909  CheckedCodes check,
910  DisableCodes disabled,
911  const char * attr
912  );
913  virtual void AddAttr(PHTML & html) const;
914  private:
915  PString m_valueString;
916  bool m_checkedFlag;
917  };
918 
919  class CheckBox : public RadioButton {
920  public:
921  CheckBox(
922  const char * fname,
923  const char * attr = NULL
924  );
925  CheckBox(
926  const char * fname,
927  DisableCodes disabled,
928  const char * attr = NULL
929  );
930  CheckBox(
931  const char * fname,
932  CheckedCodes check,
933  DisableCodes disabled = Enabled,
934  const char * attr = NULL
935  );
936  };
937 
938 
939  class InputNumber : public InputField {
940  public:
941  InputNumber(
942  const char * fname,
943  int min, int max,
944  int value = 0,
945  DisableCodes disabled = Enabled,
946  const char * attr = NULL
947  );
948  protected:
949  InputNumber(
950  const char * type,
951  const char * fname,
952  int min, int max,
953  int value,
954  DisableCodes disabled,
955  const char * attr
956  );
957  virtual void AddAttr(PHTML & html) const;
958  private:
959  void Construct(int min, int max, int value);
960  int m_minValue, m_maxValue, m_initValue;
961  };
962 
963  class InputReal : public InputField {
964  public:
965  InputReal(
966  const char * fname,
967  double minimum, double maximum,
968  double value = 0,
969  int decimals = 2,
970  DisableCodes disabled = Enabled,
971  const char * attr = NULL
972  );
973  protected:
974  virtual void AddAttr(PHTML & html) const;
975  private:
976  double m_minValue, m_maxValue, m_initValue;
977  int m_decimals;
978  };
979 
980  class InputRange : public InputNumber {
981  public:
982  InputRange(
983  const char * fname,
984  int min, int max,
985  int value = 0,
986  DisableCodes disabled = Enabled,
987  const char * attr = NULL
988  );
989  };
990 
991  class InputFile : public InputField {
992  public:
993  InputFile(
994  const char * fname,
995  const char * accept = NULL,
996  DisableCodes disabled = Enabled,
997  const char * attr = NULL
998  );
999  protected:
1000  virtual void AddAttr(PHTML & html) const;
1001  private:
1002  PString m_acceptString;
1003  };
1004 
1005  class InputImage : public InputField {
1006  public:
1007  InputImage(
1008  const char * fname,
1009  const char * src = NULL,
1010  DisableCodes disabled = Enabled,
1011  const char * attr = NULL
1012  );
1013  protected:
1014  InputImage(
1015  const char * type,
1016  const char * fname,
1017  const char * src,
1018  DisableCodes disabled,
1019  const char * attr
1020  );
1021  virtual void AddAttr(PHTML & html) const;
1022  private:
1023  PString m_srcString;
1024  };
1025 
1026  class InputScribble : public InputImage {
1027  public:
1028  InputScribble(
1029  const char * fname,
1030  const char * src = NULL,
1031  DisableCodes disabled = Enabled,
1032  const char * attr = NULL
1033  );
1034  };
1035 
1036  class ResetButton : public InputImage {
1037  public:
1038  ResetButton(
1039  const char * title,
1040  const char * fname = NULL,
1041  const char * src = NULL,
1042  DisableCodes disabled = Enabled,
1043  const char * attr = NULL
1044  );
1045  protected:
1046  ResetButton(
1047  const char * type,
1048  const char * title,
1049  const char * fname = NULL,
1050  const char * src = NULL,
1051  DisableCodes disabled = Enabled,
1052  const char * attr = NULL
1053  );
1054  virtual void AddAttr(PHTML & html) const;
1055  private:
1056  PString m_titleString;
1057  };
1058 
1059  class SubmitButton : public ResetButton {
1060  public:
1061  SubmitButton(
1062  const char * title,
1063  const char * fname = NULL,
1064  const char * src = NULL,
1065  DisableCodes disabled = Enabled,
1066  const char * attr = NULL
1067  );
1068  };
1069 
1070 
1071  protected:
1072  virtual void AssignContents(const PContainer & c);
1073 
1074  private:
1075  ElementInSet m_initialElement;
1076  BYTE m_elementSet[NumElementsInSet/8+1];
1077  PINDEX m_tableNestLevel;
1078  PINDEX m_divisionNestLevel;
1079 };
1080 
1081 
1082 #endif // PTLIB_HTML_H
1083 
1084 
1085 // End Of File ///////////////////////////////////////////////////////////////
Definition: html.h:77
PHTML & operator=(char ch)
Definition: html.h:136
Definition: html.h:250
Definition: html.h:594
Definition: html.h:95
Subscript()
Definition: html.h:445
Definition: html.h:980
Definition: html.h:74
HiddenField(const char *fname, const char *value, const char *attr=NULL)
Definition: html.h:56
Definition: html.h:60
Definition: html.h:629
Code()
Definition: html.h:470
virtual void AddAttr(PHTML &html) const
StrikeThrough()
Definition: html.h:430
Credit(const char *attr=NULL)
Definition: html.h:607
Keyboard()
Definition: html.h:480
Definition: html.h:1026
TableAttr
Definition: html.h:585
Definition: html.h:71
OptionalCRLF
Definition: html.h:171
Definition: html.h:483
virtual void Output(PHTML &html) const
virtual void AddAttr(PHTML &html) const
__inline std::string::size_type size() const
Definition: pstring.h:1882
PHTML & operator=(const PString &str)
Definition: html.h:130
Definition: html.h:295
virtual void Output(PHTML &html) const
Definition: html.h:89
Definition: html.h:448
Definition: html.h:364
friend ostream & operator<<(ostream &strm, const Escaped &e)
Definition: html.h:154
Definition: html.h:100
Strong()
Definition: html.h:465
#define PCLASSINFO(cls, par)
Declare all the standard PTLib class information.
Definition: object.h:2164
SetTab(const char *id, const char *attr=NULL)
virtual void AddAttr(PHTML &html) const
Definition: html.h:203
Banner(const char *attr=NULL)
CheckBox(const char *fname, const char *attr=NULL)
Superscript()
Definition: html.h:450
Definition: html.h:717
friend ostream & operator<<(ostream &strm, const Element &elmt)
Definition: html.h:194
Definition: html.h:168
virtual void AddAttr(PHTML &html) const
Element(const char *nam, ElementInSet elmt=NumElementsInSet, ElementInSet req=InBody, OptionalCRLF opt=BothCRLF)
Cite()
Definition: html.h:460
InputReal(const char *fname, double minimum, double maximum, double value=0, int decimals=2, DisableCodes disabled=Enabled, const char *attr=NULL)
DefinitionList(const char *attr=NULL)
Definition: html.h:83
Definition: html.h:601
Definition: html.h:58
Definition: html.h:884
Definition: html.h:62
PBoolean Is(ElementInSet elmt) const
Definition: html.h:478
virtual void AddAttr(PHTML &html) const
BlockQuote(const char *attr=NULL)
virtual void AddAttr(PHTML &html) const
Italic()
Definition: html.h:415
ImageElement(const char *nam, const char *attr, ElementInSet elmt, ElementInSet req, OptionalCRLF opt, const char *image)
DivisionStart(const char *attr=NULL)
Definition: html.h:603
Option(const char *attr=NULL)
Definition: html.h:595
Definition: html.h:590
virtual void AddAttr(PHTML &html) const
Definition: html.h:57
Target(const char *name=NULL, const char *attr=NULL)
This class is a standard C++ stream class descendent for reading or writing streamed data to or from ...
Definition: pstring.h:2188
Definition: html.h:94
Definition: html.h:76
#define P_DECL_HTML_TABLE_CTOR(cls)
Definition: html.h:609
virtual void AddAttr(PHTML &html) const
Author()
Definition: html.h:500
Definition: html.h:73
Definition: html.h:589
Form(const char *method=NULL, const char *action=NULL, const char *encoding=NULL, const char *script=NULL, const char *attr=NULL)
Definition: html.h:101
virtual void Output(PHTML &html) const
SelectionCodes
Definition: html.h:716
InputPassword(const char *fname, int size, const char *init=NULL, const char *attr=NULL)
PString()
Construct an empty string.
virtual void AddAttr(PHTML &html) const
virtual void AddAttr(PHTML &html) const
Definition: html.h:410
Definition: html.h:333
Definition: html.h:602
Variable()
Definition: html.h:485
Definition: html.h:849
Definition: html.h:685
Definition: html.h:518
Definition: html.h:72
DisableCodes
Definition: html.h:681
Definition: html.h:99
Definition: html.h:198
Definition: html.h:86
virtual void AddAttr(PHTML &html) const
Definition: html.h:1005
Definition: html.h:228
Definition: html.h:53
Definition: html.h:588
HRule(const char *image=NULL, const char *attr=NULL)
Definition: html.h:647
static const PString & GetNonBreakSpace()
Select(const char *fname=NULL, const char *attr=NULL)
Definition: html.h:639
virtual void AddAttr(PHTML &html) const
Definition: html.h:398
Definition: html.h:88
virtual void AddAttr(PHTML &html) const
Definition: html.h:263
Definition: html.h:604
Definition: html.h:577
Definition: html.h:744
RadioButton(const char *fname, const char *value, const char *attr=NULL)
void Set(ElementInSet elmt)
Definition: html.h:324
Definition: html.h:433
Definition: html.h:468
Definition: html.h:1059
Address(const char *attr=NULL)
Definition: html.h:458
Definition: html.h:593
Definition: html.h:80
Definition: html.h:438
Definition: html.h:423
Big()
Definition: html.h:435
BreakLine(const char *attr=NULL)
void Toggle(ElementInSet elmt)
Definition: html.h:463
Definition: html.h:699
PreFormat(int widthInChars=0, const char *attr=NULL)
Definition: html.h:92
Definition: html.h:148
Definition: html.h:65
Definition: html.h:804
Definition: html.h:586
Definition: html.h:84
virtual void AddAttr(PHTML &html) const
Definition: html.h:389
InputNumber(const char *fname, int min, int max, int value=0, DisableCodes disabled=Enabled, const char *attr=NULL)
Paragraph(const char *attr=NULL)
InputText(const char *fname, int size, const char *init=NULL, const char *attr=NULL)
Definition: html.h:591
Definition: html.h:68
Definition: html.h:598
TeleType()
Definition: html.h:420
Person()
Definition: html.h:505
Definition: html.h:70
Definition: html.h:103
Definition: html.h:81
Definition: html.h:523
Definition: html.h:599
Definition: html.h:597
virtual void AssignContents(const PContainer &c)
Copy the container contents.
Heading(int number, int sequence=0, int skip=0, const char *attr=NULL)
Definition: html.h:881
Body(const char *attr=NULL)
virtual void AddAttr(PHTML &html) const
Definition: html.h:374
Definition: html.h:384
virtual ~Element()
Definition: html.h:170
Small()
Definition: html.h:440
Definition: html.h:605
void Clr(ElementInSet elmt)
Definition: html.h:171
Definition: html.h:508
Sample()
Definition: html.h:475
Definition: html.h:537
virtual void Output(PHTML &html) const
Definition: html.h:79
Definition: html.h:556
Definition: html.h:64
OrderedList(int seqNum=0, const char *attr=NULL)
Definition()
Definition: html.h:490
Abbrev()
Definition: html.h:515
Escaped(const char *str)
Definition: html.h:150
Acronym()
Definition: html.h:510
virtual void AddAttr(PHTML &html) const
Definition: html.h:488
Definition: html.h:300
Definition: html.h:570
Definition: html.h:759
Definition: html.h:102
Definition: html.h:652
bool PBoolean
Definition: object.h:174
Definition: html.h:542
Definition: html.h:617
Definition: html.h:718
PHTML(ElementInSet initialState=NumElementsInSet)
Construct a new HTML object.
Definition: html.h:59
Definition: html.h:963
Definition: html.h:75
virtual void AddAttr(PHTML &html) const
InsertedText()
Definition: html.h:520
Definition: html.h:530
virtual void Output(PHTML &html) const
virtual void AddAttr(PHTML &html) const
The character string class.
Definition: pstring.h:108
Definition: html.h:720
HTML(const char *attr=NULL)
Definition: html.h:270
Definition: html.h:791
Definition: html.h:98
Definition: html.h:85
Definition: html.h:97
Definition: html.h:210
SimpleList(const char *attr=NULL)
Underline()
Definition: html.h:425
Definition: html.h:55
Definition: html.h:503
ListHeading(const char *attr=NULL)
Emphasis()
Definition: html.h:455
Bold()
Definition: html.h:411
Definition: html.h:453
Definition: html.h:217
virtual void AddAttr(PHTML &html) const
Abstract class to embody the base functionality of a container.
Definition: contain.h:99
Definition: html.h:255
Definition: html.h:663
virtual void Output(PHTML &html) const
Definition: html.h:171
static PString Escape(const char *str)
Definition: html.h:305
InputField(const char *type, const char *fname, DisableCodes disabled, const char *attr)
Definition: html.h:69
FormField(const char *nam, const char *attr, ElementInSet elmt, OptionalCRLF opt, DisableCodes disabled, const char *fname)
Definition: html.h:551
Definition: html.h:939
Definition: html.h:369
virtual void Output(PHTML &html) const
This class describes a HyperText markup Language string as used by the World Wide Web and the PURL an...
Definition: html.h:45
Definition: html.h:93
Definition: html.h:54
TextArea(const char *fname, DisableCodes disabled=Enabled, const char *attr=NULL)
Definition: html.h:882
Definition: html.h:67
Quote()
Definition: html.h:495
virtual void AddAttr(PHTML &html) const
Definition: html.h:51
Definition: html.h:919
Definition: html.h:87
PString m_srcString
Definition: html.h:343
SubmitButton(const char *title, const char *fname=NULL, const char *src=NULL, DisableCodes disabled=Enabled, const char *attr=NULL)
Definition: html.h:606
Definition: html.h:428
Image(const char *src, int width=0, int height=0, const char *attr=NULL)
DefinitionTerm(const char *attr=NULL)
Definition: html.h:473
Definition: html.h:587
virtual void AddAttr(PHTML &html) const
Definition: html.h:498
virtual void AddAttr(PHTML &html) const
virtual void AddAttr(PHTML &html) const
FieldElement(const char *nam, const char *attr, ElementInSet elmt, OptionalCRLF opt, DisableCodes disabled)
Definition: html.h:90
Definition: html.h:683
Definition: html.h:82
Definition: html.h:171
InputFile(const char *fname, const char *accept=NULL, DisableCodes disabled=Enabled, const char *attr=NULL)
Definition: html.h:413
Definition: html.h:513
PHTML & operator=(const PHTML &html)
Restart the HTML string output using the specified value as the new title.
Definition: html.h:127
Definition: html.h:493
Definition: html.h:379
Definition: html.h:778
DeletedText()
Definition: html.h:525
DefinitionItem(const char *attr=NULL)
ResetButton(const char *title, const char *fname=NULL, const char *src=NULL, DisableCodes disabled=Enabled, const char *attr=NULL)
Definition: html.h:61
Definition: html.h:346
virtual void Output(PHTML &html) const
BulletList(const char *attr=NULL)
Definition: html.h:52
Definition: html.h:159
InputRange(const char *fname, int min, int max, int value=0, DisableCodes disabled=Enabled, const char *attr=NULL)
virtual void AddAttr(PHTML &html) const
Definition: html.h:682
virtual void Output(PHTML &html) const
TableElement(const char *nam, const char *att, ElementInSet elmt, ElementInSet req, OptionalCRLF opt)
Definition: html.h:619
virtual void AddAttr(PHTML &html) const
Definition: html.h:600
Definition: html.h:171
CheckedCodes
Definition: html.h:880
Definition: html.h:78
InputScribble(const char *fname, const char *src=NULL, DisableCodes disabled=Enabled, const char *attr=NULL)
friend ostream & operator<<(ostream &strm, const NonBreakSpace &e)
Definition: html.h:165
Definition: html.h:91
Tab(int indent, const char *attr=NULL)
Note(const char *image=NULL, const char *attr=NULL)
Definition: html.h:96
Definition: html.h:443
virtual void Output(PHTML &html) const
virtual void Output(PHTML &html) const
Definition: html.h:1036
Definition: html.h:596
virtual void Output(PHTML &html) const
Definition: html.h:592
ElementInSet
Definition: html.h:50
virtual void AddAttr(PHTML &html) const
Definition: html.h:991
Definition: html.h:418
Definition: html.h:657
virtual void AddAttr(PHTML &html) const
Definition: html.h:66
NonBreakSpace(unsigned count=1)
Definition: html.h:161
Definition: html.h:63
PHTML & operator=(const char *cstr)
Definition: html.h:133
InputImage(const char *fname, const char *src=NULL, DisableCodes disabled=Enabled, const char *attr=NULL)
Definition: html.h:104
Definition: html.h:561
ListItem(int skip=0, const char *attr=NULL)
virtual void AddAttr(PHTML &html) const