| 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_RESIZE_AREA_DELEGATE_H_ | 5 #ifndef UI_VIEWS_CONTROLS_RESIZE_AREA_DELEGATE_H_ |
| 6 #define VIEWS_CONTROLS_RESIZE_AREA_DELEGATE_H_ | 6 #define UI_VIEWS_CONTROLS_RESIZE_AREA_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 namespace views { | 9 namespace views { |
| 10 | 10 |
| 11 // An interface implemented by objects that want to be notified about the resize | 11 // An interface implemented by objects that want to be notified about the resize |
| 12 // event. | 12 // event. |
| 13 class ResizeAreaDelegate { | 13 class ResizeAreaDelegate { |
| 14 public: | 14 public: |
| 15 // OnResize is sent when resizing is detected. |resize_amount| specifies the | 15 // OnResize is sent when resizing is detected. |resize_amount| specifies the |
| 16 // number of pixels that the user wants to resize by, and can be negative or | 16 // number of pixels that the user wants to resize by, and can be negative or |
| 17 // positive (depending on direction of dragging and flips according to | 17 // positive (depending on direction of dragging and flips according to |
| 18 // locale directionality: dragging to the left in LTR locales gives negative | 18 // locale directionality: dragging to the left in LTR locales gives negative |
| 19 // |resize_amount| but positive amount for RTL). |done_resizing| is true if | 19 // |resize_amount| but positive amount for RTL). |done_resizing| is true if |
| 20 // the user has released the mouse. | 20 // the user has released the mouse. |
| 21 virtual void OnResize(int resize_amount, bool done_resizing) = 0; | 21 virtual void OnResize(int resize_amount, bool done_resizing) = 0; |
| 22 | 22 |
| 23 protected: | 23 protected: |
| 24 virtual ~ResizeAreaDelegate() {} | 24 virtual ~ResizeAreaDelegate() {} |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 } // namespace views | 27 } // namespace views |
| 28 | 28 |
| 29 #endif // VIEWS_CONTROLS_RESIZE_AREA_DELEGATE_H_ | 29 #endif // UI_VIEWS_CONTROLS_RESIZE_AREA_DELEGATE_H_ |
| OLD | NEW |