FLTK Utility Library and Widget Collection (FLU): Flu_DND_Event class Reference

Main Page | Class Hierarchy | Class List | File List | Class Members

# Flu_DND_Event Class Reference

This class encapsulates the event state for a single dragged object, and is designed to work exclusively with Flu_DND. More...

`#include <Flu_DND.h>`

List of all members.

## Public Member Functions
| Flu_DND_Event ()
| Default constructor.
| ~Flu_DND_Event ()
| Default destructor.
bool | event_is_valid () const
| `true` if currently dragging an object, `false` otherwise
bool | event_is_text () const
| `true` if the dragged object is normal FLTK text (see Fl::copy() ), else `false` if it is an object derived from Flu_DND
bool | event_is_other () const
| `true` if the dragged object is an object derived from Flu_DND, else `false` if it is normal FLTK text (see Fl::copy() )
const char * | text () const
| the text from Fl::copy() if this event is a text event (see event_is_text() )
void * | data () const
| the dragged object data as added in Flu_DND::dnd_grab() if this event is an "other" event (see event_is_other() )
const char * | data_type () const
| the type of the data object that was dropped. This is `NULL` for FLTK text events
bool | is_data_type (const char *t) const
| `true` if the type of the data object that was dropped is equal to t, `false` otherwise
int | grab_x () const
| the x coordinate (from Fl::event_x() ) of when the object was grabbed
int | grab_y () const
| the y coordinate (from Fl::event_y() ) of when the object was grabbed
int | drop_x () const
| the x coordinate (from Fl::event_x() ) of when the object was dropped
int | drop_y () const
| the y coordinate (from Fl::event_y() ) of when the object was dropped
## Public Attributes
bool | dummy
## Friends
class | Flu_DND

## Detailed Description

This class encapsulates the event state for a single dragged object, and is designed to work exclusively with Flu_DND.

## Member Function Documentation

void* Flu_DND_Event::data | ( |  | ) | const`[inline]`

| the dragged object data as added in Flu_DND::dnd_grab() if this event is an "other" event (see event_is_other() ) Note: This is valid only after the object has been dropped (i.e. in Flu_DND::on_dnd_drop() )

const char* Flu_DND_Event::data_type | ( |  | ) | const`[inline]`

| the type of the data object that was dropped. This is `NULL` for FLTK text events Note: This is valid only after the object has been dropped (i.e. in Flu_DND::on_dnd_drop() )

const char* Flu_DND_Event::text | ( |  | ) | const`[inline]`

| the text from Fl::copy() if this event is a text event (see event_is_text() ) Note: This is valid only after the object has been dropped (i.e. in Flu_DND::on_dnd_drop() )

The documentation for this class was generated from the following files:

- Flu_DND.h
- Flu_Tree_Browser.h