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

Side by Side Diff: ui/views/controls/button/label_button.h

Issue 59383003: Add the button style for combobox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: warnings Created 7 years 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/resources/ui_resources.grd ('k') | ui/views/controls/button/label_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) 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_BUTTON_LABEL_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
11 #include "ui/gfx/font.h" 11 #include "ui/gfx/font.h"
12 #include "ui/gfx/image/image_skia.h" 12 #include "ui/gfx/image/image_skia.h"
13 #include "ui/views/controls/button/custom_button.h" 13 #include "ui/views/controls/button/custom_button.h"
14 #include "ui/views/controls/image_view.h" 14 #include "ui/views/controls/image_view.h"
15 #include "ui/views/controls/label.h" 15 #include "ui/views/controls/label.h"
16 #include "ui/views/native_theme_delegate.h" 16 #include "ui/views/native_theme_delegate.h"
17 17
18 namespace views { 18 namespace views {
19 19
20 class Painter; 20 class Painter;
21 21
22 // LabelButton is an alternative to TextButton, it's not focusable by default. 22 // LabelButton is an alternative to TextButton, it's not focusable by default.
23 class VIEWS_EXPORT LabelButton : public CustomButton, 23 class VIEWS_EXPORT LabelButton : public CustomButton,
24 public NativeThemeDelegate { 24 public NativeThemeDelegate {
25 public: 25 public:
26 // The length of the hover fade animation.
27 static const int kHoverAnimationDurationMs;
28
26 static const char kViewClassName[]; 29 static const char kViewClassName[];
27 30
28 LabelButton(ButtonListener* listener, const string16& text); 31 LabelButton(ButtonListener* listener, const string16& text);
29 virtual ~LabelButton(); 32 virtual ~LabelButton();
30 33
31 // Get or set the image shown for the specified button state. 34 // Get or set the image shown for the specified button state.
32 // GetImage returns the image for STATE_NORMAL if the state's image is empty. 35 // GetImage returns the image for STATE_NORMAL if the state's image is empty.
33 virtual const gfx::ImageSkia& GetImage(ButtonState for_state); 36 virtual const gfx::ImageSkia& GetImage(ButtonState for_state);
34 void SetImage(ButtonState for_state, const gfx::ImageSkia& image); 37 void SetImage(ButtonState for_state, const gfx::ImageSkia& image);
35 38
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 ButtonStyle style_; 148 ButtonStyle style_;
146 149
147 scoped_ptr<Painter> focus_painter_; 150 scoped_ptr<Painter> focus_painter_;
148 151
149 DISALLOW_COPY_AND_ASSIGN(LabelButton); 152 DISALLOW_COPY_AND_ASSIGN(LabelButton);
150 }; 153 };
151 154
152 } // namespace views 155 } // namespace views
153 156
154 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 157 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/resources/ui_resources.grd ('k') | ui/views/controls/button/label_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698