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

Side by Side Diff: ui/views/controls/label.h

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed errors reported by trybots Created 8 years, 4 months 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
« no previous file with comments | « ui/views/controls/button/menu_button.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // Overridden from View: 177 // Overridden from View:
178 virtual gfx::Insets GetInsets() const OVERRIDE; 178 virtual gfx::Insets GetInsets() const OVERRIDE;
179 virtual int GetBaseline() const OVERRIDE; 179 virtual int GetBaseline() const OVERRIDE;
180 // Overridden to compute the size required to display this label. 180 // Overridden to compute the size required to display this label.
181 virtual gfx::Size GetPreferredSize() OVERRIDE; 181 virtual gfx::Size GetPreferredSize() OVERRIDE;
182 // Returns the height necessary to display this label with the provided width. 182 // Returns the height necessary to display this label with the provided width.
183 // This method is used to layout multi-line labels. It is equivalent to 183 // This method is used to layout multi-line labels. It is equivalent to
184 // GetPreferredSize().height() if the receiver is not multi-line. 184 // GetPreferredSize().height() if the receiver is not multi-line.
185 virtual int GetHeightForWidth(int w) OVERRIDE; 185 virtual int GetHeightForWidth(int w) OVERRIDE;
186 virtual std::string GetClassName() const OVERRIDE; 186 virtual std::string GetClassName() const OVERRIDE;
187 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; 187 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
188 // Mouse enter/exit are overridden to render mouse over background color. 188 // Mouse enter/exit are overridden to render mouse over background color.
189 // These invoke SetContainsMouse as necessary. 189 // These invoke SetContainsMouse as necessary.
190 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; 190 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE;
191 virtual void OnMouseEntered(const MouseEvent& event) OVERRIDE; 191 virtual void OnMouseEntered(const MouseEvent& event) OVERRIDE;
192 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; 192 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE;
193 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; 193 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
194 // Gets the tooltip text for labels that are wider than their bounds, except 194 // Gets the tooltip text for labels that are wider than their bounds, except
195 // when the label is multiline, in which case it just returns false (no 195 // when the label is multiline, in which case it just returns false (no
196 // tooltip). If a custom tooltip has been specified with SetTooltipText() 196 // tooltip). If a custom tooltip has been specified with SetTooltipText()
197 // it is returned instead. 197 // it is returned instead.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // Should a shadow be drawn behind the text? 302 // Should a shadow be drawn behind the text?
303 bool has_shadow_; 303 bool has_shadow_;
304 304
305 305
306 DISALLOW_COPY_AND_ASSIGN(Label); 306 DISALLOW_COPY_AND_ASSIGN(Label);
307 }; 307 };
308 308
309 } // namespace views 309 } // namespace views
310 310
311 #endif // UI_VIEWS_CONTROLS_LABEL_H_ 311 #endif // UI_VIEWS_CONTROLS_LABEL_H_
OLDNEW
« no previous file with comments | « ui/views/controls/button/menu_button.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698