Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: sky/engine/public/platform/WebThemeEngine.h

Issue 653993007: Remove straggling bits of listboxes. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 PartScrollbarHorizontalThumb, 94 PartScrollbarHorizontalThumb,
95 PartScrollbarVerticalThumb, 95 PartScrollbarVerticalThumb,
96 PartScrollbarHorizontalTrack, 96 PartScrollbarHorizontalTrack,
97 PartScrollbarVerticalTrack, 97 PartScrollbarVerticalTrack,
98 PartScrollbarCorner, 98 PartScrollbarCorner,
99 99
100 // RenderTheme parts 100 // RenderTheme parts
101 PartCheckbox, 101 PartCheckbox,
102 PartRadio, 102 PartRadio,
103 PartButton, 103 PartButton,
104 PartTextField,
105 PartMenuList, 104 PartMenuList,
106 PartSliderTrack, 105 PartSliderTrack,
107 PartSliderThumb, 106 PartSliderThumb,
108 PartInnerSpinButton, 107 PartInnerSpinButton,
109 PartProgressBar 108 PartProgressBar
110 }; 109 };
111 110
112 111
113 // Extra parameters for drawing the PartScrollbarHorizontalTrack and 112 // Extra parameters for drawing the PartScrollbarHorizontalTrack and
114 // PartScrollbarVerticalTrack. 113 // PartScrollbarVerticalTrack.
115 struct ScrollbarTrackExtraParams { 114 struct ScrollbarTrackExtraParams {
116 bool isBack; // Whether this is the 'back' part or the 'forward' part. 115 bool isBack; // Whether this is the 'back' part or the 'forward' part.
117 116
118 // The bounds of the entire track, as opposed to the part being painted. 117 // The bounds of the entire track, as opposed to the part being painted.
119 int trackX; 118 int trackX;
120 int trackY; 119 int trackY;
121 int trackWidth; 120 int trackWidth;
122 int trackHeight; 121 int trackHeight;
123 }; 122 };
124 123
125 // Extra parameters for PartCheckbox, PartPushButton and PartRadio. 124 // Extra parameters for PartCheckbox, PartPushButton and PartRadio.
126 struct ButtonExtraParams { 125 struct ButtonExtraParams {
127 bool checked; 126 bool checked;
128 bool indeterminate; // Whether the button state is indeterminate. 127 bool indeterminate; // Whether the button state is indeterminate.
129 bool isDefault; // Whether the button is default button. 128 bool isDefault; // Whether the button is default button.
130 bool hasBorder; 129 bool hasBorder;
131 WebColor backgroundColor; 130 WebColor backgroundColor;
132 }; 131 };
133 132
134 // Extra parameters for PartTextField
135 struct TextFieldExtraParams {
136 bool isTextArea;
137 bool isListbox;
138 WebColor backgroundColor;
139 };
140
141 // Extra parameters for PartMenuList 133 // Extra parameters for PartMenuList
142 struct MenuListExtraParams { 134 struct MenuListExtraParams {
143 bool hasBorder; 135 bool hasBorder;
144 bool hasBorderRadius; 136 bool hasBorderRadius;
145 int arrowX; 137 int arrowX;
146 int arrowY; 138 int arrowY;
147 int arrowHeight; 139 int arrowHeight;
148 WebColor backgroundColor; 140 WebColor backgroundColor;
149 bool fillContentArea; 141 bool fillContentArea;
150 }; 142 };
(...skipping 15 matching lines...) Expand all
166 bool determinate; 158 bool determinate;
167 int valueRectX; 159 int valueRectX;
168 int valueRectY; 160 int valueRectY;
169 int valueRectWidth; 161 int valueRectWidth;
170 int valueRectHeight; 162 int valueRectHeight;
171 }; 163 };
172 164
173 union ExtraParams { 165 union ExtraParams {
174 ScrollbarTrackExtraParams scrollbarTrack; 166 ScrollbarTrackExtraParams scrollbarTrack;
175 ButtonExtraParams button; 167 ButtonExtraParams button;
176 TextFieldExtraParams textField;
177 MenuListExtraParams menuList; 168 MenuListExtraParams menuList;
178 SliderExtraParams slider; 169 SliderExtraParams slider;
179 InnerSpinButtonExtraParams innerSpin; 170 InnerSpinButtonExtraParams innerSpin;
180 ProgressBarExtraParams progressBar; 171 ProgressBarExtraParams progressBar;
181 }; 172 };
182 173
183 // Gets the size of the given theme part. For variable sized items 174 // Gets the size of the given theme part. For variable sized items
184 // like vertical scrollbar thumbs, the width will be the required width of 175 // like vertical scrollbar thumbs, the width will be the required width of
185 // the track while the height will be the minimum height. 176 // the track while the height will be the minimum height.
186 virtual WebSize getSize(Part) { return WebSize(); } 177 virtual WebSize getSize(Part) { return WebSize(); }
187 // Paint the given the given theme part. 178 // Paint the given the given theme part.
188 virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParam s*) { } 179 virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParam s*) { }
189 }; 180 };
190 181
191 } // namespace blink 182 } // namespace blink
192 183
193 #endif 184 #endif
OLDNEW
« no previous file with comments | « sky/engine/public/platform/WebFallbackThemeEngine.h ('k') | sky/engine/testing/platform/webthemeengine_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698