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

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

Issue 11262002: Merge TextButton and LabelButton border images util structs, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename BorderImages and const image id arrays, etc. Created 8 years, 1 month 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
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 "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/image/image_skia.h" 10 #include "ui/gfx/image/image_skia.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 void set_max_size(const gfx::Size& max_size) { max_size_ = max_size; } 48 void set_max_size(const gfx::Size& max_size) { max_size_ = max_size; }
49 49
50 // Get or set the option to handle the return key; false by default. 50 // Get or set the option to handle the return key; false by default.
51 bool default_button() const { return default_button_; } 51 bool default_button() const { return default_button_; }
52 void SetDefaultButton(bool default_button); 52 void SetDefaultButton(bool default_button);
53 53
54 // Get or set the option to use a native button appearance; false by default. 54 // Get or set the option to use a native button appearance; false by default.
55 bool native_theme() const { return native_theme_; } 55 bool native_theme() const { return native_theme_; }
56 void SetNativeTheme(bool native_theme); 56 void SetNativeTheme(bool native_theme);
57 57
58 // Overridden from CustomButton: 58 // Overridden from CustomButton:
Peter Kasting 2012/10/25 23:56:38 Nit: Can we make any of these overrides private, o
msw 2012/10/27 07:40:57 I made them all private, but now LabelButtonBorder
59 virtual void StateChanged() OVERRIDE; 59 virtual void StateChanged() OVERRIDE;
60 60
61 // Overridden from View: 61 // Overridden from View:
62 virtual gfx::Size GetPreferredSize() OVERRIDE; 62 virtual gfx::Size GetPreferredSize() OVERRIDE;
63 virtual void Layout() OVERRIDE; 63 virtual void Layout() OVERRIDE;
64 virtual std::string GetClassName() const OVERRIDE; 64 virtual std::string GetClassName() const OVERRIDE;
65 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE; 65 virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
66 66
67 protected:
68 // Overridden from NativeThemeDelegate: 67 // Overridden from NativeThemeDelegate:
69 virtual ui::NativeTheme::Part GetThemePart() const OVERRIDE; 68 virtual ui::NativeTheme::Part GetThemePart() const OVERRIDE;
70 virtual gfx::Rect GetThemePaintRect() const OVERRIDE; 69 virtual gfx::Rect GetThemePaintRect() const OVERRIDE;
71 virtual ui::NativeTheme::State GetThemeState( 70 virtual ui::NativeTheme::State GetThemeState(
72 ui::NativeTheme::ExtraParams* params) const OVERRIDE; 71 ui::NativeTheme::ExtraParams* params) const OVERRIDE;
73 virtual const ui::Animation* GetThemeAnimation() const OVERRIDE; 72 virtual const ui::Animation* GetThemeAnimation() const OVERRIDE;
74 virtual ui::NativeTheme::State GetBackgroundThemeState( 73 virtual ui::NativeTheme::State GetBackgroundThemeState(
75 ui::NativeTheme::ExtraParams* params) const OVERRIDE; 74 ui::NativeTheme::ExtraParams* params) const OVERRIDE;
76 virtual ui::NativeTheme::State GetForegroundThemeState( 75 virtual ui::NativeTheme::State GetForegroundThemeState(
77 ui::NativeTheme::ExtraParams* params) const OVERRIDE; 76 ui::NativeTheme::ExtraParams* params) const OVERRIDE;
(...skipping 23 matching lines...) Expand all
101 100
102 // Flag indicating native theme styling (or Views styling) of the button. 101 // Flag indicating native theme styling (or Views styling) of the button.
103 bool native_theme_; 102 bool native_theme_;
104 103
105 DISALLOW_COPY_AND_ASSIGN(LabelButton); 104 DISALLOW_COPY_AND_ASSIGN(LabelButton);
106 }; 105 };
107 106
108 } // namespace views 107 } // namespace views
109 108
110 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_ 109 #endif // UI_VIEWS_CONTROLS_BUTTON_LABEL_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698