1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ATHENA_UTIL_DRAG_HANDLE_H_
6 #define ATHENA_UTIL_DRAG_HANDLE_H_
8 #include "athena/athena_export.h"
15 class DragHandleScrollDelegate
{
17 virtual ~DragHandleScrollDelegate() {}
19 // Beginning of a scroll gesture.
20 virtual void HandleScrollBegin(float delta
) = 0;
22 // End of the current scroll gesture.
23 virtual void HandleScrollEnd() = 0;
25 // Update of the scroll position for the currently active scroll gesture.
26 virtual void HandleScrollUpdate(float delta
) = 0;
29 enum DragHandleScrollDirection
{ DRAG_HANDLE_VERTICAL
, DRAG_HANDLE_HORIZONTAL
};
31 // Creates a handle view which notifies the delegate of the scrolls performed on
33 ATHENA_EXPORT
views::View
* CreateDragHandleView(
34 DragHandleScrollDirection scroll_direction
,
35 DragHandleScrollDelegate
* delegate
,
37 int preferred_height
);
41 #endif // ATHENA_UTIL_DRAG_HANDLE_H_