From 2cde58f966908851c8d97ee442cdbf825c180899 Mon Sep 17 00:00:00 2001
From: Matthias Melcher
Date: Sun, 24 Feb 2002 21:09:51 +0000
Subject: Update documentation to contain DND stuff.
I am missing a decent Linux machine. Could someone please check
if DND works smoothly on those machines?
Just run the 'Input' test and mark and drag text out of the
text widgets into another app. Then drag'n'drop text into the FLTK
widgets. Finally drag text from one widget into another widget
within the same FLTK app.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1972 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
---
documentation/Fl.html | 7 +++++++
documentation/enumerations.html | 5 +++++
documentation/events.html | 24 ++++++++++++++++++++++++
documentation/osissues.html | 2 ++
documentation/subclassing.html | 19 +++++++++++++++++++
5 files changed, 57 insertions(+)
(limited to 'documentation')
diff --git a/documentation/Fl.html b/documentation/Fl.html
index 692181511..5129c11e4 100644
--- a/documentation/Fl.html
+++ b/documentation/Fl.html
@@ -49,6 +49,7 @@ state information and global methods for the current application.
damage
default_atclose
display
+ dnd
error
event
event_alt
@@ -414,6 +415,12 @@ the environment variable $DISPLAY to the passed string, so this only
works before you show() the first window or otherwise open the display,
and does nothing useful under WIN32.
+
+
+Initiate a Drag And Drop operation. The clipboard should be filled
+with relevant data before calling this method. FLTK will then initiate
+the system wide drag'n'drop handling. Dropped data will be marked as text.
+
FLTK calls this to print a normal error message. You can
diff --git a/documentation/enumerations.html b/documentation/enumerations.html
index 24b90f94e..9651a9e22 100644
--- a/documentation/enumerations.html
+++ b/documentation/enumerations.html
@@ -41,6 +41,11 @@ understand) occurred (0).
clipboard.
FL_SELECTIONCLEAR - The widget should clear any selections
made for the clipboard.
+FL_MOUSEWHEEL - The horizontal or vertical mousewheel was turned.
+FL_DND_ENTER - The mouse pointer entered a widget dragging data.
+FL_DND_DRAG - The mouse pointer was moved dragging data.
+FL_DND_LEAVE - The mouse pointer left a widget still dragging data.
+FL_DND_RELEASE - Dragged data is about to be dropped.
The following constants determine when a callback is performed:
diff --git a/documentation/events.html b/documentation/events.html
index a742d69f4..c9921f818 100644
--- a/documentation/events.html
+++ b/documentation/events.html
@@ -217,6 +217,30 @@ widget. This indicates that some other widget or program has
claimed the selection. Motif programs used this to clear the
selection indication. Most modern programs ignore this.
+
+
+FL_DND_ENTER
+
+The mouse has been moved to point at this widget. A widget
+that is interested in receiving drag'n'drop data must return 1
+to receive FL_DND_DRAG, FL_DND_LEAVE and FL_DND_RELEASE events.
+
+
FL_DND_DRAG
+
+The mouse has been moved inside a widget while dragging data.
+A widget that is interested in receiving drag'n'drop data should
+indicate the possible drop position.
+
+
FL_DND_LEAVE
+
+The mouse has moved out of the widget.
+
+
FL_DND_RELEASE
+
+The user has released the mouse button dropping data into
+the widget. If the widget returns 1, it will receive the data in
+the immediatly following FL_PASTE event.
+
FLTK keeps the information about the most recent event in
diff --git a/documentation/osissues.html b/documentation/osissues.html
index 99af09039..8bb37368c 100644
--- a/documentation/osissues.html
+++ b/documentation/osissues.html
@@ -595,6 +595,8 @@ version of FLTK:
Line styles are not well supported. This is due to
limitations in the QuickDraw interface.
+ File descriptors are not yet supported.
+ Drag'n'drop is not yet supported.
diff --git a/documentation/subclassing.html b/documentation/subclassing.html
index 5b1f69e0f..7e3cbf126 100644
--- a/documentation/subclassing.html
+++ b/documentation/subclassing.html
@@ -362,6 +362,7 @@ positions you might want to call child->draw_label(x,y,w,h,a).
should call this on all the children if your own damage is equal to
FL_DAMAGE_CHILD. Nothing is done if the child is not visible()
or if it is clipped.
+
Cut and Paste Support
FLTK provides routines to cut and paste 8-bit text (in the future this
may be UTF-8) between applications:
@@ -372,6 +373,24 @@ may be UTF-8) between applications:
It may be possible to cut/paste non-text data by using
Fl::add_handler().
+
+Drag And Drop Support
+
+FLTK provides routines to drag and drop 8-bit text between applications:
+
+Drag'n'drop operations are are initiated by copying data to the
+clipboard and calling the function
+Fl::dnd().
+
+
Drop attempts are handled via events:
+
+- FL_DND_ENTER
+- FL_DND_DRAG
+- FL_DND_LEAVE
+- FL_DND_RELEASE
+- FL_PASTE
+
+
Making a subclass of Fl_Window
You may want your widget to be a subclass of
--
cgit v1.2.3