add class dragdrop

This commit is contained in:
Jinhao
2018-11-16 07:41:29 +08:00
parent b3eacfddd0
commit fe01aa0fd9
2 changed files with 173 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ namespace nana
simple_dragdrop(simple_dragdrop&&) = delete;
simple_dragdrop& operator=(simple_dragdrop&&) = delete;
public:
simple_dragdrop(window drag_wd);
simple_dragdrop(window source);
~simple_dragdrop();
/// Sets a condition that determines whether the drag&drop can start
@@ -40,6 +40,26 @@ namespace nana
private:
implementation* const impl_;
};
class dragdrop
{
struct implementation;
dragdrop(const dragdrop&) = delete;
dragdrop& operator=(const dragdrop&) = delete;
dragdrop(dragdrop&&) = delete;
dragdrop& operator=(dragdrop&&) = delete;
public:
dragdrop(window source);
~dragdrop();
void condition(std::function<bool()> predicate_fn);
void make_data(std::function<void()> generator);
private:
implementation* const impl_;
};
}
#endif