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 VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ | 5 #ifndef VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ |
6 #define VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ | 6 #define VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 bool checked() const { return checked_; } | 42 bool checked() const { return checked_; } |
43 | 43 |
44 // Overridden from View: | 44 // Overridden from View: |
45 virtual gfx::Size GetPreferredSize() OVERRIDE; | 45 virtual gfx::Size GetPreferredSize() OVERRIDE; |
46 virtual int GetHeightForWidth(int w) OVERRIDE; | 46 virtual int GetHeightForWidth(int w) OVERRIDE; |
47 virtual void SetEnabled(bool enabled) OVERRIDE; | 47 virtual void SetEnabled(bool enabled) OVERRIDE; |
48 virtual void Layout() OVERRIDE; | 48 virtual void Layout() OVERRIDE; |
49 virtual std::string GetClassName() const OVERRIDE; | 49 virtual std::string GetClassName() const OVERRIDE; |
50 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 50 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; |
51 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; | 51 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; |
52 virtual void OnMouseReleased(const MouseEvent& event, bool canceled) OVERRIDE; | 52 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
| 53 virtual void OnMouseCaptureLost() OVERRIDE; |
53 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; | 54 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; |
54 virtual void OnMouseEntered(const MouseEvent& event) OVERRIDE; | 55 virtual void OnMouseEntered(const MouseEvent& event) OVERRIDE; |
55 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; | 56 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; |
56 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 57 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
57 | 58 |
58 // Overridden from NativeButton: | 59 // Overridden from NativeButton: |
59 virtual void SetLabel(const std::wstring& label) OVERRIDE; | 60 virtual void SetLabel(const std::wstring& label) OVERRIDE; |
60 | 61 |
61 protected: | 62 protected: |
62 // Returns true if the event (in Checkbox coordinates) is within the bounds of | 63 // Returns true if the event (in Checkbox coordinates) is within the bounds of |
(...skipping 19 matching lines...) Expand all Loading... |
82 | 83 |
83 // True if the checkbox is checked. | 84 // True if the checkbox is checked. |
84 bool checked_; | 85 bool checked_; |
85 | 86 |
86 DISALLOW_COPY_AND_ASSIGN(Checkbox); | 87 DISALLOW_COPY_AND_ASSIGN(Checkbox); |
87 }; | 88 }; |
88 | 89 |
89 } // namespace views | 90 } // namespace views |
90 | 91 |
91 #endif // VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ | 92 #endif // VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ |
OLD | NEW |