Nana C++ Library. Reference for users.
What we need to use nana
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
nana::dragdrop Class Reference

Classes

class  data
 
struct  implementation
 

Public Member Functions

 dragdrop (window source)
 
 ~dragdrop ()
 
void condition (std::function< bool()> predicate_fn)
 Condition checker. More...
 
void prepare_data (std::function< data()> generator)
 Transferred data. More...
 
void drop_finished (std::function< void(bool dropped, dnd_action executed_action, data &data_transferred)> finish_fn)
 Drop handler. More...
 

Constructor & Destructor Documentation

nana::dragdrop::dragdrop ( window  source)
nana::dragdrop::~dragdrop ( )

Member Function Documentation

void nana::dragdrop::condition ( std::function< bool()>  predicate_fn)

Condition checker.

void nana::dragdrop::drop_finished ( std::function< void(bool dropped, dnd_action executed_action, data &data_transferred)>  finish_fn)

Drop handler.

The drop handler is called when the drop operation is completed. There are 3 parameters for the handler dropped Indicates whether the data is accepted by a target window. executed_action Indicates the action returned by target window. Ignore if dropped is false. data_transferred The data object which is generated by the generator.

Parameters
finish_fnThe drop handling function.
void nana::dragdrop::prepare_data ( std::function< data()>  generator)

Transferred data.

Set a data generator. When drag begins, it is called to generate a data object for transferring.

Parameters
generatorIt returns the data for transferring.