home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / layout / laystyle.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  5.7 KB  |  181 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #ifndef LAYSTYLE_H
  20. #define LAYSTYLE_H
  21.  
  22. #define ALLOW_NEG_MARGINS
  23. /* #undef ALLOW_NEG_MARGINS */
  24.  
  25. /* prefix for the implicit id's needed for style attributes */
  26. #define NSIMPLICITID "nsImplicitID"
  27. #define NS_STYLE_NAME_ATTR "ns_ss_name"
  28.  
  29. #define STYLE_NEED_TO_POP_TABLE         "POP_TABLE"
  30. #define STYLE_NEED_TO_POP_LIST             "POP_LIST"
  31. #define STYLE_NEED_TO_POP_MARGINS        "POP_MARGINS"
  32. #define STYLE_NEED_TO_POP_FONT             "POP_FONT"
  33. #define STYLE_NEED_TO_POP_PRE             "POP_PRE"
  34. #define STYLE_NEED_TO_POP_ALIGNMENT     "POP_ALIGNMENT"
  35. #define STYLE_NEED_TO_POP_LINE_HEIGHT     "POP_LINE_HEIGHT"
  36. #define STYLE_NEED_TO_POP_LAYER     "POP_LAYER"
  37. #define STYLE_NEED_TO_POP_CONTENT_HIDING     "POP_HIDE_CONTENT"
  38.  
  39. #define STYLE_NEED_TO_RESET_PRE "RESET_PRE"
  40.  
  41. #define FONTSIZE_STYLE            "fontSize"
  42. #define FONTFACE_STYLE            "fontFamily"
  43. #define FONTWEIGHT_STYLE        "fontWeight"
  44.  
  45. #define FONTSTYLE_STYLE            "fontStyle"
  46. #define NORMAL_STYLE            "normal"
  47. #define ITALIC_STYLE            "italic"
  48. #define OBLIQUE_STYLE            "oblique"
  49.  
  50. /* color and background properties */
  51. #define COLOR_STYLE                "color"
  52. #define BG_COLOR_STYLE             "backgroundColor"
  53. #define BG_IMAGE_STYLE             "backgroundImage"
  54. #define BG_REPEAT_STYLE            "backgroundRepeat"
  55. #define BG_REPEAT_ALL_STYLE        "repeat"
  56. #define BG_REPEAT_X_STYLE        "repeat-x"
  57. #define BG_REPEAT_Y_STYLE        "repeat-y"
  58. #define BG_REPEAT_NONE_STYLE        "no-repeat"
  59.  
  60. /* text properties */
  61. #define TEXTDECORATION_STYLE    "textDecoration"
  62. #define VERTICAL_ALIGN_STYLE    "verticalAlign"
  63. #define TEXT_TRANSFORM_STYLE    "textTransform"
  64. #define TEXT_ALIGN_STYLE        "textAlign"
  65. #define TEXTINDENT_STYLE        "textIndent"
  66. #define LINE_HEIGHT_STYLE        "lineHeight"
  67.  
  68. #define BLINK_STYLE             "blink"
  69. #define UNDERLINE_STYLE         "underline"
  70. #define OVERLINE_STYLE          "overline"
  71. #define STRIKEOUT_STYLE          "line-through"
  72.  
  73.  
  74. /* box properties */
  75. #define BORDERWIDTH_STYLE        "borderWidth"
  76. #define BORDER_STYLE_STYLE        "borderStyle"
  77. #define BORDER_COLOR_STYLE        "borderColor"
  78. #define BORDERRIGHTWIDTH_STYLE    "borderRightWidth"
  79. #define BORDERLEFTWIDTH_STYLE    "borderLeftWidth"
  80. #define BORDERTOPWIDTH_STYLE    "borderTopWidth"
  81. #define BORDERBOTTOMWIDTH_STYLE    "borderBottomWidth"
  82.  
  83. #define LEFTMARGIN_STYLE        "marginLeft"
  84. #define RIGHTMARGIN_STYLE        "marginRight"
  85. #define TOPMARGIN_STYLE            "marginTop"
  86. #define BOTTOMMARGIN_STYLE        "marginBottom"
  87.  
  88. #define PADDING_STYLE            "padding"
  89. #define LEFTPADDING_STYLE        "paddingLeft"
  90. #define RIGHTPADDING_STYLE        "paddingRight"
  91. #define TOPPADDING_STYLE        "paddingTop"
  92. #define BOTTOMPADDING_STYLE        "paddingBottom"
  93.  
  94. #define WIDTH_STYLE            "width"
  95. #define LAYER_WIDTH_STYLE               "_layer_width" /* Bogus style used for layer widths */
  96. #define HEIGHT_STYLE            "height"
  97.  
  98. #define HORIZONTAL_ALIGN_STYLE    "align"   /* css float property */
  99. #define CLEAR_STYLE                "clear"
  100.  
  101. #define PAGE_BREAK_BEFORE_STYLE    "pageBreakBefore"
  102. #define PAGE_BREAK_AFTER_STYLE    "pageBreakAfter"
  103.  
  104. /* classification properties */
  105. #define DISPLAY_STYLE            "display"
  106. #define BLOCK_STYLE            "block"
  107. #define INLINE_STYLE            "inline"
  108. #define NONE_STYLE            "none"
  109. #define LIST_ITEM_STYLE            "list-item"
  110.  
  111. #define LIST_STYLE_TYPE_STYLE        "listStyleType"
  112. #define WHITESPACE_STYLE        "whiteSpace"
  113.  
  114. /* layer styles */
  115. #define POSITION_STYLE            "position"
  116. #define ABSOLUTE_STYLE            "absolute"
  117. #define RELATIVE_STYLE            "relative"
  118. #define TOP_STYLE                "top"
  119. #define LEFT_STYLE                "left"
  120. #define CLIP_STYLE                "clip"
  121. #define ZINDEX_STYLE            "zIndex"
  122. #define VISIBILITY_STYLE        "visibility"
  123. #define OVERFLOW_STYLE            "overflow"
  124. #define LAYER_SRC_STYLE            "includeSource"
  125. #define LAYER_BG_COLOR_STYLE    "layerBackgroundColor"
  126. #define LAYER_BG_IMAGE_STYLE    "layerBackgroundImage"
  127.  
  128. /* link color styles */
  129. #define LINK_COLOR        "linkColor"
  130. #define VISITED_COLOR        "visitedColor"
  131. #define ACTIVE_COLOR        "activeColor"
  132. #define LINK_BORDER        "linkBorder"
  133.  
  134. XP_BEGIN_PROTOS
  135.  
  136. extern int32
  137. LO_GetWidthFromStyleSheet(MWContext *context, lo_DocState *state);
  138.  
  139. extern int32
  140. LO_GetHeightFromStyleSheet(MWContext *context, lo_DocState *state);
  141.  
  142. extern PushTagStatus
  143. LO_PushTagOnStyleStack(MWContext *context, lo_DocState *state, PA_Tag *tag);
  144.  
  145. extern void
  146. LO_PopStyleTag(MWContext *context, lo_DocState **state, PA_Tag *tag);
  147.  
  148. extern void
  149. LO_PopStyleTagByIndex(MWContext *context, lo_DocState **state, TagType tag_type, int32 index);
  150.  
  151. extern XP_Bool
  152. LO_PopAllTagsAbove(MWContext *context, 
  153.                    lo_DocState **state, 
  154.                    TagType tag_type, 
  155.                    TagType not_below_this,
  156.                    TagType or_this,
  157.                    TagType or_this_either);
  158.  
  159. extern XP_Bool
  160. LO_ImplicitPop(MWContext *context, lo_DocState **state, PA_Tag *tag);
  161.  
  162. extern XP_Bool
  163. LO_CheckForContentHiding(lo_DocState *state);
  164.  
  165. extern void
  166. LO_AdjustSSUnits(SS_Number *number, char *style_type, MWContext *context, lo_DocState *state);
  167.  
  168. extern PA_Tag *
  169. LO_CreateStyleSheetDummyTag(PA_Tag *old_tag);
  170.  
  171. extern XP_Bool
  172. LO_StyleSheetsEnabled(MWContext *context);
  173.  
  174. /* function body is in laytags.c */
  175. extern int
  176. lo_list_bullet_type(char *type_string, TagType tag_type);
  177.  
  178. XP_END_PROTOS
  179.  
  180. #endif /* LAYSTYLE_H */
  181.