📄 html.hpp
字号:
CHTML_basefont* SetTypeFace(const string& typeface);};class NCBI_XHTML_EXPORT CHTML_color : public CHTML_font{ typedef CHTML_font CParent;public: CHTML_color(const string& color, CNCBINode* node = 0); CHTML_color(const string& color, const string& text); ~CHTML_color(void);};// <hr> tag.class NCBI_XHTML_EXPORT CHTML_hr : public CHTMLOpenElement{ typedef CHTMLOpenElement CParent; static const char sm_TagName[];public: CHTML_hr(bool noShade = false); CHTML_hr(int size, bool noShade = false); CHTML_hr(int size, int width, bool noShade = false); CHTML_hr(int size, const string& width, bool noShade = false); ~CHTML_hr(void); CHTML_hr* SetNoShade(void); CHTML_hr* SetNoShade(bool noShade); virtual CNcbiOstream& PrintBegin(CNcbiOstream &, TMode mode);};// <meta> tag.class NCBI_XHTML_EXPORT CHTML_meta : public CHTMLOpenElement{ typedef CHTMLOpenElement CParent; static const char sm_TagName[];public: enum EType { eName, eHttpEquiv }; CHTML_meta(EType mtype, const string& var, const string& content); ~CHTML_meta(void);};// <scrpt> tag.class NCBI_XHTML_EXPORT CHTML_script : public CHTMLElement{ typedef CHTMLElement CParent; static const char sm_TagName[];public: CHTML_script(const string& stype); CHTML_script(const string& stype, const string& url); ~CHTML_script(void); CHTML_script* AppendScript(const string& script);};// Other tags (default implementation).DECLARE_HTML_ELEMENT( head, CHTMLElement);DECLARE_HTML_ELEMENT( body, CHTMLElement);DECLARE_HTML_ELEMENT( base, CHTMLElement);DECLARE_HTML_ELEMENT( isindex, CHTMLOpenElement);DECLARE_HTML_ELEMENT( link, CHTMLOpenElement);DECLARE_HTML_ELEMENT( noscript, CHTMLElement);DECLARE_HTML_ELEMENT( object, CHTMLElement);DECLARE_HTML_ELEMENT( style, CHTMLElement);DECLARE_HTML_ELEMENT( title, CHTMLElement);DECLARE_HTML_ELEMENT( address, CHTMLElement);DECLARE_HTML_ELEMENT( blockquote, CHTMLBlockElement);DECLARE_HTML_ELEMENT( center, CHTMLElement);DECLARE_HTML_ELEMENT( div, CHTMLBlockElement);DECLARE_HTML_ELEMENT( h1, CHTMLBlockElement);DECLARE_HTML_ELEMENT( h2, CHTMLBlockElement);DECLARE_HTML_ELEMENT( h3, CHTMLBlockElement);DECLARE_HTML_ELEMENT( h4, CHTMLBlockElement);DECLARE_HTML_ELEMENT( h5, CHTMLBlockElement);DECLARE_HTML_ELEMENT( h6, CHTMLBlockElement);DECLARE_HTML_ELEMENT( p, CHTMLBlockElement);DECLARE_HTML_ELEMENT( pnop, CHTMLOpenElement);DECLARE_HTML_ELEMENT( pre, CHTMLBlockElement);DECLARE_HTML_ELEMENT( dt, CHTMLElement);DECLARE_HTML_ELEMENT( dd, CHTMLElement);DECLARE_HTML_ELEMENT( li, CHTMLBlockElement);DECLARE_HTML_ELEMENT( caption, CHTMLElement);DECLARE_HTML_ELEMENT( col, CHTMLElement);DECLARE_HTML_ELEMENT( colgroup, CHTMLElement);DECLARE_HTML_ELEMENT( thead, CHTMLElement);DECLARE_HTML_ELEMENT( tbody, CHTMLElement);DECLARE_HTML_ELEMENT( tfoot, CHTMLElement);DECLARE_HTML_ELEMENT( th, CHTML_tc);DECLARE_HTML_ELEMENT( td, CHTML_tc);DECLARE_HTML_ELEMENT( applet, CHTMLElement);DECLARE_HTML_ELEMENT( param, CHTMLOpenElement);DECLARE_HTML_ELEMENT( cite, CHTMLInlineElement);DECLARE_HTML_ELEMENT( code, CHTMLInlineElement);DECLARE_HTML_ELEMENT( dfn, CHTMLElement);DECLARE_HTML_ELEMENT( em, CHTMLInlineElement);DECLARE_HTML_ELEMENT( kbd, CHTMLInlineElement);DECLARE_HTML_ELEMENT( samp, CHTMLElement);DECLARE_HTML_ELEMENT( strike, CHTMLInlineElement);DECLARE_HTML_ELEMENT( strong, CHTMLInlineElement);DECLARE_HTML_ELEMENT( var, CHTMLInlineElement);DECLARE_HTML_ELEMENT( b, CHTMLInlineElement);DECLARE_HTML_ELEMENT( big, CHTMLInlineElement);DECLARE_HTML_ELEMENT( i, CHTMLInlineElement);DECLARE_HTML_ELEMENT( s, CHTMLInlineElement);DECLARE_HTML_ELEMENT( small, CHTMLInlineElement);DECLARE_HTML_ELEMENT( sub, CHTMLInlineElement);DECLARE_HTML_ELEMENT( sup, CHTMLInlineElement);DECLARE_HTML_ELEMENT( tt, CHTMLInlineElement);DECLARE_HTML_ELEMENT( u, CHTMLInlineElement);DECLARE_HTML_ELEMENT( blink, CHTMLInlineElement);DECLARE_HTML_ELEMENT( span, CHTMLInlineElement);DECLARE_HTML_ELEMENT( map, CHTMLElement);DECLARE_HTML_ELEMENT( area, CHTMLElement);DECLARE_HTML_SPECIAL_CHAR( nbsp, " ");DECLARE_HTML_SPECIAL_CHAR( gt, ">");DECLARE_HTML_SPECIAL_CHAR( lt, "<");DECLARE_HTML_SPECIAL_CHAR( quot, "\"");DECLARE_HTML_SPECIAL_CHAR( amp, "&");DECLARE_HTML_SPECIAL_CHAR( copy, "(c)");DECLARE_HTML_SPECIAL_CHAR( reg, "(r)");#include <html/html.inl>END_NCBI_SCOPE/* @} *//* * =========================================================================== * $Log: html.hpp,v $ * Revision 1000.5 2004/06/01 19:15:12 gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.75 * * Revision 1.75 2004/04/05 15:50:49 ivanov * Cosmetic changes * * Revision 1.74 2004/04/01 14:14:01 lavr * Spell "occurred", "occurrence", and "occurring" * * Revision 1.73 2004/02/03 19:45:41 ivanov * Binded dummy names for the unnamed nodes * * Revision 1.72 2004/02/02 14:08:06 ivanov * Added export specifier to the macro for declare HTML classes * * Revision 1.71 2004/01/26 16:26:42 ivanov * Added NOWRAP attribute support * * Revision 1.70 2003/12/31 19:00:45 ivanov * Added default constructor for CHTML_a * * Revision 1.69 2003/12/02 14:18:52 ivanov * AttachPopupMenu() comment changes * * Revision 1.68 2003/11/05 18:41:06 dicuccio * Added export specifiers * * Revision 1.67 2003/11/03 17:02:53 ivanov * Some formal code rearrangement. Move log to end. * * Revision 1.66 2003/11/03 14:47:39 ivanov * Some formal code rearrangement * * Revision 1.65 2003/10/01 15:54:31 ivanov * Added comments for AttachPopupMenu * * Revision 1.64 2003/04/25 13:45:26 siyan * Added doxygen groupings * * Revision 1.63 2003/02/14 16:18:29 ucko * Override CHTMLListItem::PrintChildren (so we can indent them in text * mode); make <li> a block element for proper text display. * * Revision 1.62 2002/12/24 14:56:20 ivanov * Fix for R1.76: HTML classes for tags <h1-6>, <p>, <div>. <pre>, <blockquote> * now inherits from CHTMLBlockElement (not CHTMElement as before) * * Revision 1.61 2002/12/20 19:19:30 ivanov * Added SPAN tag support * * Revision 1.60 2002/12/09 22:12:25 ivanov * Added support for Sergey Kurdin's popup menu. * Added CHTMLNode::AttachPopupMenu(). * * Revision 1.59 2002/09/25 01:24:29 dicuccio * Added CHTMLHelper::StripTags() - strips HTML comments and tags from any * string * * Revision 1.58 2002/02/13 20:17:06 ivanov * Added support of dynamic popup menus. Changed EnablePopupMenu(). * * Revision 1.57 2002/01/29 20:00:18 ivanov * (plain text) CHTML_table:: set def. medium sep. to " " instead of "\t" * * Revision 1.56 2002/01/28 17:56:43 vakatov * (plain text) CHTML_table:: set def. medium sep. to "\t" instead of "\t|\t" * * Revision 1.55 2002/01/17 23:39:35 ivanov * Added means to print HTML tables in plain text mode * * Revision 1.54 2001/08/14 16:51:33 ivanov * Change mean for init JavaScript popup menu & add it to HTML document. * Remove early redefined classes for tags HEAD and BODY. * * Revision 1.53 2001/07/16 19:45:22 ivanov * Changed default value for JS menu lib path in CHTML_html::InitPopupMenus(). * * Revision 1.52 2001/07/16 13:54:42 ivanov * Added support JavaScript popups menu (jsmenu.[ch]pp) * * Revision 1.51 2001/06/08 19:01:41 ivanov * Added base classes: CHTMLDualNode, CHTMLSpecialChar * (and based on it: CHTML_nbsp, _gt, _lt, _quot, _amp, _copy, _reg) * Added realization for tags <meta> (CHTML_meta) and <script> (CHTML_script) * Changed base class for tags LINK, PARAM, ISINDEX -> CHTMLOpenElement * Added tags: OBJECT, NOSCRIPT * Added attribute "alt" for CHTML_img * Added CHTMLComment::Print() for disable print html-comments in plaintext mode * * Revision 1.50 2001/06/05 15:36:10 ivanov * Added attribute "alt" to CHTML_image * * Revision 1.49 2001/05/17 14:55:24 lavr * Typos corrected * * Revision 1.48 2000/10/18 13:25:46 vasilche * Added missing constructors to CHTML_font. * * Revision 1.47 2000/09/27 14:11:10 vasilche * Newline '\n' will not be generated after tags LABEL, A, FONT, CITE, CODE, EM, * KBD, STRIKE STRONG, VAR, B, BIG, I, S, SMALL, SUB, SUP, TT, U and BLINK. * * Revision 1.46 2000/08/15 19:40:16 vasilche * Added CHTML_label::SetFor() method for setting HTML attribute FOR. * * Revision 1.45 2000/07/25 15:26:00 vasilche * Added newline symbols before table and after each table row in text mode. * * Revision 1.44 2000/07/18 19:08:48 vasilche * Fixed uninitialized members. * Fixed NextCell to advance to next cell. * * Revision 1.43 2000/07/18 17:21:34 vasilche * Added possibility to force output of empty attribute value. * Added caching to CHTML_table, now large tables work much faster. * Changed algorithm of emitting EOL symbols in html output. * * Revision 1.42 2000/07/12 16:37:37 vasilche * Added new HTML4 tags: LABEL, BUTTON, FIELDSET, LEGEND. * Added methods for setting common attributes: STYLE, ID, TITLE, ACCESSKEY. * * Revision 1.41 1999/12/28 21:01:03 vasilche * Fixed conflict on MS VC between bool and const string& arguments by * adding const char* argument. * * Revision 1.40 1999/12/28 18:55:28 vasilche * Reduced size of compiled object files: * 1. avoid inline or implicit virtual methods (especially destructors). * 2. avoid std::string's methods usage in inline methods. * 3. avoid string literals ("xxx") in inline methods. * * Revision 1.39 1999/10/29 18:28:53 vakatov * [MSVC] bool vs. const string& arg confusion * * Revision 1.38 1999/10/28 13:40:29 vasilche * Added reference counters to CNCBINode. * * Revision 1.37 1999/08/20 16:14:36 golikov * 'non-<TR> tag' bug fixed * * Revision 1.36 1999/05/28 18:04:05 vakatov * CHTMLNode:: added attribute "CLASS" * * Revision 1.35 1999/05/20 16:49:11 pubmed * Changes for SaveAsText: all Print() methods get mode parameter that can be * HTML or PlainText * * Revision 1.34 1999/05/10 17:01:11 vasilche * Fixed warning on Sun by renaming CHTML_font::SetSize() -> SetFontSize(). * * Revision 1.33 1999/05/10 14:26:09 vakatov * Fixes to compile and link with the "egcs" C++ compiler under Linux * * Revision 1.32 1999/04/27 14:49:57 vasilche * Added FastCGI interface. * CNcbiContext renamed to CCgiContext. * * Revision 1.31 1999/04/22 14:20:10 vasilche * Now CHTML_select::AppendOption and CHTML_option constructor accept option * name always as first argument. * * Revision 1.30 1999/04/15 22:05:16 vakatov * Include NCBI C++ headers before the standard ones * * Revision 1.29 1999/04/15 19:48:16 vasilche * Fixed several warnings detected by GCC * * Revision 1.28 1999/04/08 19:00:24 vasilche * Added current cell pointer to CHTML_table * * Revision 1.27 1999/03/01 21:03:27 vasilche * Added CHTML_file input element. * Changed CHTML_form constructors. * * Revision 1.26 1999/02/26 21:03:30 vasilche * CAsnWriteNode made simple node. Use CHTML_pre explicitly. * Fixed bug in CHTML_table::Row. * Added CHTML_table::HeaderCell & DataCell methods. * * Revision 1.25 1999/02/02 17:57:46 vasilche * Added CHTML_table::Row(int row). * Linkbar now have equal image spacing. * * Revision 1.24 1999/01/28 21:58:05 vasilche * QueryBox now inherits from CHTML_table (not CHTML_form as before). * Use 'new CHTML_form("url", queryBox)' as replacement of old QueryBox. * * Revision 1.23 1999/01/28 16:58:58 vasilche * Added several constructors for CHTML_hr. * Added CHTMLNode::SetSize method. * * Revision 1.22 1999/01/25 19:34:14 vasilche * String arguments which are added as HTML text now treated as plain text. * * Revision 1.21 1999/01/21 21:12:54 vasilche * Added/used descriptions for HTML submit/select/text. * Fixed some bugs in paging. * * Revision 1.20 1999/01/14 21:25:16 vasilche * Changed CPageList to work via form image input elements. * * Revision 1.19 1999/01/11 22:05:48 vasilche * Fixed CHTML_font size. * Added CHTML_image input element. * * Revision 1.18 1999/01/11 15:13:32 vasilche * Fixed CHTML_font size. * CHTMLHelper extracted to separate file. * * Revision 1.17 1999/01/07 16:41:53 vasilche * CHTMLHelper moved to separate file. * TagNames of CHTML classes ara available via s_GetTagName() static * method. * Input tag types ara available via s_GetInputType() static method. * Initial selected database added to CQueryBox. * Background colors added to CPagerBax & CSmallPagerBox. * * Revision 1.16 1999/01/05 21:47:10 vasilche * Added 'current page' to CPageList. * CPageList doesn't display forward/backward if empty. * * Revision 1.15 1999/01/04 20:06:09 vasilche * Redesigned CHTML_table. * Added selection support to HTML forms (via hidden values). * * Revision 1.13 1998/12/28 21:48:12 vasilche * Made Lewis's 'tool' compilable * * Revision 1.12 1998/12/28 16:48:05 vasilche * Removed creation of QueryBox in CHTMLPage::CreateView() * CQueryBox extends from CHTML_form * CButtonList, CPageList, CPagerBox, CSmallPagerBox extend from CNCBINode. * * Revision 1.11 1998/12/24 16:15:36 vasilche * Added CHTMLComment class. * Added TagMappers from static functions. * * Revision 1.10 1998/12/23 21:20:56 vasilche * Added more HTML tags (almost all). * Importent ones: all lists (OL, UL, DIR, MENU), fonts (FONT, BASEFONT). * * Revision 1.9 1998/12/23 14:28:07 vasilche * Most of closed HTML tags made via template. * * Revision 1.8 1998/12/21 22:24:56 vasilche * A lot of cleaning. * * Revision 1.7 1998/12/09 23:02:55 lewisg * update to new cgiapp class * * Revision 1.6 1998/12/08 00:34:55 lewisg * cleanup * * Revision 1.5 1998/12/03 22:49:10 lewisg * added HTMLEncode() and CHTML_img * * Revision 1.4 1998/12/01 19:09:05 lewisg * uses CCgiApplication and new page factory * =========================================================================== */#endif /* HTML___HTML__HPP */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -