-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
8 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* Drag and Drop Implementation | ||
* Nana C++ Library(http://www.nanapro.org) | ||
* Copyright(C) 2018 Jinhao([email protected]) | ||
* Copyright(C) 2018-2019 Jinhao([email protected]) | ||
* | ||
* Distributed under the Boost Software License, Version 1.0. | ||
* (See accompanying file LICENSE_1_0.txt or copy at | ||
|
@@ -43,7 +43,11 @@ namespace nana | |
simple_dragdrop(window source); | ||
~simple_dragdrop(); | ||
|
||
/// Sets a condition that determines whether the drag&drop can start | ||
/// Condition checker | ||
/** | ||
* Sets a condition checker that determines whether the drag-and-drop operation can start. If a condition checker is not set, it always start drag-and-drop operation. | ||
* @param predicate_fn Unary predicate which returns #true# for starting drag-and-drop operation. | ||
*/ | ||
void condition(std::function<bool()> predicate_fn); | ||
void make_drop(window target, std::function<void()> drop_fn); | ||
private: | ||
|
@@ -94,9 +98,9 @@ namespace nana | |
dragdrop(window source); | ||
~dragdrop(); | ||
|
||
/// Condition of dragging | ||
/// Condition checker | ||
/*** | ||
* The preciate function is called when press mouse button on the source window, it returns true to indicate the start of dragging. If the predicate is not set, it always start to drag. | ||
* Sets a condition checker that determines whether the drag-and-drop operation can start. If a condition checker is not set, it always start drag-and-drop operation. | ||
* @param predicate_fn A predicate function to be set. | ||
*/ | ||
void condition(std::function<bool()> predicate_fn); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters