css_box_properties.h

Go to the documentation of this file.
00001 /*
00002 **  ClanLib SDK
00003 **  Copyright (c) 1997-2011 The ClanLib Team
00004 **
00005 **  This software is provided 'as-is', without any express or implied
00006 **  warranty.  In no event will the authors be held liable for any damages
00007 **  arising from the use of this software.
00008 **
00009 **  Permission is granted to anyone to use this software for any purpose,
00010 **  including commercial applications, and to alter it and redistribute it
00011 **  freely, subject to the following restrictions:
00012 **
00013 **  1. The origin of this software must not be misrepresented; you must not
00014 **     claim that you wrote the original software. If you use this software
00015 **     in a product, an acknowledgment in the product documentation would be
00016 **     appreciated but is not required.
00017 **  2. Altered source versions must be plainly marked as such, and must not be
00018 **     misrepresented as being the original software.
00019 **  3. This notice may not be removed or altered from any source distribution.
00020 **
00021 **  Note: Some of the libraries ClanLib may link to may have additional
00022 **  requirements or restrictions.
00023 **
00024 **  File Author(s):
00025 **
00026 **    Magnus Norddahl
00027 */
00028 
00029 #pragma once
00030 
00031 #include "PropertyTypes/css_box_background_attachment.h"
00032 #include "PropertyTypes/css_box_background_color.h"
00033 #include "PropertyTypes/css_box_background_image.h"
00034 #include "PropertyTypes/css_box_background_position.h"
00035 #include "PropertyTypes/css_box_background_repeat.h"
00036 #include "PropertyTypes/css_box_background_origin.h"
00037 #include "PropertyTypes/css_box_background_clip.h"
00038 #include "PropertyTypes/css_box_background_size.h"
00039 #include "PropertyTypes/css_box_border_collapse.h"
00040 #include "PropertyTypes/css_box_border_color.h"
00041 #include "PropertyTypes/css_box_border_spacing.h"
00042 #include "PropertyTypes/css_box_border_style.h"
00043 #include "PropertyTypes/css_box_border_width.h"
00044 #include "PropertyTypes/css_box_border_radius.h"
00045 #include "PropertyTypes/css_box_border_image_source.h"
00046 #include "PropertyTypes/css_box_border_image_slice.h"
00047 #include "PropertyTypes/css_box_border_image_width.h"
00048 #include "PropertyTypes/css_box_border_image_outset.h"
00049 #include "PropertyTypes/css_box_border_image_repeat.h"
00050 #include "PropertyTypes/css_box_decoration_break.h"
00051 #include "PropertyTypes/css_box_shadow.h"
00052 #include "PropertyTypes/css_box_bottom.h"
00053 #include "PropertyTypes/css_box_caption_side.h"
00054 #include "PropertyTypes/css_box_clear.h"
00055 #include "PropertyTypes/css_box_clip.h"
00056 #include "PropertyTypes/css_box_color.h"
00057 #include "PropertyTypes/css_box_counter_increment.h"
00058 #include "PropertyTypes/css_box_counter_reset.h"
00059 #include "PropertyTypes/css_box_content.h"
00060 #include "PropertyTypes/css_box_cursor.h"
00061 #include "PropertyTypes/css_box_direction.h"
00062 #include "PropertyTypes/css_box_display.h"
00063 #include "PropertyTypes/css_box_empty_cells.h"
00064 #include "PropertyTypes/css_box_float.h"
00065 #include "PropertyTypes/css_box_font_family.h"
00066 #include "PropertyTypes/css_box_font_size.h"
00067 #include "PropertyTypes/css_box_font_style.h"
00068 #include "PropertyTypes/css_box_font_variant.h"
00069 #include "PropertyTypes/css_box_font_weight.h"
00070 #include "PropertyTypes/css_box_height.h"
00071 #include "PropertyTypes/css_box_left.h"
00072 #include "PropertyTypes/css_box_letter_spacing.h"
00073 #include "PropertyTypes/css_box_line_height.h"
00074 #include "PropertyTypes/css_box_list_style_image.h"
00075 #include "PropertyTypes/css_box_list_style_position.h"
00076 #include "PropertyTypes/css_box_list_style_type.h"
00077 #include "PropertyTypes/css_box_margin_width.h"
00078 #include "PropertyTypes/css_box_max_height.h"
00079 #include "PropertyTypes/css_box_max_width.h"
00080 #include "PropertyTypes/css_box_min_height.h"
00081 #include "PropertyTypes/css_box_min_width.h"
00082 #include "PropertyTypes/css_box_orphans.h"
00083 #include "PropertyTypes/css_box_outline_color.h"
00084 #include "PropertyTypes/css_box_outline_style.h"
00085 #include "PropertyTypes/css_box_outline_width.h"
00086 #include "PropertyTypes/css_box_overflow.h"
00087 #include "PropertyTypes/css_box_padding_width.h"
00088 #include "PropertyTypes/css_box_page_break_after.h"
00089 #include "PropertyTypes/css_box_page_break_before.h"
00090 #include "PropertyTypes/css_box_page_break_inside.h"
00091 #include "PropertyTypes/css_box_position.h"
00092 #include "PropertyTypes/css_box_quotes.h"
00093 #include "PropertyTypes/css_box_right.h"
00094 #include "PropertyTypes/css_box_table_layout.h"
00095 #include "PropertyTypes/css_box_text_align.h"
00096 #include "PropertyTypes/css_box_text_decoration.h"
00097 #include "PropertyTypes/css_box_text_indent.h"
00098 #include "PropertyTypes/css_box_text_transform.h"
00099 #include "PropertyTypes/css_box_top.h"
00100 #include "PropertyTypes/css_box_unicode_bidi.h"
00101 #include "PropertyTypes/css_box_vertical_align.h"
00102 #include "PropertyTypes/css_box_visibility.h"
00103 #include "PropertyTypes/css_box_white_space.h"
00104 #include "PropertyTypes/css_box_widows.h"
00105 #include "PropertyTypes/css_box_width.h"
00106 #include "PropertyTypes/css_box_word_spacing.h"
00107 #include "PropertyTypes/css_box_z_index.h"
00108 
00109 class CL_CSSPropertyList2;
00110 
00111 class CL_CSSBoxProperties
00112 {
00113 public:
00114         CL_CSSBoxDisplay display;
00115         CL_CSSBoxWhiteSpace white_space;
00116 
00117         CL_CSSBoxMarginWidth margin_width_left;
00118         CL_CSSBoxMarginWidth margin_width_top;
00119         CL_CSSBoxMarginWidth margin_width_right;
00120         CL_CSSBoxMarginWidth margin_width_bottom;
00121 
00122         CL_CSSBoxBorderColor border_color_left;
00123         CL_CSSBoxBorderColor border_color_top;
00124         CL_CSSBoxBorderColor border_color_right;
00125         CL_CSSBoxBorderColor border_color_bottom;
00126 
00127         CL_CSSBoxBorderStyle border_style_left;
00128         CL_CSSBoxBorderStyle border_style_top;
00129         CL_CSSBoxBorderStyle border_style_right;
00130         CL_CSSBoxBorderStyle border_style_bottom;
00131 
00132         CL_CSSBoxBorderWidth border_width_left;
00133         CL_CSSBoxBorderWidth border_width_top;
00134         CL_CSSBoxBorderWidth border_width_right;
00135         CL_CSSBoxBorderWidth border_width_bottom;
00136 
00137         CL_CSSBoxBorderRadius border_radius_top_right;
00138         CL_CSSBoxBorderRadius border_radius_bottom_right;
00139         CL_CSSBoxBorderRadius border_radius_bottom_left;
00140         CL_CSSBoxBorderRadius border_radius_top_left;
00141 
00142         CL_CSSBoxBorderImageSource border_image_source;
00143         CL_CSSBoxBorderImageSlice border_image_slice;
00144         CL_CSSBoxBorderImageWidth border_image_width;
00145         CL_CSSBoxBorderImageOutset border_image_outset;
00146         CL_CSSBoxBorderImageRepeat border_image_repeat;
00147 
00148         CL_CSSBoxDecorationBreak decoration_break;
00149         CL_CSSBoxShadow shadow;
00150 
00151         CL_CSSBoxBackgroundAttachment background_attachment;
00152         CL_CSSBoxBackgroundColor background_color;
00153         CL_CSSBoxBackgroundImage background_image;
00154         CL_CSSBoxBackgroundPosition background_position;
00155         CL_CSSBoxBackgroundRepeat background_repeat;
00156         CL_CSSBoxBackgroundOrigin background_origin;
00157         CL_CSSBoxBackgroundClip background_clip;
00158         CL_CSSBoxBackgroundSize background_size;
00159 
00160         CL_CSSBoxPaddingWidth padding_width_left;
00161         CL_CSSBoxPaddingWidth padding_width_top;
00162         CL_CSSBoxPaddingWidth padding_width_right;
00163         CL_CSSBoxPaddingWidth padding_width_bottom;
00164 
00165         CL_CSSBoxWidth width;
00166         CL_CSSBoxHeight height;
00167         CL_CSSBoxMaxWidth max_width;
00168         CL_CSSBoxMaxHeight max_height;
00169         CL_CSSBoxMinWidth min_width;
00170         CL_CSSBoxMinHeight min_height;
00171 
00172         CL_CSSBoxPosition position;
00173         CL_CSSBoxZIndex z_index;
00174         CL_CSSBoxLeft left;
00175         CL_CSSBoxTop top;
00176         CL_CSSBoxRight right;
00177         CL_CSSBoxBottom bottom;
00178         CL_CSSBoxFloat float_box;
00179         CL_CSSBoxClear clear;
00180         CL_CSSBoxClip clip;
00181         CL_CSSBoxOverflow overflow;
00182         CL_CSSBoxVisibility visibility;
00183 
00184         CL_CSSBoxCounterIncrement counter_increment;
00185         CL_CSSBoxCounterReset counter_reset;
00186 
00187         CL_CSSBoxCursor cursor;
00188         CL_CSSBoxOutlineColor outline_color;
00189         CL_CSSBoxOutlineStyle outline_style;
00190         CL_CSSBoxOutlineWidth outline_width;
00191 
00192         CL_CSSBoxContent content;
00193 
00194         CL_CSSBoxColor color;
00195         CL_CSSBoxTextDecoration text_decoration;
00196         CL_CSSBoxTextIndent text_indent;
00197         CL_CSSBoxTextTransform text_transform;
00198         CL_CSSBoxTextAlign text_align;
00199         CL_CSSBoxFontFamily font_family;
00200         CL_CSSBoxFontSize font_size;
00201         CL_CSSBoxFontStyle font_style;
00202         CL_CSSBoxFontVariant font_variant;
00203         CL_CSSBoxFontWeight font_weight;
00204         CL_CSSBoxLetterSpacing letter_spacing;
00205         CL_CSSBoxWordSpacing word_spacing;
00206         CL_CSSBoxLineHeight line_height;
00207         CL_CSSBoxQuotes quotes;
00208         CL_CSSBoxDirection direction;
00209         CL_CSSBoxUnicodeBidi unicode_bidi;
00210 
00211         CL_CSSBoxOrphans orphans;
00212         CL_CSSBoxWidows widows;
00213         CL_CSSBoxPageBreakBefore page_break_before;
00214         CL_CSSBoxPageBreakAfter page_break_after;
00215         CL_CSSBoxPageBreakInside page_break_inside;
00216 
00217         CL_CSSBoxListStyleType list_style_type;
00218         CL_CSSBoxListStylePosition list_style_position;
00219         CL_CSSBoxListStyleImage list_style_image;
00220 
00221         CL_CSSBoxTableLayout table_layout;
00222         CL_CSSBoxCaptionSide caption_side;
00223         CL_CSSBoxBorderCollapse border_collapse;
00224         CL_CSSBoxBorderSpacing border_spacing;
00225         CL_CSSBoxVerticalAlign vertical_align;
00226         CL_CSSBoxEmptyCells empty_cells;
00227 
00228         void apply_properties(const CL_String &style_string, std::map<CL_String, CL_CSSBoxProperty *> *out_change_set = 0);
00229         void apply_properties(const CL_CSSPropertyList2 &css_properties, std::map<CL_String, CL_CSSBoxProperty *> *out_change_set = 0);
00230 
00231         void compute(const CL_CSSBoxProperties *parent, CL_CSSResourceCache *layout);
00232 };