| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 PartInnerSpinButton, | 64 PartInnerSpinButton, |
| 65 PartProgressBar | 65 PartProgressBar |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 // The current state of the associated Part. | 68 // The current state of the associated Part. |
| 69 enum State { | 69 enum State { |
| 70 StateDisabled, | 70 StateDisabled, |
| 71 StateHover, | 71 StateHover, |
| 72 StateNormal, | 72 StateNormal, |
| 73 StatePressed, | 73 StatePressed, |
| 74 StateFocused, |
| 75 StateReadonly, |
| 74 }; | 76 }; |
| 75 | 77 |
| 76 // Extra parameters for drawing the PartScrollbarHorizontalTrack and | 78 // Extra parameters for drawing the PartScrollbarHorizontalTrack and |
| 77 // PartScrollbarVerticalTrack. | 79 // PartScrollbarVerticalTrack. |
| 78 struct ScrollbarTrackExtraParams { | 80 struct ScrollbarTrackExtraParams { |
| 81 bool isBack; // Whether this is the 'back' part or the 'forward' part. |
| 82 |
| 79 // The bounds of the entire track, as opposed to the part being painted. | 83 // The bounds of the entire track, as opposed to the part being painted. |
| 80 int trackX; | 84 int trackX; |
| 81 int trackY; | 85 int trackY; |
| 82 int trackWidth; | 86 int trackWidth; |
| 83 int trackHeight; | 87 int trackHeight; |
| 84 }; | 88 }; |
| 85 | 89 |
| 86 // Extra parameters for PartCheckbox, PartPushButton and PartRadio. | 90 // Extra parameters for PartCheckbox, PartPushButton and PartRadio. |
| 87 struct ButtonExtraParams { | 91 struct ButtonExtraParams { |
| 88 bool checked; | 92 bool checked; |
| 89 bool indeterminate; // Whether the button state is indeterminate. | 93 bool indeterminate; // Whether the button state is indeterminate. |
| 90 bool isDefault; // Whether the button is default button. | 94 bool isDefault; // Whether the button is default button. |
| 91 bool hasBorder; | 95 bool hasBorder; |
| 92 WebColor backgroundColor; | 96 WebColor backgroundColor; |
| 93 }; | 97 }; |
| 94 | 98 |
| 95 // Extra parameters for PartTextField | 99 // Extra parameters for PartTextField |
| 96 struct TextFieldExtraParams { | 100 struct TextFieldExtraParams { |
| 97 bool isTextArea; | 101 bool isTextArea; |
| 98 bool isListbox; | 102 bool isListbox; |
| 99 WebColor backgroundColor; | 103 WebColor backgroundColor; |
| 100 }; | 104 }; |
| 101 | 105 |
| 102 // Extra parameters for PartMenuList | 106 // Extra parameters for PartMenuList |
| 103 struct MenuListExtraParams { | 107 struct MenuListExtraParams { |
| 104 bool hasBorder; | 108 bool hasBorder; |
| 105 bool hasBorderRadius; | 109 bool hasBorderRadius; |
| 106 int arrowX; | 110 int arrowX; |
| 107 int arrowY; | 111 int arrowY; |
| 112 int arrowHeight; |
| 108 WebColor backgroundColor; | 113 WebColor backgroundColor; |
| 114 bool fillContentArea; |
| 109 }; | 115 }; |
| 110 | 116 |
| 111 // Extra parameters for PartSliderTrack and PartSliderThumb | 117 // Extra parameters for PartSliderTrack and PartSliderThumb |
| 112 struct SliderExtraParams { | 118 struct SliderExtraParams { |
| 113 bool vertical; | 119 bool vertical; |
| 114 bool inDrag; | 120 bool inDrag; |
| 115 }; | 121 }; |
| 116 | 122 |
| 117 // Extra parameters for PartInnerSpinButton | 123 // Extra parameters for PartInnerSpinButton |
| 118 struct InnerSpinButtonExtraParams { | 124 struct InnerSpinButtonExtraParams { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 143 // like vertical scrollbar thumbs, the width will be the required width of | 149 // like vertical scrollbar thumbs, the width will be the required width of |
| 144 // the track while the height will be the minimum height. | 150 // the track while the height will be the minimum height. |
| 145 virtual WebSize getSize(Part) { return WebSize(); } | 151 virtual WebSize getSize(Part) { return WebSize(); } |
| 146 // Paint the given the given theme part. | 152 // Paint the given the given theme part. |
| 147 virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParam
s*) { } | 153 virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParam
s*) { } |
| 148 }; | 154 }; |
| 149 | 155 |
| 150 } // namespace blink | 156 } // namespace blink |
| 151 | 157 |
| 152 #endif | 158 #endif |
| OLD | NEW |