OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_VIEWS_CONTROLS_LABEL_H_ | 5 #ifndef UI_VIEWS_CONTROLS_LABEL_H_ |
6 #define UI_VIEWS_CONTROLS_LABEL_H_ | 6 #define UI_VIEWS_CONTROLS_LABEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 int ComputeDrawStringFlags() const; | 238 int ComputeDrawStringFlags() const; |
239 | 239 |
240 gfx::Rect GetAvailableRect() const; | 240 gfx::Rect GetAvailableRect() const; |
241 | 241 |
242 // Returns parameters to be used for the DrawString call. | 242 // Returns parameters to be used for the DrawString call. |
243 void CalculateDrawStringParams(base::string16* paint_text, | 243 void CalculateDrawStringParams(base::string16* paint_text, |
244 gfx::Rect* text_bounds, | 244 gfx::Rect* text_bounds, |
245 int* flags) const; | 245 int* flags) const; |
246 | 246 |
247 // Updates any colors that have not been explicitly set from the theme. | |
248 void UpdateColorsFromTheme(const ui::NativeTheme* theme); | |
249 | |
250 // Resets |cached_heights_| and |cached_heights_cursor_| and mark | 247 // Resets |cached_heights_| and |cached_heights_cursor_| and mark |
251 // |text_size_valid_| as false. | 248 // |text_size_valid_| as false. |
252 void ResetCachedSize(); | 249 void ResetCachedSize(); |
253 | 250 |
254 bool ShouldShowDefaultTooltip() const; | 251 bool ShouldShowDefaultTooltip() const; |
255 | 252 |
256 base::string16 text_; | 253 base::string16 text_; |
257 base::string16 layout_text_; | 254 base::string16 layout_text_; |
258 gfx::FontList font_list_; | 255 gfx::FontList font_list_; |
259 SkColor requested_enabled_color_; | 256 SkColor requested_enabled_color_; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 // The cached heights to avoid recalculation in GetHeightForWidth(). | 296 // The cached heights to avoid recalculation in GetHeightForWidth(). |
300 std::vector<gfx::Size> cached_heights_; | 297 std::vector<gfx::Size> cached_heights_; |
301 int cached_heights_cursor_; | 298 int cached_heights_cursor_; |
302 | 299 |
303 DISALLOW_COPY_AND_ASSIGN(Label); | 300 DISALLOW_COPY_AND_ASSIGN(Label); |
304 }; | 301 }; |
305 | 302 |
306 } // namespace views | 303 } // namespace views |
307 | 304 |
308 #endif // UI_VIEWS_CONTROLS_LABEL_H_ | 305 #endif // UI_VIEWS_CONTROLS_LABEL_H_ |
OLD | NEW |