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

Side by Side Diff: views/controls/button/text_button.h

Issue 6976048: views: Add OnEnabledChanged() method to View class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DisableOnHover test? Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « views/controls/button/native_button.cc ('k') | views/controls/button/text_button.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 5 #ifndef VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
6 #define VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 6 #define VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void ClearEmbellishing(); 181 void ClearEmbellishing();
182 182
183 // Paint the button into the specified canvas. If |mode| is |PB_FOR_DRAG|, the 183 // Paint the button into the specified canvas. If |mode| is |PB_FOR_DRAG|, the
184 // function paints a drag image representation into the canvas. 184 // function paints a drag image representation into the canvas.
185 enum PaintButtonMode { PB_NORMAL, PB_FOR_DRAG }; 185 enum PaintButtonMode { PB_NORMAL, PB_FOR_DRAG };
186 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode); 186 virtual void PaintButton(gfx::Canvas* canvas, PaintButtonMode mode);
187 187
188 // Overridden from View: 188 // Overridden from View:
189 virtual gfx::Size GetPreferredSize() OVERRIDE; 189 virtual gfx::Size GetPreferredSize() OVERRIDE;
190 virtual gfx::Size GetMinimumSize() OVERRIDE; 190 virtual gfx::Size GetMinimumSize() OVERRIDE;
191 virtual void SetEnabled(bool enabled) OVERRIDE; 191 virtual void OnEnabledChanged() OVERRIDE;
192 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 192 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
193 193
194 // Text colors. 194 // Text colors.
195 static const SkColor kEnabledColor; 195 static const SkColor kEnabledColor;
196 static const SkColor kHighlightColor; 196 static const SkColor kHighlightColor;
197 static const SkColor kDisabledColor; 197 static const SkColor kDisabledColor;
198 static const SkColor kHoverColor; 198 static const SkColor kHoverColor;
199 199
200 // Returns views/TextButton. 200 // Returns views/TextButton.
201 virtual std::string GetClassName() const; 201 virtual std::string GetClassName() const;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 // Space between icon and text. 364 // Space between icon and text.
365 int icon_text_spacing_; 365 int icon_text_spacing_;
366 366
367 DISALLOW_COPY_AND_ASSIGN(TextButton); 367 DISALLOW_COPY_AND_ASSIGN(TextButton);
368 }; 368 };
369 369
370 } // namespace views 370 } // namespace views
371 371
372 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_ 372 #endif // VIEWS_CONTROLS_BUTTON_TEXT_BUTTON_H_
OLDNEW
« no previous file with comments | « views/controls/button/native_button.cc ('k') | views/controls/button/text_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698