Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #pragma once
00030
00031 #include "../css_box_property.h"
00032 #include "../css_box_length.h"
00033
00034 class CL_CSSBoxBackgroundSize : public CL_CSSBoxProperty
00035 {
00036 public:
00037 CL_CSSBoxBackgroundSize();
00038 void compute(const CL_CSSBoxBackgroundSize *parent, CL_CSSResourceCache *layout, float em_size, float ex_size);
00039 CL_String to_string() const;
00040
00041 enum Type
00042 {
00043 type_value,
00044 type_inherit
00045 } type;
00046
00047 enum SizeType
00048 {
00049 size_contain,
00050 size_cover,
00051 size_values,
00052 };
00053
00054 enum ValueType
00055 {
00056 value_type_auto,
00057 value_type_length,
00058 value_type_percentage
00059 };
00060
00061 class Size
00062 {
00063 public:
00064 Size() : type(size_values), value_x(value_type_auto), value_y(value_type_auto), percentage_x(0.0f), percentage_y(0.0f) { }
00065
00066 SizeType type;
00067 ValueType value_x, value_y;
00068 CL_CSSBoxLength length_x;
00069 float percentage_x;
00070 CL_CSSBoxLength length_y;
00071 float percentage_y;
00072 };
00073
00074 std::vector<Size> values;
00075 };