/usr/include/wxSVG/CSSStyleDeclaration.h is in libwxsvg-dev 2:1.2~dfsg0-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 | //////////////////////////////////////////////////////////////////////////////
// Name: CSSStyleDeclaration.h
// Author: Alex Thuering
// Copyright: (c) 2005 Alex Thuering
// Licence: wxWindows licence
// Notes: generated by genCSS.py
//////////////////////////////////////////////////////////////////////////////
#ifndef WX_CSS_STYLE_DECLARATION_H
#define WX_CSS_STYLE_DECLARATION_H
#include "CSSValue.h"
#include "SVGPaint.h"
#include <wx/hashmap.h>
enum wxCSS_PROPERTY
{
wxCSS_PROPERTY_UNKNOWN,
wxCSS_PROPERTY_ALIGNMENT_BASELINE,
wxCSS_PROPERTY_BASELINE_SHIFT,
wxCSS_PROPERTY_CLIP,
wxCSS_PROPERTY_CLIP_PATH,
wxCSS_PROPERTY_CLIP_RULE,
wxCSS_PROPERTY_COLOR,
wxCSS_PROPERTY_COLOR_INTERPOLATION,
wxCSS_PROPERTY_COLOR_INTERPOLATION_FILTERS,
wxCSS_PROPERTY_COLOR_PROFILE,
wxCSS_PROPERTY_COLOR_RENDERING,
wxCSS_PROPERTY_CURSOR,
wxCSS_PROPERTY_DIRECTION,
wxCSS_PROPERTY_DISPLAY,
wxCSS_PROPERTY_DOMINANT_BASELINE,
wxCSS_PROPERTY_ENABLE_BACKGROUND,
wxCSS_PROPERTY_FILL,
wxCSS_PROPERTY_FILL_OPACITY,
wxCSS_PROPERTY_FILL_RULE,
wxCSS_PROPERTY_FILTER,
wxCSS_PROPERTY_FLOOD_COLOR,
wxCSS_PROPERTY_FLOOD_OPACITY,
wxCSS_PROPERTY_FONT_FAMILY,
wxCSS_PROPERTY_FONT_SIZE,
wxCSS_PROPERTY_FONT_SIZE_ADJUST,
wxCSS_PROPERTY_FONT_STRETCH,
wxCSS_PROPERTY_FONT_STYLE,
wxCSS_PROPERTY_FONT_VARIANT,
wxCSS_PROPERTY_FONT_WEIGHT,
wxCSS_PROPERTY_GLYPH_ORIENTATION_HORIZONTAL,
wxCSS_PROPERTY_GLYPH_ORIENTATION_VERTICAL,
wxCSS_PROPERTY_IMAGE_RENDERING,
wxCSS_PROPERTY_KERNING,
wxCSS_PROPERTY_LETTER_SPACING,
wxCSS_PROPERTY_LIGHTING_COLOR,
wxCSS_PROPERTY_MARKER_END,
wxCSS_PROPERTY_MARKER_MID,
wxCSS_PROPERTY_MARKER_START,
wxCSS_PROPERTY_MASK,
wxCSS_PROPERTY_OPACITY,
wxCSS_PROPERTY_OVERFLOW,
wxCSS_PROPERTY_POINTER_EVENTS,
wxCSS_PROPERTY_SHAPE_RENDERING,
wxCSS_PROPERTY_STOP_COLOR,
wxCSS_PROPERTY_STOP_OPACITY,
wxCSS_PROPERTY_STROKE,
wxCSS_PROPERTY_STROKE_DASHARRAY,
wxCSS_PROPERTY_STROKE_DASHOFFSET,
wxCSS_PROPERTY_STROKE_LINECAP,
wxCSS_PROPERTY_STROKE_LINEJOIN,
wxCSS_PROPERTY_STROKE_MITERLIMIT,
wxCSS_PROPERTY_STROKE_OPACITY,
wxCSS_PROPERTY_STROKE_WIDTH,
wxCSS_PROPERTY_TEXT_ANCHOR,
wxCSS_PROPERTY_TEXT_DECORATION,
wxCSS_PROPERTY_TEXT_RENDERING,
wxCSS_PROPERTY_UNICODE_BIDI,
wxCSS_PROPERTY_VISIBILITY,
wxCSS_PROPERTY_WORD_SPACING,
wxCSS_PROPERTY_WRITING_MODE
};
WX_DECLARE_HASH_MAP(wxCSS_PROPERTY, wxCSSValue*, wxIntegerHash, wxIntegerEqual, wxHashMapCSSValue);
typedef wxString wxCSSStyler;
class wxCSSStyleDeclaration: public wxHashMapCSSValue
{
public:
wxCSSStyleDeclaration() {}
wxCSSStyleDeclaration(const wxCSSStyleDeclaration& src) { Add(src); }
~wxCSSStyleDeclaration();
wxCSSStyleDeclaration& operator=(const wxCSSStyleDeclaration& src);
void Add(const wxCSSStyleDeclaration& style);
public:
wxString GetCSSText() const;
void SetCSSText(const wxString& text);
inline wxString GetPropertyValue(const wxString& propertyName) const
{ return GetPropertyValue(GetPropertyId(propertyName)); }
inline const wxCSSValue& GetPropertyCSSValue(const wxString& propertyName) const
{ return GetPropertyCSSValue(GetPropertyId(propertyName)); }
void SetProperty(const wxString& propertyName, const wxString& value)
{ SetProperty(GetPropertyId(propertyName), value); }
inline bool HasProperty(const wxString& propertyName) const
{ return HasProperty(GetPropertyId(propertyName)); }
inline wxString RemoveProperty(const wxString& propertyName)
{ return RemoveProperty(GetPropertyId(propertyName)); }
public:
inline wxString GetPropertyValue(wxCSS_PROPERTY propertyId) const
{ const_iterator it = find(propertyId); if (it != end()) return it->second->GetCSSText(); return wxT(""); }
inline const wxCSSValue& GetPropertyCSSValue(wxCSS_PROPERTY propertyId) const
{ const_iterator it = find(propertyId); if (it != end()) return *it->second; return *s_emptyCSSValue; }
void SetProperty(wxCSS_PROPERTY propertyId, const wxString& value);
inline bool HasProperty(wxCSS_PROPERTY propertyId) const { return find(propertyId) != end(); }
inline wxString RemoveProperty(wxCSS_PROPERTY propertyId) { erase(propertyId); return wxT(""); }
static wxCSS_PROPERTY GetPropertyId(const wxString& propertyName);
static wxString GetPropertyName(wxCSS_PROPERTY propertyId);
public:
inline wxCSS_VALUE GetAlignmentBaseline() const
{
const_iterator it = find(wxCSS_PROPERTY_ALIGNMENT_BASELINE);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_AUTO;
}
inline bool HasAlignmentBaseline() const { return HasProperty(wxCSS_PROPERTY_ALIGNMENT_BASELINE); }
inline void SetAlignmentBaseline(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_ALIGNMENT_BASELINE);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_ALIGNMENT_BASELINE] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetBaselineShift() const
{
const_iterator it = find(wxCSS_PROPERTY_BASELINE_SHIFT);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasBaselineShift() const { return HasProperty(wxCSS_PROPERTY_BASELINE_SHIFT); }
inline void SetBaselineShift(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_BASELINE_SHIFT);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_BASELINE_SHIFT] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetClip() const
{
const_iterator it = find(wxCSS_PROPERTY_CLIP);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasClip() const { return HasProperty(wxCSS_PROPERTY_CLIP); }
inline void SetClip(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_CLIP);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_CLIP] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetClipPath() const
{
const_iterator it = find(wxCSS_PROPERTY_CLIP_PATH);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasClipPath() const { return HasProperty(wxCSS_PROPERTY_CLIP_PATH); }
inline void SetClipPath(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_CLIP_PATH);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_CLIP_PATH] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetClipRule() const
{
const_iterator it = find(wxCSS_PROPERTY_CLIP_RULE);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_NONZERO;
}
inline bool HasClipRule() const { return HasProperty(wxCSS_PROPERTY_CLIP_RULE); }
inline void SetClipRule(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_CLIP_RULE);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_CLIP_RULE] = new wxCSSPrimitiveValue(value);
}
inline wxRGBColor GetColor() const
{
const_iterator it = find(wxCSS_PROPERTY_COLOR);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetRGBColorValue() : wxRGBColor();
}
inline bool HasColor() const { return HasProperty(wxCSS_PROPERTY_COLOR); }
inline void SetColor(const wxRGBColor& value)
{
iterator it = find(wxCSS_PROPERTY_COLOR);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetRGBColorValue(value);
else
(*this)[wxCSS_PROPERTY_COLOR] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetColorInterpolation() const
{
const_iterator it = find(wxCSS_PROPERTY_COLOR_INTERPOLATION);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_SRGB;
}
inline bool HasColorInterpolation() const { return HasProperty(wxCSS_PROPERTY_COLOR_INTERPOLATION); }
inline void SetColorInterpolation(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_COLOR_INTERPOLATION);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_COLOR_INTERPOLATION] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetColorInterpolationFilters() const
{
const_iterator it = find(wxCSS_PROPERTY_COLOR_INTERPOLATION_FILTERS);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_LINEARRGB;
}
inline bool HasColorInterpolationFilters() const { return HasProperty(wxCSS_PROPERTY_COLOR_INTERPOLATION_FILTERS); }
inline void SetColorInterpolationFilters(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_COLOR_INTERPOLATION_FILTERS);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_COLOR_INTERPOLATION_FILTERS] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetColorProfile() const
{
const_iterator it = find(wxCSS_PROPERTY_COLOR_PROFILE);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasColorProfile() const { return HasProperty(wxCSS_PROPERTY_COLOR_PROFILE); }
inline void SetColorProfile(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_COLOR_PROFILE);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_COLOR_PROFILE] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetColorRendering() const
{
const_iterator it = find(wxCSS_PROPERTY_COLOR_RENDERING);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_AUTO;
}
inline bool HasColorRendering() const { return HasProperty(wxCSS_PROPERTY_COLOR_RENDERING); }
inline void SetColorRendering(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_COLOR_RENDERING);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_COLOR_RENDERING] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetCursor() const
{
const_iterator it = find(wxCSS_PROPERTY_CURSOR);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasCursor() const { return HasProperty(wxCSS_PROPERTY_CURSOR); }
inline void SetCursor(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_CURSOR);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_CURSOR] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetDirection() const
{
const_iterator it = find(wxCSS_PROPERTY_DIRECTION);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_LTR;
}
inline bool HasDirection() const { return HasProperty(wxCSS_PROPERTY_DIRECTION); }
inline void SetDirection(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_DIRECTION);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_DIRECTION] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetDisplay() const
{
const_iterator it = find(wxCSS_PROPERTY_DISPLAY);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_INLINE;
}
inline bool HasDisplay() const { return HasProperty(wxCSS_PROPERTY_DISPLAY); }
inline void SetDisplay(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_DISPLAY);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_DISPLAY] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetDominantBaseline() const
{
const_iterator it = find(wxCSS_PROPERTY_DOMINANT_BASELINE);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_AUTO;
}
inline bool HasDominantBaseline() const { return HasProperty(wxCSS_PROPERTY_DOMINANT_BASELINE); }
inline void SetDominantBaseline(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_DOMINANT_BASELINE);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_DOMINANT_BASELINE] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetEnableBackground() const
{
const_iterator it = find(wxCSS_PROPERTY_ENABLE_BACKGROUND);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_ACCUMULATE;
}
inline bool HasEnableBackground() const { return HasProperty(wxCSS_PROPERTY_ENABLE_BACKGROUND); }
inline void SetEnableBackground(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_ENABLE_BACKGROUND);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_ENABLE_BACKGROUND] = new wxCSSPrimitiveValue(value);
}
inline const wxSVGPaint& GetFill() const
{
const_iterator it = find(wxCSS_PROPERTY_FILL);
return it != end() ? ((wxSVGPaint&)*it->second) : *s_blackSVGPaint;
}
inline bool HasFill() const { return HasProperty(wxCSS_PROPERTY_FILL); }
inline void SetFill(const wxSVGPaint& value)
{
iterator it = find(wxCSS_PROPERTY_FILL);
if (it != end())
{
delete it->second;
it->second = new wxSVGPaint(value);
}
else
(*this)[wxCSS_PROPERTY_FILL] = new wxSVGPaint(value);
}
inline double GetFillOpacity() const
{
const_iterator it = find(wxCSS_PROPERTY_FILL_OPACITY);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetFloatValue() : 1;
}
inline bool HasFillOpacity() const { return HasProperty(wxCSS_PROPERTY_FILL_OPACITY); }
inline void SetFillOpacity(double value)
{
iterator it = find(wxCSS_PROPERTY_FILL_OPACITY);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetFloatValue(wxCSS_NUMBER, value);
else
(*this)[wxCSS_PROPERTY_FILL_OPACITY] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetFillRule() const
{
const_iterator it = find(wxCSS_PROPERTY_FILL_RULE);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_NONZERO;
}
inline bool HasFillRule() const { return HasProperty(wxCSS_PROPERTY_FILL_RULE); }
inline void SetFillRule(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_FILL_RULE);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_FILL_RULE] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetFilter() const
{
const_iterator it = find(wxCSS_PROPERTY_FILTER);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasFilter() const { return HasProperty(wxCSS_PROPERTY_FILTER); }
inline void SetFilter(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_FILTER);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_FILTER] = new wxCSSPrimitiveValue(value);
}
inline const wxSVGColor& GetFloodColor() const
{
const_iterator it = find(wxCSS_PROPERTY_FLOOD_COLOR);
return it != end() ? ((wxSVGColor&)*it->second) : *s_emptySVGColor;
}
inline bool HasFloodColor() const { return HasProperty(wxCSS_PROPERTY_FLOOD_COLOR); }
inline void SetFloodColor(const wxSVGColor& value)
{
iterator it = find(wxCSS_PROPERTY_FLOOD_COLOR);
if (it != end())
{
delete it->second;
it->second = new wxSVGColor(value);
}
else
(*this)[wxCSS_PROPERTY_FLOOD_COLOR] = new wxSVGColor(value);
}
inline double GetFloodOpacity() const
{
const_iterator it = find(wxCSS_PROPERTY_FLOOD_OPACITY);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetFloatValue() : 1;
}
inline bool HasFloodOpacity() const { return HasProperty(wxCSS_PROPERTY_FLOOD_OPACITY); }
inline void SetFloodOpacity(double value)
{
iterator it = find(wxCSS_PROPERTY_FLOOD_OPACITY);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetFloatValue(wxCSS_NUMBER, value);
else
(*this)[wxCSS_PROPERTY_FLOOD_OPACITY] = new wxCSSPrimitiveValue(value);
}
inline wxString GetFontFamily() const
{
const_iterator it = find(wxCSS_PROPERTY_FONT_FAMILY);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetStringValue() : wxT("");
}
inline bool HasFontFamily() const { return HasProperty(wxCSS_PROPERTY_FONT_FAMILY); }
inline void SetFontFamily(const wxString& value)
{
iterator it = find(wxCSS_PROPERTY_FONT_FAMILY);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetStringValue(wxCSS_STRING, value);
else
(*this)[wxCSS_PROPERTY_FONT_FAMILY] = new wxCSSPrimitiveValue(value);
}
inline double GetFontSize() const
{
const_iterator it = find(wxCSS_PROPERTY_FONT_SIZE);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetFloatValue() : 20;
}
inline bool HasFontSize() const { return HasProperty(wxCSS_PROPERTY_FONT_SIZE); }
inline void SetFontSize(double value)
{
iterator it = find(wxCSS_PROPERTY_FONT_SIZE);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetFloatValue(wxCSS_NUMBER, value);
else
(*this)[wxCSS_PROPERTY_FONT_SIZE] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetFontSizeAdjust() const
{
const_iterator it = find(wxCSS_PROPERTY_FONT_SIZE_ADJUST);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasFontSizeAdjust() const { return HasProperty(wxCSS_PROPERTY_FONT_SIZE_ADJUST); }
inline void SetFontSizeAdjust(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_FONT_SIZE_ADJUST);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_FONT_SIZE_ADJUST] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetFontStretch() const
{
const_iterator it = find(wxCSS_PROPERTY_FONT_STRETCH);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_NORMAL;
}
inline bool HasFontStretch() const { return HasProperty(wxCSS_PROPERTY_FONT_STRETCH); }
inline void SetFontStretch(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_FONT_STRETCH);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_FONT_STRETCH] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetFontStyle() const
{
const_iterator it = find(wxCSS_PROPERTY_FONT_STYLE);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_NORMAL;
}
inline bool HasFontStyle() const { return HasProperty(wxCSS_PROPERTY_FONT_STYLE); }
inline void SetFontStyle(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_FONT_STYLE);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_FONT_STYLE] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetFontVariant() const
{
const_iterator it = find(wxCSS_PROPERTY_FONT_VARIANT);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_NORMAL;
}
inline bool HasFontVariant() const { return HasProperty(wxCSS_PROPERTY_FONT_VARIANT); }
inline void SetFontVariant(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_FONT_VARIANT);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_FONT_VARIANT] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetFontWeight() const
{
const_iterator it = find(wxCSS_PROPERTY_FONT_WEIGHT);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_NORMAL;
}
inline bool HasFontWeight() const { return HasProperty(wxCSS_PROPERTY_FONT_WEIGHT); }
inline void SetFontWeight(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_FONT_WEIGHT);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_FONT_WEIGHT] = new wxCSSPrimitiveValue(value);
}
inline double GetGlyphOrientationHorizontal() const
{
const_iterator it = find(wxCSS_PROPERTY_GLYPH_ORIENTATION_HORIZONTAL);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetFloatValue() : 0;
}
inline bool HasGlyphOrientationHorizontal() const { return HasProperty(wxCSS_PROPERTY_GLYPH_ORIENTATION_HORIZONTAL); }
inline void SetGlyphOrientationHorizontal(double value)
{
iterator it = find(wxCSS_PROPERTY_GLYPH_ORIENTATION_HORIZONTAL);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetFloatValue(wxCSS_NUMBER, value);
else
(*this)[wxCSS_PROPERTY_GLYPH_ORIENTATION_HORIZONTAL] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetGlyphOrientationVertical() const
{
const_iterator it = find(wxCSS_PROPERTY_GLYPH_ORIENTATION_VERTICAL);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasGlyphOrientationVertical() const { return HasProperty(wxCSS_PROPERTY_GLYPH_ORIENTATION_VERTICAL); }
inline void SetGlyphOrientationVertical(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_GLYPH_ORIENTATION_VERTICAL);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_GLYPH_ORIENTATION_VERTICAL] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetImageRendering() const
{
const_iterator it = find(wxCSS_PROPERTY_IMAGE_RENDERING);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_AUTO;
}
inline bool HasImageRendering() const { return HasProperty(wxCSS_PROPERTY_IMAGE_RENDERING); }
inline void SetImageRendering(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_IMAGE_RENDERING);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_IMAGE_RENDERING] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetKerning() const
{
const_iterator it = find(wxCSS_PROPERTY_KERNING);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasKerning() const { return HasProperty(wxCSS_PROPERTY_KERNING); }
inline void SetKerning(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_KERNING);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_KERNING] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetLetterSpacing() const
{
const_iterator it = find(wxCSS_PROPERTY_LETTER_SPACING);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasLetterSpacing() const { return HasProperty(wxCSS_PROPERTY_LETTER_SPACING); }
inline void SetLetterSpacing(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_LETTER_SPACING);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_LETTER_SPACING] = new wxCSSPrimitiveValue(value);
}
inline const wxSVGColor& GetLightingColor() const
{
const_iterator it = find(wxCSS_PROPERTY_LIGHTING_COLOR);
return it != end() ? ((wxSVGColor&)*it->second) : *s_emptySVGColor;
}
inline bool HasLightingColor() const { return HasProperty(wxCSS_PROPERTY_LIGHTING_COLOR); }
inline void SetLightingColor(const wxSVGColor& value)
{
iterator it = find(wxCSS_PROPERTY_LIGHTING_COLOR);
if (it != end())
{
delete it->second;
it->second = new wxSVGColor(value);
}
else
(*this)[wxCSS_PROPERTY_LIGHTING_COLOR] = new wxSVGColor(value);
}
inline const wxCSSPrimitiveValue& GetMarkerEnd() const
{
const_iterator it = find(wxCSS_PROPERTY_MARKER_END);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasMarkerEnd() const { return HasProperty(wxCSS_PROPERTY_MARKER_END); }
inline void SetMarkerEnd(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_MARKER_END);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_MARKER_END] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetMarkerMid() const
{
const_iterator it = find(wxCSS_PROPERTY_MARKER_MID);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasMarkerMid() const { return HasProperty(wxCSS_PROPERTY_MARKER_MID); }
inline void SetMarkerMid(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_MARKER_MID);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_MARKER_MID] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetMarkerStart() const
{
const_iterator it = find(wxCSS_PROPERTY_MARKER_START);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasMarkerStart() const { return HasProperty(wxCSS_PROPERTY_MARKER_START); }
inline void SetMarkerStart(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_MARKER_START);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_MARKER_START] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetMask() const
{
const_iterator it = find(wxCSS_PROPERTY_MASK);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasMask() const { return HasProperty(wxCSS_PROPERTY_MASK); }
inline void SetMask(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_MASK);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_MASK] = new wxCSSPrimitiveValue(value);
}
inline double GetOpacity() const
{
const_iterator it = find(wxCSS_PROPERTY_OPACITY);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetFloatValue() : 1;
}
inline bool HasOpacity() const { return HasProperty(wxCSS_PROPERTY_OPACITY); }
inline void SetOpacity(double value)
{
iterator it = find(wxCSS_PROPERTY_OPACITY);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetFloatValue(wxCSS_NUMBER, value);
else
(*this)[wxCSS_PROPERTY_OPACITY] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetOverflow() const
{
const_iterator it = find(wxCSS_PROPERTY_OVERFLOW);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_AUTO;
}
inline bool HasOverflow() const { return HasProperty(wxCSS_PROPERTY_OVERFLOW); }
inline void SetOverflow(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_OVERFLOW);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_OVERFLOW] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetPointerEvents() const
{
const_iterator it = find(wxCSS_PROPERTY_POINTER_EVENTS);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_VISIBLEPAINTED;
}
inline bool HasPointerEvents() const { return HasProperty(wxCSS_PROPERTY_POINTER_EVENTS); }
inline void SetPointerEvents(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_POINTER_EVENTS);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_POINTER_EVENTS] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetShapeRendering() const
{
const_iterator it = find(wxCSS_PROPERTY_SHAPE_RENDERING);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_AUTO;
}
inline bool HasShapeRendering() const { return HasProperty(wxCSS_PROPERTY_SHAPE_RENDERING); }
inline void SetShapeRendering(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_SHAPE_RENDERING);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_SHAPE_RENDERING] = new wxCSSPrimitiveValue(value);
}
inline const wxSVGColor& GetStopColor() const
{
const_iterator it = find(wxCSS_PROPERTY_STOP_COLOR);
return it != end() ? ((wxSVGColor&)*it->second) : *s_emptySVGColor;
}
inline bool HasStopColor() const { return HasProperty(wxCSS_PROPERTY_STOP_COLOR); }
inline void SetStopColor(const wxSVGColor& value)
{
iterator it = find(wxCSS_PROPERTY_STOP_COLOR);
if (it != end())
{
delete it->second;
it->second = new wxSVGColor(value);
}
else
(*this)[wxCSS_PROPERTY_STOP_COLOR] = new wxSVGColor(value);
}
inline double GetStopOpacity() const
{
const_iterator it = find(wxCSS_PROPERTY_STOP_OPACITY);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetFloatValue() : 1;
}
inline bool HasStopOpacity() const { return HasProperty(wxCSS_PROPERTY_STOP_OPACITY); }
inline void SetStopOpacity(double value)
{
iterator it = find(wxCSS_PROPERTY_STOP_OPACITY);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetFloatValue(wxCSS_NUMBER, value);
else
(*this)[wxCSS_PROPERTY_STOP_OPACITY] = new wxCSSPrimitiveValue(value);
}
inline const wxSVGPaint& GetStroke() const
{
const_iterator it = find(wxCSS_PROPERTY_STROKE);
return it != end() ? ((wxSVGPaint&)*it->second) : *s_emptySVGPaint;
}
inline bool HasStroke() const { return HasProperty(wxCSS_PROPERTY_STROKE); }
inline void SetStroke(const wxSVGPaint& value)
{
iterator it = find(wxCSS_PROPERTY_STROKE);
if (it != end())
{
delete it->second;
it->second = new wxSVGPaint(value);
}
else
(*this)[wxCSS_PROPERTY_STROKE] = new wxSVGPaint(value);
}
inline const wxCSSPrimitiveValue& GetStrokeDasharray() const
{
const_iterator it = find(wxCSS_PROPERTY_STROKE_DASHARRAY);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasStrokeDasharray() const { return HasProperty(wxCSS_PROPERTY_STROKE_DASHARRAY); }
inline void SetStrokeDasharray(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_STROKE_DASHARRAY);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_STROKE_DASHARRAY] = new wxCSSPrimitiveValue(value);
}
inline double GetStrokeDashoffset() const
{
const_iterator it = find(wxCSS_PROPERTY_STROKE_DASHOFFSET);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetFloatValue() : 0;
}
inline bool HasStrokeDashoffset() const { return HasProperty(wxCSS_PROPERTY_STROKE_DASHOFFSET); }
inline void SetStrokeDashoffset(double value)
{
iterator it = find(wxCSS_PROPERTY_STROKE_DASHOFFSET);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetFloatValue(wxCSS_NUMBER, value);
else
(*this)[wxCSS_PROPERTY_STROKE_DASHOFFSET] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetStrokeLinecap() const
{
const_iterator it = find(wxCSS_PROPERTY_STROKE_LINECAP);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_BUTT;
}
inline bool HasStrokeLinecap() const { return HasProperty(wxCSS_PROPERTY_STROKE_LINECAP); }
inline void SetStrokeLinecap(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_STROKE_LINECAP);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_STROKE_LINECAP] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetStrokeLinejoin() const
{
const_iterator it = find(wxCSS_PROPERTY_STROKE_LINEJOIN);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_MITER;
}
inline bool HasStrokeLinejoin() const { return HasProperty(wxCSS_PROPERTY_STROKE_LINEJOIN); }
inline void SetStrokeLinejoin(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_STROKE_LINEJOIN);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_STROKE_LINEJOIN] = new wxCSSPrimitiveValue(value);
}
inline double GetStrokeMiterlimit() const
{
const_iterator it = find(wxCSS_PROPERTY_STROKE_MITERLIMIT);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetFloatValue() : 4;
}
inline bool HasStrokeMiterlimit() const { return HasProperty(wxCSS_PROPERTY_STROKE_MITERLIMIT); }
inline void SetStrokeMiterlimit(double value)
{
iterator it = find(wxCSS_PROPERTY_STROKE_MITERLIMIT);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetFloatValue(wxCSS_NUMBER, value);
else
(*this)[wxCSS_PROPERTY_STROKE_MITERLIMIT] = new wxCSSPrimitiveValue(value);
}
inline double GetStrokeOpacity() const
{
const_iterator it = find(wxCSS_PROPERTY_STROKE_OPACITY);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetFloatValue() : 1;
}
inline bool HasStrokeOpacity() const { return HasProperty(wxCSS_PROPERTY_STROKE_OPACITY); }
inline void SetStrokeOpacity(double value)
{
iterator it = find(wxCSS_PROPERTY_STROKE_OPACITY);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetFloatValue(wxCSS_NUMBER, value);
else
(*this)[wxCSS_PROPERTY_STROKE_OPACITY] = new wxCSSPrimitiveValue(value);
}
inline double GetStrokeWidth() const
{
const_iterator it = find(wxCSS_PROPERTY_STROKE_WIDTH);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetFloatValue() : 1;
}
inline bool HasStrokeWidth() const { return HasProperty(wxCSS_PROPERTY_STROKE_WIDTH); }
inline void SetStrokeWidth(double value)
{
iterator it = find(wxCSS_PROPERTY_STROKE_WIDTH);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetFloatValue(wxCSS_NUMBER, value);
else
(*this)[wxCSS_PROPERTY_STROKE_WIDTH] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetTextAnchor() const
{
const_iterator it = find(wxCSS_PROPERTY_TEXT_ANCHOR);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_START;
}
inline bool HasTextAnchor() const { return HasProperty(wxCSS_PROPERTY_TEXT_ANCHOR); }
inline void SetTextAnchor(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_TEXT_ANCHOR);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_TEXT_ANCHOR] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetTextDecoration() const
{
const_iterator it = find(wxCSS_PROPERTY_TEXT_DECORATION);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_NONE;
}
inline bool HasTextDecoration() const { return HasProperty(wxCSS_PROPERTY_TEXT_DECORATION); }
inline void SetTextDecoration(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_TEXT_DECORATION);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_TEXT_DECORATION] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetTextRendering() const
{
const_iterator it = find(wxCSS_PROPERTY_TEXT_RENDERING);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_AUTO;
}
inline bool HasTextRendering() const { return HasProperty(wxCSS_PROPERTY_TEXT_RENDERING); }
inline void SetTextRendering(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_TEXT_RENDERING);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_TEXT_RENDERING] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetUnicodeBidi() const
{
const_iterator it = find(wxCSS_PROPERTY_UNICODE_BIDI);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_NORMAL;
}
inline bool HasUnicodeBidi() const { return HasProperty(wxCSS_PROPERTY_UNICODE_BIDI); }
inline void SetUnicodeBidi(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_UNICODE_BIDI);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_UNICODE_BIDI] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetVisibility() const
{
const_iterator it = find(wxCSS_PROPERTY_VISIBILITY);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_VISIBLE;
}
inline bool HasVisibility() const { return HasProperty(wxCSS_PROPERTY_VISIBILITY); }
inline void SetVisibility(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_VISIBILITY);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_VISIBILITY] = new wxCSSPrimitiveValue(value);
}
inline const wxCSSPrimitiveValue& GetWordSpacing() const
{
const_iterator it = find(wxCSS_PROPERTY_WORD_SPACING);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second) : *s_emptyCSSValue;
}
inline bool HasWordSpacing() const { return HasProperty(wxCSS_PROPERTY_WORD_SPACING); }
inline void SetWordSpacing(const wxCSSPrimitiveValue& value)
{
iterator it = find(wxCSS_PROPERTY_WORD_SPACING);
if (it != end())
{
delete it->second;
it->second = new wxCSSPrimitiveValue(value);
}
else
(*this)[wxCSS_PROPERTY_WORD_SPACING] = new wxCSSPrimitiveValue(value);
}
inline wxCSS_VALUE GetWritingMode() const
{
const_iterator it = find(wxCSS_PROPERTY_WRITING_MODE);
return it != end() ? ((wxCSSPrimitiveValue&)*it->second).GetIdentValue() : wxCSS_VALUE_LR_TB;
}
inline bool HasWritingMode() const { return HasProperty(wxCSS_PROPERTY_WRITING_MODE); }
inline void SetWritingMode(wxCSS_VALUE value)
{
iterator it = find(wxCSS_PROPERTY_WRITING_MODE);
if (it != end())
((wxCSSPrimitiveValue*)it->second)->SetIdentValue(value);
else
(*this)[wxCSS_PROPERTY_WRITING_MODE] = new wxCSSPrimitiveValue(value);
}
protected:
static wxCSSPrimitiveValue* s_emptyCSSValue;
static wxSVGColor* s_emptySVGColor;
static wxSVGPaint* s_emptySVGPaint;
static wxSVGPaint* s_blackSVGPaint;
static double ParseNumber(const wxString& value);
static wxRGBColor ParseColor(const wxString& value);
static void ParseSVGPaint(wxSVGPaint& paint, const wxString& value);
};
/* this class copy only references of css values */
class wxCSSStyleRef: public wxCSSStyleDeclaration
{
public:
wxCSSStyleRef() {}
wxCSSStyleRef(const wxCSSStyleDeclaration& src) { Add(src); }
~wxCSSStyleRef();
void Add(const wxCSSStyleDeclaration& style);
};
#endif // WX_CSS_STYLE_DECLARATION_H
|