summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2002-02-24 21:09:51 +0000
committerMatthias Melcher <fltk@matthiasm.com>2002-02-24 21:09:51 +0000
commit2cde58f966908851c8d97ee442cdbf825c180899 (patch)
treecd71c3ec57878cd4accc902b7c1795a850ef0d55
parent4603756ed1284dfc9d71a556976f4f5b898abd24 (diff)
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
-rw-r--r--documentation/Fl.html7
-rw-r--r--documentation/enumerations.html5
-rw-r--r--documentation/events.html24
-rw-r--r--documentation/osissues.html2
-rw-r--r--documentation/subclassing.html19
5 files changed, 57 insertions, 0 deletions
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.</P>
<LI><A HREF="#Fl.damage">damage</A></LI>
<LI><A HREF="#Fl.default_atclose">default_atclose</A></LI>
<LI><A HREF="#Fl.display">display</A></LI>
+ <LI><A HREF="#Fl.dnd">dnd</A></LI>
<LI><A HREF="#Fl.error">error</A></LI>
<LI><A HREF="#Fl.event">event</A></LI>
<LI><A HREF="#Fl.event_alt">event_alt</A></LI>
@@ -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.
+<H4><A NAME="Fl.dnd">int dnd();</A></H4>
+
+<P>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 <i>text</i>.
+
<H4><A NAME="Fl.error">void (*error)(const char*, ...);</A></H4>
<P>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).</LI>
clipboard. </LI>
<LI><TT>FL_SELECTIONCLEAR</TT> - The widget should clear any selections
made for the clipboard. </LI>
+<LI><TT>FL_MOUSEWHEEL</TT> - The horizontal or vertical mousewheel was turned. </LI>
+<LI><TT>FL_DND_ENTER</TT> - The mouse pointer entered a widget dragging data. </LI>
+<LI><TT>FL_DND_DRAG</TT> - The mouse pointer was moved dragging data. </LI>
+<LI><TT>FL_DND_LEAVE</TT> - The mouse pointer left a widget still dragging data. </LI>
+<LI><TT>FL_DND_RELEASE</TT> - Dragged data is about to be dropped. </LI>
</UL>
<H2><a name=when>Callback &quot;When&quot; Conditions</A></H2>
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.
+<H2><A NAME="dnd">Drag And Drop Events</A></H2>
+
+<H3>FL_DND_ENTER</H3>
+
+<P>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.
+
+<H3>FL_DND_DRAG</H3>
+
+<P>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.
+
+<H3>FL_DND_LEAVE</H3>
+
+<P>The mouse has moved out of the widget.
+
+<H3>FL_DND_RELEASE</H3>
+
+<P>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.
+
<H2><A name="event_xxx">Fl::event_*() methods</A></H2>
<P>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:
<LI>Line styles are not well supported. This is due to
limitations in the QuickDraw interface.</LI>
+ <LI>File descriptors are not yet supported.</LI>
+ <LI>Drag'n'drop is not yet supported.</LI>
</UL>
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 <TT>child-&gt;draw_label(x,y,w,h,a)</TT>.
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 <TT>visible()</TT>
or if it is clipped.
+
<H2>Cut and Paste Support</H2>
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:
</UL>
It may be possible to cut/paste non-text data by using <A href=osissues.html#add_handler>
<TT>Fl::add_handler()</TT></A>.
+
+<H2>Drag And Drop Support</H2>
+
+FLTK provides routines to drag and drop 8-bit text between applications:
+
+<P>Drag'n'drop operations are are initiated by copying data to the
+clipboard and calling the function
+<A href="Fl.html#Fl.dnd"><TT>Fl::dnd()</TT></A>.
+
+<P>Drop attempts are handled via <A href="events.html#dnd">events</A>:
+<UL>
+<LI><TT>FL_DND_ENTER</TT></LI>
+<LI><TT>FL_DND_DRAG</TT></LI>
+<LI><TT>FL_DND_LEAVE</TT></LI>
+<LI><TT>FL_DND_RELEASE</TT></LI>
+<LI><TT>FL_PASTE</TT></LI>
+</UL>
+
<H2>Making a subclass of Fl_Window</H2>
<P>You may want your widget to be a subclass of