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

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

Issue 251099: Refactor cros library code into central location and have the UI elements obs... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/chrome.gyp ('k') | views/controls/button/custom_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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_CUSTOM_BUTTON_H_ 5 #ifndef VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
6 #define VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 6 #define VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
7 7
8 #include "app/animation.h" 8 #include "app/animation.h"
9 #include "views/controls/button/button.h" 9 #include "views/controls/button/button.h"
10 10
(...skipping 23 matching lines...) Expand all
34 // Get/sets the current display state of the button. 34 // Get/sets the current display state of the button.
35 ButtonState state() const { return state_; } 35 ButtonState state() const { return state_; }
36 void SetState(ButtonState state); 36 void SetState(ButtonState state);
37 37
38 // Starts throbbing. See HoverAnimation for a description of cycles_til_stop. 38 // Starts throbbing. See HoverAnimation for a description of cycles_til_stop.
39 void StartThrobbing(int cycles_til_stop); 39 void StartThrobbing(int cycles_til_stop);
40 40
41 // Set how long the hover animation will last for. 41 // Set how long the hover animation will last for.
42 void SetAnimationDuration(int duration); 42 void SetAnimationDuration(int duration);
43 43
44 // Sets whether or not to show the highlighed (i.e. hot) state. Default true.
45 void SetShowHighlighted(bool show_highlighted);
46
44 // Overridden from View: 47 // Overridden from View:
45 virtual void SetEnabled(bool enabled); 48 virtual void SetEnabled(bool enabled);
46 virtual bool IsEnabled() const; 49 virtual bool IsEnabled() const;
47 virtual bool IsFocusable() const; 50 virtual bool IsFocusable() const;
48 51
49 void set_triggerable_event_flags(int triggerable_event_flags) { 52 void set_triggerable_event_flags(int triggerable_event_flags) {
50 triggerable_event_flags_ = triggerable_event_flags; 53 triggerable_event_flags_ = triggerable_event_flags;
51 } 54 }
52 55
53 int triggerable_event_flags() const { 56 int triggerable_event_flags() const {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void SetHighlighted(bool highlighted); 101 void SetHighlighted(bool highlighted);
99 bool IsHighlighted() const; 102 bool IsHighlighted() const;
100 103
101 // Returns whether the button is pushed. 104 // Returns whether the button is pushed.
102 bool IsPushed() const; 105 bool IsPushed() const;
103 106
104 // Should we animate when the state changes? Defaults to true, but false while 107 // Should we animate when the state changes? Defaults to true, but false while
105 // throbbing. 108 // throbbing.
106 bool animate_on_state_change_; 109 bool animate_on_state_change_;
107 110
111 // Whether or not to show the highlighted (i.e. hot) state.
112 bool show_highlighted_;
113
108 // Mouse event flags which can trigger button actions. 114 // Mouse event flags which can trigger button actions.
109 int triggerable_event_flags_; 115 int triggerable_event_flags_;
110 116
111 DISALLOW_COPY_AND_ASSIGN(CustomButton); 117 DISALLOW_COPY_AND_ASSIGN(CustomButton);
112 }; 118 };
113 119
114 } // namespace views 120 } // namespace views
115 121
116 #endif // VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 122 #endif // VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/chrome.gyp ('k') | views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698