OSDN Git Service

web/css/attr_text.hpp: text_decoration対応
authorMyun2 <myun2@nwhite.info>
Thu, 30 Dec 2010 07:21:27 +0000 (16:21 +0900)
committerMyun2 <myun2@nwhite.info>
Thu, 30 Dec 2010 07:21:27 +0000 (16:21 +0900)
roast/include/roast/web/css/attr_text.hpp
roast/test/lexical_test/css_test.cpp

index 61cda87..6ee06e0 100644 (file)
@@ -404,10 +404,21 @@ namespace roast
                        };
                        typedef text_align_<_true_analyze> text_align;
 
+                       //      text_decoration
+                       template <typename _Value, // none | [ underline || overline || line-through || blink ] | inherit
+                               typename _Value2=empty_type, typename _Value3=empty_type, typename _Value4=empty_type>
+                       struct text_decoration_ : _values<_attrname_str::text_decoration, _Value,_Value2,_Value3,_Value4>
+                       {
+                               ROAST_CSS_STR_DEF(none)
+                               ROAST_CSS_STR_DEF(underline)
+                               ROAST_CSS_STR_DEF(overline)
+                               ROAST_LEXICAL_FIXSTR(line_through, "line-through")
+                               ROAST_CSS_STR_DEF(blink)
+                               ROAST_CSS_STR_DEF(inherit)
+                       };
+                       typedef text_decoration_<_true_analyze> text_decoration;
+                       
                        /*
-                               ROAST_LEXICAL_FIXSTR(text_decoration,           "text-decoration")
-                                       none | [ underline || overline || line-through || blink ] | inherit
-                               
                                ROAST_LEXICAL_FIXSTR(letter_spacing,            "letter-spacing")
                                Value:          normal | <length> | inherit
                                
index 7c72ffa..d2a051e 100644 (file)
@@ -37,7 +37,8 @@ int main()
        //color_<colorval_per<33,44,66> > a;
        //border_color_<border_color::threedshadow> a;
        //line_height_<hoge> a;
-       vertical_align_<vertical_align::bottom> a;
+       //vertical_align_<vertical_align::bottom> a;
+       text_decoration_<text_decoration::line_through, text_decoration::overline> a;
        //padding_px_<10,20,30,8> a;
        //color_<0xFF88DA>
        //top_<chex_string<0xFF88DA> > a;