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

Side by Side Diff: chrome/views/controls/button/native_button_wrapper.h

Issue 42582: Making the enabled and visible states work in native buttons (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « chrome/views/controls/button/native_button_win.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_ 5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_
6 #define CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_ 6 #define CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_
7 7
8 class ChromeFont; 8 class ChromeFont;
9 9
10 namespace views { 10 namespace views {
11 11
12 class Checkbox; 12 class Checkbox;
13 class NativeButton; 13 class NativeButton;
14 class RadioButton; 14 class RadioButton;
15 15
16 // A specialization of NativeControlWrapper that hosts a platform-native button. 16 // A specialization of NativeControlWrapper that hosts a platform-native button.
17 class NativeButtonWrapper { 17 class NativeButtonWrapper {
18 public: 18 public:
19 // Updates the native button's label from the state stored in its associated 19 // Updates the native button's label from the state stored in its associated
20 // NativeButton. 20 // NativeButton.
21 virtual void UpdateLabel() = 0; 21 virtual void UpdateLabel() = 0;
22 22
23 // Updates the native button's label font from the state stored in its 23 // Updates the native button's label font from the state stored in its
24 // associated NativeButton. 24 // associated NativeButton.
25 virtual void UpdateFont() = 0; 25 virtual void UpdateFont() = 0;
26 26
27 // Updates the native button's enabled state from the state stored in its
28 // associated NativeButton.
29 virtual void UpdateEnabled() = 0;
30
27 // Updates the native button's default state from the state stored in its 31 // Updates the native button's default state from the state stored in its
28 // associated NativeButton. 32 // associated NativeButton.
29 virtual void UpdateDefault() = 0; 33 virtual void UpdateDefault() = 0;
30 34
31 // Updates the native button's checked state from the state stored in its 35 // Updates the native button's checked state from the state stored in its
32 // associated NativeCheckbox. Valid only for checkboxes and radio buttons. 36 // associated NativeCheckbox. Valid only for checkboxes and radio buttons.
33 virtual void UpdateChecked() {} 37 virtual void UpdateChecked() {}
34 38
35 // Shows the pushed state for the button if |pushed| is true. 39 // Shows the pushed state for the button if |pushed| is true.
36 virtual void SetPushed(bool pushed) {}; 40 virtual void SetPushed(bool pushed) {};
(...skipping 12 matching lines...) Expand all
49 static NativeButtonWrapper* CreateNativeButtonWrapper(NativeButton* button); 53 static NativeButtonWrapper* CreateNativeButtonWrapper(NativeButton* button);
50 static NativeButtonWrapper* CreateCheckboxWrapper(Checkbox* checkbox); 54 static NativeButtonWrapper* CreateCheckboxWrapper(Checkbox* checkbox);
51 static NativeButtonWrapper* CreateRadioButtonWrapper( 55 static NativeButtonWrapper* CreateRadioButtonWrapper(
52 RadioButton* radio_button); 56 RadioButton* radio_button);
53 57
54 }; 58 };
55 59
56 } // namespace views 60 } // namespace views
57 61
58 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_ 62 #endif // #ifndef CHROME_VIEWS_CONTROLS_BUTTON_NATIVE_BUTTON_WRAPPER_H_
OLDNEW
« no previous file with comments | « chrome/views/controls/button/native_button_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698