| OLD | NEW |
| 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 UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ | 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ |
| 6 #define UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ | 6 #define UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ |
| 7 | 7 |
| 8 #include "ui/views/view.h" | 8 #include "ui/views/view.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // could be implemented by a native control or custom rendered. | 26 // could be implemented by a native control or custom rendered. |
| 27 class VIEWS_EXPORT Button : public View { | 27 class VIEWS_EXPORT Button : public View { |
| 28 public: | 28 public: |
| 29 virtual ~Button(); | 29 virtual ~Button(); |
| 30 | 30 |
| 31 void SetTooltipText(const string16& tooltip_text); | 31 void SetTooltipText(const string16& tooltip_text); |
| 32 | 32 |
| 33 int tag() const { return tag_; } | 33 int tag() const { return tag_; } |
| 34 void set_tag(int tag) { tag_ = tag; } | 34 void set_tag(int tag) { tag_ = tag; } |
| 35 | 35 |
| 36 int mouse_event_flags() const { return mouse_event_flags_; } | |
| 37 | |
| 38 void SetAccessibleName(const string16& name); | 36 void SetAccessibleName(const string16& name); |
| 39 void SetAccessibleKeyboardShortcut(const string16& shortcut); | 37 void SetAccessibleKeyboardShortcut(const string16& shortcut); |
| 40 | 38 |
| 41 // Overridden from View: | 39 // Overridden from View: |
| 42 virtual bool GetTooltipText(const gfx::Point& p, | 40 virtual bool GetTooltipText(const gfx::Point& p, |
| 43 string16* tooltip) const OVERRIDE; | 41 string16* tooltip) const OVERRIDE; |
| 44 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 42 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 45 | 43 |
| 46 protected: | 44 protected: |
| 47 // Construct the Button with a Listener. The listener can be NULL. This can be | 45 // Construct the Button with a Listener. The listener can be NULL. This can be |
| (...skipping 12 matching lines...) Expand all Loading... |
| 60 string16 tooltip_text_; | 58 string16 tooltip_text_; |
| 61 | 59 |
| 62 // Accessibility data. | 60 // Accessibility data. |
| 63 string16 accessible_name_; | 61 string16 accessible_name_; |
| 64 string16 accessible_shortcut_; | 62 string16 accessible_shortcut_; |
| 65 | 63 |
| 66 // The id tag associated with this button. Used to disambiguate buttons in | 64 // The id tag associated with this button. Used to disambiguate buttons in |
| 67 // the ButtonListener implementation. | 65 // the ButtonListener implementation. |
| 68 int tag_; | 66 int tag_; |
| 69 | 67 |
| 70 // Event flags present when the button was clicked. | |
| 71 int mouse_event_flags_; | |
| 72 | |
| 73 DISALLOW_COPY_AND_ASSIGN(Button); | 68 DISALLOW_COPY_AND_ASSIGN(Button); |
| 74 }; | 69 }; |
| 75 | 70 |
| 76 } // namespace views | 71 } // namespace views |
| 77 | 72 |
| 78 #endif // UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ | 73 #endif // UI_VIEWS_CONTROLS_BUTTON_BUTTON_H_ |
| OLD | NEW |