blob: d5f224b1b8e3ee08e6c6e611a52ae38ff663c4f9 [file] [log] [blame]
license.botf003cfe2008-08-24 09:55:55 +09001// 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
3// found in the LICENSE file.
initial.commit3f4a7322008-07-27 06:49:38 +09004
5#ifndef BASE_BASE_DRAG_SOURCE_H__
6#define BASE_BASE_DRAG_SOURCE_H__
7
8#include <objidl.h>
9
10#include "base/basictypes.h"
11
12///////////////////////////////////////////////////////////////////////////////
13//
14// BaseDragSource
15//
16// A base IDropSource implementation. Handles notifications sent by an active
17// drag-drop operation as the user mouses over other drop targets on their
18// system. This object tells Windows whether or not the drag should continue,
19// and supplies the appropriate cursors.
20//
21class BaseDragSource : public IDropSource {
22 public:
23 BaseDragSource();
24 virtual ~BaseDragSource() { }
25
26 // IDropSource implementation:
27 HRESULT __stdcall QueryContinueDrag(BOOL escape_pressed, DWORD key_state);
28 HRESULT __stdcall GiveFeedback(DWORD effect);
29
30 // IUnknown implementation:
31 HRESULT __stdcall QueryInterface(const IID& iid, void** object);
32 ULONG __stdcall AddRef();
33 ULONG __stdcall Release();
34
35 protected:
36 virtual void OnDragSourceCancel() { }
37 virtual void OnDragSourceDrop() { }
38 virtual void OnDragSourceMove() { }
39
40 private:
41 LONG ref_count_;
42
43 DISALLOW_EVIL_CONSTRUCTORS(BaseDragSource);
44};
45
46#endif // #ifndef BASE_DRAG_SOURCE_H__
license.botf003cfe2008-08-24 09:55:55 +090047