| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 void UpdateContainsMouse(const MouseEvent& event); | 230 void UpdateContainsMouse(const MouseEvent& event); |
| 231 | 231 |
| 232 // Updates whether the mouse is contained in the Label. If the new value | 232 // Updates whether the mouse is contained in the Label. If the new value |
| 233 // differs from the current value, and a mouse over background is specified, | 233 // differs from the current value, and a mouse over background is specified, |
| 234 // SchedulePaint is invoked. | 234 // SchedulePaint is invoked. |
| 235 void SetContainsMouse(bool contains_mouse); | 235 void SetContainsMouse(bool contains_mouse); |
| 236 | 236 |
| 237 // Returns where the text is drawn, in the receivers coordinate system. | 237 // Returns where the text is drawn, in the receivers coordinate system. |
| 238 gfx::Rect GetTextBounds() const; | 238 gfx::Rect GetTextBounds() const; |
| 239 | 239 |
| 240 int ComputeMultiLineFlags() const; | 240 int ComputeDrawStringFlags() const; |
| 241 | 241 |
| 242 gfx::Rect GetAvailableRect() const; | 242 gfx::Rect GetAvailableRect() const; |
| 243 | 243 |
| 244 // Returns parameters to be used for the DrawString call. | 244 // Returns parameters to be used for the DrawString call. |
| 245 void CalculateDrawStringParams(string16* paint_text, | 245 void CalculateDrawStringParams(string16* paint_text, |
| 246 gfx::Rect* text_bounds, | 246 gfx::Rect* text_bounds, |
| 247 int* flags) const; | 247 int* flags) const; |
| 248 | 248 |
| 249 string16 text_; | 249 string16 text_; |
| 250 GURL url_; | 250 GURL url_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 279 // allows this view to reserve space for a focus border that it otherwise | 279 // allows this view to reserve space for a focus border that it otherwise |
| 280 // might not have because it is not itself focusable. | 280 // might not have because it is not itself focusable. |
| 281 bool has_focus_border_; | 281 bool has_focus_border_; |
| 282 | 282 |
| 283 DISALLOW_COPY_AND_ASSIGN(Label); | 283 DISALLOW_COPY_AND_ASSIGN(Label); |
| 284 }; | 284 }; |
| 285 | 285 |
| 286 } // namespace views | 286 } // namespace views |
| 287 | 287 |
| 288 #endif // UI_VIEWS_CONTROLS_LABEL_H_ | 288 #endif // UI_VIEWS_CONTROLS_LABEL_H_ |
| OLD | NEW |